Haversine formula
Overview
 
The haversine formula is an equation important in navigation
Navigation
Navigation is the process of monitoring and controlling the movement of a craft or vehicle from one place to another. It is also the term of art used for the specialized knowledge used by navigators to perform navigation tasks...

, giving great-circle distance
Great-circle distance
The great-circle distance or orthodromic distance is the shortest distance between any two points on the surface of a sphere measured along a path on the surface of the sphere . Because spherical geometry is rather different from ordinary Euclidean geometry, the equations for distance take on a...

s between two points on a sphere
Sphere
A sphere is a perfectly round geometrical object in three-dimensional space, such as the shape of a round ball. Like a circle in two dimensions, a perfect sphere is completely symmetrical around its center, with all points on the surface lying the same distance r from the center point...

 from their longitude
Longitude
Longitude is a geographic coordinate that specifies the east-west position of a point on the Earth's surface. It is an angular measurement, usually expressed in degrees, minutes and seconds, and denoted by the Greek letter lambda ....

s and latitude
Latitude
In geography, the latitude of a location on the Earth is the angular distance of that location south or north of the Equator. The latitude is an angle, and is usually measured in degrees . The equator has a latitude of 0°, the North pole has a latitude of 90° north , and the South pole has a...

s. It is a special case of a more general formula in spherical trigonometry
Spherical trigonometry
Spherical trigonometry is a branch of spherical geometry which deals with polygons on the sphere and the relationships between the sides and the angles...

, the law of haversines, relating the sides and angles of spherical "triangles".

These names follow from the fact that they are customarily written in terms of the haversine
Versine
The versine or versed sine, versin, is a trigonometric function equal to and 2sin2. It appeared in some of the earliest trigonometric tables and was once widespread, but it is now little-used...

 function, given by haversin(θ) = sin2(θ/2).
 
x
OK