Calculate the shortest distance between two points using the haversine formula.
Calculate initial and final bearings along a great circle path.
Find where you end up given a start point, bearing, and distance.
Find any point along a great circle path between two locations.
Find where two great circle paths cross.
Calculate distance and bearing along a constant-heading rhumb line.
a = sinΒ²(ΞΟ/2) + cos Οβ Β· cos Οβ Β· sinΒ²(ΞΞ»/2)
c = 2 Β· atan2(βa, β(1βa))
d = R Β· c
R = 6,371 km (Earth's volumetric mean radius). Note: All angles must be in radians.
ΞΈ = atan2(sin ΞΞ» Β· cos Οβ,
cos Οβ Β· sin Οβ β sin Οβ Β· cos Οβ Β· cos ΞΞ»)
Angles in radians.
Οβ = asin(sin Οβ Β· cos Ξ΄ + cos Οβ Β· sin Ξ΄ Β· cos ΞΈ)
Ξ»β = Ξ»β + atan2(sin ΞΈ Β· sin Ξ΄ Β· cos Οβ, cos Ξ΄ β sin Οβ Β· sin Οβ)
Ξ΄ = d/R (angular distance). Angles in radians.
Bx = cos Οβ Β· cos ΞΞ»
By = cos Οβ Β· sin ΞΞ»
Οβ = atan2(sin Οβ + sin Οβ, β((cos Οβ + Bx)Β² + ByΒ²))
Angles in radians.
Uses spherical trigonometry to find where two great circle paths cross.
ΞΟ = ln(tan(Ο/4 + Οβ/2) / tan(Ο/4 + Οβ/2))
d = β(ΞΟΒ² + qΒ²Β·Ξλ²) Β· R
Ο = isometric latitude. Angles in radians.