|
From: | Helge Walle |
Subject: | Re: [Paparazzi-devel] Fwd: Barometric altitude measurements. |
Date: | Mon, 30 Sep 2013 16:47:34 +0200 |
Hi Helge,I don't think it's a good idea to do the altitude and offset calculation directly in each baro driver.Serveral reasons: then you have to re-implement the same thing for each baro sensor and it makes it harder to fuse with other data to get better precision/update rate and also estimate the (changing) baro pressure offset (QFE).In the baro_abi branch/pull request we mostly cleaned this up. Every baro sensor just publishes the absolute pressure (in Pascal) and then in the INS this is converted to altitude (taking pressure at field level QFE) using the barometric pressure formula. Then this can also be fused with other sensors and the baro offset can be tracked (e.g. using sonar or GPS).While this already works well and was also tested in flight, some more tests and feedback (e.g. how to handle the configuration in a nice way) would be very much appreciated.Also for some of the older analog baro sensors the scale/sensitivity of raw measurements to Pascal has not been confirmed yet (but is confirmed for e.g. ms5611, bmp, mpl3115, ..)Cheers, FelixOn Mon, Sep 30, 2013 at 10:14 AM, Helge Walle <address@hidden> wrote:
Hi,
Hopefully this will be of interest.
I wanted to use my BMP085 pressure sensor for "true" altitude measurements. So I added some code to the baro_bmp files. It can be found on branch skyw-fw on my github fork https://github.com/HWal/paparazzi/tree/skyw-fw .
On power-up the altimeter is initialized on airfield ground level, with local pressure and temperature, taking into account GROUND_ALT from the flight plan. After init, press and temp are reduced to Mean Sea Level. Calculations are based on the barometric formula http://en.wikipedia.org/wiki/Barometric_formula.
The altitude of our airfield is a known value of 61m above MSL.
I added a new message BMP_ALTITUDE. Currently the message shows some values that doesn't change. I will remove these.
I did a couple of test flights. The graphs, from one of the flights, shows GPS altitude (blue), "true" altitude (red) and ISA pressure altitude (green).
With the day's press and temp, the pressure altitude deviated from "true" altitude by more than 20m. This figure would of course be continously changing, often to a greater value. But unless there is a weather front coming, it should change little within an hour or so.
The plot from the flight shows that the GPS altitude and "true" altitude falls together relatively well most of the time. Which of them is the most correct I can not tell.
The zoomed parts of the plot show that the BMP altitude while stationary on the airfield shows almost the same value before and after flight. This should prove that the local temp and pressure changed very little during that flight.
Comments and corrections are of course very welcome. I suppose the altimeter could be made better with more careful programming, a better sensor, filtering etc.
Messages window http://imgur.com/PA3DwFt
Plot start of flight http://imgur.com/glKRe8k
Zoom mid flight http://imgur.com/jf66fUf
End of flight http://imgur.com/A7nUPzt
Whole flight http://imgur.com/zfdTRb8
Helge.
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
[Prev in Thread] | Current Thread | [Next in Thread] |