# Haversine formula - Git

Using the wrong units is a very common cause of errors people have written to us about! Illustrated this way, the sine is vertical rectus, literally "straight" while the versine is horizontal versus, literally "turned against, out-of-place" ; both are distances from C to the circle.

If you're in it for the full SQL learning experience, let's dive in.

In Clagett, Marshall ed.

In your case positions and directions could be handled most straightforward manner with vectors.

What the formula means Doctor Rick continues: I'll just add that the intermediate result "a" is the square of half of the straight-line distance chord length between the two points.

I haven't tried to draw the straight lines chords connecting A to C and B to D, but I show the chords connecting A to D and B to C.

### Haversine

The Mathematical-Function Computation Handbook - Programming Using the MathCW Portable Software Library 1 ed.

Description: Graphs of historical trigonometric functions compared with sin and cos — in hover over or click a graph to highlight it The ordinary function was sometimes historically called the sinus rectus "straight sine"to contrast it with the versed sine sinus versus.

Sexy:
Funny:
Views: 6995 Date: 18.01.2023 Favorited: 109
Category: DEFAULT

A somewhat better 2001 version can be foundand the part with the formulas is.
Short on time or just prefer to learn via video vs write-ups?
Sources and Studies in the History of Mathematics and Physical Sciences.

## HotCategories

+323reps
The haversine of the central angle (which is d/r) is calculated by the following formula: where r is the radius of the earth (6371 km), d is the distance between two points, is the latitude of the two points, and is the longitude of the two points respectively.
+385reps
The haversine formula is an equation important in navigation, giving great-circle distances between two points on a sphere from their longitudes and latitudes. It is a special case of a more general formula in spherical trigonometry, the law of haversines, relating the sides and angles of spherical triangles. Task
+289reps
haversine (θ) = sin² (θ/2) The following equation where φ is latitude, λ is longitude, R is earth’s radius (mean radius = 6,371km) is how we translate the above formula to include latitude and longitude coordinates. Note that angles need to be in radians to pass to trig functions: a = sin² (φB - φA/2) + cos φA * cos φB * sin² (λB - λA /2)
+346reps
This link might be helpful to you, as it details the use of the Haversine formula to calculate the distance. Excerpt: This script [in Javascript] calculates great-circle distances between the two points – that is, the shortest distance over the earth’s surface – using the ‘Haversine’ formula.