On Sun, 2007-01-21 at 18:19 +0100, Roy Vegard Ovesen wrote: > What I'm asking for is an equation to convert from pressure altitude to ASL > altitude. Something like > ASL_alt = f(pressure_alt, ref_pressure) >
In an off-list note I indicated that what Roy is looking for is the differential of the height function and that I would try to compute this. We know h(P, Pr) = a(1-(P/Pr)^g) where a and g are known constants, h = height, P = static pressure, and Pr = reference pressure. This is what the altimeter does, If Pr = altimeter settings, then h(P, Pr) = ASL_alt and h(P, Po) = pressure altitude if Po = 29.92 inhg. So ASL_alt = h(P, Pr) - h(P, Po) + pressure altitude. h(P, Pr) - h(P, Po) ~= (Partial of h w.r.t. Pr)*(Pr - Po). The partial is at Pr = Po = 29.92 inhg and still varies with the static pressure P. The formula for the partial at (P, Po) is (a*g/Po)(P/Po)^g. So ASL_alt = pressure altitude + [(a*g/Po)(P/Po)^g]*(Pr - Po). This only takes one call to pow compared to two calls to pow w/o the differential approximation saving both an exp and ln call. I will program this in nasal and send it to Roy for checking. The dependence on P is not very strong. The term a*g/Po is constant and P only varies from about 28 to 32 inhg. Over this range, the partial varies from 913 to 931 and is 924.87 at P = 29.92. This agrees with a rule of thumb taught in many ground school classes which states delta h = 1000*(P2 - P1). If we used a constant 925 (no call to pow) for the partial derivative, I don't think we would notice the error in the altAlert. Or we could evaluate the partial "exactly" at (P, Po) with just one call to pow. It is easy to do both and compare the results with the non differential version of altAlert. Regards, -- Dave Perry <[EMAIL PROTECTED]> ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel