geodetic-haversine-distance
This function calculates the distance in meters between two latitude/longitude coordinates.
Instead of using a mean radius of Earth, the radius is estimated using the latitude
of the first position.
Install
$ npm install --save geodetic-haversine-distance
Usage
const haversineDistance = ; const a = latitude: 59338746 longitude: 18060683 ;const b = latitude: 59339042 longitude: 18061779 ; ;//=> 70.37704048362993
API
haversineDistance(start, end)
Calculate the distance in meters between two positions.
The two positions must have the properties latitude
and longitude
.