Author Topic: Barometric Pressure to Altimeter  (Read 25899 times)

0 Members and 1 Guest are viewing this topic.

Offline iisfaq

  • Christchurch Weather Live
  • Senior Contributor
  • ****
  • Posts: 216
    • Christchurch Weather Live
Barometric Pressure to Altimeter
« on: July 01, 2011, 11:30:14 PM »
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
« Last Edit: July 02, 2011, 12:47:20 AM by iisfaq »

Offline WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Re: Barometric Pressure to Altimeter
« Reply #1 on: July 02, 2011, 01:16:56 AM »

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.
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3

Offline iisfaq

  • Christchurch Weather Live
  • Senior Contributor
  • ****
  • Posts: 216
    • Christchurch Weather Live
Re: Barometric Pressure to Altimeter
« Reply #2 on: July 02, 2011, 02:26:09 AM »
  • 30.46958209 from the Davis formula, and
  • 30.46072921 from the NOAA formula.

The difference is less than 0.03%.

Here is the formula from NOAA



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

Code: [Select]
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));

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
« Last Edit: July 02, 2011, 02:35:00 AM by iisfaq »

Offline WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Re: Barometric Pressure to Altimeter
« Reply #3 on: July 02, 2011, 02:42:56 AM »
  • 30.46958209 from the Davis formula, and
  • 30.46072921 from the NOAA formula.

The difference is less than 0.03%.

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

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)
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3

Offline iisfaq

  • Christchurch Weather Live
  • Senior Contributor
  • ****
  • Posts: 216
    • Christchurch Weather Live
Re: Barometric Pressure to Altimeter
« Reply #4 on: July 02, 2011, 03:00:46 AM »
P(mb)  =  33.8639 * P(inHg)

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

Offline WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Re: Barometric Pressure to Altimeter
« Reply #5 on: July 02, 2011, 03:45:00 AM »

I'll have to look at your code tomorrow [way past my bed time right now].

I think the main point, though, is that you can trust the simpler Davis formula. It is accurate, and simpler formulas mean there's a reduced chance of making human error.
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3

Offline iisfaq

  • Christchurch Weather Live
  • Senior Contributor
  • ****
  • Posts: 216
    • Christchurch Weather Live
Re: Barometric Pressure to Altimeter
« Reply #6 on: July 02, 2011, 04:20:40 AM »

[way past my bed time right now].


No worries - thans for your help....

Still early here (New Zealand) -- 8pm on Saturday night


Offline wuhu_software

  • Forecaster
  • *****
  • Posts: 689
    • WUHU Software Yahoo Group
Re: Barometric Pressure to Altimeter
« Reply #7 on: July 02, 2011, 09:12:41 AM »

Steve at SoftWx (maker of VirtualVP and VPLive) posted this Delphi source code:

http://www.softwx.com/weather/uwxutils.html

Offline WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Re: Barometric Pressure to Altimeter
« Reply #8 on: July 02, 2011, 03:54:04 PM »
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?

I think "raw station pressure" means the actual [absolute] pressure unadjusted to elevation above sea level.

