Calculates the shortest distance between two points on the Earth's surface using the Haversine formula, also known as the great-circle distance or "as the crow flies".
haversine(lat_from, lon_from, lat_to, lon_to, r = 6378137)
Latitude of the starting point.
Longitude of the starting point.
Latitude of the destination point.
Longitude of the destination point.
Radius of the Earth in meters (default = 6378137).
Vector of distances in the same unit as r
(default in meters).
The Haversine ('half-versed-sine') formula was published by R.W. Sinnott in 1984, although it has been known for much longer.
Sinnott, R.W, 1984. Virtues of the Haversine. Sky and Telescope 68(2): 159.
haversine(53.24007, 6.520386, 53.24054, 6.520386)
#> [1] 52.32016