OK, so we have some understanding of how the atmosphere (in particular pressure) changes with altitude. And we've learned a bit about how pressure sensors work. So how can we use a pressure sensor to determine altitude?

Well, buried in that lovely U.S. Standard Atmosphere document, on page 12, is this sweet little equation 33a:

Bleh! That's a mess. But don't worry, we can simplify this greatly. This is a full form general purpose equation, so includes all the bells and whistles.

To make it a little clearer, here are the pressure (P) and altitude (H) that we are interested in:

Everything else in the equation is a constant - known values that we simply go look up. Here's a run down:

We get R*, g0', and TM,b from Table 2. For our case, TM,b is T0.

We get Hb and LM,b from Table 4.

We are staying within the lowest region of the atmosphere, so b=0.

After a little hunting, we track down M0 in the text.

So, we simply plug in all those values and all that is left is pressure (P) and altitude (H).

But then, one more step. This equation computes pressure for a given altitude, but we want to go the other way - we want to compute altitude for a given pressure. So we need to rearrange the equation.

Here's the end result, after plugging in all those constants and rearranging:

Just plug in pressure P from our pressure sensor and out comes altitude H in meters. Neat!

Someone working at NWS/NOAA probably got tired of answering this one also and put together this little handy cheat sheet: