GeographicLib 2.3

Great Ellipses
Back to Rhumb lines. Forward to Transverse Mercator projection. Up to Contents.

Great ellipses are sometimes proposed (Williams, 1996; Pallikaris & Latsas, 2009) as alternatives to geodesics for the purposes of navigation. This is predicated on the assumption that solving the geodesic problems is complex and costly. These assumptions are no longer true, and geodesics should normally be used in place of great ellipses. This is discussed in more detail in Great ellipses vs geodesics.

Solutions of the great ellipse problems implemented for MATLAB and Octave are provided by

- gedoc: briefly describe the routines
- gereckon: solve the direct great ellipse problem
- gedistance: solve the inverse great ellipse problem

At this time, there is no C++ support in GeographicLib for great ellipses.

References:

- P. D. Thomas, Mathematical Models for Navigation Systems, TR-182 (U.S. Naval Oceanographic Office, 1965).
- B. R. Bowring, The direct and inverse solutions for the great elliptic line on the reference ellipsoid, Bull. Geod. 58, 101–108 (1984).
- M. A. Earle, A vector solution for navigation on a great ellipse, J. Navigation 53(3), 473–481 (2000).
- M. A. Earle, Vector solutions for azimuth, J. Navigation 61(3), 537–545 (2008).
- C. F. F. Karney, Algorithms for geodesics, J. Geodesy 87(1), 43–55 (2013); addenda: geod-addenda.html.
- A. Pallikaris & G. Latsas, New algorithm for great elliptic sailing (GES), J. Navigation 62(3), 493–507 (2009).
- A. Pallikaris, L. Tsoulos, & D. Paradissis, New meridian arc formulas for sailing calculations in navigational GIS, International Hydrographic Review, 24–34 (May 2009).
- L. E. Sjöberg, Solutions to the direct and inverse navigation problems on the great ellipse, J. Geodetic Science 2(3), 200–205 (2012).
- R. Williams, The Great Ellipse on the Surface of the Spheroid, J. Navigation 49(2), 229–234 (1996).
- T. Vincenty, Direct and Inverse Solutions of Geodesics on the Ellipsoid with Application of Nested Equations, Survey Review 23(176), 88–93 (1975).
- Wikipedia page, Great ellipse.

Go to

- Solution of great ellipse problems
- The area under a great ellipse
- Great ellipses vs geodesics

# Solution of great ellipse problems

