# Geodesics on an ellipsoid

Geodesy :
Fundamentals
Geodesy
Geodynamics
Geomatics
History :
Concepts
Geographical distance
Geoid
Figure of the Earth (radius and circumference)
Geodetic coordinates
Geodetic datum
Geodesic
Horizontal position representation
Latitude / Longitude
Map projection
Reference ellipsoid
Satellite geodesy
Spatial reference system
Spatial relations
Vertical positions :
Technologies
Global Nav. Sat. Systems (GNSSs)
Global Pos. System (GPS)
GLONASS (Russia)
BeiDou (BDS) (China)
Galileo (Europe)
NAVIC (India)
Quasi-Zenith Sat. Sys. (QZSS) (Japan)
Discrete Global Grid and Geocoding :
Standards (history) NGVD 29 Sea Level Datum 1929 OSGB36 Ordnance Survey Great Britain 1936 SK-42 Systema Koordinat 1942 goda ED50 European Datum 1950 SAD69 South American Datum 1969 GRS 80 Geodetic Reference System 1980 ISO 6709 Geographic point coord. 1983 NAD 83 North American Datum 1983 WGS 84 World Geodetic System 1984 NAVD 88 N. American Vertical Datum 1988 ETRS89 European Terrestrial Ref. Sys. 1989 GCJ-02 Chinese obfuscated datum 2002 Geo URI Internet link to a point 2010
International Terrestrial Reference System
Spatial Reference System Identifier (SRID)
Universal Transverse Mercator (UTM) :
vte :
The study of geodesics on an ellipsoid arose in connection with geodesy specifically with the solution of triangulation networks. The figure of the Earth is well approximated by an oblate ellipsoid, a slightly flattened sphere. A geodesic is the shortest path between two points on a curved surface, analogous to a straight line on a plane surface. The solution of a triangulation network on an ellipsoid is therefore a set of exercises in spheroidal trigonometry (Euler 1755).
If the Earth is treated as a sphere, the geodesics are great circles (all of which are closed) and the problems reduce to ones in spherical trigonometry. However, Newton (1687) showed that the effect of the rotation of the Earth results in its resembling a slightly oblate ellipsoid: in this case, the equator and the meridians are the only simple closed geodesics. Furthermore, the shortest path between two points on the equator does not necessarily run along the equator. Finally, if the ellipsoid is further perturbed to become a triaxial ellipsoid (with three distinct semi-axes), only three geodesics are closed.

## Geodesics on an ellipsoid of revolution

There are several ways of defining geodesics (Hilbert & Cohn-Vossen 1952, pp. 220–221). A simple definition is as the shortest path between two points on a surface. However, it is frequently more useful to define them as paths with zero geodesic curvature—i.e., the analogue of straight lines on a curved surface. This definition encompasses geodesics traveling so far across the ellipsoid's surface that they start to return toward the starting point, so that other routes are more direct, and includes paths that intersect or re-trace themselves. Short enough segments of a geodesics are still the shortest route between their endpoints, but geodesics are not necessarily globally minimal (i.e. shortest among all possible paths). Every globally-shortest path is a geodesic, but not vice versa.
By the end of the 18th century, an ellipsoid of revolution (the term spheroid is also used) was a well-accepted approximation to the figure of the Earth. The adjustment of triangulation networks entailed reducing all the measurements to a reference ellipsoid and solving the resulting two-dimensional problem as an exercise in spheroidal trigonometry (Bomford 1952, Chap. 3) (Leick et al. 2015, §4.5).
It is possible to reduce the various geodesic problems into one of two types. Consider two points: A at latitude φ$_1$ and longitude λ$_1$ and B at latitude φ$_2$ and longitude λ$_2$ (see Fig. 1). The connecting geodesic (from A to B) is AB, of length s$_{12}$, which has azimuths α$_1$ and α$_2$ at the two endpoints. The two geodesic problems usually considered are:
* the direct geodesic problem or first geodesic problem, given A, α$_1$, and s$_{12}$, determine B and α$_2$;
* the inverse geodesic problem or second geodesic problem, given A and B, determine s$_{12}$, α$_1$, and α$_2$.
As can be seen from Fig. 1, these problems involve solving the triangle NAB given one angle, α$_1$ for the direct problem and λ$_{12}$ = λ$_2$ − λ$_1$ for the inverse problem, and its two adjacent sides. For a sphere the solutions to these problems are simple exercises in spherical trigonometry, whose solution is given by formulas for solving a spherical triangle. (See the article on great-circle navigation.)
For an ellipsoid of revolution, the characteristic constant defining the geodesic was found by Clairaut (1735). A systematic solution for the paths of geodesics was given by Legendre (1806) and Oriani (1806) (and subsequent papers in 1808 and 1810). The full solution for the direct problem (complete with computational tables and a worked out example) is given by Bessel (1825).
During the 18th century geodesics were typically referred to as "shortest lines". The term "geodesic line" (actually, a curve) was coined by Laplace (1799b):
   Nous désignerons cette ligne sous le nom de ligne géodésique [We will call this line the geodesic line].
