Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Distance calculation by lattitude/longitude
Message
From
23/09/2005 08:19:52
Neil Mc Donald
Cencom Systems P/L
The Sun, Australia
 
 
To
23/09/2005 05:24:48
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01052304
Message ID:
01052330
Views:
8
Hi,

The great circle distance (D) between any two points P and A on the sphere is calculated with the following formula:
cos D = (sin p sin a) + (cos p cos a cos |dl|)
p and a are the latitudes of P and A
|dl| is the absolute value of the difference in longitude between P and A

Calculate the great circle distance between Paris (P) and Austin (A):
Paris, France (48° 52' N, 02° 20' E)
Austin, Texas (30° 16' 09" N, 97° 44' 37" W)

1. Convert to decimal degrees:
Paris: 48.87° N, 02.33° E
Austin: 30.27° N, 97.74° W

2. cos D = [sin(48.87) * sin(30.27)] + [cos(48.87) * cos(30.27) * cos(|-97.74 - 2.33|)]
3. cos D = [0.753 * 0.504] + [0.658 * 0.864 * -0.174] = 0.281
4. D = cos-1 (0.281) = 73.68°
5. D = 73.68° * 111.23 kilometers/degree = 8,195.44 kilometers (5,092.03 miles)
Regards N Mc Donald
Previous
Reply
Map
View

Click here to load this message in the networking platform