Sign in to follow this  
WarpD

xml ambient pressure to altitude

Recommended Posts

Hi,Does anyone has a "simple" (xml)formula in stock to calculate altitude from ambient pressure?I know it is a quite complicated thing with density, temperature etc.and it is a sort of parabole.Say :altitude = 0 feet, amb. press. = 15 psialtitude = 18000 feet, amb. press. = 7.5 psialtitude = 100000 feet, amb. press. = 0.0... psiJan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,Found in wikipedia:145426*(1-(((ambient pressure,kpa/101.325)*288.15)/(ambient temperature,C+273.15))^0.325)Seems to work in excelHow do you work with the exp ^ in xml, pow(base,0.325) ?So something like:1 pow( (A:Ambient pressure,kPa) 101.325 / 288.15 * (A:Ambient temperature,kelvin) / , 0.325) - 145426 * ??Some testing at home needed (at work!) Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Jan,145426*(1-(((ambient pressure,kpa/101.325)*288.15)/(ambient temperature,C+273.15))^0.325)One approach in XML:(A:Ambient pressure,kPa) 101.325 / 288.15 * (A:Ambient temperature,kelvin) / 0.325 pow 1 r - 145426 * Tom

Share this post


Link to post
Share on other sites

Tom,Thanks, that looks much better, i'll give it a try tonight.Had no experience with r and pow.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi,May be it is not correct, but pressure altitude reads altitude at 29.92 inHg, and the formula gives quit different values (density altitude)Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Pressure altitude does not read altitude at 29.92... it reads altitude based on actual pressure experienced. However, density altitude is a whole different value. You did not state you wanted the value of density altitude. In that case try this:To calculate you need:OAT (ambient temp, celcius)SAT (standard atmosphere temp, celcius)PA pressure altitudeWith those variables your density altitude is:PA + (120*(OAT-SAT))

Share this post


Link to post
Share on other sites

"Does anyone has a "simple" (xml)formula in stock to calculate altitude from ambient pressure?"That question isn't asking for density altitude.... thus the confusion.

Share this post


Link to post
Share on other sites

Thanks Ed,That is a far more simpler formula.After some more googling found it.I feel comfortable with the density altitude charts for calculating performance, needed runwaylength etc.Just wanted to know some mathematical background and how to implement that in xml.Had no specific things in mind.Still there is an average of about 140 feet difference between the 2 calculations at high altitudes (>20.000 feet)%((A:Ambient temperature,celsius) (A:STANDARD ATM TEMPERATURE,celsius) - 120 * (A:PRESSURE ALTITUDE,feet) + 10 / int 10 *)%!d!%((A:Ambient pressure,kPa) 288.15 * (A:Ambient temperature,kelvin) 101.325 * / 0.235 pow 1 r - 145426 * 10 / int 10 *)%!d!May be something wrong or neglectible(?)Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Your formula does not take into account actual pressure altitude. Which means your formula is assuming that FS accurately models pressure altitude to match real world perfectly.I rarely trust FS to be that accurate in such regard. ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this