This terminology was introduced into English either as "geodesic line" or as "geodetic line", for example (Hutton 1811, p. 115),
   A line traced in the manner we have now been describing, or deduced from trigonometrical measures, by the means we have indicated, is called a geodetic or geodesic line: it has the property of being the shortest which can be drawn between its two extremities on the surface of the Earth; and it is therefore the proper itinerary measure of the distance between those two points.
In its adoption by other fields geodesic line, frequently shortened to geodesic, was preferred.
This section treats the problem on an ellipsoid of revolution (both oblate and prolate). The problem on a triaxial ellipsoid is covered in the next section.

### Equations for a geodesic

Here the equations for a geodesic are developed; the derivation closely follows that of Bessel (1825). Jordan & Eggert (1941), Bagratuni (1962, §15), Gan'shin (1967, Chap. 5), Krakiwsky & Thomson (1974, §4), Rapp (1993, §1.2), Jekeli (2012), and Borre & Strang (2012) also provide derivations of these equations.
Consider an ellipsoid of revolution with equatorial radius a and polar semi-axis b. Define the flattening f, the eccentricity e, and the second eccentricity e′:
    $f={\frac {a-b}{a}},\quad e={\frac {\sqrt {a^{2}-b^{2}}}{a}}={\sqrt {f(2-f)}},\quad e'={\frac {\sqrt {a^{2}-b^{2}}}{b}}={\frac {e}{1-f}}.$
(In most applications in geodesy, the ellipsoid is taken to be oblate, a > b; however, the theory applies without change to prolate ellipsoids, a < b, in which case f, e$^2$, and e′$^2$ are negative.)
Let an elementary segment of a path on the ellipsoid have length ds. From Figs. 2 and 3, we see that if its azimuth is α, then ds is related to dφ and dλ by
    $\cos \alpha \,ds=\rho \,d\varphi =-{\frac {dR}{\sin \varphi }},\quad \sin \alpha \,ds=R\,d\lambda ,$ (1)
where ρ is the meridional radius of curvature, R = ν cosφ is the radius of the circle of latitude φ, and ν is the normal radius of curvature. The elementary segment is therefore given by
    $ds^{2}=\rho ^{2}\,d\varphi ^{2}+R^{2}\,d\lambda ^{2}$
or
    ${\begin{aligned}ds&={\sqrt {\rho ^{2}\varphi '^{2}+R^{2}}}\,d\lambda \\&\equiv L(\varphi ,\varphi ')\,d\lambda ,\end{aligned}}$
where φ′ = dφ/dλ and the Lagrangian function L depends on φ through ρ(φ) and R(φ). The length of an arbitrary path between (φ$_1$, λ$_1$) and (φ$_2$, λ$_2$) is given by
    $s_{12}=\int _{\lambda _{1}}^{\lambda _{2}}L(\varphi ,\varphi ')\,d\lambda ,$
where φ is a function of λ satisfying φ(λ$_1$) = φ$_1$ and φ(λ$_2$) = φ$_2$. The shortest path or geodesic entails finding that function φ(λ) which minimizes s$_{12}$. This is an exercise in the calculus of variations and the minimizing condition is given by the Beltrami identity,
    $L-\varphi '{\frac {\partial L}{\partial \varphi '}}={\text{const.}}$
Substituting for L and using Eqs. (1) gives
    $R\sin \alpha ={\text{const.}}$
Clairaut (1735) found this relation, using a geometrical construction; a similar derivation is presented by Lyusternik (1964, §10). Differentiating this relation gives
    $d\alpha =\sin \varphi \,d\lambda .$
This, together with Eqs. (1), leads to a system of ordinary differential equations for a geodesic
    ${\frac {d\varphi }{ds}}={\frac {\cos \alpha }{\rho }};\quad {\frac {d\lambda }{ds}}={\frac {\sin \alpha }{\nu \cos \varphi }};\quad {\frac {d\alpha }{ds}}={\frac {\tan \varphi \sin \alpha }{\nu }}.$
We can express R in terms of the parametric latitude, β, using
    $R=a\cos \beta ,$
and Clairaut's relation then becomes
    $\sin \alpha _{1}\cos \beta _{1}=\sin \alpha _{2}\cos \beta _{2}.$
