Filter löschen
Filter löschen

Distance between two points of latitude/longitude

7 Ansichten (letzte 30 Tage)
emily bristow
emily bristow am 4 Jan. 2021
Kommentiert: dpb am 4 Jan. 2021
I need to work out the distance (km) between two points.
The first latitude and longitude is 55 27.58'N 005 01.92'W and the second was taken at 49 58.25'N 008 08.13'W
I did try the latlon1 latlon2 function but I'm not sure if it's giving me the correct distance?
Any advice!
  1 Kommentar
dpb
dpb am 4 Jan. 2021
What makes you think it isn't the correct result? Have you checked you reproduce the answer for the sample case in the help for the function?
There's also another implementation of Haversine forumula on FEX I've used that seems to work reliably <Haversince FEX submission>; you can always check against its result for consistency.
And, of course, use coordinates for known locations and for which you know the correct answer to verify.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by