1

I have(for exemple) a hotel with the latitude: 46.752879 and longitude: 23.605848 and my position: latitude 46.776073 and longitude 23.605802. I want to find out if the hotel is in 2km range from my position. How can I do that?

I read that 1 deg latitude=110.6 km so 46.752879=5,170(approximate) but how can i calculated the longitude? How would it be easier to find out if the hotel is in the range?

Thank you!

Faurean
  • 43
  • 1
  • 5
  • 4
    Use the [Haversine forumla](https://en.wikipedia.org/wiki/Haversine_formula) to compute (an approximation of) the distance between two points on the surface of a sphere. – chepner May 08 '18 at 23:13
  • What language are you using, if you are using any, to calculate the distance? – displayName May 08 '18 at 23:25
  • Possible duplicate of [Calculate distance between two latitude-longitude points? (Haversine formula)](https://stackoverflow.com/questions/27928/calculate-distance-between-two-latitude-longitude-points-haversine-formula) – coproc May 09 '18 at 09:10

0 Answers0