Skip to content
Andrew Voirol
Monday, August 31, 2026artemis-velocity-vis

Geodesic Haversine spherical arc derivation vs flat Mercator linear chord error

Visualizationd3-geoAlgorithms

When flight paths and orbital ground tracks are rendered as straight lines on standard Web Mercator (EPSG:3857) maps, they deceive human perception. Web Mercator is conformal—preserving local angles at the expense of severe polar areal distortion (sec⁡2ϕ→∞\sec^2\phi \to \inftysec2ϕ→∞).

A straight line drawn between two coordinates on a Mercator map is a Rhumb line (loxodrome), not the shortest distance on Earth. Spacecraft orbital trajectories follow great circles governed by the Riemannian 2-sphere metric ds2=R2(dϕ2+cos⁡2ϕ dλ2)ds^2 = R^2(d\phi^2 + \cos^2\phi\,d\lambda^2)ds2=R2(dϕ2+cos2ϕdλ2).

1. Haversine Central Angular Distance & 3D Slerp

Given origin P1(ϕ1,λ1)P_1(\phi_1, \lambda_1)P1​(ϕ1​,λ1​) and destination P2(ϕ2,λ2)P_2(\phi_2, \lambda_2)P2​(ϕ2​,λ2​), central angle Δσ\Delta\sigmaΔσ is calculated via:

a=sin⁡2(Δϕ2)+cos⁡ϕ1cos⁡ϕ2sin⁡2(Δλ2),Δσ=2arcsin⁡(a)a = \sin^2\left(\frac{\Delta\phi}{2}\right) + \cos\phi_1 \cos\phi_2 \sin^2\left(\frac{\Delta\lambda}{2}\right), \quad \Delta\sigma = 2 \arcsin(\sqrt{a})a=sin2(2Δϕ​)+cosϕ1​cosϕ2​sin2(2Δλ​),Δσ=2arcsin(a​)

Intermediate surface waypoints at fraction f∈[0,1]f \in [0, 1]f∈[0,1] are interpolated via 3D unit vectors v1,v2∈S2\mathbf{v}_1, \mathbf{v}_2 \in \mathbb{S}^2v1​,v2​∈S2:

v(f)=sin⁡((1−f)Δσ)sin⁡Δσv1+sin⁡(fΔσ)sin⁡Δσv2\mathbf{v}(f) = \frac{\sin((1 - f)\Delta\sigma)}{\sin\Delta\sigma}\mathbf{v}_1 + \frac{\sin(f\Delta\sigma)}{\sin\Delta\sigma}\mathbf{v}_2v(f)=sinΔσsin((1−f)Δσ)​v1​+sinΔσsin(fΔσ)​v2​

2. Empirical Divergence on the London → Tokyo Corridor

On the sub-polar flight path from London (51.51° N) to Tokyo (35.68° N):

MetricGreat-Circle GeodesicFlat Mercator Linear ChordDistortion Delta
Path Distance5,939.48 miles7,017.56 miles+1,078.08 miles (+18.15%)
Max North Latitude68.99° N (Arctic Siberia)51.51° N (Kazakhstan)1,857 miles lateral separation

← Previous

Geodesic arc morphing: spherical SLERP flight paths across dynamic projections

Next →

Real-time ground track speed, velocity scrubber, and Mach number telemetry


Andrew Voirol

Builder, hacker, shipper. Currently leaving localhost.

Navigate

WorkThreadsBuilder's LogAboutContactRSS Feed

Connect

X / TwitterGitHubLinkedIn

© 2026 Andrew Voirol·Back to top ↑
✦Just one prompt away from figuring it all out.