I am trying to calculate the distance between two points using latitude longitude and height (height).
I used the euclidean formula to get my distance:
D=√((Long1-Long2)²+(Lat1-Lat2)²+(Alt1-Alt2)²)
My points are geographic coordinates, and the flight altitude is my altitude. I have only lat and lng, I use GOOGLE API height to get my height.
I am developing an application that calculates my distance traveled (on my skis). Each application that I used gets a distance with height enabled. Like #Endomondo or #Garmin, I cannot get my distance in 2D space because the true distances will be different from the ones I returned.
Which formula would be best to calculate my distance? Of course, with the height included.
I am writing my application in Python using PostGis.
source
share