Haversine formula
B3. Nautical ScienceDefinition
Spherical trig relation used in distance/bearing.
The haversine formula computes the great-circle distance between two points from their latitudes and the difference in longitude, using the haversine of the central angle to keep the result numerically stable for small angles where the plain cosine formula loses precision. It returns the angular separation, which multiplied by the Earth’s radius or by 60 gives distance in nautical miles. It is the relation programmed into voyage-distance tools and chart-table software, and it underlies the great-circle distance shown alongside the rhumb-line distance in passage planning.
Source: Spherical trigonometry