Given the Latitude and Longtitude of two points, and the radius of the Earth in miles, I need to work out the distance between the two points.
I have been given the calulations
Lat1=52.47758N Lon1=1.90983W
Lat2=50.80029N Lon2=1.08825W
Delta of Lat (Dlat)=Lat2-Lat1
Delta of Lon (Dlon)=Lon2-lon1
a={sin(Dlat/2)}^2 + [cos(lat1) * cos(lat2) * {sin(dlon/2)}^2]
c=2*arcsin(min1,sqrt(a))
d=Radius*c
d being the distance between the two points. I have tried to write this forumla in Foxpro, but I'm getting 5430 miles instead of around 124 miles.
Can anyone help?
Barry Yesterday is history
Tomorrow is a mystery
and todays a gift... ...thats why we call it the present.
I have been given the calulations
Lat1=52.47758N Lon1=1.90983W
Lat2=50.80029N Lon2=1.08825W
Delta of Lat (Dlat)=Lat2-Lat1
Delta of Lon (Dlon)=Lon2-lon1
a={sin(Dlat/2)}^2 + [cos(lat1) * cos(lat2) * {sin(dlon/2)}^2]
c=2*arcsin(min1,sqrt(a))
d=Radius*c
d being the distance between the two points. I have tried to write this forumla in Foxpro, but I'm getting 5430 miles instead of around 124 miles.
Can anyone help?
Barry Yesterday is history
Tomorrow is a mystery
and todays a gift... ...thats why we call it the present.