This is the sine rule of spherical trigonometry relating two sides of the triangle NAB (see Fig. 4), NA = 1⁄2π − β$_1$, and NB = 1⁄2π − β$_2$ and their opposite angles B = π − α$_2$ and A = α$_1$.
In order to find the relation for the third side AB = σ$_{12}$, the spherical arc length, and included angle N = ω$_{12}$, the spherical longitude, it is useful to consider the triangle NEP representing a geodesic starting at the equator; see Fig. 5. In this figure, the variables referred to the auxiliary sphere are shown with the corresponding quantities for the ellipsoid shown in parentheses. Quantities without subscripts refer to the arbitrary point P; E, the point at which the geodesic crosses the equator in the northward direction, is used as the origin for σ, s and ω.
If the side EP is extended by moving P infinitesimally (see Fig. 6), we obtain
    $\cos \alpha \,d\sigma =d\beta ,\quad \sin \alpha \,d\sigma =\cos \beta \,d\omega .$ (2)
Combining Eqs. (1) and (2) gives differential equations for s and λ
    ${\frac {1}{a}}{\frac {ds}{d\sigma }}={\frac {d\lambda }{d\omega }}={\frac {\sin \beta }{\sin \varphi }}.$
The relation between β and φ is
    $\tan \beta ={\sqrt {1-e^{2}}}\tan \varphi =(1-f)\tan \varphi ,$
which gives
    ${\frac {\sin \beta }{\sin \varphi }}={\sqrt {1-e^{2}\cos ^{2}\beta }},$
so that the differential equations for the geodesic become
    ${\frac {1}{a}}{\frac {ds}{d\sigma }}={\frac {d\lambda }{d\omega }}={\sqrt {1-e^{2}\cos ^{2}\beta }}.$
The last step is to use σ as the independent parameter in both of these differential equations and thereby to express s and λ as integrals. Applying the sine rule to the vertices E and G in the spherical triangle EGP in Fig. 5 gives
    $\sin \beta =\sin \beta (\sigma ;\alpha _{0})=\cos \alpha _{0}\sin \sigma ,$
