To compensate for altitude you could use the equations of the ISA
(International Standard Atmosphere). According to ISA, pressure as a
function of altitude is given by:
P = P0*(1 - L*H/T0)^((g*M)/(R*L))
where,
H = (6356*Z)/(6356+Z) [km]
Z = altitude of your barometer [km]
P0 = 101325 [Pa] (sea-level std. pressure)
T0 = 288.15 [K]
g = 9.80665 [m/sec2]
L = 6.5 [K/km]
R = 8.31432 [J/ mol*K]
M = 28.9644 [g/mol]
To calculate the difference in pressure due to altitude, subtract the
standard pressure at altitude (using the above formula) from standard
sea-level pressure (i.e. P0). Now add this to the actual pressure you
measured at altitude (station-pressure). This will give a pressure
"corrected to sea-level".
As for temperature and gravity, I think this has to do more with the
specific characteristics of the barometer you are using so I can't
really comment on it. (A mercury barometer would probably feel the
effects of temperature and gravity). It is true that the acceleration
due to gravity changes as you move away from the earth but I don't
think the change is large enough to be of significance in this
calculation (it's not accounted for in the ISA formula).
I'm no meteorologist, so all this might be way-off, but I did build a
electronic weather station so I have done this type of calculation and
it seems to work out alright. (note: the pressure sensor on my weather
station was a semiconductor device). |