Garmin Tips and Tricks #22
GPS Altitude
Keith Thomassen, PhD, CFII

The position solution from your GPS receiver locates you at a point in space above the earth. This position determination has a very high lateral (lat-lon) and vertical accuracy. As such, GPS altitude used with a terrain database stored in the unit creates an accurate terrain awareness map.  Such maps could not be made using baro-altitude because of the inherent errors in altitude determined using the local pressure at your aircraft and a barometric model, the Standard Atmospheric Model, which gives errors of hundreds of feet and more. A terrain awareness map is essentially a colored map showing your height relative to terrain around you, and red areas (stay away) are from 100 ft below you and above. The 1000’ below that are in yellow (warning) so beware.
To be useful to us for navigation, vertical position needs to be given as MSL altitude, and it is. But what is MSL? Denver International is 5433’ above mean sea level.  What sea? The various seas of the earth are at different heights, and there is no common mean sea level to define MSL. The Pacific ocean at one end of the Panama Canal is 8 inches higher than the Atlantic ocean on the other side. So, Denver is 5433’ above what? Turns out, it is 5433’ above the earths’ geoid surface (definition coming).
Specifying a height implies a surface from which you measure.  There is the topological surface of the earth to specify AGL, and you may have heard of the WGS84 (World Geodetic System) reference surface. The WGS84 system is the reference coordinate system used by the Global Positioning System; it features an ellipsoidal surface that approximates the MSL surface of the earth, and it’s a pretty good approximation.  The errors are in tens of meters, compared to about 3.2 million meters for the earth radius! Figure 1 shows the WGS84 ellipsoid dimensions. The equatorial bulge is from the centrifugal force of the spinning earth.  There’s a 22 km difference in radius between the poles and the equator.

wgs 84 ellipsoid

Figure 1.  The WGS84 ellipsoidal surface, approximating the MSL surface of the earth and bulging at the equator.

So what is the geoid surface? Geodesy is a branch of applied mathematics and earth sciences that deals with the measurement and representation of the earth, including its gravitational field. On the so-called “geoid” surface of the earth the gravitational force is constant. But you could make a nested set of surfaces surrounding the earth at various heights on which the gravitational force is constant (and decreasing as the square of the height from earth center), but only the geoid surface coincides with the (mean) level of each sea. 
Those levels on each sea are different because there are different materials with different mass densities within the core of the earth.  If the earth were a perfect sphere but the density of material inside varied from place to place, the gravitational force on the surface would not be constant even though the surface is at a constant radius from the center. The geoid would not be a sphere.
Now we can talk about how your GPS calculates your MSL altitude from your 3D position. First it determines your HAE altitude, or Height Above the Ellipsoid. Your HAE altitude is a simple calculation, using your 3D position and the mathematical 3D surface of the ellipsoid.  By the way, the HAE altitudes of each airport where there are GPS approaches are in the database for direct comparison with your HAE altitude on approach.
Now, we defined the earths’ geoid in terms of a surface of constant gravitational force.  One way to determine the location of that surface at your position is to make a map of its height above or below the WGS84 surface.  That distance is called the geoid separation, or geoid height, and I said that the difference is only tens of meters.  The geoid height around the world varies from -70 m to +110 m, and in the US that variation is from -7 m to -35 m.  We are below the HAE surface by amounts shown on the map in Figure 2.

earth's geoid

Figure 2. The Geoid height map for the US, showing that MSL ranges from 7 m to 35 m lower than the WGS84 surface.  Note the big drop in the oceans (water is much less dense than rock).

So, as a final step in the process, there is a database of the local geoid height in your GPS, much like there is a database of terrain values. That height correction is applied to the HAE altitude where you are to give your local MSL altitude.  As Paul Harvey used to say, “now you know the rest of the story”.