How to calculate Altitude
from GPS Latitude and Longitude values.What is the exact mathematical equation to solve this problem.

- 585
- 5
- 14
-
For what do you need that for? – AlexWien Aug 22 '16 at 18:04
-
To avoid confusion you should ask "How to calculate MSL using GPS latitude and longitude". Altitude could be interpreted as AGL or Above Ground Level" which is not possible to know from the GPS coordinates along and will require additional mapping data to tell you the attitude above the ground. MSL, on the other hand, can be computed. I wish I could tell you how but I my self am looking for just that answer too. – ra9r Dec 19 '17 at 00:01
3 Answers
It is possible for a given lat,lon to determine the height of the ground (above sea level, or above Referenz Elipsoid). But since the earth surface, mountains, etc, do not follow a mathematic formula, there are Laser scans, performed by Satelites, that measured such a height for e.g every 30 meters. So there exist files where you can lookup such a height. This is called a Digital Elevation Modell, or short (DEM) Read more here: https://en.wikipedia.org/wiki/Digital_elevation_model
Such files are huge, very few application use that approach. Many just take the altidude value as delivered by the GPS receiver.

- 28,470
- 6
- 53
- 83
You can find some charts with altitude data, like Maptech's. Each pixel has a corresponding lat, long, alt/depth information. As @AlexWien said these files are huge and most of them must be bought.
If you are interest of using these files I can help you with a C++ code to read them.

- 81
- 2
- 7
-
Hey AlexWien @AlexWien , I would like to talk to you. Can you send me an e-mail, please? – Tatiana Perere Aug 22 '16 at 19:49