Send to a Friend

Solving the Barometric Equation for the standard atmosphere for altitude?
Hi,
Another super-geeky question for the jellies:
I’m trying to come up with a general solution (that I can implement in c on a microcontroller) to solve for the altitude when I only have the pressure.
I only need to solve it in zone 0 (0–36k feet), but the h term is tied up in an exponent, and I can only find the barometric formula solved for pressure. Here’s what I’ve got (imperial, sorry, since I’m solving for feet):
P = 29.92126 * (288.15 / (288.15 * -0.0019812*h))^(-5.225)
But I can’t work out how to extract the h from the 5.225 without taking the 5.225-th root of it, which seems like there should be a simpler way involving log?
I’ve considered just logging the pressure, and then when the data downloads doing a lookup table, but it’d be nice to be able to have the uC flash out it’s current/highest altitude.
Thanks!
Using Fluther
or