haversine
Calculaire the great-circle distance between two points on Earth, in kilometer.
haversine(
lat1,
lon1,
lat2,
lon2
) -> float
Calculaire the great-circle distance between two points on Earth, in kilometer.
Syntaxe
var dist = haversine(lat1=48.90720, lon1=2.24030, lat2=50.84499, lon2=4.34999) ;
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
lat1 | float | yes | - | Latitude of the first point |
lon1 | float | yes | - | Longitude of the first point |
lat2 | float | yes | - | Latitude of the second point |
lon2 | float | yes | - | Longitude of the second point |