TOPICS
Search

Spherical Distance


The spherical distance, also called the great-circle distance, between two points P and Q on a sphere is the distance of the shortest path along the surface of the sphere (paths that cut through the interior of the sphere are not allowed) from P to Q, which always lies along a great circle.

For points P and Q on the unit sphere centered at the origin, the spherical distance is given by

 d=cos^(-1)(P·Q),
(1)

where P·Q denotes a dot product and cos^(-1) denotes the principal value of the inverse cosine (Brannan et al. 1999, p. 344).

For points given by longitudes lambda_1,lambda_2 and latitudes phi_1,phi_2, let Deltalambda=lambda_1-lambda_2 and set

a=sin^2((phi_1-phi_2)/2)+cosphi_1cosphi_2sin^2((Deltalambda)/2)
(2)
b=sin^2((phi_1+phi_2)/2)+cosphi_1cosphi_2cos^2((Deltalambda)/2).
(3)

Then a=sin^2(d/2) and b=cos^2(d/2). The distance is twice the angle of the planar vector (sqrt(b),sqrt(a)) measured from the positive horizontal axis. This form is equivalent to Kahan's tangent-half-angle formula (2006, p. 44) where its tangents are finite. Computing a and b separately avoids subtracting nearly equal values to recover a small half-angle sine or cosine. For Cartesian input, the spherical distance on the unit sphere is the vector angle between P and Q. For a sphere of radius R, multiply the central angle by R.


See also

Geodesic, Great Circle, Sphere, Spherical Geometry, Vector Angle

Portions of this entry contributed by Todd Rowland

Explore with Wolfram|Alpha

References

Brannan, D. A.; Esplen, M. F.; and Gray, J. J. Geometry. Cambridge, England: Cambridge University Press, pp. 329 and 344, 1999.Kahan, W. "How Futile are Mindless Assessments of Roundoff in Floating-Point Computation?" Jan. 11, 2006, p. 44. https://people.eecs.berkeley.edu/~wkahan/Mindless.pdf.

Referenced on Wolfram|Alpha

Spherical Distance

Cite this as:

Weisstein, Eric W., with contributions by Todd Rowland. "Spherical Distance." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/SphericalDistance.html

Subject classifications