February 21, 200719 yr 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..." Jan "Beatus ille qui procul negotiis..."
February 21, 200719 yr 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..." Jan "Beatus ille qui procul negotiis..."
February 21, 200719 yr 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
February 21, 200719 yr 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..." Jan "Beatus ille qui procul negotiis..."
February 22, 200719 yr Author Commercial Member Or you could just use PRESSURE ALTITUDE. Ed Wilson Mindstar AviationMy Playland - I69
February 22, 200719 yr 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..." Jan "Beatus ille qui procul negotiis..."
February 22, 200719 yr Author Commercial Member 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)) Ed Wilson Mindstar AviationMy Playland - I69
February 22, 200719 yr Author Commercial Member "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. Ed Wilson Mindstar AviationMy Playland - I69
February 22, 200719 yr 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..." Jan "Beatus ille qui procul negotiis..."
February 22, 200719 yr Author Commercial Member 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. ;) Ed Wilson Mindstar AviationMy Playland - I69
Create an account or sign in to comment