Thursday, April 29, 2010

Altitude, From Math to Reality

Raw info from Android's GPS API is good for determining position. Not so good for determining altitude!

Why not? Well, there is a difference between a perfect mathematical model of earth which GPS service uses to calculate altitude and the real shape of the earth. First one uses a Geoid which represents Earth as a perfect, slightly squished sphere to calculate altitude based on GPS time signals. As for us, we measure altitude from mean sea level. But this changes from point to point on earth, dues to gravitational differences (e.g. Earth is thicker on equator then it would be in Europe) and is represented by an Eclipsoid.

The first part is to eliminate the difference between this two to get ab accurate reading (not yet counting satellite time signal margin of error, but that is a problem for another time).

Now, after some searching, this is the most helpful project (GeoidEval) with an online utility (or data and code to process the information offline) which takes Earth's gravity model EGM84, extrapolates it for a provided coordinate and calculates the hight of Eclipsoid above the WGS84 Geoid, used in the GPS measurements, allowing us to correct the data accordingly:

The first image was render using raw data, where the second one was render using data corrected with the Geoid-Eclipsoid difference.

You might also notice that, while starting point is on the surface, there is a parth of path missing (looks like it's just under the surface) and the and point appears to be just over the surface! This is withing the (2-8 meters of error due to rapid movement and changing of satellites mid flight), but is still as such a much more accurate and usable representation of altitude.

No comments:

Post a Comment