*** Welcome to piglix ***

Haversine formula


The haversine formula determines the great-circle distance between two points on a sphere given their longitudes and latitudes. Important in navigation, it is a special case of a more general formula in spherical trigonometry, the law of haversines, that relates the sides and angles of spherical triangles.

The first table of haversines in English was published by James Andrew in 1805, but Florian Cajori credits an earlier use by José de Mendoza y Ríos in 1801. The term haversine was coined in 1835 by James Inman.

These names follow from the fact that they are customarily written in terms of the haversine function, given by haversin(θ) = sin2(θ/2). The formulas could equally be written in terms of any multiple of the haversine, such as the older versine function (twice the haversine). Prior to the advent of computers, the elimination of division and multiplication by factors of two proved convenient enough that tables of haversine values and logarithms were included in 19th and early 20th century navigation and trigonometric texts. These days, the haversine form is also convenient in that it has no coefficient in front of the sin2 function.

For any two points on a sphere, the haversine of the central angle between them is given by

where

On the left side of the equals sign d/r is the central angle, assuming angles are measured in radians (note that φ and λ; can be converted from radians to degrees by multiplying by 180/π as usual).


...
Wikipedia

...