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