Distance between two points of latitude/longitude

6 vues (au cours des 30 derniers jours)
emily bristow
emily bristow le 4 Jan 2021
Commenté : dpb le 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 commentaire
dpb
dpb le 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.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by