Weather Software > Station Software Development

Barometric Pressure to Altimeter

(1/5) > >>

iisfaq:
I have been looking at converting my Barometric Pressure from my Davis Vantage Pro II to Altimeter.

I have found two formulas online

* Davis - http://www.davisnet.com/product_documents/weather/app_notes/AN_28-derived-weather-variables.pdf
* NOAA - http://www.wrh.noaa.gov/slc/projects/wxcalc/formulas/altimeterSetting.pdf

Here is the Davis formula:

A = (P^N + K*Z)^(1/N), where P is the raw station pressure (in. Hg), N = 0.1903, K = 1.313E -5, Z is elevation (feet).

Now Raw Station Pressure? Is this barometric presssure?

Davis in the same document above says

"
and facilitate comparison between locations with different altitudes, atmospheric pressure is generally adjusted to the equivalent sea-level pressure. This
adjusted pressure is known as barometric pressure.
"

The NOAA formula is quite involved so I will leave it out.

NOAA says station pressure (P) in millibars and a station elevation (h) in feet are given.

I used the following inputs for both formula

StationElevationInFeet = 100;
StationPressureInMB = 30.36;

Results:

Davis = 30.469582103235
NOAA = 30.7628829410821

Which is more accurate?

Does anyone have any raw data showing Altimeter, Elevation and Pressure that I could use to compare?

Chris

WeatherBeacon:

You're doing something wrong when using the NOAA formula.

To 10 digits, I get:

* 30.46958209 from the Davis formula, and

* 30.46072921 from the NOAA formula.

The difference is less than 0.03%.

I cannot know how you obtained 30.762882... without seeing how you did your calculation.

Despite how ugly the NOAA formula looks, the relationship between altimeter and pressure is nearly linear. The Davis formula is an accurate simplification to the NOAA formula.

iisfaq:

--- Quote from: WeatherBeacon on July 02, 2011, 01:16:56 AM ---
* 30.46958209 from the Davis formula, and

* 30.46072921 from the NOAA formula.

The difference is less than 0.03%.

--- End quote ---

Here is the formula from NOAA

and this is the source code in C# that I created

--- Code: ---double StationElevationInFeet = 100;
double StationPressureInMB = 30.36;

double StationAltimeterInMBNOAA_A = ((Math.Pow(1013.25, 0.190284) * 0.0065) / 288);
double StationAltimeterInMBNOAA_B = (StationElevationInFeet / Math.Pow(StationPressureInMB - 0.3, 0.190284));
double StationAltimeterInMBNOAA = (StationPressureInMB - 0.3) * Math.Pow(1 + (StationAltimeterInMBNOAA_A * StationAltimeterInMBNOAA_B), (1 / 0.190284));

--- End code ---

I will check my code again - did you have your own code for the data you replied with?

One thing in their fomula confused me was this

That formula looks odd

How do you convert meters to feet by that foruma? More like it converts feet to meters.

Chris

WeatherBeacon:

--- Quote from: iisfaq on July 02, 2011, 02:26:09 AM ---
--- Quote from: WeatherBeacon on July 02, 2011, 01:16:56 AM ---
* 30.46958209 from the Davis formula, and

* 30.46072921 from the NOAA formula.

The difference is less than 0.03%.

--- End quote ---

Here is the formula from NOAA

. . .

and this is the source code in C# that I created

. . .

I will check my code again - did you have your own code for the data you replied with?

Chris

--- End quote ---

Those are the formulas I used. (I just used a calculator.) Did you convert 30.36 (inHg) to mbar? The NOAA formula expects pressure to be entered in mbars, but you're using 30.35 inHg. So in the NOAA formula, you should multiply pressure by 33.8639:

P(mb)  =  33.8639 * P(inHg)

iisfaq:

--- Quote from: WeatherBeacon on July 02, 2011, 02:42:56 AM ---P(mb)  =  33.8639 * P(inHg)

--- End quote ---

Thanks for that - I did not do that. But I still get the wrong value.

Also looking at the formula what is Pm ?

I took it as Pmb

sorry to be a pain but can you take me through the steps you did on the calculator?

This was why I broke the code down with an _A and _B variable.

can you let me know the value you used for Hm (which should be in feet not meters?)

So given the following input

Elevation = 100Feet
Pressure = 1028.108004

My result I get now is 1040.0240773634553mb or 30.711in

chris