haversine: Haversine

View source: R/haversine.R

haversineR Documentation

Haversine

Description

Calculate the haversine distance between 2 points in metres, given lat/lon for each (in decimal degrees).

Usage

haversine(lon1, lat1, lon2, lat2)

Arguments

lon1

Decimal longitude of first point (numeric value).

lat1

Decimal latitude of first point (numeric value).

lon2

Decimal longitude of second point (numeric value).

lat2

Decimal latitude of second point (numeric value).

Value

Distance between the points (in metres).


BIO-RSG/oceancolouR documentation built on April 20, 2024, 6:40 a.m.