androidgpsaltitude

Negative altitude value


I am getting negative altitude value when finding latitude , longitude and altitude. Can anyone help me to find the reason for it ?


Solution

  • Negative latitude and longitude values are to be expected. Since latitude is calculated from the equator, everything in the southern hemisphere will be negative. Same goes for longitude and the prime meridian, heading west from there is negative until you've gone halfway around the planet.

    However, altitudes can also be negative because it's possible to be below the zero-altitude level. Short of seeing the code which produces your values, there's not much to be offered beyond general knowledge of how it works, so I'll cover that below.

    GPS altitudes generally use a geodetic model for an idealised sea level (the zero altitude), basically mapping an ellipsoid onto the (less-than-perfectly-shaped) planet, which varies anyway with things such as lunar tidal forces. See WGS84 here for more details.

    The normal error expected is about +/- 15m, and this only applies about 95% of the time. According to the specs, the other 5% can have an altitude of any value.

    And, of course, if your GPS doesn't have an unobstructed pathway between it and the satellites, the error range may be greater.

    These potential errors are no doubt why aircraft rely on altimeters, ILS (instrument landing systems), or radar/laser ground reflections, for their near-ground activities. Or, preferably, all of those methods so that you can ignore outliers.

    As one site puts it:

    What this means is that if you are walking on the seashore and see your altitude as -15 meters, you should not be too concerned.

    Of course, if you're having troubles breathing, you may want to look more closely at how wet you are :-)