From NOAA (sorry... I know you're in NZ):

Quote
STATION PRESSURE: This is the pressure that is observed at a specific elevation and is the true barometric pressure of a location. It is the pressure exerted by the atmosphere at a point as a result of gravity acting upon the "column" of air that lies directly above the point. Consequently, higher elevations above sea level experience lower pressure since there is less atmosphere on which gravity can act. Put another way, the weight of the atmosphere decreases as one increases in elevation. Consequently then, in general, for every thousand feet of elevation gain, the pressure drops about 1 inch of mercury. For example, locations near 5000 feet (about 1500 meters) above mean sea level normally have pressures on the order of 24 inches of mercury.

ALTIMETER SETTING: This is the pressure reading most commonly heard in radio and television broadcasts. It is not the true barometric pressure at a station. Instead it is the pressure "reduced" to mean sea level using the temperature profile of the "standard" atmosphere, which is representative of average conditions over the United States at 40 degrees north latitude. The altimeter setting is the pressure value to which an aircraft altimeter scale is set so that it will indicate the altitude (above mean sea level) of the aircraft on the ground at the location for which the pressure value was determined. The altimeter setting is an attempt to remove elevation effects from pressure readings using "standard" conditions.

MEAN SEA LEVEL PRESSURE: This is the pressure reading most commonly used by meteorologists to track weather systems at the surface. Like altimeter setting, it is a "reduced" pressure which uses observed conditions rather than "standard" conditions to remove the effects of elevation from pressure readings. This reduction estimates the pressure that would exist at sea level at a point directly below the station using a temperature profile based on temperatures that actually exist at the station. In practice the temperature used in the reduction is a mean temperature for the preceding twelve hours. Mean sea level pressure should be used with caution at high elevations as temperatures can have a very profound effect on the reduced pressures, sometimes giving rise to fictitious pressure patterns and anomalous mean sea level pressure values.

Source:  http://www.crh.noaa.gov/bou/awebphp/definitions_pressure.php

Are you sure the VP2 isn't already giving you the pressure adjusted to sea level? If you entered your elevation, I think the VP2 gives the pressure adjusted to sea level and not the raw [absolute] station pressure.
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3

Offline WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Re: Barometric Pressure to Altimeter
« Reply #9 on: July 02, 2011, 04:55:10 PM »

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

That's the correct formula for converting feet to meters.

To convert meters to feet, just divide meters by 0.3048. Example:

   1200 ft  =  1200 / 0.3048 = 3937 m.

Be sure to understand that the NOAA formula for altitude setting is expecting these as inputs:
  • pressure P to be station pressure [absolute, unadjusted] in mbar,
  • station elevation z to be in meters.

In your original post, you mentioned 30.36 mb. Did you mean 30.36 inHg? Standard atmospheric pressure is 1013.25 mb.

Before looking more closely at your code, I want to make sure we are doing what you really want to do. Altimeter setting is the actual [absolute] atmospheric pressure adjusted to sea level. Your VP2 may already be giving you the pressure adjusted to sea level.
« Last Edit: July 02, 2011, 05:01:29 PM by WeatherBeacon »
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3

Offline Ugly Duckling

  • Senior Contributor
  • ****
  • Posts: 230
  • __Darlin' Jill__
    • Maplewood - Omaha, NE
Re: Barometric Pressure to Altimeter
« Reply #10 on: July 02, 2011, 05:11:45 PM »


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

Chris


Being a pilot I just happened to have a altimeter in front of me.

I can set it to pressure and tell you what altitude it reads or the other way around.

Any help?

Many Happy Weather Changes,

Marci Anna



        Davis Vantage Vue

Offline WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Re: Barometric Pressure to Altimeter
« Reply #11 on: July 02, 2011, 05:48:46 PM »


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

Chris

Being a pilot I just happened to have a altimeter in front of me.

I can set it to pressure and tell you what altitude it reads or the other way around.

Any help?

That's one thing I wondered. . . if Chris really wants a way to calculate altitude from pressure. That is, an altimeter versus altimeter setting or altimeter pressure.
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3

Offline Ugly Duckling

  • Senior Contributor
  • ****
  • Posts: 230
  • __Darlin' Jill__
    • Maplewood - Omaha, NE
Re: Barometric Pressure to Altimeter
« Reply #12 on: July 02, 2011, 05:53:23 PM »


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

Chris

Being a pilot I just happened to have a altimeter in front of me.

I can set it to pressure and tell you what altitude it reads or the other way around.

Any help?

That's one thing I wondered. . . if Chris really wants a way to calculate altitude from pressure. That is, an altimeter versus altimeter setting or altimeter pressure.

Give me the numbers and I'll tell you what my altimeter reads.

Give me your Altitude or pressure or both.

Many Happy Weather Changes,

Marci Anna




        Davis Vantage Vue

Offline WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Re: Barometric Pressure to Altimeter
« Reply #13 on: July 03, 2011, 06:25:08 PM »

So this thread went belly up? I was curious to know the outcome. :-(
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3

Offline Ugly Duckling

  • Senior Contributor
  • ****
  • Posts: 230
  • __Darlin' Jill__
    • Maplewood - Omaha, NE
Re: Barometric Pressure to Altimeter
« Reply #14 on: July 03, 2011, 06:48:09 PM »

So this thread went belly up? I was curious to know the outcome. :-(

I thought they were interested in knowing.

Guess not, The End

Many Happy Weather Changes,
 
Marci Anna




        Davis Vantage Vue

Offline iisfaq

  • Christchurch Weather Live
  • Senior Contributor
  • ****
  • Posts: 216
    • Christchurch Weather Live
Re: Barometric Pressure to Altimeter
« Reply #15 on: July 03, 2011, 08:11:10 PM »
I still can't get the NOAA method to return a value for me that is close to the Davis Method.

Back at work in NZ - Monday Here!

Chris

Offline Ugly Duckling

  • Senior Contributor
  • ****
  • Posts: 230
  • __Darlin' Jill__
    • Maplewood - Omaha, NE
Re: Barometric Pressure to Altimeter
« Reply #16 on: July 03, 2011, 08:18:23 PM »
I still can't get the NOAA method to return a value for me that is close to the Davis Method.

Back at work in NZ - Monday Here!

Chris


Are you still interested in Altimeter pressure to altitude or the other way around?

Happy Monday NZ.

You do know you live in the future. You could probably tell me a lot if you choose to.

Chick with Altimeter.

Many Happy Weather Changes,

Marci Anna



        Davis Vantage Vue

Offline iisfaq

  • Christchurch Weather Live
  • Senior Contributor
  • ****
  • Posts: 216
    • Christchurch Weather Live
Re: Barometric Pressure to Altimeter
« Reply #17 on: July 03, 2011, 09:22:30 PM »
Thanks for the offer "ugly duckling" but I need to work out the NOAA function so I can see what data I have.

Chris

Offline WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Re: Barometric Pressure to Altimeter
« Reply #18 on: July 03, 2011, 11:39:25 PM »
I'll use these notations:
  • Pin to denote a pressure with units of inHg,
  • Pmb to denote a pressure with units of mbar, and
  • z to denote altitude above sea level.

For my sample calculations, I'll use:
  • an absolute [station] pressure of Pin = 30.36 inHg (unadjusted to sea level), and
  • an altitude of z = 100 ft.

Then for both formulas, set
  • N = 0.190284
  • R = 1/N  =  1/0.190284  =  5.255302600



Altimeter Setting using the Davis Formula:

The Davis formula states that station (absolute) pressure should have units of inHg, and altitude z should have units of ft. So
  • Set K = 1.313*10-5
  • Davis Pressure  =  ( PinN + K*z )R
                         =  ( 30.360.190284 + 1.313*10-5*100 )5.255302600
                         =   30.46958209 inHg
  • We may now convert this to mbar:
    Davis Pressure  =  30.46958209 inHg * 33.8639 mb/inHg
                         =  1031.818881 mb
This gives the altimeter setting (barometric pressure adjusted to sea level).



Altimeter Setting using the NOAA Formula:

The NOAA formula states that station (absolute) pressure should have units of mb, and altitude hm (i.e., z) should have units of meters. So
  • Pmb = Pin * 33.8639 mb/inHg  =  30.36 inHg * 33.8639 mb/inHg  =  1028.108004 mb
  • Set hm  =  0.3048 m/ft * z = 0.3048 m/ft * 100 ft  =  30.48 m
  • Set A  =  Pmb - 0.3  =  1028.108004 - 0.3  =  1027.808004
  • Set B  =  ( 1013.25 / A )N
              =  ( 1013.25 / 1027.808004 )0.190284
              =  0.98583587220.190284
              =  0.9972892042
  • Set C  =  B  * 0.0065 * hm / 288
              =  0.9972892042 * 0.0065 * 30.48 / 288
              =  0.0006860518649
  • Set D  =  ( 1 + C )R
              =  1.0006860525.255302600
              =  1.003610678
  • NOAA Pressure  =  A * D  =  1027.808004 * 1.003610678
                    =   1031.519088 mb
This gives the altimeter setting (barometric pressure adjusted to sea level).



The difference between the Davis result and NOAA result is

     | NOAA - DAVIS | / NOAA  * 100%   =   100 * | 1031.519088 - 1031.818881 | / 1031.519088   =   0.029%.

Converted to inHg (divide by 33.8639), these altimeter pressures are:
  • Davis  =  30.46958209 inHg
  • Noaa  = 30.46072921 inHg

DISCLAIMER:  I am not responsible for errors in these formulas. I am merely using the formulas as found in the links provided in the original post.

Regards,

Kevin...
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3

Offline iisfaq

  • Christchurch Weather Live
  • Senior Contributor
  • ****
  • Posts: 216
    • Christchurch Weather Live
Re: Barometric Pressure to Altimeter
« Reply #19 on: July 03, 2011, 11:50:54 PM »
Thanks Kevin

That looks great - I will take a look when I get home from work in a couple of hours.

Cheers

Chris

Offline WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Re: Barometric Pressure to Altimeter
« Reply #20 on: July 04, 2011, 12:28:30 AM »
Thanks Kevin

That looks great - I will take a look when I get home from work in a couple of hours.

Cheers

Chris

Sure thing. I'll be interested in seeing what you're doing.

Regards,

Kevin...
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3

Offline iisfaq

  • Christchurch Weather Live
  • Senior Contributor
  • ****
  • Posts: 216
    • Christchurch Weather Live
Re: Barometric Pressure to Altimeter
« Reply #21 on: July 04, 2011, 04:05:29 AM »
Sure thing. I'll be interested in seeing what you're doing.

Thanks - I now know what is going on - although my ability to process these equations is quite limited for me.

I am writing my own software and having this forumula will help me.

I have a long way to go until my software is complete or usable but every little step is one step further.

My software (for davis vantage pro II) runs as a Windows service since I do not want the system to run as an interactive user. Not sure what problems that will cause down the line but it is starting to look good.

Cheers

Chris

Offline WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Re: Barometric Pressure to Altimeter
« Reply #22 on: July 04, 2011, 06:16:54 PM »
Chris:

I've been doing quite a bit of analysis of the two formulas, and I keep coming up with the same conclusion:  the simpler Davis formula gives results that essentially equal those given by the NOAA formula. (And who's to say the NOAA formula is correct? It isn't, because even it is an approximation based on empirics.)

At an altitude of 5000 ft, for example, the root mean square (RMS) difference between the two formulas on the interval
      23 <=  Pabs  <= 27 inHg
is only about 0.0087. If RMS difference means little to you, then I found that the mean percent difference on that interval is only 0.035%. The latter means that on average, the difference between the two is only 0.035% over that entire interval (less than four-one hundredths of 1%).

At an altitude of 100 ft, the root mean square (RMS) difference between the two formulas on the interval
      28 <=  Pabs  <= 32 inHg
is only about 0.0088. The mean percent difference on that interval is only 0.030%. So on average, the difference between the two is only 0.03% on that entire interval (three-one hundredths of one percent).

Therefore, I recommend using the simpler Davis formula. It is also easier to write code for.
« Last Edit: July 05, 2011, 01:06:00 AM by WeatherBeacon »
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3