I have several lat/long readings from a GPS device in excel.
I need to calculate the distance between points. How?
For Latitude, I'm thinking Pi*7900/360*(lat1-lat2)
Longitude must need some sort of correction for latitude, not sure how.
Once i get lat distance and long distance sqrt(lat**2 +long**2)
I need to write this all into excel.
Extra credit question. Is there some way to make this into a excel function so you just give it the the two pairs of readings?
Karl
Didn't find your answer? Ask the community — no account required.
S
Spehro Pefhany
Google "Haversine formula" to get the great circle distance between two points.
formatting link
That assumes the earth is a perfect sphere rather than the more accurate model of an oblate spheroid. If you need more accuracy than that, there are more complex formulas.
Best regards, Spehro Pefhany
W
whoyakidding
I cheat by using the line drawing tool in Google Earth. Can also be used to illustrate LOS between two points. (change line altitude parameters) Very cool.
I'm seeing that as 22 km of "oblative flattening".
You'd have to mike it to tell the difference.
(BIG micrometer)
S
Spehro Pefhany
formatting link
WGS84 is used by GPS, GLONASS,
formatting link
This will get you down to the millimeter level, not micrometer. ;-)
For example, from Toronto to Chicago is 702.9810543723332 km elliptic, but the spherical solution gives only 700.9181433797103 km. That's an error of more than 2,000 meters.. that could put you on the wrong runway or something.
formatting link
Best regards, Spehro Pefhany
T
Tim Wescott
Does GLONASS use WGS84 now? I thought they used some commie system.
C
clare
What altitude are you flying at??? Makes a SMALL difference too.
S
Spehro Pefhany
A VERY small difference in Florida.
Best regards, Spehro Pefhany
J
John B.
Try
formatting link
J
Joe AutoDrill
formatting link
M
Michael A. Terrell
Not if you're flying over 'Sugarloaf Mountain'. ;-)
S
Stanley Schaefer
I've programmed this for checking distances between zip codes using a converison table, there are three formulas depending on what you need for accuracy. Acroos town, the difference between the formulas is like less than a tenth of a mile, it's more significant at longer distances.
What I use: If lat1 lat2 And long1 long2 Then X = (Sin(lat1 / 57.2958) * Sin(lat2 / 57.2958)) + (Cos(lat1 /
57.2958) * Cos(lat2 / 57.2958) * Cos(long2 / 57.2958 - long1 /
57.2958)) Y = Sqr(1 - X ^ 2) miles3 = 3963# * Atn(Y / X) Else miles3 = 0 End If Sensitive to where Lattitude and longitude are equal(same zip codes), hence the check. Also runs a lot longer if you've got thousands of entries to check.
From a tutorial out on the web from about 10 years back. HTH
Stan
S
Spehro Pefhany
I think you're right- it's apparently actually PZ-90. I might have seen a reciever that does the transformation.
Best regards, Spehro Pefhany
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.