Adopt the usual notation for the ellipsoid: equatorial semi-axis \(a\), polar semi-axis \(b\), flattening \(f = (a-b)/a\), eccentricity \(e = \sqrt{f(2-f)}\), second eccentricity \(e' = e/(1-f)\), and third flattening \(n=(a-b)/(a+b)=f/(2-f)\).

There are several ways in which an ellipsoid can be mapped into a sphere converting the great ellipse into a great circle. The simplest ones entail scaling the ellipsoid in the \(\hat z\) direction, the direction of the axis of rotation, scaling the ellipsoid radially, or a combination of the two.

One such combination (scaling by \(a^2/b^2\) in the \(\hat z\) direction, following by a radial scaling to the sphere) preserves the geographical latitude \(\phi\). This enables a great ellipse to be plotted on a chart merely by determining way points on the corresponding great circle and transferring them directly on the chart. In this exercise the flattening of the ellipsoid can be ignored!

Bowring (1984), Williams (1996), Earle (2000, 2008) and Pallikaris & Latsas (2009), scale the ellipsoid radially onto a sphere preserving the geocentric latitude \(\theta\). More convenient than this is to scale the ellipsoid along \(\hat z\) onto the sphere, as is done by Thomas (1965) and Sjöberg (2012), thus preserving the parametric latitude \(\beta\). The advantage of this "parametric" mapping is that Bessel's rapidly converging series for meridian arc in terms of parametric latitude can be used (a possibility that is overlooked by Sjöberg).

The full parametric mapping is:

- The geographic latitude \(\phi\) on the ellipsoid maps to the parametric latitude \(\beta\) on the sphere, where

  \[a\tan\beta = b\tan\phi.\]

- The longitude \(\lambda\) is unchanged.
- The azimuth \(\alpha\) on the ellipsoid maps to an azimuth \(\gamma\) on the sphere where

  \[ \begin{align} \tan\alpha &= \frac{\tan\gamma}{\sqrt{1-e^2\cos^2\beta}}, \\ \tan\gamma &= \frac{\tan\alpha}{\sqrt{1+e'^2\cos^2\phi}}, \end{align} \]

  and the quadrants of \(\alpha\) and \(\gamma\) are the same.
- Positions on the great circle of radius \(a\) are parametrized by arc length \(\sigma\) measured from the northward crossing of the equator. The great ellipse has semi-axes \(a\) and \(b'=a\sqrt{1-e^2\cos^2\gamma_0}\), where \(\gamma_0\) is the great-circle azimuth at the northward equator crossing, and \(\sigma\) is the parametric angle on the ellipse. [In contrast, the ellipse giving distances on a geodesic has semi-axes \(b\sqrt{1+e'^2\cos^2\alpha_0}\) and \(b\).]

To determine the distance along the ellipse in terms of \(\sigma\) and vice versa, the series for distance \(s\) and for \(\tau\) given in Expansions for geodesics can be used. The direct and inverse great ellipse problems are now simply solved by mapping the problem to the sphere, solving the resulting great circle problem, and mapping this back onto the ellipsoid.

# The area under a great ellipse

The area between the segment of a great ellipse and the equator can be found by very similar methods to those used for geodesic areas; see Danielsen (1989). The notation here is similar to that employed by Karney (2013).

\[ \begin{align} S_{12} &= S(\sigma_2) - S(\sigma_1) \\ S(\sigma) &= c^2\gamma + e^2 a^2 \cos\gamma_0 \sin\gamma_0 I_4(\sigma)\\ c^2 &= {\textstyle\frac12}\bigl(a^2 + b^2 (\tanh^{-1}e)/e\bigr) \end{align} \]

\[ I_4(\sigma) = - \sqrt{1+e'^2}\int \frac{r(e'^2) - r(k^2\sin^2\sigma)}{e'^2 - k^2\sin^2\sigma} \frac{\sin\sigma}2 \,d\sigma \]

\[ \begin{align} k &= e' \cos\gamma_0,\\ r(x) &= \sqrt{1+x} + (\sinh^{-1}\sqrt x)/\sqrt x. \end{align} \]

Expand in terms of the third flattening of the ellipsoid, \(n\), and the third flattening of the great ellipse, \(\epsilon=(a-b')/(a+b')\), by substituting

\[ \begin{align} e'&=\frac{2\sqrt n}{1-n},\\ k&=\frac{1+n}{1-n} \frac{2\sqrt{\epsilon}}{1+\epsilon}, \end{align} \]

to give

\[ I_4(\sigma) = \sum_{l = 0}^\infty G_{4l}\cos \bigl((2l+1)\sigma\bigr). \]

Compared to the area under a geodesic, we have

- \(\gamma\) and \(\gamma_0\) instead of \(\alpha\) and \(\alpha_0\). In both cases, these are azimuths on the auxiliary sphere; however, for the geodesic, they are also the azimuths on the ellipsoid.
- \(r(x) = \bigl(1+t(x)\bigr)/\sqrt{1+x}\) instead of \(t(x)\) with a balancing factor of \(\sqrt{1+e'^2}\) appearing in front of the integral. These changes are because expressing \(\sin\phi\,d\lambda\) in terms of \(\sigma\) is a little more complicated with great ellipses. (Don't worry about the addition of \(1\) to \(t(x)\); that's immaterial.)
- the factors involving \(n\) in the expression for \(k\) in terms of \(\epsilon\). This is because \(k\) is defined in terms of \(e'\), whereas it is \(e\cos\gamma_0\) that plays the role of the eccentricity for the great ellipse.

Here is the series expansion accurate to 10th order, found by gearea.mac:

    G4[0] = + (1/6 + 7/30 * n + 8/105 * n^2 + 4/315 * n^3 + 16/3465 * n^4 + 20/9009 * n^5 + 8/6435 * n^6 + 28/36465 * n^7 + 32/62985 * n^8 + 4/11305 * n^9)
            - (3/40 + 12/35 * n + 589/840 * n^2 + 1063/1155 * n^3 + 14743/15015 * n^4 + 14899/15015 * n^5 + 254207/255255 * n^6 + 691127/692835 * n^7 + 1614023/1616615 * n^8) * eps
            + (67/280 + 7081/5040 * n + 5519/1320 * n^2 + 6417449/720720 * n^3 + 708713/45045 * n^4 + 2700154/109395 * n^5 + 519037063/14549535 * n^6 + 78681626/1616615 * n^7) * eps^2
            - (29597/40320 + 30013/5280 * n + 33759497/1441440 * n^2 + 100611307/1441440 * n^3 + 16639623457/98017920 * n^4 + 3789780779/10581480 * n^5 + 1027832503/1511640 * n^6) * eps^3
            + (357407/147840 + 19833349/823680 * n + 61890679/480480 * n^2 + 97030756063/196035840 * n^3 + 2853930388817/1862340480 * n^4 + 15123282583393/3724680960 * n^5) * eps^4
            - (13200233/1537536 + 306285589/2882880 * n + 26279482199/37340160 * n^2 + 3091446335399/931170240 * n^3 + 93089556575647/7449361920 * n^4) * eps^5
            + (107042267/3294720 + 253176989449/522762240 * n + 57210830762263/14898723840 * n^2 + 641067300459403/29797447680 * n^3) * eps^6
            - (51544067373/398295040 + 38586720036247/17027112960 * n + 104152290127363/4966241280 * n^2) * eps^7
            + (369575321823/687964160 + 1721481081751393/158919720960 * n) * eps^8
            - 10251814360817/4445306880 * eps^9;
    G4[1] = + (1/120 + 4/105 * n + 589/7560 * n^2 + 1063/10395 * n^3 + 14743/135135 * n^4 + 14899/135135 * n^5 + 254207/2297295 * n^6 + 691127/6235515 * n^7 + 1614023/14549535 * n^8) * eps
            - (53/1680 + 847/4320 * n + 102941/166320 * n^2 + 1991747/1441440 * n^3 + 226409/90090 * n^4 + 3065752/765765 * n^5 + 24256057/4157010 * n^6 + 349229428/43648605 * n^7) * eps^2
            + (4633/40320 + 315851/332640 * n + 5948333/1441440 * n^2 + 11046565/864864 * n^3 + 9366910279/294053760 * n^4 + 23863367599/349188840 * n^5 + 45824943037/349188840 * n^6) * eps^3
            - (8021/18480 + 39452953/8648640 * n + 3433618/135135 * n^2 + 29548772933/294053760 * n^3 + 44355142973/139675536 * n^4 + 4771229132843/5587021440 * n^5) * eps^4
            + (2625577/1537536 + 5439457/247104 * n + 353552588953/2352430080 * n^2 + 405002114215/558702144 * n^3 + 61996934629789/22348085760 * n^4) * eps^5
            - (91909777/13178880 + 2017395395921/18819440640 * n + 51831652526149/59594895360 * n^2 + 1773086701957889/357569372160 * n^3) * eps^6
            + (35166639971/1194885120 + 26948019211109/51081338880 * n + 7934238355871/1596291840 * n^2) * eps^7
            - (131854991623/1031946240 + 312710596037369/119189790720 * n) * eps^8
            + 842282436291/1481768960 * eps^9;
    G4[2] = + (1/560 + 29/2016 * n + 1027/18480 * n^2 + 203633/1441440 * n^3 + 124051/450450 * n^4 + 1738138/3828825 * n^5 + 98011493/145495350 * n^6 + 4527382/4849845 * n^7) * eps^2
            - (533/40320 + 14269/110880 * n + 908669/1441440 * n^2 + 15253627/7207200 * n^3 + 910103119/163363200 * n^4 + 2403810527/193993800 * n^5 + 746888717/30630600 * n^6) * eps^3
            + (2669/36960 + 2443153/2882880 * n + 1024791/200200 * n^2 + 10517570057/490089600 * n^3 + 164668999127/2327925600 * n^4 + 1826633124599/9311702400 * n^5) * eps^4
            - (5512967/15375360 + 28823749/5765760 * n + 31539382001/871270400 * n^2 + 1699098121381/9311702400 * n^3 + 287618085731/398361600 * n^4) * eps^5
            + (22684703/13178880 + 25126873327/896163840 * n + 10124249914577/42567782400 * n^2 + 836412216748957/595948953600 * n^3) * eps^6
            - (3259030001/398295040 + 2610375232847/17027112960 * n + 2121882247763/1418926080 * n^2) * eps^7
            + (13387413913/343982080 + 939097138279/1135140864 * n) * eps^8
            - 82722916855/444530688 * eps^9;
    G4[3] = + (5/8064 + 23/3168 * n + 1715/41184 * n^2 + 76061/480480 * n^3 + 812779/1782144 * n^4 + 9661921/8953560 * n^5 + 40072069/18106088 * n^6) * eps^3
            - (409/59136 + 10211/109824 * n + 46381/73920 * n^2 + 124922951/43563520 * n^3 + 12524132449/1241560320 * n^4 + 30022391821/1022461440 * n^5) * eps^4
            + (22397/439296 + 302399/384384 * n + 461624513/74680320 * n^2 + 1375058687/41385344 * n^3 + 4805085120841/34763688960 * n^4) * eps^5
            - (14650421/46126080 + 17533571183/3136573440 * n + 1503945368767/29797447680 * n^2 + 43536234862451/139054755840 * n^3) * eps^6
            + (5074867067/2788065280 + 479752611137/13243310080 * n + 1228808683449/3310827520 * n^2) * eps^7
            - (12004715823/1203937280 + 17671119291563/79459860480 * n) * eps^8
            + 118372499107/2222653440 * eps^9;
    G4[4] = + (7/25344 + 469/109824 * n + 13439/411840 * n^2 + 9282863/56010240 * n^3 + 37558503/59121920 * n^4 + 44204289461/22348085760 * n^5) * eps^4
            - (5453/1317888 + 58753/823680 * n + 138158857/224040960 * n^2 + 191056103/53209728 * n^3 + 712704605341/44696171520 * n^4) * eps^5
            + (28213/732160 + 331920271/448081920 * n + 2046013913/283785216 * n^2 + 11489035343/241274880 * n^3) * eps^6
            - (346326947/1194885120 + 11716182499/1891901440 * n + 860494893431/12770334720 * n^2) * eps^7
            + (750128501/386979840 + 425425087409/9287516160 * n) * eps^8
            - 80510858479/6667960320 * eps^9;
    G4[5] = + (21/146432 + 23/8320 * n + 59859/2263040 * n^2 + 452691/2687360 * n^3 + 21458911/26557440 * n^4) * eps^5
            - (3959/1464320 + 516077/9052160 * n + 51814927/85995520 * n^2 + 15444083489/3611811840 * n^3) * eps^6
            + (1103391/36208640 + 120920041/171991040 * n + 18522863/2263040 * n^2) * eps^7
            - (92526613/343982080 + 24477436759/3611811840 * n) * eps^8
            + 1526273559/740884480 * eps^9;
    G4[6] = + (11/133120 + 1331/696320 * n + 145541/6615040 * n^2 + 46863487/277831680 * n^3) * eps^6
            - (68079/36208640 + 621093/13230080 * n + 399883/680960 * n^2) * eps^7
            + (658669/26460160 + 186416197/277831680 * n) * eps^8
            - 748030679/2963537920 * eps^9;
    G4[7] = + (143/2785280 + 11011/7938048 * n + 972829/52093440 * n^2) * eps^7
            - (434863/317521920 + 263678129/6667960320 * n) * eps^8
            + 185257501/8890613760 * eps^9;
    G4[8] = + (715/21168128 + 27313/26148864 * n) * eps^8
            - 1838551/1778122752 * eps^9;
    G4[9] = + 2431/104595456 * eps^9;

# Great ellipses vs geodesics

Some papers advocating the use of great ellipses for navigation exhibit a prejudice against the use of geodesics. These excerpts from Pallikaris, Tsoulos, & Paradissis (2009) give the flavor

- … it is required to adopt realistic accuracy standards in order not only to eliminate the significant errors of the spherical model but also to avoid the exaggerated and unrealistic requirements of sub meter accuracy.
- Calculation of shortest sailings paths on the ellipsoid by a geodetic inverse method involve formulas that are much too complex.
- Despite the fact that contemporary computers are fast enough to handle more complete geodetic formulas of sub meter accuracy, a basic principle for the design of navigational systems is the avoidance of unnecessary consumption of computing power.

This prejudice was probably due to the fact that the most well-known algorithms for geodesics, by Vincenty (1975), come with some "asterisks":

- no derivation was given (although they follow in a straightforward fashion from classic 19th century methods);
- the accuracy is "only" 0.5 mm or so, surely good enough for most applications, but still a reason for a user to worry and a spur to numerous studies "validating" the algorithms;
- no indication is given for how to extend the series to improve the accuracy;
- there was a belief in some quarters (erroneous!) that the Vincenty algorithms could not be used to compute waypoints;
- the algorithm for the inverse problem fails to converge for some inputs.

These problems meant that users were reluctant to bundle the algorithms into a library and treat them as a part of the software infrastructure (much as you might regard the computation of \(\sin x\) as a given). In particular, I regard the last issue, lack of convergence of the inverse solution, as fatal. Even though the problem only arises for nearly antipodal points, it means all users of the library must have some way to handle this problem.

For these reasons, substitution of a great ellipse for the geodesic makes some sense. The solution of the great ellipse is, in principle, no more difficult than solving for the great circle and, for paths of less then 10000 km, the error in the distance is less than 13.5 m.

Now (2014), however, the situation has reversed. The algorithms given by Karney (2013)—and used in GeographicLib since 2009—explicitly resolve the issues with Vincenty's algorithm. The geodesic problem is conveniently bundled into a library. Users can call this with an assurance of an accurate result much as they would when evaluating \(\sin x\). On the other hand, great ellipses come with their own set of asterisks:

- To the extent that they are regarded as approximations to geodesics, the errors need to be quantified, the limits of allowable use documented, etc.
- The user is now left with decisions on when to trust the results and to find alternative solutions if necessary.
- Even though the great ellipse is no more that 13.5 m longer than a 10000 km geodesic, the path of the great ellipse can deviate from the geodesic by as much as 8.3 km. This disqualifies great ellipses from use in congested air corridors where the strategic lateral offset procedure is in effect and in any situation which demands coordination in the routes of vessels.
- Because geodesics obey the triangle inequality, while great ellipses do not, the solutions for realistic navigational problems, e.g., determining the time of closest approach of two vessels, are often simpler in terms of geodesics.

To address some other of the objections in the quotes from Pallikaris et al. given above:

- "exaggerated and unrealistic requirements of sub meter accuracy": The geodesic algorithms allow full double precision accuracy at essentially no cost. This is because Clenshaw summation allows additional terms to be added to the series without the need for addition trigonometric evaluations. Full accuracy is important to maintain because it allows the results to be used reliably in more complex problems (e.g., in the determination of maritime boundaries).
- "unnecessary consumption of computing power": The solution of the inverse geodesic problem takes 2.3 μs; multiple points on a geodesic can be computed at a rate of one point per 0.4 μs. The actual power consumed in these calculations is minuscule compared to the power needed to drive the display of a navigational computer.
- "formulas that are much too complex": There's no question that the solution of the geodesic problem is more complex than for great ellipses. However this complexity is only an issue when implementing the algorithms. For the end user, navigational software employing geodesics is less complex compared with that employing great ellipses. Here is what the user needs to know about the geodesic solution:

  > "The shortest path is found."

  And here is the corresponding documentation for great ellipses:

  > "A path which closely approximates the shortest path is found. Provided that the distance is less than 10000&nbsp;km, the error in distance is no more than 14&nbsp;m and the deviation the route from that of the shortest path is no more than 9&nbsp;km. These bounds apply to the WGS84 ellipsoid. The deviation of the path means that it should be used with caution when planning routes. In addition, great ellipses do not obey the triangle inequality; this disqualifies them from use in some applications."

Having all the geodesic functions bundled up into a reliable "black box" enables users to concentrate on how to solve problems using geodesics (instead of figuring out how to solve for the geodesics). A wide range of problems (intersection of paths, the path for an interception, the time of closest approach, median lines, tri-points, etc.) are all amenable to simple and fast solutions in terms of geodesics.

Back to Rhumb lines. Forward to Transverse Mercator projection. Up to Contents.