I didn't think this would be so hard... but gezz! I'm not sure if this is more of a math question than an excel question, but since my weapon of choice is Excel I thought I'd give this a try.
I have been searching and searching for a formula that will derive the distance between two latitude longitude points.
My data is in the following format:
Lat Long
Origin: 44.844263 -92.914803
Destination: 44.822075 -92.912498
I have tried using the following formulas, which I found online, but it is clear I am using them incorrectly.
:::::Haversine formula:::::
R = earth’s radius (mean radius = 6,371km)
difflat = lat2 - lat1
difflong = long2 - long1
a = sin²(difflat/2) + cos(lat1) x cos(lat2) x sin²(diflong/2)
c = 2 x atan2(sqrt(a), sqrt(1-a))
d = R x c
:::::Spherical law of cosines:::::
d = acos(sin(lat1).sin(lat2)+cos(lat1).cos(lat2).cos(long2−long1)).R
If anyone can help me out with this I sure would appreciate it. I've already wasted hours trying to figure this out.
Thanks!
I have been searching and searching for a formula that will derive the distance between two latitude longitude points.
My data is in the following format:
Lat Long
Origin: 44.844263 -92.914803
Destination: 44.822075 -92.912498
I have tried using the following formulas, which I found online, but it is clear I am using them incorrectly.
:::::Haversine formula:::::
R = earth’s radius (mean radius = 6,371km)
difflat = lat2 - lat1
difflong = long2 - long1
a = sin²(difflat/2) + cos(lat1) x cos(lat2) x sin²(diflong/2)
c = 2 x atan2(sqrt(a), sqrt(1-a))
d = R x c
:::::Spherical law of cosines:::::
d = acos(sin(lat1).sin(lat2)+cos(lat1).cos(lat2).cos(long2−long1)).R
If anyone can help me out with this I sure would appreciate it. I've already wasted hours trying to figure this out.
Thanks!