View Question
Q: Using latitude, longitude, and altitude to determine distance ( Answered ,   4 Comments )
 Question
 Subject: Using latitude, longitude, and altitude to determine distance Category: Science > Instruments and Methods Asked by: radres-ga List Price: \$10.00 Posted: 07 Apr 2004 10:15 PDT Expires: 07 May 2004 10:15 PDT Question ID: 326655
 Given the latitude, longitude, and altitude above sea level of two points on the globe, what formula can be used to accurately determine the distance between these two points? Request for Question Clarification by leapinglizard-ga on 08 Apr 2004 01:22 PDT Are you asking for the straight-line distance between two points in space? In other words, do you want to know the length of a line segment whose endpoints are specified in polar coordinates? Clarification of Question by radres-ga on 08 Apr 2004 05:48 PDT Here's exactly what I'm trying to do: I have a programmable GPS device that can be set to take GPS reads as often as once every 5 seconds. The GPS read returned has latitude, longitude, and altitude. I want to write a program that when run while driving somewhere, will take a GPS read every 5 seconds and use the sum of the deltas between each 5 second read in order to determine distance traveled. If you think that the length of a line segment between two endpoints specified in polar coordinates would work for this task, then yes. If you don't think it's possible to determine distance via lat, long, and altitude at all, then please explain why not. As I understand it, the Great Circle method won't work because the earth is not a perfect sphere. There are difficulties in mapping the latitude and longitude to specific distances because at different points on the globe, the land is higher or lower so the actual distances can increase or decrease between different points with the same delta. In my own research, I've found many sites that describe the innaccurate Great Circle approach to distance calculations, but in my experience the actual results returned are too inaccurate to be used for my program. I have not been able to find a formula that takes into account altitude which is another parameter my device gives me and I believe may or may not make this program possible. Clarification of Question by radres-ga on 08 Apr 2004 09:57 PDT Here's a device that claims to be able to determine distance from GPS lat, long, and altitude data: http://www.garmin.com/products/forerunner201/
 Subject: Re: Using latitude, longitude, and altitude to determine distance Answered By: leapinglizard-ga on 08 Apr 2004 10:46 PDT Rated:
 radres-ga rated this answer: and gave an additional tip of: \$5.00 Finally got an implementation of this completed, and it works great! Good job leapinglizard!