Skip to main content

distance_nm

Function distance_nm 

Source
pub fn distance_nm(from: Position, to: Position) -> f64
Expand description

Distance along the great circle between two positions, in nautical miles.

Haversine rather than the spherical law of cosines: the latter loses precision badly for short distances, which are exactly the distances computed most often (metres to the next waypoint in a harbour).