Haversine Formula - The Law of Haversines

The Law of Haversines

Given a unit sphere, a "triangle" on the surface of the sphere is defined by the great circles connecting three points u, v, and w on the sphere. If the lengths of these three sides are a (from u to v), b (from u to w), and c (from v to w), and the angle of the corner opposite c is C, then the law of haversines states:

(the law of haversines)

Since this is a unit sphere, the lengths a, b, and c are simply equal to the angles (in radians) subtended by those sides from the center of the sphere (for a non-unit sphere, each of these arc lengths is equal to its central angle multiplied by the radius of the sphere).

In order to obtain the haversine formula of the previous section from this law, one simply considers the special case where u is the north pole, while v and w are the two points whose separation d is to be determined. In that case, a and b are π/2 − φ1,2 (i.e., 90° − latitude), C is the longitude separation Δλ, and c is the desired d/R. Noting that sin(π/2 − φ) = cos(φ), the haversine formula immediately follows.

To derive the law of haversines, one starts with the spherical law of cosines:

(spherical law of cosines)

As mentioned above, this formula is an ill-conditioned way of solving for c when c is small. Instead, we substitute the identity that cos(θ) = 1 − 2 haversin(θ), and also employ the addition identity cos(ab) = cos(a) cos(b) + sin(a) sin(b), to obtain the law of haversines, above.

Read more about this topic:  Haversine Formula

Famous quotes containing the word law:

    The inevitableness, the idealism, and the blessing of war, as an indispensable and stimulating law of development, must be repeatedly emphasized.
    Friedrich Von Bernhardi (1849–1930)