Sort:  

I think it works on the same principle that the pressure altimeter used in aircraft uses to determine heights from ground.

Sounds about right!