Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Great circle distance
Message
From
23/12/1998 16:57:43
 
 
To
23/12/1998 16:32:27
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00170092
Message ID:
00170103
Views:
22
Hi Ken ----

Try the following: (In Km)

Convert longitude and latitude to radians: (long or lat * Pi/180)
theta = lon2 - lon1
dist = acos(sin(lat1) × sin(lat2) + cos(lat1) × cos(lat2) × cos(theta))
if (dist < 0)
dist = dist + pi
endif
dist=dist*6371.2
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform