Unanswered: Formula for straight line distance between two waypoints
Here's an Excel formula for calculating the straightline distance between two waypoints, given the curvature of the earth. I put this together originally to try to determine which of our distribution centers should service which zip codes. It wasn't much use for that application but I have found many other uses for it. There are plenty of sites with zip code lists including lat and long if that is what you want to do. Latitude and longitude values must be in degrees (which is the way you'll usually see them). Just thought it might benefit others. Joshua
Trying to use formula for distances between waypoints.
I am creating an application to calculate the distance between airports. I believe your formula should handle this. I have a spreadsheet with four columns titled: From Latitude, From Longitude, To Latitude, and To Longitude. The fifth column is for Distance.
I plugged your formula into column 5. I get a "VALUE" error. Obviously I'm missing something here, or I have a syntax issue. I have included my first row of waypoints. I know the distance should be about 180 miles. I appreciate your comments.
N58° 43' 42.01",W156° 56' 25.35" and N58° 40' 36.49",W156° 38' 57.18"
I'm attaching a spreadsheet calculator used to calculate the distance between zip codes using their lat/long. You can either set the from/to zip in the top section to see the distance between the two or set the from and look at the zip codes in the bottom section to see how far each is from the "from" zip code. Let me know if you have any other questions. Make sure you are working with degrees or radians as needed. That can be a little confusing.