GeographicLib 2.1.2
|
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
At this time, there is no C++ support in GeographicLib for great ellipses.
References:
Go to
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:
\[a\tan\beta = b\tan\phi.\]
\[ \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.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 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
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;
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
This prejudice was probably due to the fact that the most well-known algorithms for geodesics, by Vincenty (1975), come with some "asterisks":
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 address some other of the objections in the quotes from Pallikaris et al. given above:
And here is the corresponding documentation for great ellipses:"The shortest path is found."
"A path which closely approximates the shortest path is found. Provided that the distance is less than 10000 km, the error in distance is no more than 14 m and the deviation the route from that of the shortest path is no more than 9 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.