where α$_0$ is the azimuth at E. Substituting this into the equation for ds/d σ and integrating the result gives
    ${\frac {s}{b}}=\int _{0}^{\sigma }{\sqrt {1+k^{2}\sin ^{2}\sigma '}}\,d\sigma ',$ (3)
where
    $k=e'\cos \alpha _{0},$
and the limits on the integral are chosen so that s(σ = 0) = 0. Legendre (1811, p. 180) pointed out that the equation for s is the same as the equation for the arc on an ellipse with semi-axes b√1 + e′$^2$ cos$^2$α$_0$ and b. In order to express the equation for λ in terms of σ, we write
    $d\omega ={\frac {\sin \alpha _{0}}{\cos ^{2}\beta }}\,d\sigma ,$
which follows from Eq. 2 and Clairaut's relation. This yields
    $\lambda -\lambda _{0}=\omega -f\sin \alpha _{0}\int _{0}^{\sigma }{\frac {2-f}{1+(1-f){\sqrt {1+k^{2}\sin ^{2}\sigma '}}}}\,d\sigma ',$ (4)
and the limits on the integrals are chosen so that λ = λ$_0$ at the equator crossing, σ = 0.
This completes the solution of the path of a geodesic using the auxiliary sphere. By this device a great circle can be mapped exactly to a geodesic on an ellipsoid of revolution.
There are also several ways of approximating geodesics on a terrestrial ellipsoid (with small flattening) (Rapp 1991, §6); some of these are described in the article on geographical distance. However, these are typically comparable in complexity to the method for the exact solution (Jekeli 2012, §2.1.4).

### Behavior of geodesics

Fig. 7 shows the simple closed geodesics which consist of the meridians (green) and the equator (red). (Here the qualification "simple" means that the geodesic closes on itself without an intervening self-intersection.) This follows from the equations for the geodesics given in the previous section.
All other geodesics are typified by Figs. 8 and 9 which show a geodesic starting on the equator with α$_0$ = 45°. The geodesic oscillates about the equator. The equatorial crossings are called nodes and the points of maximum or minimum latitude are called vertices; the parametric latitudes of the vertices are given by β = ±(1⁄2π − |α$_0$|). The geodesic completes one full oscillation in latitude before the longitude has increased by 360°. Thus, on each successive northward crossing of the equator (see Fig. 8), λ falls short of a full circuit of the equator by approximately 2π f sinα$_0$ (for a prolate ellipsoid, this quantity is negative and λ completes more that a full circuit; see Fig. 10). For nearly all values of α$_0$, the geodesic will fill that portion of the ellipsoid between the two vertex latitudes (see Fig. 9).
If the ellipsoid is sufficiently oblate, i.e., b⁄a < 1⁄2, another class of simple closed geodesics is possible (Klingenberg 1982, §3.5.19). Two such geodesics are illustrated in Figs. 11 and 12. Here b⁄a = 2⁄7 and the equatorial azimuth, α$_0$, for the green (resp. blue) geodesic is chosen to be 53.175° (resp. 75.192°), so that the geodesic completes 2 (resp. 3) complete oscillations about the equator on one circuit of the ellipsoid.
Fig. 13 shows geodesics (in blue) emanating A with α$_1$ a multiple of 15° up to the point at which they cease to be shortest paths. (The flattening has been increased to 1⁄10 in order to accentuate the ellipsoidal effects.) Also shown (in green) are curves of constant s$_{12}$, which are the geodesic circles centered A. Gauss (1828) showed that, on any surface, geodesics and geodesic circle intersect at right angles.
The red line is the cut locus, the locus of points which have multiple (two in this case) shortest geodesics from A. On a sphere, the cut locus is a point. On an oblate ellipsoid (shown here), it is a segment of the circle of latitude centered on the point antipodal to A, φ = −φ$_1$. The longitudinal extent of cut locus is approximately λ$_{12}$ ∈ [π (1 − f cosφ$_1$), π (1 + f cosφ$_1$)]. If A lies on the equator, φ$_1$ = 0, this relation is exact and as a consequence the equator is only a shortest geodesic if |λ$_{12}$| ≤ π (1 − f). For a prolate ellipsoid, the cut locus is a segment of the anti-meridian centered on the point antipodal to A, λ$_{12}$ = π, and this means that meridional geodesics stop being shortest paths before the antipodal point is reached.

### Differential properties of geodesics

Various problems involving geodesics require knowing their behavior when they are perturbed. This is useful in trigonometric adjustments (Ehlert 1993), determining the physical properties of signals which follow geodesics, etc. Consider a reference geodesic, parameterized by s, and a second geodesic a small distance t(s) away from it. Gauss (1828) showed that t(s) obeys the Gauss-Jacobi equation
    ${\frac {d^{2}t(s)}{ds^{2}}}+K(s)t(s)=0,$
where K(s) is the Gaussian curvature at s. As a second order, linear, homogeneous differential equation, its solution may be expressed as the sum of two independent solutions
    $t(s_{2})=Cm(s_{1},s_{2})+DM(s_{1},s_{2})$
where
    ${\begin{aligned}m(s_{1},s_{1})&=0,\quad \left.{\frac {dm(s_{1},s_{2})}{ds_{2}}}\right|_{s_{2}=s_{1}}=1,\\M(s_{1},s_{1})&=1,\quad \left.{\frac {dM(s_{1},s_{2})}{ds_{2}}}\right|_{s_{2}=s_{1}}=0.\end{aligned}}$
The quantity m(s$_1$, s$_2$) = m$_{12}$ is the so-called reduced length, and M(s$_1$, s$_2$) = M$_{12}$ is the geodesic scale. Their basic definitions are illustrated in Fig. 14.
The Gaussian curvature for an ellipsoid of revolution is
    $K={\frac {1}{\rho \nu }}={\frac {{\bigl1-e^{2}\sin ^{2}\varphi {\bigr )}^{2}}{b^{2}}}={\frac {b^{2}}{a^{4}{\bigl1-e^{2}\cos ^{2}\beta {\bigr )}^{2}}}.$
Helmert (1880, Eq. (6.5.1.)) solved the Gauss-Jacobi equation for this case enabling m$_{12}$ and M$_{12}$ to be expressed as integrals.
As we see from Fig. 14 (top sub-figure), the separation of two geodesics starting at the same point with azimuths differing by dα$_1$ is m$_{12}$ dα$_1$. On a closed surface such as an ellipsoid, m$_{12}$ oscillates about zero. The point at which m$_{12}$ becomes zero is the point conjugate to the starting point. In order for a geodesic between A and B, of length s$_{12}$, to be a shortest path it must satisfy the Jacobi condition (Jacobi 1837) (Jacobi 1866, §6) (Forsyth 1927, §§26–27) (Bliss 1916), that there is no point conjugate to A between A and B. If this condition is not satisfied, then there is a nearby path (not necessarily a geodesic) which is shorter. Thus, the Jacobi condition is a local property of the geodesic and is only a necessary condition for the geodesic being a global shortest path. Necessary and sufficient conditions for a geodesic being the shortest path are:
* for an oblate ellipsoid, |σ$_{12}$| ≤ π;
* for a prolate ellipsoid, |λ$_{12}$| ≤ π, if α$_0$ ≠ 0; if α$_0$ = 0, the supplemental condition m$_{12}$ ≥ 0 is required if |λ$_{12}$| = π.

### Envelope of geodesics

The geodesics from a particular point A if continued past the cut locus form an envelope illustrated in Fig. 15. Here the geodesics for which α$_1$ is a multiple of 3° are shown in light blue. (The geodesics are only shown for their first passage close to the antipodal point, not for subsequent ones.) Some geodesic circles are shown in green; these form cusps on the envelope. The cut locus is shown in red. The envelope is the locus of points which are conjugate to A; points on the envelope may be computed by finding the point at which m$_{12}$ = 0 on a geodesic. Jacobi (1891) calls this star-like figure produced by the envelope an astroid.
Outside the astroid two geodesics intersect at each point; thus there are two geodesics (with a length approximately half the circumference of the ellipsoid) between A and these points. This corresponds to the situation on the sphere where there are "short" and "long" routes on a great circle between two points. Inside the astroid four geodesics intersect at each point. Four such geodesics are shown in Fig. 16 where the geodesics are numbered in order of increasing length. (This figure uses the same position for A as Fig. 13 and is drawn in the same projection.) The two shorter geodesics are stable, i.e., m$_{12}$ > 0, so that there is no nearby path connecting the two points which is shorter; the other two are unstable. Only the shortest line (the first one) has σ$_{12}$ ≤ π. All the geodesics are tangent to the envelope which is shown in green in the figure.
The astroid is the (exterior) evolute of the geodesic circles centered at A. Likewise, the geodesic circles are involutes of the astroid.

### Area of a geodesic polygon

A geodesic polygon is a polygon whose sides are geodesics. It is analogous to a spherical polygon, whose sides are great circles. The area of such a polygon may be found by first computing the area between a geodesic segment and the equator, i.e., the area of the quadrilateral AFHB in Fig. 1 (Danielsen 1989). Once this area is known, the area of a polygon may be computed by summing the contributions from all the edges of the polygon.
Here an expression for the area S$_{12}$ of AFHB is developed following Sjöberg (2006). The area of any closed region of the ellipsoid is
    $T=\int dT=\int {\frac {1}{K}}\cos \varphi \,d\varphi \,d\lambda ,$
where dT is an element of surface area and K is the Gaussian curvature. Now the Gauss–Bonnet theorem applied to a geodesic polygon states
    $\Gamma =\int K\,dT=\int \cos \varphi \,d\varphi \,d\lambda ,$
where
    $\Gamma =2\pi -\sum _{j}\theta _{j}$
is the geodesic excess and θ$_j$ is the exterior angle at vertex j. Multiplying the equation for Γ by R$_2$$^2$, where R$_2$ is the authalic radius, and subtracting this from the equation for T gives
    ${\begin{aligned}T&=R_{2}^{2}\,\Gamma +\int \left({\frac {1}{K}}-R_{2}^{2}\right)\cos \varphi \,d\varphi \,d\lambda \\&=R_{2}^{2}\,\Gamma +\int \left({\frac {b^{2}}{{\bigl1-e^{2}\sin ^{2}\varphi {\bigr )}^{2}}}-R_{2}^{2}\right)\cos \varphi \,d\varphi \,d\lambda ,\end{aligned}}$
where the value of K for an ellipsoid has been substituted. Applying this formula to the quadrilateral AFHB, noting that Γ = α$_2$ − α$_1$, and performing the integral over φ gives
    $S_{12}=R_{2}^{2}(\alpha _{2}-\alpha _{1})+b^{2}\int _{\lambda _{1}}^{\lambda _{2}}\left({\frac {1}{2{\bigl1-e^{2}\sin ^{2}\varphi {\bigr )}}}+{\frac {\tanh ^{-1}(e\sin \varphi )}{2e\sin \varphi }}-{\frac {R_{2}^{2}}{b^{2}}}\right)\sin \varphi \,d\lambda ,$
where the integral is over the geodesic line (so that φ is implicitly a function of λ). The integral can be expressed as a series valid for small f (Danielsen 1989) (Karney 2013, §6 and addendum).
The area of a geodesic polygon is given by summing S$_{12}$ over its edges. This result holds provided that the polygon does not include a pole; if it does, 2π R$_2$$^2$ must be added to the sum. If the edges are specified by their vertices, then a convenient expression for the geodesic excess E$_{12}$ = α$_2$ − α$_1$ is
    $\tan {\frac {E_{12}}{2}}={\frac {\sin {\tfrac {1}{2}}(\beta _{2}+\beta _{1})}{\cos {\tfrac {1}{2}}(\beta _{2}-\beta _{1})}}\tan {\frac {\omega _{12}}{2}}.$

### Solution of the direct and inverse problems

Solving the geodesic problems entails mapping the geodesic onto the auxiliary sphere and solving the corresponding problem in great-circle navigation. When solving the "elementary" spherical triangle for NEP in Fig. 5, Napier's rules for quadrantal triangles can be employed,
    ${\begin{aligned}\sin \alpha _{0}&=\sin \alpha \cos \beta =\tan \omega \cot \sigma ,\\\cos \sigma &=\cos \beta \cos \omega =\tan \alpha _{0}\cot \alpha ,\\\cos \alpha &=\cos \omega \cos \alpha _{0}=\cot \sigma \tan \beta ,\\\sin \beta &=\cos \alpha _{0}\sin \sigma =\cot \alpha \tan \omega ,\\\sin \omega &=\sin \sigma \sin \alpha =\tan \beta \tan \alpha _{0}.\end{aligned}}$
The mapping of the geodesic involves evaluating the integrals for the distance, s, and the longitude, λ, Eqs. (3) and (4) and these depend on the parameter α$_0$.
Handling the direct problem is straightforward, because α$_0$ can be determined directly from the given quantities φ$_1$ and α$_1$; for a sample calculation, see Karney (2013).
In the case of the inverse problem, λ$_{12}$ is given; this cannot be easily related to the equivalent spherical angle ω$_{12}$ because α$_0$ is unknown. Thus, the solution of the problem requires that α$_0$ be found iteratively (root finding); see Karney (2013) for details.
In geodetic applications, where f is small, the integrals are typically evaluated as a series (Legendre 1806) (Oriani 1806) (Bessel 1825) (Helmert 1880) (Rainsford 1955) (Rapp 1993). For arbitrary f, the integrals (3) and (4) can be found by numerical quadrature or by expressing them in terms of elliptic integrals (Legendre 1806) (Cayley 1870) (Karney 2024).
Vincenty (1975) provides solutions for the direct and inverse problems; these are based on a series expansion carried out to third order in the flattening and provide an accuracy of about 0.1 mm for the WGS84 ellipsoid; however the inverse method fails to converge for nearly antipodal points.
Karney (2013) continues the expansions to sixth order which suffices to provide full double precision accuracy for |f| ≤ 1⁄50 and improves the solution of the inverse problem so that it converges in all cases. Karney (2013, addendum) extends the method to use elliptic integrals which can be applied to ellipsoids with arbitrary flattening.

## Geodesics on a triaxial ellipsoid

Solving the geodesic problem for an ellipsoid of revolution is mathematically straightforward: because of symmetry, geodesics have a constant of motion, given by Clairaut's relation allowing the problem to be reduced to quadrature. By the early 19th century (with the work of Legendre, Oriani, Bessel, et al.), there was a complete understanding of the properties of geodesics on an ellipsoid of revolution.
On the other hand, geodesics on a triaxial ellipsoid (with three unequal axes) have no obvious constant of the motion and thus represented a challenging unsolved problem in the first half of the 19th century. In a remarkable paper, Jacobi (1839) discovered a constant of the motion allowing this problem to be reduced to quadrature also (Klingenberg 1982, §3.5).

### Triaxial ellipsoid coordinate system

Consider the ellipsoid defined by
    $h={\frac {X^{2}}{a^{2}}}+{\frac {Y^{2}}{b^{2}}}+{\frac {Z^{2}}{c^{2}}}=1,$
where (X,Y,Z) are Cartesian coordinates centered on the ellipsoid and, without loss of generality, a ≥ b ≥ c > 0.
Jacobi (1866, §§26–27) employed the (triaxial) ellipsoidal coordinates (with triaxial ellipsoidal latitude and triaxial ellipsoidal longitude, β, ω) defined by
    ${\begin{aligned}X&=a\cos \omega {\frac {\sqrt {a^{2}-b^{2}\sin ^{2}\beta -c^{2}\cos ^{2}\beta }}{\sqrt {a^{2}-c^{2}}}},\\Y&=b\cos \beta \sin \omega ,\\Z&=c\sin \beta {\frac {\sqrt {a^{2}\sin ^{2}\omega +b^{2}\cos ^{2}\omega -c^{2}}}{\sqrt {a^{2}-c^{2}}}}.\end{aligned}}$
In the limit b → a, β becomes the parametric latitude for an oblate ellipsoid, so the use of the symbol β is consistent with the previous sections. However, ω is different from the spherical longitude defined above.
Grid lines of constant β (in blue) and ω (in green) are given in Fig. 17. These constitute an orthogonal coordinate system: the grid lines intersect at right angles. The principal sections of the ellipsoid, defined by X = 0 and Z = 0 are shown in red. The third principal section, Y = 0, is covered by the lines β = ±90° and ω = 0° or ±180°. These lines meet at four umbilical points (two of which are visible in this figure) where the principal radii of curvature are equal. Here and in the other figures in this section the parameters of the ellipsoid are a:b:c = 1.01:1:0.8, and it is viewed in an orthographic projection from a point above φ = 40°, λ = 30°.
The grid lines of the ellipsoidal coordinates may be interpreted in three different ways:
* They are "lines of curvature" on the ellipsoid: they are parallel to the directions of principal curvature (Monge 1796).
* They are also intersections of the ellipsoid with confocal systems of hyperboloids of one and two sheets (Dupin 1813, Part 5).
* Finally they are geodesic ellipses and hyperbolas defined using two adjacent umbilical points (Hilbert & Cohn-Vossen 1952, p. 188). For example, the lines of constant β in Fig. 17 can be generated with the familiar string construction for ellipses with the ends of the string pinned to the two umbilical points.

### Jacobi's solution

Jacobi showed that the geodesic equations, expressed in ellipsoidal coordinates, are separable. Here is how he recounted his discovery to his friend and neighbor Bessel (Jacobi 1839, Letter to Bessel),
   The day before yesterday, I reduced to quadrature the problem of geodesic lines on an ellipsoid with three unequal axes. They are the simplest formulas in the world, Abelian integrals, which become the well known elliptic integrals if 2 axes are set equal.
   Königsberg, 28th Dec. '38.
The solution given by Jacobi (Jacobi 1839) (Jacobi 1866, §28) is
    ${\begin{aligned}\delta &=\int {\frac {{\sqrt {b^{2}\sin ^{2}\beta +c^{2}\cos ^{2}\beta }}\,d\beta }{{\sqrt {a^{2}-b^{2}\sin ^{2}\beta -c^{2}\cos ^{2}\beta }}{\sqrt {{\biglb^{2}-c^{2}{\bigr )}\cos ^{2}\beta -\gamma }}}}\\[6pt]&\quad -\int {\frac {{\sqrt {a^{2}\sin ^{2}\omega +b^{2}\cos ^{2}\omega }}\,d\omega }{{\sqrt {a^{2}\sin ^{2}\omega +b^{2}\cos ^{2}\omega -c^{2}}}{\sqrt {{\bigla^{2}-b^{2}{\bigr )}\sin ^{2}\omega +\gamma }}}}.\end{aligned}}$
As Jacobi notes "a function of the angle β equals a function of the angle ω. These two functions are just Abelian integrals..." Two constants δ and γ appear in the solution. Typically δ is zero if the lower limits of the integrals are taken to be the starting point of the geodesic and the direction of the geodesics is determined by γ. However, for geodesics that start at an umbilical points, we have γ = 0 and δ determines the direction at the umbilical point. The constant γ may be expressed as
    $\gamma ={\biglb^{2}-c^{2}{\bigr )}\cos ^{2}\beta \sin ^{2}\alpha -{\bigla^{2}-b^{2}{\bigl )}\sin ^{2}\omega \cos ^{2}\alpha ,$
where α is the angle the geodesic makes with lines of constant ω. In the limit b → a, this reduces to sinα cosβ = const., the familiar Clairaut relation. A derivation of Jacobi's result is given by Darboux (1894, §§583–584); he gives the solution found by Liouville (1846) for general quadratic surfaces.

### Survey of triaxial geodesics

On a triaxial ellipsoid, there are only three simple closed geodesics, the three principal sections of the ellipsoid given by X = 0, Y = 0, and Z = 0. To survey the other geodesics, it is convenient to consider geodesics that intersect the middle principal section, Y = 0, at right angles. Such geodesics are shown in Figs. 18–22, which use the same ellipsoid parameters and the same viewing direction as Fig. 17. In addition, the three principal ellipses are shown in red in each of these figures.
If the starting point is β$_1$ ∈ (−90°, 90°), ω$_1$ = 0, and α$_1$ = 90°, then γ > 0 and the geodesic encircles the ellipsoid in a "circumpolar" sense. The geodesic oscillates north and south of the equator; on each oscillation it completes slightly less than a full circuit around the ellipsoid resulting, in the typical case, in the geodesic filling the area bounded by the two latitude lines β = ±β$_1$. Two examples are given in Figs. 18 and 19. Figure 18 shows practically the same behavior as for an oblate ellipsoid of revolution (because a ≈ b); compare to Fig. 9. However, if the starting point is at a higher latitude (Fig. 18) the distortions resulting from a ≠ b are evident. All tangents to a circumpolar geodesic touch the confocal single-sheeted hyperboloid which intersects the ellipsoid at β = β$_1$ (Chasles 1846) (Hilbert & Cohn-Vossen 1952, pp. 223–224).
If the starting point is β$_1$ = 90°, ω$_1$ ∈ (0°, 180°), and α$_1$ = 180°, then γ < 0 and the geodesic encircles the ellipsoid in a "transpolar" sense. The geodesic oscillates east and west of the ellipse X = 0; on each oscillation it completes slightly more than a full circuit around the ellipsoid. In the typical case, this results in the geodesic filling the area bounded by the two longitude lines ω = ω$_1$ and ω = 180° − ω$_1$. If a = b, all meridians are geodesics; the effect of a ≠ b causes such geodesics to oscillate east and west. Two examples are given in Figs. 20 and 21. The constriction of the geodesic near the pole disappears in the limit b → c; in this case, the ellipsoid becomes a prolate ellipsoid and Fig. 20 would resemble Fig. 10 (rotated on its side). All tangents to a transpolar geodesic touch the confocal double-sheeted hyperboloid which intersects the ellipsoid at ω = ω$_1$.
In Figs. 18–21, the geodesics are (very nearly) closed. As noted above, in the typical case, the geodesics are not closed, but fill the area bounded by the limiting lines of latitude (in the case of Figs. 18–19) or longitude (in the case of Figs. 20–21).
If the starting point is β$_1$ = 90°, ω$_1$ = 0° (an umbilical point), and α$_1$ = 135° (the geodesic leaves the ellipse Y = 0 at right angles), then γ = 0 and the geodesic repeatedly intersects the opposite umbilical point and returns to its starting point. However, on each circuit the angle at which it intersects Y = 0 becomes closer to 0° or 180° so that asymptotically the geodesic lies on the ellipse Y = 0 (Hart 1849) (Arnold 1989, p. 265), as shown in Fig. 22. A single geodesic does not fill an area on the ellipsoid. All tangents to umbilical geodesics touch the confocal hyperbola that intersects the ellipsoid at the umbilic points.
Umbilical geodesic enjoy several interesting properties.
* Through any point on the ellipsoid, there are two umbilical geodesics.
* The geodesic distance between opposite umbilical points is the same regardless of the initial direction of the geodesic.
* Whereas the closed geodesics on the ellipses X = 0 and Z = 0 are stable (a geodesic initially close to and nearly parallel to the ellipse remains close to the ellipse), the closed geodesic on the ellipse Y = 0, which goes through all 4 umbilical points, is exponentially unstable. If it is perturbed, it will swing out of the plane Y = 0 and flip around before returning to close to the plane. (This behavior may repeat depending on the nature of the initial perturbation.)
If the starting point A of a geodesic is not an umbilical point, its envelope is an astroid with two cusps lying on β = −β$_1$ and the other two on ω = ω$_1$ + π. The cut locus for A is the portion of the line β = −β$_1$ between the cusps.

## Applications

The direct and inverse geodesic problems no longer play the central role in geodesy that they once did. Instead of solving adjustment of geodetic networks as a two-dimensional problem in spheroidal trigonometry, these problems are now solved by three-dimensional methods (Vincenty & Bowring 1978). Nevertheless, terrestrial geodesics still play an important role in several areas:
* for measuring distances and areas in geographic information systems;
* the definition of maritime boundaries (UNCLOS 2006);
* in the rules of the Federal Aviation Administration for area navigation (RNAV 2007);
* the method of measuring distances in the FAI Sporting Code (FAI 2018).
* help Muslims find their direction toward Mecca
By the principle of least action, many problems in physics can be formulated as a variational problem similar to that for geodesics. Indeed, the geodesic problem is equivalent to the motion of a particle constrained to move on the surface, but otherwise subject to no forces (Laplace 1799a) (Hilbert & Cohn-Vossen 1952, p. 222). For this reason, geodesics on simple surfaces such as ellipsoids of revolution or triaxial ellipsoids are frequently used as "test cases" for exploring new methods. Examples include:
* the development of elliptic integrals (Legendre 1811) and elliptic functions (Weierstrass 1861);
* the development of differential geometry (Gauss 1828) (Christoffel 1869);
* methods for solving systems of differential equations by a change of independent variables (Jacobi 1839);
* the study of caustics (Jacobi 1891);
* investigations into the number and stability of periodic orbits (Poincaré 1905);
* in the limit c → 0, geodesics on a triaxial ellipsoid reduce to a case of dynamical billiards;
* extensions to an arbitrary number of dimensions (Knörrer 1980);
* geodesic flow on a surface (Berger 2010, Chap. 12).