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
Quote:
|
=IF(SIN(RADIANS(From Latitude))*SIN(RADIANS(To Latitude))+COS(RADIANS(From Latitude))*COS(RADIANS(To Latitude))*COS(RADIANS(From Longitude)-RADIANS(To Longitude))>1,3963.1*ACOS(1),3963.1*ACOS(SIN(RADIA NS(From Latitude))*SIN(RADIANS(To Latitude))+COS(RADIANS(From Latitude))*COS(RADIANS(To Latitude))*COS(RADIANS(From Longitude)-RADIANS(To Longitude))))
|