+ All Categories
Home > Documents > arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the...

arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the...

Date post: 22-Jul-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
29
arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 Link http://geographiclib.sourceforge.net/geod.html Geodesics on an ellipsoid of revolution Charles F. F. Karney SRI International, 201 Washington Rd, Princeton, NJ 08543-5300, USA (Dated: February 7, 2011) Algorithms for the computation of the forward and inverse geodesic problems for an ellipsoid of revolution are derived. These are accurate to better than 15 nm when applied to the terrestrial ellipsoids. The solutions of other problems involving geodesics (triangulation, projections, maritime boundaries, and polygonal areas) are investigated. Keywords: geometrical geodesy, geodesics, map projections, triangulation, maritime boundaries, polygonal areas, numerical methods 1. INTRODUCTION A geodesic is the natural “straight line”, defined as the line of minimum curvature, for the surface of the earth (Hilbert and Cohn-Vossen, 1952, pp. 220–222). Geodesics are also of interest because the shortest path between two points on the earth is always a geodesic (although the con- verse is not necessarily true). In most terrestrial applications, the earth is taking to be an ellipsoid of revolution and I adopt this model in this paper. Consider two points A, at latitude and longitude (φ 1 1 ), and B, at (φ 2 2 ), on the surface of the earth connected by α 0 α 2 α 1 s 12 φ 2 φ 1 λ 12 E F H N A B FIG. 1 The ellipsoidal triangle NAB. N is the north pole, NA and NB are meridians, and AB is a geodesic of length s12. The longi- tude of B relative to A is λ12; the latitudes of A and B are φ1 and φ2. EFH is the equator with E also lying on the extension of the geodesic AB; and α0, α1, and α2 are the azimuths of the geodesic at E, A, and B. Electronic address: [email protected] a geodesic. Denote the bearings of the geodesic (measured clockwise from north) at A and B by α 1 and α 2 , respectively, and the length of the geodesic by s 12 ; see Fig. 1. There are two main “geodesic problems”: the direct problem, given φ 1 , s 12 , and α 1 determine φ 2 , λ 12 = λ 2 λ 1 , and α 2 ; and the inverse problem, given the φ 1 , φ 2 , and λ 12 , determine s 12 , α 1 , and α 2 . Considering the ellipsoidal triangle, NAB, in Fig. 1, where N is the north pole, it is clear that both problems are equivalent to solving the triangle given two sides and the included angle. In the first half of this paper (Secs. 2–9), I present solutions to these problems: the accuracy of the solutions is limited only by the precision of the number system of the computer; the direct solution is non-iterative; the inverse solution is iterative but always converges in a few iterations. In the second half (Secs. 10–15), I discuss several applications of geodesics. This paper has had a rather elephantine gestation. My ini- tial work in this area grew out of a dissatisfaction with the widely used algorithms for the main geodesic problems given by Vincenty (1975a). These have two flaws: firstly, the al- gorithms are given to a fixed order in the flattening of the ellipsoid thereby limiting their accuracy; more seriously, the algorithm for the inverse problem fails in the case of nearly antipodal points. Starting with the overview of the problem given by Williams (2002), I cured the defects noted above and included the algorithms in GeographicLib (Karney, 2010) in March 2009. At the same time, I started writing this paper and in the course of this I came across references in, for example, Rainsford (1955) to work by Euler, Legendre, and Bessel. Be- cause no specific citations were given, I initially ignored these references. However, when I finally stumbled across Bessel’s paper on geodesics (Bessel, 1825), I was “like some watcher of the skies when a new planet swims into his ken”. Overlook- ing minor quirks of notation and the use of logarithms for nu- merical calculations, Bessel gives a formulation and solution of the direct geodesic problem which is as clear, as concise, and as modern as any I have read. However, I was surprised to discover that Bessel derived series expansions for the geo- desic integrals which are more economical than those used in the English-language literature of the 20th century. This prompted me to undertake a systematic search for the other
Transcript
Page 1: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

arX

iv:1

102.

1215

v1 [

phys

ics.

geo-

ph]

7 F

eb 2

011

Link http://geographiclib.sourceforge.net/geod.html

Geodesics on an ellipsoid of revolution

Charles F. F. Karney∗

SRI International, 201 Washington Rd, Princeton, NJ 08543-5300, USA

(Dated: February 7, 2011)

Algorithms for the computation of the forward and inverse geodesic problems for an ellipsoid of revolution arederived. These are accurate to better than15 nm when applied to the terrestrial ellipsoids. The solutions ofother problems involving geodesics (triangulation, projections, maritime boundaries, and polygonal areas) areinvestigated.

Keywords: geometrical geodesy, geodesics, map projections, triangulation, maritime boundaries, polygonalareas, numerical methods

1. INTRODUCTION

A geodesic is the natural “straight line”, defined as theline of minimum curvature, for the surface of the earth(Hilbert and Cohn-Vossen, 1952, pp. 220–222). Geodesicsare also of interest because the shortest path between twopoints on the earth is always a geodesic (although the con-verse is not necessarily true). In most terrestrial applications,the earth is taking to be an ellipsoid of revolution and I adoptthis model in this paper.

Consider two pointsA, at latitude and longitude(φ1, λ1),andB, at (φ2, λ2), on the surface of the earth connected by

α0

α2

α1

s12

φ2

φ1

λ12

EF

H

N

A

B

FIG. 1 The ellipsoidal triangleNAB. N is the north pole,NA andNB are meridians, andAB is a geodesic of lengths12. The longi-tude ofB relative toA is λ12; the latitudes ofA andB areφ1 andφ2. EFH is the equator withE also lying on the extension of thegeodesicAB; andα0, α1, andα2 are the azimuths of the geodesicatE,A, andB.

∗Electronic address: [email protected]

a geodesic. Denote the bearings of the geodesic (measuredclockwise from north) atA andB byα1 andα2, respectively,and the length of the geodesic bys12; see Fig. 1. There are twomain “geodesic problems”: thedirectproblem, givenφ1, s12,andα1 determineφ2, λ12 = λ2 − λ1, andα2; and theinverseproblem, given theφ1, φ2, andλ12, determines12,α1, andα2.Considering the ellipsoidal triangle,NAB, in Fig. 1, whereNis the north pole, it is clear that both problems are equivalentto solving the triangle given two sides and the included angle.In the first half of this paper (Secs. 2–9), I present solutions tothese problems: the accuracy of the solutions is limited onlyby the precision of the number system of the computer; thedirect solution is non-iterative; the inverse solution is iterativebut always converges in a few iterations. In the second half(Secs. 10–15), I discuss several applications of geodesics.

This paper has had a rather elephantine gestation. My ini-tial work in this area grew out of a dissatisfaction with thewidely used algorithms for the main geodesic problems givenby Vincenty (1975a). These have two flaws: firstly, the al-gorithms are given to a fixed order in the flattening of theellipsoid thereby limiting their accuracy; more seriously, thealgorithm for the inverse problem fails in the case of nearlyantipodal points. Starting with the overview of the problemgiven by Williams (2002), I cured the defects noted above andincluded the algorithms in GeographicLib (Karney, 2010) inMarch 2009. At the same time, I started writing this paper andin the course of this I came across references in, for example,Rainsford (1955) to work by Euler, Legendre, and Bessel. Be-cause no specific citations were given, I initially ignored thesereferences. However, when I finally stumbled across Bessel’spaper on geodesics (Bessel, 1825), I was “like some watcherof the skies when a new planet swims into his ken”. Overlook-ing minor quirks of notation and the use of logarithms for nu-merical calculations, Bessel gives a formulation and solutionof the direct geodesic problem which is as clear, as concise,and as modern as any I have read. However, I was surprisedto discover that Bessel derived series expansions for the geo-desic integrals which are more economical than those usedin the English-language literature of the 20th century. Thisprompted me to undertake a systematic search for the other

Page 2: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

2

original papers on geodesics, the fruits of which are availableon-line (Karney, 2009). These contained other little knownresults—probably the most important of which is the conceptof the reduced length (Sect. 3)— which have been incorpo-rated into the geodesic classes in GeographicLib.

Some authors define “spheroid” as an ellipsoid of revolu-tion. In this paper, I use the term in its more general sense,as an approximately spherical figure. Although this paper isprincipally concerned the earth modeled as an ellipsoid of rev-olution, there are two sections where the analysis is more gen-eral: (1) in the development of the auxiliary sphere, Sect. 2and Appendix A, which applies to a spheroid of revolution;(2) in the generalization of the gnomonic projection, Sect.13,which applies to a general spheroid.

2. AUXILIARY SPHERE

The study of geodesics on an ellipsoid of revolution waspursued by many authors in the 18th and 19th centuries. Theimportant early papers are by Clairaut (1735), Euler (1755),Dionis du Sejour (1789, Book 1, Chaps. 1–3), Legendre(1789, 1806), and Oriani (1806, 1808, 1810). Clairaut (1735)found an invariant for a geodesic (a consequence of the ro-tational symmetry of the ellipsoid); this reduces the equa-tions for the geodesic to quadrature. Subsequently, Legendre(1806) and Oriani (1806) reduced the spheroidal triangle inFig. 1 into an equivalent triangle on the “auxiliary” sphere.Bessel (1825) provided a method (using tables that he sup-plied) to compute the necessary integrals and allowed the di-rect problem to be solved with an accuracy of a few centime-ters. In this section, I summarize this formulation of geo-desics; more details are given in Appendix A in which thederivation of the auxiliary sphere is given.

I consider an ellipsoid of revolution with equatorial radiusa, and polar semi-axisb, flatteningf , third flatteningn, ec-centricitye, and second eccentricitye′ given by

f = (a− b)/a, (1)

n = (a− b)/(a+ b) = f/(2− f), (2)

e2 = (a2 − b2)/a2 = f(2− f), (3)

e′2 = (a2 − b2)/b2 = e2/(1− e2). (4)

In this paper, I am primarily concerned with oblate ellipsoids(a > b); however, with a few exceptions, the formulas applyto prolate ellipsoids merely by allowingf < 0 ande2 < 0.(Appendix D addresses the modifications necessary to treatprolate ellipsoids in more detail.) Most of the examples in thispaper use the WGS84 ellipsoid for whicha = 6378.137kmandf = 1/298.257223563. (In the illustrative examples,numbers given in boldface are exact. The other numbers areobtained by rounding the exact result to the given number ofplaces.) The surface of the ellipsoid is characterized by itsmeridional and transverse radii of curvature,

ρ =a

1− fw3, (5)

ν =a

1− fw, (6)

α0

α

σ (s) β (φ)

ω(λ)

E G

N

P

FIG. 2 The elementary ellipsoidal triangleNEP mapped to the aux-iliary sphere. NE andNPG are meridians;EG is the equator;andEP is the geodesic. The corresponding ellipsoidal variables areshown in parentheses.

respectively, where

w =1

1 + e′2 cos2 φ. (7)

Consider a geodesic which intersects the equator,φ = 0, inthe northwards direction with azimuth (measured clockwisefrom north)α0 ∈ [− 1

2π,12π]. I denote this equatorial cross-

ing pointE and this is taken as the origin for the longitudeλand for measuring (signed) displacementss along the geode-sic. Because this definition of longitude depends on the geo-desic, longitude differences must be computed for points onthe same geodesic. Consider now a pointP with latitudeφ,longitudeλ, a displacements along the geodesic and form theellipsoidal triangleNEP whereN represents the north pole.The (forward) azimuth of the geodesic atP isα (i.e., the angleNPE is π − α).

Appendix A shows how this triangle may be transferred tothe auxiliary sphere where the latitude on the sphere is thereduced latitudeβ, given by

tanβ = (1− f) tanφ (8)

(Legendre, 1806, p. 136), azimuths (α0 andα) are conserved,the longitude is denoted byω, andEP is a portion of agreat circle with arc lengthσ; see Fig. 2. (Cayley (1870,p. 331) suggested the termparametric latitudefor β becausethis is the angle most commonly used when the meridian el-lipse is written in parametric form.) Applying Napier’s rulesof circular parts (Todhunter, 1871,§66) to the right triangleEPG in Fig. 2 gives a set of relations that apply cyclically to[α0,

12π − σ, 12π − α, β, ω],

sinα0 = sinα cosβ (9)

= tanω cotσ, (10)

cosσ = cosβ cosω (11)

= tanα0 cotα, (12)

Page 3: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

3

cosα = cosω cosα0 (13)

= cotσ tanβ, (14)

sinβ = cosα0 sinσ (15)

= cotα tanω, (16)

sinω = sinσ sinα (17)

= tanβ tanα0. (18)

In solving the main geodesic problems, I letP stand forA orB with the quantitiesβ, α, σ, ω, s, andλ acquiring a subscript1 or 2. I also defineσ12 = σ2 − σ1, the increase ofσ alongAB, with ω12, s12, andλ12 defined similarly. Equation (9) isClairaut’s characteristic equation for the geodesic, Eq. (A2).The ellipsoidal quantitiess andλ are then given by (Bessel,1825, Eqs. (5))

1

a

ds

dσ=

dω= w. (19)

wherew, Eq. (7), is now given in terms ofβ by

w =√

1− e2 cos2 β, (20)

and where the derivatives are taken holdingα0 fixed (see Ap-pendix A). Integrating the equation fors and substituting forβ from Eq. (15) gives (Bessel, 1825,§5)

s

b=

∫ σ

0

1 + k2 sin2 σ′ dσ′, (21)

where

k = e′ cosα0. (22)

As Legendre (1811,§127) points out, the expression forsgiven by Eq. (21) is the same as that for the length along theperimeter of an ellipse with semi-axesb andb

√1 + k2. The

equation forλ may also be expressed as an integral inσ byusing the second of Eqs. (A4),dω/dσ = sinα/ cosβ; thisgives (Bessel, 1825,§9)

λ = ω − f sinα0

∫ σ

0

2− f

1 + (1− f)√

1 + k2 sin2 σ′

dσ′.

(23)Consider a geodesic on the auxiliary sphere completely encir-cling the sphere. On the ellipsoid, the end pointB satisfiesφ2 = φ1 andα2 = α1; however, from Eq. (23), the longitudedifferenceλ12 falls short of2π by approximately2πf sinα0.As a consequence, geodesics on ellipsoids (as distinct fromspheres) are not, in general, closed.

In principle, the auxiliary sphere and Eqs. (21) and (23)enable the solution of all geodesic problems on an ellipsoid.However, the efficient solution of the inverse problem requiresknowledge of how neighboring geodesics behave. This is ex-amined in the next section.

3. REDUCED LENGTH

Following Bessel’s paper, Gauss (1902) studied the prop-erties of geodesics on general surfaces. Consider all the geo-desics emanating from a pointA. Define ageodesic circle

FIG. 3 Geodesics from a pointφ1 = −30◦. The east-going geo-desics with azimuthsα1 which are multiples of10◦ are shown asheavy lines. The spherical arc length of the geodesics isσ12 = 180◦.The geodesics are viewed from a distant point over the equator atλ−λ1 = 90◦. The light lines show equally spaced geodesic circles.The flattening of the ellipsoid was taken to bef = 1

5for the purposes

of this figure.

centered atA to be the locus of points a fixed (geodesic) dis-tances12 from A; this is a straightforward extension of thedefinition of a circle on a plane. Gauss (1902,§15) provedthat geodesic circles intersect the geodesics at right angles;see Fig. 3.

(Circles on a plane also have a second property: they are thecurves which enclose the maximum area for a given perimeter.On an ellipsoid such curves have constant geodesic curvature(Minding, 1830). Darboux (1894,§652) adopts this as hisdefinition of the geodesic circle; however, in general, thesecurves are different from the geodesic circles as defined in theprevious paragraph.)

Gauss (1902) also introduced the concept of thereducedlengthm12 for the geodesic which is also the subject of adetailed investigation by Christoffel (1910) (the term is hiscoinage). Consider two geodesics of lengths12 departingfromA at azimuthsα1 andα1+dα1. On a flat surface the endpoints are separated bys12 dα1 (in the limit dα1 → 0). Ona curved surface the separation ism12 dα1 wherem12 is thereduced length. Gauss (1902,§19) showed that the reducedlength satisfies the differential equation

d2m

ds2+K(s)m = 0, (24)

whereK(s) is the Gaussian curvature of the surface. Letm(s; s1) be the solution to Eq. (24) subject to the initial con-ditions

m(s1; s1) = 0,dm(s; s1)

ds

s=s1

= 1;

thenm12 is given bym12 = m(s2; s1). Equation (24) obeysa simple reciprocity relationm(s1; s2) = −m(s2; s1) which

Page 4: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

4

gives the result (Christoffel, 1910,§9) that the reduced lengthis invariant under interchange of the end points, i.e.,m21 =−m12.

For a geodesic on an ellipsoid of revolution, the Gaussiancurvature is given by

K =1

ρν=

b2

a4w4=

1

b2(1 + k2 sin2 σ)2. (25)

Helmert (1880,§6.5) solves Eq. (24) in this case to give

m12/b =√

1 + k2 sin2 σ2 cosσ1 sinσ2

−√

1 + k2 sin2 σ1 sinσ1 cosσ2

− cosσ1 cosσ2(

J(σ2)− J(σ1))

, (26)

where

J(σ) =

∫ σ

0

k2 sin2 σ′

1 + k2 sin2 σ′

dσ′

=s

b−∫ σ

0

1√

1 + k2 sin2 σ′

dσ′. (27)

In the spherical limit, Eq. (26) reduces to

m12 = a sinσ12 = a sin(s12/a).

Gauss (1902,§23) also introduced what I call thegeode-sic scaleM12, which gives the separation of close, initiallyparallel, geodesics, and which is given by another solutionofEq. (24),M(s; s1), with the initial conditions

M(s1; s1) = 1,dM(s; s1)

ds

s=s1

= 0.

Darboux (1894,§633) shows how to construct the solutiongiven two independent solutions of Eq. (24) which are given,for example, by Eq. (26) with two different starting points.This gives

M12 = cosσ1 cosσ2

+

1 + k2 sin2 σ2√

1 + k2 sin2 σ1sinσ1 sinσ2

− sinσ1 cosσ2(

J(σ2)− J(σ1))

1 + k2 sin2 σ1, (28)

whereM12 = M(s2; s1). Note thatM12 is not symmetricunder interchange of the end points. In the spherical limit,Eq. (28) reduces to

M12 = cosσ12 = cos(s12/a).

By direct differentiation, it is easy to show that the Wronskianfor the two solutionsm12 andM12 is a constant. Substitutingthe initial conditions then gives

M12dm12

ds2−m12

dM12

ds2= 1. (29)

There is little mention of the reduced length in the geodeticliterature in the English language of the last century. An ex-ception is Tobey (1928, Prop. IV) who derives an expressionfor m12 as a series valid for smalls12/a (Rapp, 1991,§4.22).

4. PROPERTIES OF THE INTEGRALS

The solution of the main geodesic problems requires theevaluation of the three integrals appearing in Eqs. (21), (27),and (23). In order to approach the evaluation systematically, Iwrite these integrals as

I1(σ) =

∫ σ

0

1 + k2 sin2 σ′ dσ′, (30)

I2(σ) =

∫ σ

0

1√

1 + k2 sin2 σ′

dσ′, (31)

I3(σ) =

∫ σ

0

2− f

1 + (1− f)√

1 + k2 sin2 σ′

dσ′. (32)

In terms ofIj(σ), Eqs. (21), (27), and (23) become

s/b = I1(σ), (33)

J(σ) = I1(σ)− I2(σ), (34)

λ = ω − f sinα0 I3(σ). (35)

The integralsIj(σ) may be expressed in terms of ellipticfunctions as (Forsyth, 1896; Jacobi, 1855; Luther, 1856)

I1(σ) = k′1

∫ u1

0

nd2(u′, k1) du′, (36)

I2(σ) = k′1u1, (37)

I3(σ) = − (1− f)k′1f sin2 α0

∫ u1

0

nd2(u′, k1)

1 + cot2 α0 cd2(u′, k1)

du′

+tan−1(sinα0 tanσ)

f sinα0, (38)

wherek1 = k/√1 + k2, k′1 =

√1− k21 = 1/

√1 + k2,

am(u1 −K(k1), k1) = σ − 12π,

cd(x, k) and nd(x, k) are Jacobian elliptic functions(Olveret al., 2010, §22.2), am(x, k) is Jacobi’s amplitudefunction (Olveret al., 2010,§22.16(i)), andK(k) is the com-plete elliptic integral of the first kind (Olveret al., 2010,§19.2(ii)). The integrals can also be written in closed form as(Legendre, 1811,§§127–128)

I1(σ) =1

k′1E(σ − 1

2π, k1)− c1, (39)

I2(σ) = k′1F (σ − 12π, k1)− c2, (40)

I3(σ) = − 1− f

fk′1 sin2 α0

G(σ − 12π,− cot2 α0, k1)

+tan−1(sinα0 tanσ)

f sinα0− c3, (41)

where

G(φ, α2, k) =

∫ φ

0

1− k2 sin2 θ

1− α2 sin2 θdθ

=

(

1− k2

α2

)

Π(φ, α2, k) +k2

α2F (φ, k), (42)

Page 5: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

5

the integration constantscj are given by the conditionIj(0) =0, andF (φ, k), E(φ, k), andΠ(φ, α2, k) are Legendre’s in-complete elliptic integrals of the first, second, and third kinds(Olveret al., 2010,§19.2(ii)).

There are several ways that the integrals may be com-puted. One possibility is merely to utilize standard algorithms(Bulirsch, 1965; Carlson, 1995) for elliptic functions andin-tegrals for the evaluation of Eqs. (39)–(41). Alternatively,some authors, for example Saito (1970, 1979), have employednumerical quadrature on Eqs. (30) and (32). However, thepresence of small parameters in the integrals also allow theintegrals to be expressed in terms of rapidly converging se-ries. Bessel (1825) used this approach and tabulated the co-efficients appearing in these series thereby allowing the directgeodesic problem to be solved easily and with an accuracy ofabout 8 decimal digits. I also use this technique because itallows the integrals to be evaluated efficiently and accurately.

Before carrying out the series expansions, it is useful to es-tablished general properties of the integrals. As functions ofσ, the integrands are all even, periodic with periodπ, posi-tive, and of the form1 + O(f). (Note thatk2 = O(f).) TheintegralsIj(σ) can therefore be expressed as

Ij(σ) = Aj

(

σ +Bj(σ))

, for j = 1, 2, 3, (43)

where the constantAj = 1+O(f) andBj(σ) = O(f) is oddand periodic with periodπ and so may be written as

Bj(σ) =

∞∑

l=1

Cjl sin 2l, σ for j = 1, 2, 3. (44)

In addition, it is easy to show thatCjl = O(f l). In order toobtain results fors, λ, andm12 accurate to orderfL, truncatethe sum in Eq. (44) atl = L for j = 1 and2 and atl =L − 1 for j = 3. (In the equation forλ, Eq. (35),I3(σ) ismultiplied byf ; so it is only necessary to compute this integralto orderfL−1.) Similarly, the expansions forAj andCjl maybe truncated at orderfL for j = 1 and2 and at orderfL−1

for j = 3.The form of the trigonometric expansion, Eqs. (43) and

(44), and the subsequent expansion of the coefficients as Tay-lor series inf (or an equivalent small parameter), that I de-tail in the next section, provide expansions for the integralswhich, with a modest number of terms, are valid for arbitrar-ily long geodesics. This is to be distinguished from a numberof approximate methods for short geodesics (Rapp, 1991,§6),which were derived as an aid to computing by hand.

5. SERIES EXPANSIONS OF THE INTEGRALS

Finding explicit expressions forAj andCjl is simply matterof expanding the integrands for smallk andf enabling theintegrals to be evaluated. I used the algebra system Maxima(2009) to carry out the necessary expansion, integration, andsimplification. Here, I present the expansions to orderL = 8.

The choice of expansion parameter affects the compactnessof the resulting expressions. In the case ofI1, Bessel intro-

duced a change of variable,

k2 =4ǫ

(1− ǫ)2, (45)

ǫ =

√1 + k2 − 1√1 + k2 + 1

=k2

(√1 + k2 + 1

)2 , (46)

into Eq. (30) to give

(1 − ǫ)I1(σ) =

∫ σ

0

1− 2ǫ cos 2σ′ + ǫ2 dσ′. (47)

The integrand now exhibits the symmetry that it is invariantunder the transformationǫ → −ǫ andσ → 1

2π − σ. Thisresults in a series with half the number of terms (comparedto a simple expansion ink2). The relation betweenk andǫis the same as that between the second eccentricity and thirdflattening of an ellipsoid,e′ andn, and frequently formulas forellipsoids are simpler when expressed in terms ofn because ofthe symmetry of its definition, Eq. (2). (Bessel undertook thetask of tabulating the coefficients in the series forB1(σ) forsome 200 different values ofk. This gave him with a strongincentive to find a way to halve the amount of work required.)

The quantityǫ isO(f); thus expanding Eq. (47) to orderf8

is, asymptotically, equivalent to expanding to orderǫ8. Carry-ing out this expansion inǫ then yields

A1 = (1− ǫ)−1(

1 + 14ǫ

2 + 164ǫ

4 + 1256ǫ

6

∥ + 2516384 ǫ

8 + · · ·)

, (48)

C11 = − 12ǫ+

316ǫ

3 − 132 ǫ

5∥

∥ + 192048 ǫ

7 + · · · ,C12 = − 1

16ǫ2 + 1

32ǫ4 − 9

2048ǫ6∥

∥ + 74096ǫ

8 + · · · ,C13 = − 1

48ǫ3 + 3

256 ǫ5∥

∥ − 32048ǫ

7 + · · · ,C14 = − 5

512ǫ4 + 3

512 ǫ6∥

∥ − 1116384 ǫ

8 + · · · ,C15 = − 7

1280ǫ5∥

∥ + 72048ǫ

7 + · · · ,C16 = − 7

2048ǫ6∥

∥ + 94096ǫ

8 + · · · ,C17 =

∥ − 3314336ǫ

7 + · · · ,C18 =

∥ − 429262144ǫ

8 + · · · . (49)

I use the caesura symbol,∥

∥, to indicate where the series maybe truncated, atO(f6), while still giving full accuracy withdouble-precision arithmetic for|f | ≤ 1/150 (this is estab-lished in Sect. 9). Equation (49) is a simple extension of se-ries given by Bessel (1825,§5), except that I have dividedout the coefficient of the linear termA1. Bessel’s formula-tion was used throughout the 19th century and the series givenhere, truncated to orderǫ4, coincides with Helmert (1880,Eq. (5.5.7)). However, many later works, such as Rainsford(1955, Eqs. (18)–(19)), use less efficient expansions ink2.

The expansion forI2 proceeds analogously yielding

A2 = (1− ǫ)(

1 + 14ǫ

2 + 964ǫ

4 + 25256ǫ

6

∥ + 122516384ǫ

8 + · · ·)

, (50)

C21 = 12 ǫ+

116ǫ

3 + 132ǫ

5∥

∥ + 412048ǫ

7 + · · · ,C22 = 3

16 ǫ2 + 1

32ǫ4 + 35

2048ǫ6∥

∥ + 474096 ǫ

8 + · · · ,

Page 6: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

6

C23 = 548ǫ

3 + 5256ǫ

5∥

∥ + 232048ǫ

7 + · · · ,C24 = 35

512ǫ4 + 7

512 ǫ6∥

∥ + 13316384 ǫ

8 + · · · ,C25 = 63

1280ǫ5∥

∥ + 212048ǫ

7 + · · · ,C26 = 77

2048ǫ6∥

∥ + 334096ǫ

8 + · · · ,C27 =

42914336ǫ

7 + · · · ,C28 =

6435262144ǫ

8 + · · · . (51)

The expansion ofI3 is more difficult because of the pres-ence of two parametersf andk; this presented a problem forBessel—it was a practical impossibility for him to compilecomplete tables of coefficients with two dependencies. Later,when the flattening of the earth was known with some preci-sion, he might have contemplated compiling tables for a fewvalues off . Instead, Bessel (1825,§8) employs a transforma-tion to move the dependence on the second parameter into ahigher order term which he then neglects. The magnitude ofthe neglected term is about0.000 003′′ for geodesics stretch-ing half way around the WGS84 ellipsoid; this correspondsto an error in position of about0.1mm. Although this is avery small error, there is no need to resort to such trickerynowadays because computers can evaluate the coefficients asneeded.

Following Helmert (1880, Eq. (5.8.14)), I expand inn andǫ, both of which areO(f), to give

A3 = 1−(

12 − 1

2n)

ǫ−(

14 + 1

8n− 38n

2)

ǫ2

−(

116 + 3

16n+ 116n

2∥

∥ − 516n

3)

ǫ3

−(

364 + 1

32n∥

∥ + 532n

2 + 5128n

3 + · · ·)

ǫ4

−(

3128

∥ + 5128n+ 5

256n2 + · · ·

)

ǫ5∥

∥ −(

5256 + 15

1024n+ · · ·)

ǫ6 − 252048ǫ

7 + · · · ,(52)

C31 =(

14 − 1

4n)

ǫ+(

18 − 1

8n2)

ǫ2

+(

364 + 3

64n− 164n

2∥

∥ − 564n

3)

ǫ3

+(

5128 + 1

64n∥

∥ + 164n

2 − 164n

3 + · · ·)

ǫ4

+(

3128

∥ + 11512n+ 3

512n2 + · · ·

)

ǫ5∥

∥ +(

211024 + 5

512n+ · · ·)

ǫ6 + 24316384ǫ

7 + · · · ,C32 =

(

116 − 3

32n+ 132n

2)

ǫ2

+(

364 − 1

32n− 364n

2∥

∥ + 132n

3)

ǫ3

+(

3128 + 1

128n∥

∥ − 9256n

2 − 3128n

3 + · · ·)

ǫ4

+(

5256

∥ + 1256n− 1

128n2 + · · ·

)

ǫ5∥

∥ +(

272048 + 69

8192n+ · · ·)

ǫ6 + 18716384ǫ

7 + · · · ,C33 =

(

5192 − 3

64n+ 5192n

2∥

∥ − 1192n

3)

ǫ3

+(

3128 − 5

192n∥

∥ − 164n

2 + 5192n

3 + · · ·)

ǫ4

+(

7512

∥ − 1384n− 77

3072n2 + · · ·

)

ǫ5∥

∥ +(

3256 − 1

1024n+ · · ·)

ǫ6 + 13916384ǫ

7 + · · · ,C34 =

(

7512 − 7

256n∥

∥ + 5256n

2 − 71024n

3 + · · ·)

ǫ4

+(

7512

∥ − 5256n− 7

2048n2 + · · ·

)

ǫ5∥

∥ +(

91024 − 43

8192n+ · · ·)

ǫ6 + 12716384ǫ

7 + · · · ,

C35 =(

212560

∥ − 9512n+ 15

1024n2 + · · ·

)

ǫ5∥

∥ +(

91024 − 15

1024n+ · · ·)

ǫ6 + 9916384ǫ

7 + · · · ,C36 =

(

112048 − 99

8192n+ · · ·)

ǫ6 + 9916384ǫ

7 + · · · ,C37 =

429114688 ǫ

7 + · · · . (53)

I continue these expansions out to orderf7, which is, as notedas the end of Sect. 4, consistent with expanding the other inte-grals to orderf8. All the parenthetical terms in Eqs. (52) and(53) are functions ofn only and so may be evaluated once fora given ellipsoid. Note that the coefficient ofǫl is a terminat-ing polynomial of orderl in n. This is a curious degeneracyof this integral when expressed in terms ofn andǫ. Rainsford(1955, Eqs. (10)–(11)) writesk2 in Eq. (23) in terms off andcos2 α0 and gives a expansion for the integral in powers off .This results in an expansion with more terms.

The direct geodesic problem requires solving Eq. (21) forσin terms ofs. (There is a unique solution becauseds/dσ > 0.)Equations (33) and (43), withj = 1, can be written as

τ = σ +B1(σ), (54)

where

τ = s/(bA1), (55)

which shows that findingσ as a function ofs is equivalent toinverting Eq. (54). This may be accomplished using Lagrange(1869,§16) inversion, which gives

σ = τ +B′

1(τ), (56)

where

B′

j(τ) =∞∑

l=1

(−1)l

l!

dl−1Bj(σ)l

dσl−1

σ=τ

.

Carrying out these operations with Maxima (2009) gives

B′

j(τ) =

∞∑

l=1

C′

jl sin 2lτ, (57)

where

C′

11 = 12ǫ − 9

32ǫ3 + 205

1536ǫ5∥

∥ − 487973728ǫ

7 + · · · ,C′

12 = 516 ǫ

2 − 3796ǫ

4 + 13354096 ǫ

6∥

∥ − 86171368640 ǫ

8 + · · · ,C′

13 = 2996 ǫ

3 − 75128ǫ

5∥

∥ + 29014096ǫ

7 + · · · ,C′

14 = 5391536 ǫ

4 − 23912560ǫ

6∥

∥ + 1082857737280 ǫ

8 + · · · ,C′

15 = 34677680 ǫ

5∥

∥ − 2822318432 ǫ

7 + · · · ,C′

16 = 3808161440 ǫ

6∥

∥ − 733437286720 ǫ

8 + · · · ,C′

17 =∥

459485516096 ǫ

7 + · · · ,C′

18 =∥

10916785182575360 ǫ

8 + · · · . (58)

Legendre (1806,§13) makes a half-hearted attempt at in-verting Eq. (21) in terms of trigonometric functions ofs/b(instead ofs/(bA1)). Because the period is slightly differ-ent fromπ, the result is a much more messy expansion than

Page 7: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

7

given here. Oriani (1833) used Lagrange inversion to solvethe distance integral as a series ink2. Finally, Helmert (1880,Eq. (5.6.8)) carries out the inversion in terms ofǫ (as here)including terms to orderǫ3.

Most other authors invert Eq. (21) iteratively. Both Bessel(1825) and Vincenty (1975a) use the scheme given by the firstline of

σ(i+1) = τ −B1(σ(i))

= σ(i) +s/b− I1(σ

(i))

A1,

with σ(0) = τ . This converges linearly and this is adequateto achieve accuracies on the order of0.1mm. A superior it-erative solution is given by Newton’s method which can bewritten as

σ(i+1) = σ(i) +s/b− I1(σ

(i))√

1 + k2 sin2 σ(i),

which converges quadratically enabling the solution to fullmachine precision to be found in a few iterations. The sim-ple iterative scheme effectively replaces the denominatorinthe fraction above by its mean valueA1. By using the re-verted series, I solve forσ non-iteratively. This does incur thecost of evaluating the coefficientsC′

1l; however, this cost canbe amortized if several points along the same geodesics arecomputed.

I give the expansions forAj , Cjl, andC′1l to orderf8

above. However, these expansions are generated by Maxima(2009) with only a few dozen lines of code in about 4 sec-onds. The expansions can easily be extended to higher orderjust by changing one parameter in the Maxima code; this hasbeen tested by generating the series to orderf30, which takesabout 13 minutes. Maxima is also used to generate the C++code for the expansions in GeographicLib. Treating Maximaas a preprocessor for the C++ compiler, the methods presentedhere can be considered to be of arbitrary order. In the currentGeographicLib implementation, the order of the expansion isa compile-time constant which can be set to anyL ≤ 8. Asa practical matter, the series truncated at orderf6 suffice togive close to full accuracy with double-precision arithmeticfor terrestrial ellipsoids.

Although Oriani (1806) and Bessel (1825) give expressionsfor general terms in their expansions, most subsequent authorsare content to work out just a few terms. An exception isthe work of Levallois and Dupuy (1952) who formulate theproblem in terms of Wallis integrals where the general termin the series is given by a recursion relation, allowing the se-ries to be extended to arbitrary order at run-time (Levallois,1970, Chap. 5). Pittman (1986) independently derived a sim-ilar method. Unfortunately, Pittman usesβ as the variable ofintegration (instead ofσ); because the latitude does not changemonotonically along the geodesic, this choice leads to a lossof numerical accuracy and to technical problems in followinggeodesics through vertices (the positions of extrema of thelat-itude for the geodesic).

Because of their widespread adoption, the expansions givenby Vincenty (1975a) are of special interest. He expresses

the distance integral in terms ofC11 and the longitude inte-gral in terms of1 − A3. This leads to rather compact serieswhen truncated at orderf3. However, much of the simplic-ity disappears at the next higher order, at which point Vin-centy’s technique offers no particular advantage. Neverthe-less, his procedure does expose the symmetry betweenk andσ in I1(σ) even though his original expansion was ink2. Be-latedly, Vincenty (1975a, addendum) discovered the economyof Bessel’s change of variable, Eq. (45), to obtain the sameexpansions forA1 andC11 as given here (truncated at orderǫ3). Incidentally, the key constraint that Vincenty worked un-der was that his programs should fit onto calculators, such asthe Wang 720 (Vincenty, 1975b, p. 10), which only had a fewkilobytes of memory; this precluded the use of higher-orderexpansions and allowed for only a simple (and failure prone)iterative solution of the inverse problem. Vincenty cast theseries in “nested”, i.e., Horner, form, in order to minimizeprogram size and register use; I also use the Horner schemefor evaluating the series because of its accuracy and speed.

6. DIRECT PROBLEM

The direct geodesic problem is to determineφ2, λ12, andα2, given φ1, α1 and s12; see Fig. 1. The solution startsby findingβ1 using Eq. (8); next solve the spherical triangleNEA, to giveα0, σ1, andω1, by means of Eqs. (9), (14), and(10). Withα0 known, the coefficientsAj , Cjl, andC′

1l maybe computed from the series in Sect. 5. These polynomials aremost easily computed using the Horner scheme and the Max-ima program accompanying GeographicLib creates the nec-essary code. The functionsBj(σ) andB′

1(σ), Eqs. (44) and(57), may similarly be evaluated for a givenσ using Clenshaw(1955) summation, wherein the truncated series,

f(x) =

L∑

l=1

al sin lx,

is computed by determining

bl =

{

0, for l > L,

al + 2bl+1 cosx− bl+2, otherwise,(59)

and by evaluating the sum as

f(x) = b1 sinx.

Now s1 andλ1 can be determined using Eqs. (33), (35), and(43). Computes2 = s1 + s12 and findσ2 using Eqs. (55) and(56). Solve the spherical triangleNEB to giveβ2, α2, andω2

using Eqs. (15), (12), and (10). Findφ2 using Eq. (8) again.With σ2 andω2 given,λ2 can be found from Eq. (35) whichyieldsλ12 = λ2 − λ1.

Although the reduced lengthm12 is not needed to solve thedirect problem, it is nonetheless a useful quantity to compute.It is found using Eqs. (26), (34), (43), (44), (50), and (51).InformingI1(σ)−I2(σ) in Eq. (34), I avoid the loss of precisionin the term proportional toσ by writing

A1σ −A2σ = (A1 − 1)σ − (A2 − 1)σ,

Page 8: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

8

whereA1 − 1, for example, is given, from Eq. (48), by

A1 − 1 = (1− ǫ)−1(

ǫ+ 14ǫ

2 + 164ǫ

4 + · · ·)

.

The geodesic scalesM12 andM21 may be found similarly,starting with Eq. (28). This completes the solution of the di-rect geodesic problem.

If several points are required along a single geodesic, manyof the intermediate expressions above may be evaluated justonce; this includes all the quantities with a subscript “1”,andthe coefficientsAj ,Cjl, C′

1l. In this case the determination ofthe points entails just two Clenshaw summations and a littlespherical trigonometry. If it is only necessary to obtain pointswhich areapproximatelyevenly spaced on the geodesic, re-places12 in the specification of the direct problem with the arclength on the auxiliary sphereσ12, in which case the conver-sion fromτ toσ is avoided and only one Clenshaw summationis needed.

For speed and accuracy, I avoid unnecessarily invokingtrigonometric and inverse trigonometric functions. Thus Iusually represent an angleθ by the pair the pair(sin θ, cos θ);however, I avoid the loss of accuracy that may ensue whencomputingcosα0, for example, using

1− sin2 α0. Instead,after finding the sine ofα0 using Eq. (9), I compute its cosinewith

cosα0 =√

cos2 α+ sin2 α sin2 β;

similarly, after findingsinβ with Eq. (15), I use

cosβ =√

sin2 α0 + cos2 α0 cos2 σ.

In this way, the angles near the 4 cardinal directions can berepresented accurately. In order to determine the quadrantofangles correctly, I replace Eqs. (10), (12), and (14) by

ω = ph(cosσ + i sinα0 sinσ), (60)

α = ph(cosσ cosα0 + i sinα0), (61)

σ = ph(cosα cosβ + i sinβ), (62)

where θ = ph(x + iy) is the phase of a complex num-ber (Olveret al., 2010,§1.9(i)), typically given by the libraryfunctionatan2(y, x). Equations (60) and (61) become inde-terminate at the poles, wheresinα0 = cosσ = 0. However, Iensure thatω (and henceλ) andα are consistent with their in-terpretation for a latitude very close to the pole (i.e.,cosβ is asmall positive quantity) and that the direction of the geodesicin three-dimensional space is correct. In some contexts, thesolution requires explicit use of the arc lengthσ instead of itssine or cosine, for example, in the termAjσ in Eq. (43) andin determiningσ from Eq. (56).

Geodesics which encircle the earth multiple times can behandled by allowings12 andσ12 to be arbitrarily large. Fur-thermore, Eq. (60) allowsω to be followed around the circle insynchronism withσ; this permits the longitude to be trackedcontinuously along the geodesic so that it increases by+360◦

(resp.−360◦) with each circumnavigation of the earth in theeasterly (resp. westerly) direction.

The solution for the direct geodesic problem presented hereis a straightforward extension to higher order of Helmert’smethod (Helmert, 1880,§5.9), which is largely based onBessel (1825). These authors, in common with many morerecent ones, express the difference of the trigonometric termswhich arise when the sums, Eq. (44), inBj(σ2)−Bj(σ1) areexpanded as

sin 2lσ2 − sin 2lσ1 = 2 cos(

l(σ2 + σ1))

sin lσ12.

This substitution is needed to prevent errors in the evaluationof the terms on the left side of the equation causing large rel-ative errors in the difference when using low-precision arith-metic. However, the use of double-precision arithmetic ren-ders this precaution unnecessary (see Sect. 9); furthermore itsuse interferes with Clenshaw summation and prevents the ef-ficient evaluation of many points along a geodesic.

7. BEHAVIOR NEAR THE ANTIPODAL POINT

Despite the seeming equivalence of the direct and inversegeodesic problems when considered as exercises in ellipsoidaltrigonometry, the inverse problem is significantly more com-plex when transferred to the auxiliary sphere. The includedangle for the inverse problem on the ellipsoid isλ12; however,the equivalent angleω12 on the sphere cannot be immediatelydetermined because the relation betweenλ andω, Eq. (23),depends on the unknown angleα0. The normal approach,epitomized by Rainsford (1955) and Vincenty (1975a), is toestimateα1 andα2, for example, by approximating the el-lipsoid by a sphere (i.e.,ω12 = λ12), obtain a correctedω12

from Eq. (23) and to iterate until convergence. This procedurebreaks down ifα1 andα2 depend very sensitively onω12, i.e.,for nearly antipodal points. Before tackling the inverse prob-lem, it is therefore useful to examine the behavior of geodesicsin this case.

Consider two geodesics starting atA with azimuthsα1 andα1 + dα1. On a closed surface, they will intersect at somedistance fromA. The first such intersection is theconjugatepoint for the geodesic and it satisfiesm12 = 0 (for s12 > 0).Jacobi (1891) showed that the geodesics no longer retain theproperty of being the shortest path beyond the conjugate point(Darboux, 1894,§623). For an ellipsoid with small flattening,the conjugate point is given by

φ2 = −φ1 − fπ cos2 φ1 cos3 α1 +O(f2),

λ2 = λ1 + π − fπ cosφ1 sin3 α1 +O(f2).

The envelope of the geodesics leavingA is given by the lo-cus of the conjugate points and, in the case of an ellipsoid,this yields a four-point star called anastroid (Jacobi, 1891,Eqs. (16)–(17)), whose equation in cartesian form is, aftersuitable scaling (see below),

x2/3 + y2/3 = 1, (63)

which is depicted in Fig. 4a; see also Jacobi (1891, Fig. 11)and Helmert (1880,§7.2). The angular extent of the astroid is,

Page 9: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

9

179 179.5 18029.5

30

30.5(a)

λ12

(°)

φ 2 (°)

179 179.5 18029.5

30

30.5(b)

λ12

(°)

φ 2 (°)

FIG. 4 Geodesics in antipodal region. (a) The geodesics emanat-ing from a pointφ1 = −30◦ are shown close in the neighborhoodof the antipodal point atφ2 = 30◦, λ12 = 180◦. The azimuthsα1 are multiples of5◦ between0◦ and 180◦. The geodesics aregiven in an equidistant cylindrical projection with the scale set forφ2 = 30◦. The heavy lines are geodesics which satisfy the shortestdistance property; the light lines are their continuation.The WGS84ellipsoid is used. (b) The geodesic circles on the same scale. Theheavy (resp. light) lines are for geodesics which have (resp. do nothave) are property of being shortest paths. The cusps on the circleslie on the geodesic envelope in (a).

to lowest order,2fπ cos2 φ1. Figure 4b shows the behavior ofthe geodesic circles in this region.

Although geodesics are no longer the shortest paths beyondthe conjugate point (where they intersect a nearby geodesic),in general, they loose this property earlier when they first in-tersect any geodesic of the same length emanating from the

same starting point. In the case of the ellipsoid, it is easy toestablish earlier intersection points. Consider two geodesicsleavingA with azimuthsα1 andπ − α1. These intersect at|ω12| = π andφ2 = −φ1 and, for oblate ellipsoids this in-tersection is earlier than the conjugate points. For prolate el-lipsoids the corresponding pair of azimuths are±α1 and theseintersect at|λ12| = π, also prior to the conjugate points. Thus,an ellipsoidal geodesic is the shortest path if, and only if,

max(|ω12| , |λ12|) ≤ π.

The only conjugate points lying on shortest paths are for thegeodesics withα1 = ± 1

2π for oblate ellipsoids andα1 = 0or π for prolate ellipsoids. Solving the inverse problem withend points close to such conjugate pairs presents a challengebecause tiny changes in end points lead to large changes in thegeodesic.

The inverse problem may be solved approximately in thecase of nearly antipodal points by considering the pointB to-gether with envelope of geodesics forA (centered at the an-tipodes ofA); see Fig. 5. The coordinates near the antipodescan be rescaled as

x =sin(λ− λ1 − π)

∆λ, y =

sin(β + β1)

∆β,

where

∆λ = fπA3 cosβ1, ∆β = cosβ1∆λ,

andA3 is evaluated withα0 = 12π − |β1|. In the(x, y) coor-

dinate system, the conjugate point for the geodesic leavingAwith α1 = ± 1

2π is at(∓1, 0) and the scale in they directioncompared tox is 1+O(f). The geodesic throughB is tangentto the astroid; plane geometry can therefore be used to find itsdirection, using

x

cos θ− y

sin θ+ 1 = 0, (64)

whereθ = 12π − α2 ≈ α1 − 1

2π is the angle of the geodesicmeasured anticlockwise from thex axis. The constant termon the left hand side of Eq. (64),1, reflects the property oftangents to the astroid, that the lengthCD is constant. (Theastroid is the envelope generated as a ladder slides down awall.) Note that geodesics are directed lines; thus a distinctline is given byθ → θ+ π. The point of tangency of Eq. (64)with the astroid is

x0 = − cos3 θ, y0 = sin3 θ,

which are the parametric equations for the astroid, Eq. (63);the line and the astroid are shown in Fig. 5a. The goal nowis, givenx andy (the position ofB), to solve Eq. (64) forθ.I follow the method given by Vermeille (2002) for convertingfrom geocentric to geodetic coordinates. In Fig. 5b,COD andBED are similar triangles; if the (signed) lengthBC is κ,then an equation forκ can be found by applying Pythagoras’theorem toCOD,

x2

(1 + κ)2+y2

κ2= 1,

Page 10: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

10

1

2

Q2

3

Q3

4

x

y

O

1

1θC

B

D(a)

OC

B E

D

(b)

κ

1−y/κ

−y−x/(1+κ)

−x

FIG. 5 The inverse geodesic problem for nearly antipodal points.(a) The heavy line (labeled 1) shows the shortest geodesic from Ato B continued until it intersects the antipodal meridian atD. Thelight lines (2–4) show 3 other approximately hemisphericalgeode-sics. The geodesics are all tangent (at their points of conjugacy) tothe astroid in this figure. The pointsQ2 andQ3 are the points ofconjugacy for the geodesics 2 and 3. (b) The solution of the astroidequations by similar triangles.

which can be expanded to give a quartic equation inκ,

κ4 + 2κ3 + (1− x2 − y2)κ2 − 2y2κ− y2 = 0. (65)

Onceκ is known,θ can be determined from the triangleCODin Fig. 5b,

θ = ph(

−x/(1 + κ)− iy/κ)

. (66)

The pointC in Fig. 5 corresponds to a spherical longitudedifference ofπ. Thus the spherical longitude difference forB,ω12, can be estimated as

ω12 ≈ π +κx

1 + κ∆λ; (67)

compare with Helmert (1880, Eq. (7.3.11)).In Appendix B, I summarize the closed form solution of

Eq. (65) as given by Vermeille (2002). I have modified this

TABLE 1 The four approximately hemispherical solutions of theinverse geodesic problem on the WGS84 ellipsoid forφ1 = −30

◦,φ2 = 29.9◦, λ12 = 179.8◦, ranked by lengths12.

No. α1 (◦) α2 (

◦) s12 (m) σ12 (◦) m12 (m)

1 161.891 18.091 19 989 833 179.895 57 2772 30.945 149.089 20 010 185 180.116 24 241

3 68.152 111.990 20 011 887 180.267 −22 649

4 −81.076 −99.282 20 049 364 180.631 −68 796

solution so that it is applicable for allx andy and more stablenumerically.

Equation (65) has 2 (resp. 4) real roots ifB lies outside(resp. inside) the astroid. The methods given in Appendix B(with e set to unity) can be used to determine all these roots,κ, and Eq. (66) then gives the corresponding angles of thegeodesics atB. All the geodesics obtained in this way are ap-proximately hemispherical and that obtained using the largestvalue ofκ is the shortest path. IfB lies on the axes within theastroid, then the limiting solutions Eqs. (B6) or (B7) shouldbe used to avoid an indeterminate expression. For example, ify = 0, substitute the largestκ from Eq. (B7) into Eq. (66) togiveθ = ph

(

−x+ i√

max(0, 1− x2))

.Figure 5 shows a case whereB is within the astroid result-

ing in 4 hemispherical geodesics which are listed in Table 1ranked by their length. The values given here have been accu-rately computed for the case of the WGS84 ellipsoid using themethod described in Sect. 8. The second and third geodesicsare eastward (the same sense as the shortest geodesic), whilethe last is westward. AsB crosses the boundary of the astroidthe second and third geodesics approach one another and dis-appear (leaving the first and fourth geodesics). Figure 5a alsoillustrates that the envelope is an evolute of the geodesics; inparticular, Eisenhart (1909,§94) shows that the length of geo-desic 2 fromA to its conjugate pointQ2 exceeds the length ofgeodesic 3 fromA to Q3 by the distance along the envelopefromQ3 toQ2; see also Helmert (1880,§9.2).

Schmidt (2000) uses Helmert’s method for estimating theazimuth. Bowring (1996) proposed a solution of the astroidproblem where he approximates the 4 arcs of the astroid byquarter circles. Rapp (1993, Table 1.6, p. 54) gives a simi-lar set of hemispherical geodesics to those given in Table 1.However, this table contains two misprints:φ2 should be−40◦01′05.759 32′′ and not−40◦00′05.759 32′′; for method3,α12 should be86◦20′38.153 06′′ and not87◦20′38.153 06′′.

8. INVERSE PROBLEM

Recall that the inverse geodesic problem is to determines12, α1 andα2 given φ1, φ2, andλ12. I begin by review-ing the solution of the inverse problem assuming thatω12 isgiven (which is equivalent to seeking the solution of the in-verse problem for a sphere). Write the cartesian coordinatesfor the two end points on the auxiliary sphere (with unit ra-

Page 11: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

11

dius) asA = [cosβ1, 0, sinβ1] andB = [cosβ2 cosω12,cosβ2 sinω12, sinβ2]. A point on the geodesic a small spher-ical arc lengthdσ fromA is at positionA+dA wheredA =[− sinβ1 cosα1, sinα1, cosβ1 cosα1] dσ. The azimuthα1

can be found by demanding thatA, B, anddA be coplanaror thatA×B andA× dA be parallel (where× here denotesthe vector cross product), and similarly forα2. Likewise, thespherical arc lengthσ12 is given byph(A · B + i |A×B|),where· denotes the vector dot product. Evaluating these ex-pressions gives

z1 = cosβ1 sinβ2 − sinβ1 cosβ2 cosω12

+ i cosβ2 sinω12,

z2 = − sinβ1 cosβ2 + cosβ1 sinβ2 cosω12

+ i cosβ1 sinω12,

α1 = ph z1, (68)

α2 = ph z2, (69)

σ12 = ph(sinβ1 sinβ2 + cosβ1 cosβ2 cosω12 + i |z1|).(70)

In order to maintain accuracy whenA andB are nearly coin-cident or nearly antipodal, I evaluate the real part ofz1 as

sin(β2 ∓ β1)±sin2 ω12 sinβ1 cosβ2

1± cosω12,

where the upper and lower signs are forcosω12 ≷ 0. Theevaluation ofz2 is handled in the same way. This completesthe solution of the inverse problem for a sphere.

In the ellipsoidal case, the inverse problem is just a two-dimensional root finding problem. Solve the direct geodesicstarting atA and adjustα1 and s12 (subject to the shortestdistance constraint), so that the terminal point of the geodesicmatchesB. In order to convert this process into an algorithm,a rule needs to be given for adjustingα1 andσ12 so that theprocess converges to the true solution.

The first step in finding such a rule is to convert the two-dimensional problem into a one-dimensional root-finding one.I begin by putting the points in a canonical configuration,

φ1 ≤ 0, φ1 ≤ φ2 ≤ −φ1, 0 ≤ λ12 ≤ π. (71)

This may be accomplished swapping the end points and thesigns of the coordinates if necessary, and the solution maysimilarly be transformed to apply to the original points. Re-ferring to Fig. 3, note that, with these orderings of the coor-dinates, all geodesics withα1 ∈ [0, π] intersect latitudeφ2with λ12 ∈ [0, π]. Furthermore, the search for solutions canbe restricted toα2 ∈ [0, 12π], i.e., when the geodesicfirst in-tersects latitudeφ2. (Forφ2 = −φ1, there is a second shortestpath withα2 ∈ [ 12π, π] if λ12 is nearly equal toπ. But thisgeodesic is easily derived from the first.)

Meridional geodesics are treated as a special case. Theseinclude the casesλ12 = 0 or π andβ1 = − 1

2π with anyλ12.This also includes the case whereA andB are coincident. Inthese cases, setα1 = λ12 andα2 = 0. (This value ofα1 isconsistent with the prescription for azimuths near a pole givenat the end of Sect. 6.)

0 45 90 135 1800

45

90

135

180

α1 (°)

λ 12 (

°)

φ2 = −30°

−25−15

0

152530

FIG. 6 The variation ofλ12 as a function ofα1. The latitudes areφ1 = −30◦ andφ2 = −30◦, −25◦, −15◦, 0◦, 15◦, 25◦, 30◦. Forφ1 < 0 andφ1 < φ2 < −φ1, the curves are strictly increasing,while forφ1 < 0 andφ2 = ±φ1, the curves are non-decreasing withdiscontinuities in the slopes atα1 = 90◦ (see Fig. 7). The WGS84ellipsoid is used.

Define now a variant of the direct geodesic problem: givenφ1, φ2, subject to Eq. (71), andα1, findλ12. Proceed as in thedirect problem up to the solution of the triangleNEA. Findβ2 from Eq. (8) and solve the triangleNEB for α2 ∈ [0, 12π],σ2, ω2 from Eqs. (9), (14), and (10). Finally, determineλ12 asin the solution to the direct problem. In determiningα2 fromEq. (9), I use in addition

cosα2 =+√

cos2 α1 cos2 β1 + (cos2 β2 − cos2 β1)

cosβ2, (72)

where the parenthetical term under the radical is computedby (cosβ2 − cosβ1)(cosβ2 + cosβ1) if β1 < − 1

4π and by(sinβ1 − sinβ2)(sinβ1 + sinβ2) otherwise. It remains todetermine the value ofα1 that results in the given value ofλ12.

I show the behavior ofλ12 as a function ofα1 in Figs. 6–7. For an oblate ellipsoid and|β2| < −β1, λ12 is a strictlyincreasing function ofα1. Forβ2 = β1, λ12 vanishes for0 ≤α1 <

12π; for β2 = −β1, dλ12/dα1 vanishes forα1 = 1

2π+.Therefore ifβ1 = β2 = 0, λ12 is discontinuous atα1 = 1

2πjumping from0 to (1 − f)π. This is the case of equatorialend points—ifλ12 ≤ (1 − f)π, the geodesic lies along theequator, withα1 = α2 = 1

2π.Thus with the ordering given by Eq. (71), simple root find-

ing methods, such as binary search orregula falsi, will allowα1 to be determined for a givenλ12. Because such meth-ods converge slowly, I instead solve forα1 using Newton’smethod.

First, I compute the necessary derivative. Consider a trialgeodesic with initial azimuthα1. If the azimuth is increasedto α1 + dα1 with the length held fixed, then the other end ofthe geodesic moves bym12 dα1 in a direction1

2π+α2. If the

Page 12: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

12

0 30 60 900

1

2

3(a)

−30−29.9

φ2 = −29°

α1 (°)

λ 12 (

°)

90 120 150 180177

178

179

180(b)

30

29.9

φ2 = 29°

α1 (°)

λ 12 (

°)

FIG. 7 Details ofλ12 as a function ofα1 near the discontinuitiesin the slopes. This shows blow-ups of the two “corner” regions inFig. 6 (for φ1 = −30◦). (a) The short line limit, whereφ2 ≈ φ1

andλ12 ≈ 0; here,φ2 is in [−30◦,−29◦] at intervals of0.1◦. Atφ2 = φ1 = −30◦ andα1 = 90◦, the slope changes from zeroto a finite value. (b) The nearly antipodal limit, whereφ2 ≈ −φ1

andλ12 ≈ 180◦; here,φ2 is in [29◦, 30◦] at intervals of0.1◦. Atφ2 = −φ1 = 30◦ andα1 = 90◦, the slope changes from a finitevalue to zero.

geodesic is extended to intersect the parallelφ2 once more, thepoint of intersection moves bym12 dα1/ cosα2; see Fig. 8.The radius of this parallel isa cosβ2, thus the rate of changeof the longitude difference is

dλ12dα1

φ1,φ2

=m12

a

1

cosα2 cosβ2, (73)

where the subscripts on the derivative indicate which quanti-ties are held fixed in taking the derivative. The denominatorcan vanish ifβ2 = |β1| andα2 = 1

2π; in this case, use

dλ12dα1

φ1,φ2

= −√

1− e2 cos2 β1sinβ1

(

1∓ sign(cosα1))

, (74)

for β2 = ±β1. For Newton’s method, pick the positive deriva-tive, i.e., take1 ∓ sign(cosα1) = 2, which corresponds toα1 = 90◦± for φ2 = ±φ1 in Fig. 6.

Newton’s method requires a sufficiently accurate startingguess forα1 to converge. To determine this, I first estimateω12, the longitude difference on the auxiliary sphere, and thenfind α1 using Eq. (68). To obtain this estimate forω12, I dis-tinguish three regions; see Fig. 9 (the caption gives the precise

φ = φ1

φ = φ2

α1

dα1

m12

dα1

α2

m12

dα1secα

2

FIG. 8 Findingdλ12/dα1 with φ1 andφ2 held fixed.

0 πλ12

−|φ1|

|φ1|

φ2

1b

3a

2

1a

3b

FIG. 9 Schematic showing the 5 regions for the inverse problem.Region 1 is given byλ12 <

16π andβ2 − β1 <

16π. Region 1a is

given byσ12 <√δ/max

(

0.1,∣

∣e2∣

)

. Region 3 is given byσ12 >

π(

1 − 3 |f |A3 cos2 β1

)

. Region 3b is given byy > −100δ andx > −1− 1000

√δ.

boundaries of the regions). (1) Short lines: Ifλ12 andβ2 −β1are reasonably small, then useω12 ≈ λ12/w1, wherew1 isgiven by Eq. (20). (2) Intermediate lines: Assumeω12 = λ12,provided that the resultingσ12 is sufficiently less thanπ.(3) Long lines: Analyze the problem using the methods ofSect. 7, evaluatex < 0 andy ≤ 0, and use Eq. (67) as anestimate ofω12. However, ify is very small and−1 ≤ x ≤ 0,thenω12 is nearly equal toπ and Eq. (68) becomes indeter-minate; in this case, estimateα1 directly usingα1 ≈ θ + 1

2π,with θ given by Eq. (66) (region 3b in Fig. 9). This rule is alsoapplied forx slightly less than−1, to ensure that Newton’smethod doesn’t get tripped by the discontinuity in the slopeofλ12(α1) in Fig. 7b.

This provides suitable starting values forα1 for use in New-ton’s method. Carrying out Newton’s method can be avoidedin case 1 above ifσ12, Eq. (70), is sufficiently small (case 1a inFig. 9), in which case the full solution is given by Eqs. (68)–(70) with s12 = aw1σ12. This also avoids the problem ofmaintaining accuracy when solving forλ12 given φ2 ≈ φ1andα1 ≈ 1

2π. Details of the convergence of Newton’s method

Page 13: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

13

are given in Sect. 9. The boundaries of regions 1a and 3b inFig. 9 depend on the precision of the floating-point numbersystem. This is characterized byδ = 1/2p−1 wherep is thenumber of bits of precision in the number system and1 + δis the smallest representable number greater than1. Typicallyp = 53 andδ = 2.2× 10−16 for double precision.

Once a converged value ofα1 has been found, convergedvalues ofα2, σ1, andσ2 are also known (during the courseof the final Newton iteration), ands12 can be found usingEq. (33). The quantitiesm12,M12, andM21 can also be com-puted as in the solution of the direct problem. This completesthe solution of the inverse problem for an ellipsoid.

In the following cases, there are multiple solutions to theinverse problem and I indicate how to find them all given onesolution. (1) Ifφ1 + φ1 = 0 (and neither point is at the pole)and ifα1 6= α2, a second geodesic is obtained by settingα1 =α2 andα2 = α1. (This occurs whenλ12 ≈ ±180◦ for oblateellipsoids.) (2) Ifλ12 = ±180◦ (and neither point is at a pole)and if the geodesic in not meridional, a second geodesic isobtained by settingα1 = −α1 andα2 = −α2. (This occurswhen theφ1 + φ2 ≈ 0 for prolate ellipsoids.) (3) IfA andB are at opposite poles, there are infinitely many geodesicswhich can be generated by settingα1 = α1+γ andα2 = α2−γ for arbitraryγ. (For spheres, this prescription applies whenA andB are antipodal.) (4) Ifs12 = 0 (coincident points),there are infinitely many geodesics which can be generated bysettingα1 = α1 + γ andα2 = α2 + γ for arbitraryγ.

The methods given here can be adapted to return geodesicswhich are not shortest paths provided a suitable starting pointfor Newton’s method is given. For example, geodesics 2–4 inTable 1 can be found by using the negative square root in theequation forcosα2, Eq. (72); and for geodesic 4, solve theproblem with2π−λ12 = 180.2◦ as the longitude difference.In these cases, the starting points are given by the multipleso-lutions of the astroid equation, Eq. (65). Geodesics that wraparound the globe multiple times can be handled similarly.

Although the published inverse method of Vincenty(1975a) fails to converge for nearly antipodal points, he didgive a modification of his method that deals with this case(Vincenty, 1975b). The method requires one minor modifica-tion: following his Eq. (10), insertcosσ = −

1− sin2 σ.The principal drawback of his method (apart from the lim-ited accuracy of his series) is its very slow convergence fornearly conjugate points—in some cases, many thousands of it-erations are required. In contrast, by using Newton’s method,the method described here converges in only a few iterations.Sodano (1958), starting with the same formulation as givenhere (Bessel, 1825; Helmert, 1880) derives an approximatenon-iterative solution for the inverse problem; however, thismay fail for antipodal points (Rapp, 1993,§1.3). Sodano’sjustification for his method is illuminating: a non-iterativemethod is better suited to the mechanical and electronic com-puters of his day. (See also my comment about Vincenty’suse of programmable calculators at the end of Sect. 5.) Thesituation now is, of course, completely different: the series ofBessel and Helmert are readily implemented on modern com-puters and iterative methods are frequently key to efficientandaccurate computational algorithms.

TABLE 2 Truncation errors for the main geodesic problems.∆d

and∆i are approximate upper bounds on the truncation errors forthe direct and inverse problems. The parameters of the WGS84and the SRMmax ellipsoids are used. The SRMmax ellipsoid,a =6400 km, f = 1/150, is an ellipsoid with an exaggerated flatten-ing introduced by the National Geospatial-Intelligence Agency forthe purposes of algorithm testing.

WGS84 SRMmaxL ∆d (m) ∆i (m) ∆d (m) ∆i (m)

2 2.6× 10−2 2.6× 10−2 2.1× 10−1 2.1× 10−1

3 3.7× 10−5 1.6× 10−5 5.8× 10−4 2.5× 10−4

4 1.1× 10−7 3.2× 10−8 3.3× 10−6 1.0× 10−6

5 2.5× 10−10 2.3× 10−11 1.6× 10−8 1.5× 10−9

6 7.7× 10−13 5.3× 10−14 9.6× 10−11 6.6× 10−12

7 2.1× 10−15 4.1× 10−17 5.2× 10−13 1.0× 10−14

8 6.8× 10−18 1.1× 10−19 3.4× 10−15 5.0× 10−17

9 2.0× 10−20 8.0× 10−23 2.0× 10−17 7.9× 10−20

10 6.6× 10−23 2.1× 10−25 1.3× 10−19 4.1× 10−22

12 6.7× 10−28 4.6× 10−31 5.2× 10−24 3.6× 10−27

14 7.0× 10−33 1.1× 10−36 2.2× 10−28 3.3× 10−32

16 7.7× 10−38 2.5× 10−42 9.4× 10−33 3.0× 10−37

18 8.5× 10−43 5.8× 10−48 4.2× 10−37 2.8× 10−42

20 9.7× 10−48 1.4× 10−53 1.9× 10−41 2.7× 10−47

9. ERRORS

Floating-point implementations of the algorithms describedin Secs. 6 and 8 are included in GeographicLib (Karney,2010). These suffer from two sources of error: truncationerrors because the series in Sect. 5, when truncated at or-der L, differ from the exact integrals; and round-off errorsdue to evaluating the series and solving the resulting problemin spherical trigonometry using inexact (floating-point) arith-metic. In order to assess both types of error, it is useful to beable to compute geodesics with arbitrary accuracy. For thispurpose, I used Maxima’s Taylor package to expand the se-ries to 30th order and its “bigfloat” package to solve the directproblem with 100 decimal digits. The results obtained in thisway are accurate to at least 50 decimal digits and may be re-garded as “exact”.

I first present the truncation errors. I carry out a sequenceof direct geodesic computations with randomφ1, α1, ands12(subject to the shortest path constraint) comparing the posi-tion of the end point (φ2 andλ12) computed using the seriestruncated to orderL with the exact result (i.e., withL = 30),in both cases using arithmetic with 100 decimal digits. Theresults are shown in Table 2 which shows the approximatemaximum truncation error as a function ofL ≤ 20. The quan-tity ∆d gives the truncation error for the method as given inSect. 6; this scales asfL. On the other hand,∆i is the trunca-tion error where, instead of solvingσ in terms ofs using thetruncated reverted series, Eq. (56), I invert the truncatedse-ries fors, Eqs. (33) and (43), to giveσ in terms ofs. (This isdone “exactly”, i.e., using Newton’s method and demanding

Page 14: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

14

convergence to 100 decimal places.) This is representativeofthe truncation error in the solution of inverse geodesic prob-lem, because the inverse problem does not involve determin-ing σ in terms ofs. ∆i scales approximately as(12f)

L. Forcomparison, the truncation errors for Vincenty’s algorithm are9.1×10−5m and1.5×10−3m for the WGS84 and SRMmaxellipsoids; these errors are about2.5 times larger than∆d forL = 3 (the order of Vincenty’s series).

I turn now to the measurement of the round-off errors.The limiting accuracy, assuming that the fraction of thefloating-point representation containsp = 53 bits, is about20 000 km/253 ≈ 2 nm (where20 000 km is approximatelyhalf the circumference of the earth). From Table 2, the choiceL = 6 ensures that the truncation error is negligible comparedto the round-off error even forf = 1/150. I assembled a largeset of exact geodesics for the WGS84 ellipsoid to serve as testdata. These were obtained by solving the direct problem usingMaxima using the protocol described at the beginning of thissection. All the test data satisfiesσ12 ≤ 180◦, so that theyare all shortest paths. Each test geodesic gives accurate valuesfor φ1, α1, φ2, λ12, s12, σ12, andm12. In this list φ1, α1,ands12 are “input” values for the direct problem. The othervalues are computed and then rounded to the nearest0.1 pmin the case ofm12 and(10−18)◦ in the case of the angles. Thetest data includes randomly chosen geodesics together witha large number of geodesics chosen to uncover potential nu-merical problems. These include nearly meridional geodesics,nearly equatorial ones, geodesics with one or both end pointsclose to a pole, and nearly antipodal geodesics.

For each test geodesic, I use the floating-point implementa-tions of the algorithms to solve the direct problem from eachend point and to solve the inverse problem. Denoting the re-sults of the computations with an asterisk, I define the errorina computed quantityx by δx = x∗−x. For the direct problemcomputed starting at the first end point, I compute the error inthe computed position of the second end point as

|ρ2δφ2 + i cosφ2ν2δλ2| .

I convert the error in the azimuth into a distance via

a |δα2 − δλ12 sinφ2| ,

which is proportional to the error in the direction of the geo-desic atB in three dimensions and accounts for the couplingof α2 andλ12 near the poles. I compute the correspondingerrors when solving the direct problem starting at the secondend point.

For the inverse problem, I record the error in the length

|δs12| .

I convert the errors in the azimuths into a length using

max(|δα1| , |δα2|) |m12| ;

the multiplication by the reduced length accounts for the sen-sitivity of the azimuths to the positions of the end points. Anobvious example of such sensitivity is when the two pointsare close to opposite poles or when they are very close to each

TABLE 3 Two close geodesics. The parameters of the WGS84 el-lipsoid are used.

Case 1 Case 2

φ1 −30◦

φ2 30◦ (30−

4× 10−15)◦

λ12 179.477 019999 75666◦

α1 90.000 008◦ 90.001 489◦

α2 89.999 992◦ 89.998 511◦

s12 19 978 693.309 037 086m

σ12 180◦ 180.000 000◦

m12 1.1 nm 51µm

other. A less obvious case is illustrated in Table 3. The secondend points in cases 1 and 2 are only0.4 nm apart; and yet theazimuths in the two cases differ by−5.3′′ and the two geo-desics are separated by about160m at their midpoints. (This“unstable” case finding the conjugate point for a geodesic bysolving the direct problem withα1 = 90◦ and spherical arclength ofσ12 = 180◦.)

This provides a suitable measure of theaccuracyof thecomputed azimuths for the inverse problem. I also check theirconsistency. If s12 ≥ a, I determine the midpoint of the com-puted geodesic by separate direct geodesic calculations start-ing at either end point with the respective computed azimuthsand geodesic lengths± 1

2s∗12 and I measure the distance be-

tween the computed midpoints. Similarly for shorter geode-sics,s12 < a, I compare the computed positions of a pointon the geodesic a distancea beyond the second point withseparate direct calculations from the two endpoints and repeatsuch a comparison for a point a distancea before the first endpoint.

In this way, all the various measures of the accuracy ofthe direct and inverse geodesic are converted into comparableground distances, and the maximum of these measures over alarge number of test geodesics is a good estimate of the com-bined truncation and round-off errors for the geodesic calcu-lations. The maximum error using double precision (p = 53)is about15 nm. With extended precision (p = 64), the erroris about7 pm, consistent with 11 bits of additional precision.The test data consists of geodesics which are shortest paths,the longest of which is about20 000 km. If the direct problemis solved for longer geodesics (which are not therefore short-est paths), the error grows linearly with length. For example,the error in a geodesic of length200 000 km that completelyencircles the earth 5 times is about150 nm (for double preci-sion).

Another important goal for the test set was to check the con-vergence of the inverse solution. Usually a practical conver-gence criterion for Newton’s method is that the relative changein the solution is less thanO(

√δ); because of the quadratic

convergence of the method, this ensures that the error in thesolution is less thatO(δ). However, this reasoning breaksdown for the inverse geodesic problem because the deriva-

Page 15: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

15

TABLE 4 Ellipsoidal trigonometry problems. Here,ξ, ζ, andθ arethe three given quantities. The “notes” column gives the number as-signed by Oriani (1810, p. 48) in his “index of spheroidal problems”and by Puissant (1831, p. 521) in his enumeration of solutions. Seethe text for an explanation of the other columns.

No. ξ, ζ, θ ψ Ref.dθ

ξ,ζ

Notes

1 φ1, α1, φ2 1, 12 φ1, α1, α2 3, 123 φ1, α1, s12 σ12 Eq. (75) 5, 24 φ1, α1, λ12 σ12 Eq. (76) 11, 65 φ1, φ2, s12 α1 1 Eq. (77) 7, 36 φ1, φ2, λ12 α1 1 Eq. (78) 13, 77 φ1, α2, s12 α1 2 Eq. (79) 8, 48 φ1, α2, λ12 α1 2 Eq. (80) 14, 89 φ1, s12, λ12 α1 3 Eq. (81) 19, 11

10 α1, s12, λ12 φ1 3 Eq. (82) 17, 1011 α1, α2, s12 φ1 2 Eq. (83) 10, 512 α1, α2, λ12 φ1 2 Eq. (84) 16, 9

tive of λ12 with respect toα1 can become arbitrarily small;therefore a more conservative convergence criterion is used.Typically 2–4 iterations of Newton’s method are required. Asmall fraction of geodesics, those with nearly conjugate endpoints, require up to 16 iterations. No convergence failuresare observed.

10. ELLIPSOIDAL TRIGONOMETRY

The direct and inverse geodesic problems are two examplesof solving the ellipsoidal triangleNAB in Fig. 1 given twosides and the included angle. The sides of this triangle aregiven byNA = aE(12π − β1, e), NB = aE(12π − β2, e),andAB = s12 and its angles areNAB = α1, NBA = π −α2, andANB = λ12. The triangle is fully solved ifφ1, α1,φ2, α2, s12, andλ12 are all known. The typical problem inellipsoidal trigonometry is to solve the triangle if just three ofthese quantities are specified. Considering thatA andB areinterchangeable, there are 12 distinct such problems whicharelaid out in Table 4. (In plane geometry, there are four distincttriangle problems. On a sphere, the constraint on the sumof the angles of a triangle is relaxed, leading to six triangleproblems.)

Oriani (1810, p. 48) and Puissant (1831, p. 521) both gavesimilar catalogs of ellipsoidal problems as Table 4. Here (andin Sect. 11), I do not give the full solution of the ellipsoidalproblems nor do I consider how to distinguish the cases wherethere may be 0, 1, or 2 solutions. Instead, I indicate how, ineach case, an accurate solution may be obtained using New-ton’s method assuming that a sufficiently accurate startingguess has been found. This might be obtained by approximat-ing the ellipsoid by a sphere and using spherical trigonome-try (Todhunter, 1871, Chap. 6) or by using approximate ellip-

soidal methods (Rapp, 1991,§6). In Sect. 13, I also show howthe gnomonic projection may be used to solve several ellip-soidal problems using plane geometry.

In treating these problems, recall that the relation betweenφ andβ is given by Eq. (8) and depends only on the eccentric-ity of the ellipsoid. On the other hand, the relations betweens12 andλ12 and the corresponding variables on the auxiliarysphere,σ12 andω12, depend on the geodesic (specifically onα0).

In Table 4,ξ, ζ, θ are the given quantities. In problems 1and 2, the given quantities are all directly related to corre-sponding quantities for the triangle on the auxiliary sphere.This allows the auxiliary triangle to be solved and the ellip-soidal quantities can then be obtained. (Problem 1 was usedin solving the inverse problem in Sect. 8.)

Problem 3 is the direct problem whose solution is givenin Sect. 6. Here, however, I give the solution by Newton’smethod to put this problem on the same footing as the otherproblems. The solution consists of treatingσ12 (the col-umn labeledψ) as a “control variable”. Assume a value forthis quantity, solve the problem with givenφ1, α1, σ12 (i.e.,ξ, ζ, ψ) for s12 (i.e., θ) using Eq. (33). The value thus foundfor s12 will, of course, differ from the given value and a betterapproximation forσ12 is found using Newton’s method with

ds12dσ12

φ1,α1

= aw2. (75)

The equation for the derivative needed for Newton’s method isgiven in the column labeleddθ/dψ|ξ,ζ in the table. Problem4 is handled similarly except that Eq. (35) is used to giveλ12and the necessary derivative for Newton’s method is

dλ12dσ12

φ1,α1

=w2 sinα2

cosβ2. (76)

Problems 1–4 are the simplest ellipsoidal trigonometryproblems withφ andα specified at the same point, so that it ispossible to determineα0 which fixes the relation betweens12andσ12 and betweenλ12 andω12. In the remaining problemsit is necessary to assume a value forφ1 orα1 thereby reducingthe problem to one of the reference problems 1–3 (the columnlabeled “Ref.”). Thus, givenξ, ζ, θ, assume a valueψ(0) for ψ;solve the reference problemξ, ζ, ψ(i) to determineθ(i); find amore accurate approximation toψ using

ψ(i+1) = ψ(i) − (θ(i) − θ)

(

dθ(i)

dψ(i)

ξ,ζ

)−1

,

and iterate until convergence. The remaining derivatives are

ds12dα1

φ1,φ2

= m12 tanα2, (77)

dλ12dα1

φ1,φ2

=m12

a

1

cosα2 cosβ2, (78)

ds12dα1

φ1,α2

= m12 tanα2 −aw2

tanα1 tanβ2 cosα2, (79)

Page 16: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

16

dλ12dα1

φ1,α2

=m12/a

cosα2 cosβ2− w2 tanα2

tanα1 sinβ2, (80)

dλ12dα1

φ1,s12

=m12

a

cosα2

cosβ2, (81)

dλ12dφ1

α1,s12

=w3

1

(1− f) sinα1×

(

cosα1

cosβ1− cosα2

cosβ2N12

)

, (82)

ds12dφ1

α1,α2

= aw3

1

1− f

(

−N12 tanα2

sinα1

+tanβ1

cosα2 tanβ2

w2

w1

)

, (83)

dλ12dφ1

α1,α2

=w3

1

1− f

(

cosα1

sinα1 cosβ1− N12 secα2

sinα1 cosβ2

+tanβ1 tanα2

sinβ2

w2

w1

)

, (84)

where

N12 =M12 −(m12/a) cosα1 tanβ1

w1.

The choice ofψ in these solutions is somewhat arbitrary;other choices may be preferable in some cases. These formu-las for the derivatives are obtained with constructions similarto Fig. 8. Equations (82)–(84) involve partial derivativestakenwith α1 held constant; the role ofN12 in these equation canbe contrasted with that ofM12 as follows. Consider a geo-desic fromA to B with length s12 and initial azimuthα1.Construct a second geodesic of the same length fromA′ toB′ whereA′ is given by moving a small distancedt from Ain a directionα1 +

12π. If the initial direction of the second

geodesic isα′1 = α1 (resp. parallel to the first geodesic), then

the distance fromB toB′ isN12 dt (resp.M12 dt). (Becausemeridians converge, two neighboring geodesics with the sameazimuth are not, in general, parallel.)

Problem 6 is the geodesic inverse problem solved in Sect. 8and I have repeated Eq. (73) as Eq. (78). Problem 7 is the“retro-azimuthal” problem for which Hinks (1929) gives aninteresting application. For many years a radio at Rugby trans-mitted a long wavelength time signal. Hinks’ retro-azimuthalproblem is to determine the position of an unknown point withknowledge of the distance and bearing to Rugby.

11. TRIANGULATION FROM A BASELINE

The ellipsoidal triangle considered in Sect. 10 is special inthat one of its vertices is a pole so that two of its sides aremeridians. The next class of ellipsoidal problems treated issolving a triangleABC with a known baseline, see Fig. 10a.Here, the goal is to determine the position ofC if the positionsif A andB are known, i.e., ifφ1, φ2, andλ12 are given (andhence, from the solution of the inverse problem forAB, thequantitiesα1, α2, ands12 are known). This corresponds to a

A A

B

B

C C

s13

s23

γ3

y′

x′

(a) (b)

FIG. 10 Two ellipsoidal triangle problems: (a) triangulating from abaseline and (b) rectangular geodesic (or oblique Cassini–Soldner)coordinates.

TABLE 5 Ellipsoidal triangulation problems. In these problems,the positions ofA andB (i.e., φ1, φ2, andλ12) are given and theposition ofC is sought. The quantitiesξ and ζ are the additionalgiven quantities.

No. ξ, ζ ψdζ

ξ

0 α1(3), s131 s13, s23 α1(3) Eq. (85)2 α1(3), α2(3) s13 Eq. (86)3 α1(3), s23 s13 Eq. (87)4 s13, γ3 α1(3) Eq. (88)5 α1(3), γ3 s13 Eq. (89)

class of triangulation problems encountered in field surveying:a lineAB is measured and is used as the base of a triangula-tion network. However, in the present context,A need not bevisible fromB and I consider both the problems of triangula-tion and trilateration. (In addition, remember that the anglesmeasured by a theodolite are not the angles between geodesicsbut between normal sections.)

Because the problems entail consideration of more than asingle general geodesic, it is necessary to generalize the nota-tion for azimuthal angles to make clear which geodesic line isbeing measured. I defineαi(j) as the azimuth of the geodesicline passing through pointi wherej is some other point onthe same line. Each geodesic line is assigned a unique direc-tion, indicated by arrows in the figures, and all azimuths areforward azimuths (as before).

With one side specified and two additional quantitiesneeded to solve the triangle, there are 10 possible problemstosolve. Of these, six are distinct (considering the interchange-ability of A andB) and are listed in Table 5. For the angleatC, I assume thatγ3 = α3(1) − α3(2), the difference in thebearings ofA andB, is given; this is included angle atC inFig. 10a. In other words, I do not presume that the directionof due north is known,a priori, at C. This is the commonsituation with theodolite readings and it also includes theim-portant case whereγ is required to be± 1

2π which allows the

Page 17: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

17

shortest distance from a point to a geodesic to be determined.Problem 0 is just the direct geodesic problem (problem 3 of

Sect. 10). The remaining 5 problems may be solved by New-ton’s method, in a similar fashion as in Sect. 10, as follows:replace the second given quantityζ by one of the unknownsψ;estimate a value ofψ; solve the problem withξ andψ (which,in each case, is a direct geodesic problem fromA) to deter-mine a trial position forC; solve the inverse geodesic problembetweenB and the trial position forC to obtain a trial valuefor ζ; update the value ofψ using Newton’s method so that theresulting value ofζ matches the given value. The derivativesnecessary for Newton’s method are given in Eqs. (85)–(89):

ds23dα1(3)

φ1,φ2,λ12,s13

= −m13 sin γ3, (85)

dα2(3)

ds13

φ1,φ2,λ12,α1(3)

=1

m23sin γ3, (86)

ds23ds13

φ1,φ2,λ12,α1(3)

= cos γ3, (87)

dγ3dα1(3)

φ1,φ2,λ12,s13

=M31 −M32m13

m23cos γ3, (88)

dγ3ds13

φ1,φ2,λ12,α1(3)

=M32

m23sin γ3. (89)

The triangulation problems 1, 2, and 3, entail specificationof either the distance or the bearing toC from each ofA andB. These can also be solved by generalizing the method givenby Sjoberg (2002,§5) for the solution of problem 2. The tech-nique is to treat the latitude ofC, φ3, as the control variable.Thus, start with an estimate forφ3; if the bearing of (resp. dis-tance to)C from a base point is given, then solve the inter-mediate problemφi, φ3, αi(3) (resp.si3) wherei = 1 or 2for base pointsA orB, i.e., problem 1 (resp. 5) in Sect. 10 togive λi3; and evaluateλ12 = λ13 − λ23. Now adjustφ3 us-ing Newton’s method so that theλ12 matches the known valueusing

dλi3dφ3

φi,αi(3)

=w3

3

1− f

tanα3(i)

cosβ3, (90)

dλi3dφ3

φi,si3

= − w33

1− f

cotα3(i)

cosβ3. (91)

This method of solution essentially factors the problem intotwo simpler problems of the type investigated in Sect. 10.

A similar approach can also be applied to problem 5. Guessa value ofs13, solve problems 3 and 1 of Sect. 10 to deter-mine successively the positions ofC andB. Adjusts13 usingNewton’s method so that the correct value ofλ12 is obtained,which requires the use of the derivative

dλ12ds13

φ1,φ2,α1(3),γ3

= −M32

a

sin γ3 secα2(3)

cosβ2. (92)

Knowledge of reduced length and the geodesic scale allowerrors to be propagated through a calculation. For example,

if the measurements ofα1(3) andα2(3) are subject to an in-strumental errorδα, then the error ellipse in the position ofC when solving problem 2 will have a covariance which de-pends onm13 δα,m23 δα, andγ3. The effects of errors in thepositions ofA andB and in the measurements ofs13 ands23can be similarly estimated.

RNAV (2007,§§A2.4.1–3) also presents solution for prob-lems 1–3. However, these use the secant method and so con-verge more slowly that the methods given here.

12. GEODESIC PROJECTIONS

Several map projections are defined in terms of geodesics.In the azimuthal equidistant projection (Snyder, 1987,§25)the distance and bearing from a central pointA to an arbitrarypointB is preserved. Gauss (1902,§19) lays out the prob-lem for a general surface: the pointB is projected to planecartesian coordinates,

x = s12 sinα1, y = s12 cosα1.

Bagratuni (1967,§16) calls these “geodetic polar coordi-nates”. Gauss (1902,§15) proves that the geodesics (lines ofconstantα1) and the geodesic circles (lines of constants12),which, by construction, intersect at right angles in the projec-tion, also intersect at right angles on the ellipsoid (see Sect. 3).The scale in the radial direction is unity, while the scale inthe azimuthal direction iss12/m12; the projection is confor-mal only at the origin. The forward and reverse projectionsare given by solving the inverse and direct geodesic problems.The entire ellipsoid maps to an approximately elliptical area,with the azimuthal scale becoming infinite at the two bound-ary points on thex axis. The projection can be continuedbeyond the boundary giving geodesics which are no longershortest lines and negative azimuthal scales. Snyder (1987,p. 197) gives the formulas for this projection for the ellipsoidonly for the case where the center point is a pole. For example,if A is at the north pole then the projection becomes

s12 = aE(12π − β2, e), m12 = a cosβ2.

However, the method given here is applicable for any centerpoint. The projection is useful for showing distances and di-rections from a central transportation hub.

Gauss (1902,§23) also describes another basic geode-sic projection, called “right-angle spheroidal coordinates” byBagratuni (1967,§17). Consider a reference geodesic passingthrough the pointA at azimuthα1(3). The reverse projec-tion,B, of the pointx, y is given by the following operationswhich are illustrated in Fig. 10b: resolve the coordinates intothe directions normal and parallel to the initial heading ofthereference geodesic,

x′ = cosα1(3)x− sinα1(3)y,

y′ = sinα1(3)x+ cosα1(3)y;

starting atA proceed along the reference geodesic a dis-tancey′ to C; then proceed along the geodesic with azimuth

Page 18: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

18

α3(2) = α3(1) +12π a distancex′ to pointB. (Here, the “for-

ward” direction on the geodesicCB is to the right of the ref-erence geodesicAC which is the opposite of the conventionin Sect. 11.) Gauss (1902,§16) proves that geodesics (linesof constanty′) and the geodesic “parallels” (lines of constantx′) intersect at right angles on the ellipsoid. AtB, the scalein thex′ direction is unity while the scale in they′ directionis 1/M32 which is unity onx′ = 0; thus the projection is con-formal onx′ = 0. The definition of the mapping given hereprovides the prescription for carrying out the reverse projec-tions. The forward projection is solved as follows: determinethe pointC on the reference geodesic which is closest toB(problem 5 of Sect. 11); setx′ to the distanceCB signed pos-itive or negative according to whetherB is to the right or leftof the reference geodesic; sety′ to the distanceAC signedpositive or negative according to whetherC is ahead or behindA on the reference geodesic; finally transform the coordinateframe

x = cosα1(3)x′ + sinα1(3)y

′,

y = − sinα1(3)x′ + cosα1(3)y

′.

In the case where the reference geodesic is the equator,the projection is the ellipsoidal generalization of the so-called “equidistant cylindrical” projection (Snyder, 1987,§12). Solving for the pointC is trivial; the coordinates aregiven by

x = aλ12, y = a(

E(e)−E(12π−β2, e))

, M32 = cosβ2,

where E(k) is the complete elliptic integral of thesecond kind (Olveret al., 2010, §19.2(ii)); see alsoBugayevskiy and Snyder (1995,§2.1.4). The whole ellipsoidis mapped to a rectangular region with the poles mapped tolines (where the scale in thex direction is infinite). If the refer-ence geodesic is a “central” meridian, the projection is called“Cassini–Soldner” (Snyder, 1987,§13) andC may most sim-ply be found by finding the midpoint of the geodesicBDwhereD is the reflection ofB in the plane of the centralmeridian. This allows the Cassini–Soldner mapping to be besolved accurately for the whole ellipsoid, in contrast to the se-ries method presented in Snyder (1987, p. 95) which is onlyvalid near the central meridian. The ellipsoid maps to an ap-proximately rectangular region with the scale in they direc-tion divergent where the equator intersects the boundary. TheCassini–Soldner was widely used for large-scale maps untilthe middle of the 20th century when it was almost entirely re-placed by the transverse Mercator projection (Snyder, 1987,§8). Tasks such as navigation and artillery aiming were muchmore easily accomplished with a conformal projection, suchas transverse Mercator, compared to Cassini–Soldner with itsunequal scales. The general case of this mapping may betermed the “oblique Cassini–Soldner” projection. Becausethereference geodesic is not closed in this case, it is not conve-nient to use this projection for mapping the entire ellipsoidbecause there may be multiple candidates forC, the positionon the reference geodesic closest toB.

The doubly equidistant projection has been used in small-scale maps to minimize the distortions of large land masses

γ3

u+ = const.

u− = const.

A

B

C

γ1

γ2

s12

s13

s23

FIG. 11 The doubly equidistant projection. Also shown are portionsof the geodesic ellipse and hyperbola throughC.

(Bugayevskiy and Snyder, 1995,§7.9). In this projection, thedistances to an arbitrary pointC from two judiciously cho-sen reference pointsA andB are preserved; see Fig. 11. Theformulas are usually given for a sphere; however, the general-ization to an ellipsoid is straightforward. For the forwardpro-jection, fix the baselineAB with A andB separated bys12;solve the inverse geodesic problems forAC andBC and usethe distancess13 ands23 together with elementary trigonome-try to determine the position ofC in the projected space; thereare two solutions for the position ofC either side of the base-line; the desired solution is the one that lies on the same sideof the baseline asC on the ellipsoid. The reverse projection issimilar, except that the position ofC on the ellipsoid is deter-mined by solving problem 1 in Sect. 11. The projection is onlywell defined ifγ1 andγ2 are the same sign (consistent with aplanar triangle). This is always the case for a sphere; the en-tire sphere projects onto an ellipse. However, on an ellipsoid,the geodesic connectingA andB is not closed in general andthus does not divide the ellipsoid into two halves. As a conse-quence, there may be a portion of the ellipsoid which is on oneside of the baseline geodesic as seen fromA but on the otherside of it as seen fromB; such points cannot be projected. Forexample ifA = (35◦N, 40◦E) andB = (35◦N, 140◦E), thenthe point(43.5◦S, 60.5◦W) cannot be projected because it isnorth of the baseline as seen byA but south of the baselinerelative toB

The scales of the doubly equidistant projection can be de-termined as follows. By construction, geodesic ellipses andhyperbolae, defined byu± = 1

2 (s13 ± s23) = const., mapto ellipses and hyperbolae under this projection; see Fig. 11.Weingarten (1863) establishes these results for geodesic el-lipses and hyperbolae (Eisenhart, 1909,§90): they are orthog-onal; the geodesic hyperbola throughC bisects the angleγ3made by the two geodesics fromA andB; and the scales intheu± directions arecos 1

2γ3 andsin 12γ3, respectively. The

same relations hold, of course, for the projected ellipses andhyperbolae, except that the angleACB takes on a different(smaller) valueγ′3. Thus, the elliptic and hyperbolic scale fac-

Page 19: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

19

A B

C

C′

γ1

γ1

γ2

s12

s13

s23

FIG. 12 The construction of the spheroidal gnomonic projection asthe limit of a doubly azimuthal projection.

tors for the double equidistant projection may be written as

cos 12γ3

cos 12γ

′3

,sin 1

2γ3

sin 12γ

′3

,

respectively. Evaluatingγ′3 using the cosine rule for the planetriangleABC gives

2√s13s23 cos

12γ3

(s13 + s23)2 − s212,

2√s13s23 sin

12γ3

s212 − (s13 − s23)2.

The results generalize those of Cox (1946, 1951) for the pro-jection of a sphere. In the limits12 → 0, this projection re-duces to the azimuthal equidistant projection and these scalesreduce to the radial scale,1, and the azimuthal scale,s13/m13.

13. SPHEROIDAL GNOMONIC PROJECTION

The gnomonic projection of the sphere, which is obtainedby a central projection of the surface of the sphere onto a tan-gent plane, has the property that all geodesics on the spheremap to straight lines (Snyder, 1987,§22). Such a projectionis impossible for an ellipsoid because it does not have con-stant curvature (Beltrami, 1865). However, a spheroidal gen-eralization of the gnomonic projections can be constructedforwhich geodesics are very nearly straight. First recall thatthedoubly azimuthal projection (Bugayevskiy and Snyder, 1995,§7.8) of the sphere, where the bearings from two pointsA andB toC are preserved, gives the gnomonic projection which iscompressed in the direction parallel toAB. In the limit asBapproachesA, the pure gnomonic projection is recovered.

The construction of the spheroidal gnomonic projectionproceeds in the same way; see Fig. 12. Draw a geodesicBC′ such that it is parallel to the geodesicAC atB. Its ini-tial separation fromAC is s12 sin γ1; at C′, the point clos-est toC, the separation becomesM13s12 sin γ1 (in the limit

s12 → 0). Thus the difference in the azimuths of the geode-sicsBC andBC′ atB is (M13/m13)s12 sin γ1, which givesγ1+γ2 = π− (M13/m13)s12 sin γ1. Now, solving the planartriangle problem withγ1 andγ2 as the two base angles givesthe distanceAC in the projected space asm13/M13.

Thus leads to the following specification for the spheroidalgnomonic projection. Let the center point beA; for an arbi-trary pointB, solve the inverse geodesic problem betweenAandB; then pointB projects to the point

x = ρ sinα1, y = ρ cosα1, ρ = m12/M12; (93)

the projection is undefined ifM12 ≤ 0. In the spherical limit,this becomes the standard gnomonic projection,ρ = a tanσ12(Snyder, 1987, p. 165). The azimuthal scale is1/M12 and theradial scale, found by computingdρ/ds12 and using Eq. (29),is 1/M2

12; the projection is therefore conformal at the origin.The reverse projection is found byα1 = ph(y + ix) andby solving fors12 using Newton’s method withdρ/ds12 =1/M2

12 (i.e., the radial scale). Clearly the projection preservesthe bearings from the center point and all lines through thecenter point are geodesics. Consider now a straight lineBCin the projection and project this line on the spheroid. Thedistance that this deviates from a geodesic is, to lowest order,

h =l2

32(∇K · t)t, (94)

wherel is the length of the geodesic,K is the Gaussian curva-ture, andt is the perpendicular vector from the center of pro-jection to the geodesic. I obtained this result semi-empirically:numerically, I determined that the maximum deviation wasfor east-west geodesics; I then found, by Taylor expansion,the deviation for the simple case in which the end points areequally distant from the center point at bearings±α; finally,I generalized the resulting expression and confirmed this nu-merically. The deviation in the azimuths at the end points isabout4h/l and the length is greater than the geodesic dis-tance by about83h

2/l. For an ellipsoid, the curvature is givenby Eq. (25), which gives

∇K = −4a

b4e2(1− e2 sin2 φ)5/2 cosφ sinφ; (95)

the direction of∇K is along the meridian towards the equator.Boundingh over all the geodesics whose end-points lie withina distancer of the center of projection, gives (in the limit thate andr are small)

|h| ≤ f

8

r3

a3r. (96)

The limiting value is attained when the center of projectionis atφ = ±45◦ and the geodesic is running in an east-westdirection with the end points at bearings±45◦ or±135◦ fromthe center.

Bowring (1997) and Williams (1997) have proposed an al-ternate ellipsoidal generalization of the gnomonic projectionas a central projection of the ellipsoid onto a tangent plane. In

Page 20: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

20

1000 km

2000 km

FIG. 13 The coast line of Europe and North Africa in the ellipsoidalgnomonic projection with center at(45◦N, 12◦E) near Venice. Thegraticule lines are shown at multiples of10◦. The two circles arecentered on the projection center with (geodesic) radii of1000 kmand 2000 km. The data for the coast lines is taken from GMT(Wessel and Smith, 2010) at “low” resolution.

such a mapping, great ellipses project to straight lines. Em-pirically, I find that the deviation between straight lines in thismapping and geodesics is

|h| ≤ f

2

r

ar.

Letoval’tsev (1963) suggested another gnomonic projection inwhich normal sections through the center point map to straightlines. The corresponding deviation for geodesics is

|h| ≤ 3f

8

r2

a2r,

which gives a more accurate approximation to geodesics thangreat ellipses. However, the new definition of the spheroidalgnomonic projection, Eq. (93), results in an even smaller er-ror, Eq. (96), in estimating geodesics. As an illustration,con-sider Fig. 13 in which a gnomonic projection of Europe isshown. The two circles are geodesic circles of radii1000 kmand2000 km. If the geodesic between two points within oneof these circles is estimated by using a straight line on thisfigure, the maximum deviation from the true geodesic will beabout1.7m and28m, respectively. The maximum changes inthe end azimuths are1.1′′ and8.6′′ and the maximum errorsin the lengths are only5.4µm and730µm.

At one time, the gnomonic projection was useful for de-termining geodesics graphically. However, the ability to de-termine geodesics paths computationally renders such use ofthe projection an anachronism. Nevertheless, the projectioncan be a used within an algorithm to solve some triangulationproblems. For example, consider a variant of the triangula-tion problem 2 of Sect. 11: determine the point of intersectionof two geodesics betweenA andB and betweenC andD.

This can be solved using the ellipsoidal gnomonic projectionas follows. Guess an intersection pointO(0) and use this asthe center of the gnomonic projection; definea, b, c, d as thepositions ofA, B, C, D in the gnomonic projection; find theintersection of ofAB andCD in this projection, i.e.,

o =(z · c× d)(b− a)− (z · a× b)(d− c)

z · (b− a) × (d− c),

where indicates a unit vector (a = a/a) and z = x × y isin the direction perpendicular to the projection plane. Projecto back to geographic coordinatesO(1) and use this as a newcenter of projection; iterate this process untilO(i) = O(i−1)

which is then the desired intersection point. This algorithmconverges to the exact intersection point because the mappingprojects all geodesics through the center point into straightlines. The convergence is rapid because projected geodesicswhich pass near the center point are very nearly straight. Prob-lem 5 of Sect. 11 can be solving using the gnomonic projec-tion in a similar manner. If the pointO onAB which closestto C is to be found, the problem in the gnomonic space be-comes

o =c · (b− a)(b− a)− (z · a× b)z× (b− a)

|b− a|2;

in this case, the method relies on the preservation of azimuthsabout the center point.

Another application of the gnomonic projection is in solv-ing for region intersections, unions, etc. For example the in-tersection of two polygons can be determined by projectingthe polygons to planar polygons with the gnomonic projec-tion about some suitable center. Any place were the edgesof the polygons intersector nearly intersectin the projectedspace is a candidate for an intersection on the ellipsoid whichcan be found exactly using the techniques given above. Theinequality (96) can be used to define how close to intersec-tion the edges must be in projection space be candidates forintersection on the ellipsoid.

The methods described here suffer from the drawback thatthe gnomonic projection can be used to project only about onehalf of the ellipsoid about a given center. This is unlikelyto be a serious limitation in practice and can, of course, beeliminated by partitioning a problem covering a large area intoa few smaller sub-problems.

14. MARITIME BOUNDARIES

Maritime boundaries are defined to be a fixed distance fromthe coast of a state or, in the case of adjacent states or oppositestates, as the “median line” between the states (TALOS, 2006,Chaps. 5–6). In the application of these rule, distances aredefined as the geodesic distance on a reference ellipsoid tothe nearest point of a state and the extent of a state is definedeither by points on the low water mark or straight lines closingoff bays or joining islands to the mainland.

For median lines, several cases can then be enumerated(TALOS, 2006, Chap. 6): the median is determined by two

Page 21: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

21

200 km

FIG. 14 The median line (shown as a heavy line) between Britainand her North Sea neighbors. Light lines connect the median lineto the controlling boundary points. The Cassini–Soldner projectionis used with the central meridian (shown as a dashed line) equal to2◦20′15′′E (the longitude of Paris). The data for the coast lines istaken from GMT (Wessel and Smith, 2010) at “intermediate” resolu-tion.

points, a point and a line, or two lines. In the first case, theboundary is analogous to the perpendicular bisector in planegeometry. It may be constructed by determining the midpointof the geodesic joining the two points and then marking offsuccessive points either side of the geodesic by solving the2-distance triangulation problem (problem 1 in Sect. 11) usingincreasing distances. This continues until some other coastalpoint becomes closer, at which point the median line changesdirection and continues as the perpendicular bisector of a newpair of points. Such turning points are called “tri-points”andare equidistant from two points of one state and two point ofthe other; such a point is the center of the geodesic circle cir-cumscribing the triangle formed by the three points.

I consider first the problem of determining a tri-pointOgiven the three coastal pointsA, B, andC. The solution isan iterative one which is conveniently described in terms ofthe azimuthal equidistant projection. Make an initial guessO(0) for the position of the tri-point. MapA, B, andC tothe azimuthal equidistant projection withO(0) as the centerand denote their positions in this projection asa, b, andc.Compute the centero of the circle circumscribing the triangleformed by these three points,

o =

(

a2(b− c) + b2(c− a) + c2(a− b))

× z

2(a− b)× (b− c) · z . (97)

Projecto to geographic coordinatesO(1) and use this as thenew center of projection. Repeat these steps until conver-gence. This process converges to the required tri-point be-cause of the equidistant property of the projection and it con-verges rapidly because of the projection is azimuthal. If thepoints are sufficiently distant (in other words if the centerofthe projection is sufficiently close to the tri-point), Eq. (97)can be replaced by

o = −(

(a− b)c+ (b − c)a+ (c− a)b)

× z

(a− b)× (b− c) · z. (98)

Figure 14 shows the result of using this method to determinethe median line separating Britain and her North Sea neigh-bors.

With slight modifications this procedure can be applied ifany of the coast points are replaced by lines. For example,assume thatA is replaced by a line and letA now denote thepoint on the line closest toO. At the same time as pickingO(0), provide an estimateA(0) for the position ofA. (Thesecan be the result of solving problem 5 of Sect. 11; however,it’s more efficient to interleave this solution with the iterationfor the tri-point.) TransformA(0), B, andC to the azimuthalprojection and obtainO(1) using either Eq. (97) or (98). Alsoupdate the estimates forA toA(1) using one step of Newton’smethod with Eq. (89). In this update, use the computed anglebetween the line and the geodesic fromO(0) toA(0) correctedfor the anticipated change due too; this iso× a · z divided bythe reduced length of the geodesic fromO(0) toA(0). Repeatthese steps until convergence.

The median line between two pointsA andB (or lines) canbe found similarly. In this case, introduce a third pointC (orline), use the distance toC as a control variable, and determinethe point which is equidistant fromA andB and a distancec0fromC. By adjustingc0 a set of regularly spaced points alongthe median line can be found. The algorithm is similar to thesolving for the tri-point using Eq. (98); however, the updatedposition of the median point in the projected space is

o = −(

(c− c0)(a− b)− (a− b)c)

× z

(a− b)× c · z. (99)

Boundaries which are a fixed distance from a state, typ-ically 12NM for territorial seas or200NM for exclusiveeconomic zones, can be found using the same machinery(TALOS, 2006, Chap. 5). If the coast is defined by a set ofpoints, the boundary is a set of circular arcs which meet atpoints which are equidistant from two coastal points. Thegeneral problem is to determine the point with is a distancea0 from A andb0 from B; A is a coast point or a point ona coastal line anda0 = 12NM; B is another such pointwhen determining where two circular arcs meet in which caseb0 = a0, or is a control point in which caseb0 measures offthe distance along a circular arc. This is just problem 1 ofSect. 11; however, it can also be solving using the azimuthalequidistant projection in a similar manner to finding the me-dian line. The formula for updating the boundary point in this

Page 22: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

22

case is

o =

(

(a− a0)b− (b − b0)a)

× z

a× b · z. (100)

Figure 14 was obtained by exhaustively computing the dis-tances to all the coastal points at each point along the medianline. This is reasonably fast for small data sets,N . 1000points. For larger data sets, the points should be organizedin such a way that the distance to the closest point can becomputed quickly. For example, the points can be orga-nized into quad trees (Finkel and Bentley, 1974) where everynode in the tree can be characterized by a center and a ra-dius r. The geodesic triangle inequality can be used to givebounds on the distances from a pointP to any point withinthe node in terms of the distances0 to its center, namelymax(0, s0 − r) ≤ s ≤ s0 + r. Once the quad tree has beenconstructed, which takesO(N logN) operations, computingthe closest distance takes onlyO(logN) operations.

15. AREAS OF A GEODESIC POLYGON

The last geodesic problem I consider is the computation ofthe area of a geodesic polygon. Here, I extend the method ofDanielsen (1989) to higher order so that the result is accurateto round-off, and I recast his series into a simple trigonometricsum which is amenable to Clenshaw summation. In formulat-ing the problem, I follow Sjoberg (2006).

The area of an arbitrary region on the ellipsoid is given by

T =

dT, (101)

wheredT = cosφdφdλ/K is an element of area andK isthe Gaussian curvature. Compare this with the Gauss–Bonnettheorem (Eisenhart, 1940,§34) (Bonnet, 1848,§105)

Γ =

K dT, (102)

whereΓ = 2π − ∑

j θj is the geodesic excess. This formof the theorem applies only for a polygon whose sides aregeodesics and the sum is over its vertices andθj is the exteriorangle at vertexj. Sjoberg combines Eqs. (101) and (102) togive

T = c2Γ +

∫(

1

K− c2

)

cosφdφdλ

= c2Γ +

∫(

b2

(1− e2 sin2 φ)2− c2

)

cosφdφdλ, (103)

wherec is a constant, andK has been evaluated using Eqs. (7)and (25). Now apply Eq. (103) to the geodesic quadrilateralAFHB in Fig. 1 for whichΓ = α2 − α1 and the integrationoverφ may be performed to give

S12 = c2(α2 − α1) + b2∫ λ2

λ1

(

1

2(1− e2 sin2 φ)

+tanh−1(e sinφ)

2e sinφ− c2

b2

)

sinφdλ, (104)

whereS12 is the area of the geodesic quadrilateral and inte-gral is over the geodesic line (so thatφ is implicitly a functionof λ). Convert this to an integral over the spherical arc lengthσ using a similar technique to that used in deriving Eq. (23).Sjoberg choosesc = b; however, this leads to a singular in-tegrand when the geodesics pass over a pole. (In addition, heexpresses the integral in terms of the latitude which leads togreater errors in its numerical evaluation.) In contrast, Idefine

c2 = R2q =

a2

2+b2

2

tanh−1 e

e, (105)

which is, in effect, the choice that Danielsen makes and whichleads to a non-singular integrand. The quantityRq is the au-thalic radius, the radius of the sphere with the same area as theellipsoid. ExpressingS12 in terms ofσ gives

S12 = S(σ2)− S(σ1), (106)

S(σ) = R2qα+ e2a2 cosα0 sinα0 I4(σ), (107)

where

I4(σ) = −∫ σ

π/2

t(e′2)− t(k2 sin2 σ′)

e′2 − k2 sin2 σ′

sinσ′

2dσ′, (108)

and

t(x) = x+√

x−1 + 1 sinh−1 √x, (109)

and I have chosen the limits of integration in Eq. (108) so thatthe mean value of the integral vanishes. Expanding the inte-grand in powers ofk2 ande′2 (the same expansion parametersas Danielsen uses) and performing the integral gives

I4(σ) =

∞∑

l=0

C4l cos(

(2l+ 1)σ)

, (110)

where

C40 =(

23 − 1

15e′2 + 4

105e′4 − 8

315e′6 + 64

3465e′8 − 128

9009e′10

)

−(

120 − 1

35e′2 + 2

105e′4 − 16

1155e′6 + 32

3003e′8)

k2

+(

142 − 1

63e′2 + 8

693e′4 − 80

9009e′6)

k4

−(

172 − 1

99e′2 + 10

1287e′4)

k6

+(

1110 − 1

143e′2)

k8 − 1156k

10 + · · · ,C41 =

(

1180 − 1

315e′2 + 2

945e′4 − 16

10395e′6 + 32

27027e′8)

k2

−(

1252 − 1

378e′2 + 4

2079e′4 − 40

27027e′6)

k4

+(

1360 − 1

495e′2 + 2

1287e′4)

k6

−(

1495 − 2

1287e′2)

k8 + 53276k

10 + · · · ,C42 =

(

12100 − 1

3150e′2 + 4

17325e′4 − 8

45045e′6)

k4

−(

11800 − 1

2475e′2 + 2

6435e′4)

k6

+(

11925 − 2

5005e′2)

k8 − 12184k

10 + · · · ,C43 =

(

117640 − 1

24255e′2 + 2

63063e′4)

k6

−(

110780 − 1

14014e′2)

k8 + 545864k

10 + · · · ,C44 =

(

1124740 − 1

162162e′2)

k8 − 158968k

10 + · · · ,

Page 23: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

23

C45 = 1792792k

10 + · · · . (111)

I have included terms up toO(f5) so that the expression forS(σ) is accurate toO(f6). This is consistent with the orderto which the distance and longitude integrals need to be eval-uated to give accuracy to the round-off limit forf = 1/150.In contrast the series given by Danielsen (1989) givesS ac-curate toO(f4). Clenshaw (1955) summation can be used toperform the (truncated) sum in Eq. (110), with

L∑

l=1

al cos(

l− 12

)

x = (b1 − b2) cos12x,

wherebl is given by Eq. (59).Summing Eq. (106) for each side of a polygon gives the to-

tal area of the polygon, provided it does not include a pole.If it does, then2πc2 should be added to the result. The com-bined round-off and truncation error in the evaluation ofI4(σ)is about5 × 10−3m2 for the WGS84 ellipsoid. However, thebigger source of errors is in the computation of the geodesicexcess, i.e., the first term in Eq. (107); the sum of these termsgives the area of the spherical polygon and, in Appendix C,I show how to calculate this accurately. The resulting errorsin the area of polygon can be estimated using the data for theerrors in the azimuths given in Sect. 9. Typically, the errorisapproximatelya × 15 nm = 0.1m2 per vertex; however, itmay be greater if polygon vertices are very close to a pole orif a side is nearly hemispherical. Sometimes the polygon mayinclude many thousands of vertices, e.g., determining the areaof the Japan. In this case an additional source of round-off er-ror occurs when summing the separate contributionsS12 fromeach edge; this error can be controlled by using Kahan (1965)summation.

This method of area computation requires that the sides ofthe polygon be geodesics. If this condition is fulfilled thenthework of computing the area is proportional to the number ofsides of the polygon. If the sides are some other sort of lines,then additional vertices must be inserted so that the individ-ual sides are well approximated by geodesics. Alternativelythe lines can be mapped to an equal-area projection, such asthe Albers conic projection (Snyder, 1987,§14), as suggestedby Gillissen (1993), and the area computed in the projectedspace. In either of these cases, the work of computing the areawill be proportional to the perimeter of the polygon.

16. CONCLUSIONS

This paper presents solutions for the direct and inverse geo-desic problems which are accurate to close to machine pre-cision; the errors are less than15 nm using double-precisionarithmetic. The algorithm for the inverse problem always con-verges rapidly. The algorithms also give the reduced lengthand geodesic scale; these provide scale factors for geodesicprojections, allow Newton’s method to be used to solve var-ious problems in ellipsoidal trigonometry, and enable instru-mental errors to be propagated through geodesic calculations.I introduce an ellipsoidal generalization of the gnomonic pro-jection in which geodesics project to approximately straight

lines. I discuss the solution of several geodesic problems in-volving triangulation and the determination of median lines. Isimplify and extend the formulas given by Danielsen (1989)for the area of geodesic polygons to arbitrary precision. Thesolution of the inverse geodesic problem uses a general so-lution for converting from geocentric to geodetic coordinates(Appendix B).

Reviewing the list of references, it is remarkable the extentto which this paper relies on 19th century authors. Indeed mysolution of the direct geodesic problems is a straightforwardextension of that given by Helmert (1880) to higher order. Thesolution for the inverse problem relies on two relatively mod-est innovations, the use of Newton’s method to accelerate con-vergence and a careful choice of the starting guess to ensureconvergence; however, the necessary machinery is all avail-able in Helmert (1880). My advances, such as they are, relyon a few 20th century innovations. The most obvious oneis the availability of cheap hardware and software for flex-ibly carrying out numerical calculations. However, equallyimportant for algorithm development are software packagesfor algebraic manipulation and arbitrary precision arithmetic,both of which are provided by Maxima (2009)—these facili-ties have been available in Maxima since the mid 1970s.

Computer code implementing much of this work is incor-porated into GeographicLib (Karney, 2010). This includes(a) C++ implementations of the solutions for the direct andinverse geodesic problem, (b) methods for computing pointsalong a geodesic in terms of distance or spherical arc length,(c) computation of the reduced lengthm12, the geodesicscalesM12 andM21, and the areaS12, (d) implementationsof the azimuthal equidistant, Cassini–Soldner, and ellipsoidalgnomonic projections (all of which return projection scales),(e) command-line utilities for solving the main geodesic prob-lems, computing geodesic projections, and finding the area ofa geodesic polygon, (f) Maxima code to generate the seriesIj(σ) extract the coefficientsAj andCjl, and “write” the C++code to evaluate the coefficients, (g) the series expansionscar-ried out to 30th order, and (h) the geodesic test data used inSect. 9. The web page http://geographiclib.sf.net/geod.htmlprovides quick links to all these resources. In this paper, Ihavetried to document the geodesic algorithms in GeographicLibaccurately; the source code should be consulted in case of anyambiguity.

I have been questioned on the need for nanometer accuracywhen geodetic measurements are frequently only accurate toabout a centimeter. I can give four possible answers. (1) Geo-desic routines which are accurate to1mm, say, can yield sat-isfactory results for simple problems. However, more compli-cated problems typically require much greater accuracy; forexample, the two-point equidistant projection may entail thesolution of ill-conditioned triangles for which millimeter er-rors in the geodesic calculation would lead to much largererrors in the results. With accurate geodesic routines pack-aged as “subroutines”, the azimuthal equidistant and Cassini–Soldner projections (which are usually expressed as serieswith limited applicability) can be easily and accurately com-puted for nearly the whole earth. The need for accuracyhas has become more pressing with the proliferation of “ge-

Page 24: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

24

ographic information systems” which allow users (who maybe unaware of the pitfalls of error propagation) access to ge-ographic data. (2) Even if millimeter errors are tolerable,itis frequently important that other properties of geodesicsarewell satisfied, and this is best achieved by ensuring the geo-desic calculations are themselves very accurate. An exampleof such a property is the triangle inequality; this implies thatthe shortest path between a point and a geodesic intersectsthe geodesic at right angles and it also ensures the orthogo-nality of the polar graticule of the azimuthal equidistant pro-jection. (3) Accurate routines may be just as fast as inaccurateones. In particular, the use of Clenshaw summation means thatthere is little penalty to going to 6th order in the expansionsin Sect. 5. On a2.66GHz Intel processor with the g++ com-piler, version 4.4.4, solving the direct geodesic problem takes0.88µs, while the inverse problem takes2.62µs (on average).Points along a geodesic can be computed at the rate of0.37µs(resp.0.31µs) per point when the geodesic is parametrized bydistance (resp. spherical arc length). Thus the time to performa forward and reverse azimuthal equidistant projection (equiv-alent to solving the inverse and direct geodesic problems) is3.4µs, which is only about2 times slower than computing thetransverse Mercator projection using Kruger’s series (Karney,2011). The object code in geodesic code of GeographicLibis substantially longer than an implementation of the methodof Vincenty (1975a), but, at about30 kbytes, it is negligiblecompared to the available memory on most computers. (4) Fi-nally, it is desirable that a well defined mathematical problemhave an accurate and complete computational solution; para-phrasing Gauss (1903, p. 378) in a letter to Olbers (in 1827,on the ellipsoidal corrections to the distribution of the geode-sic excess between the angles of a spheroidal triangle), “thedignity of science (die Wurde der Wissenschaft)” requires it.

Acknowledgments

I would like to thank Rod Deakin and Dick Rapp for com-ments on a preliminary version of this paper. John Noltonkindly furnished me with a copy of Vincenty (1975b).

Appendix A: Equations for a geodesic

Here, I give a derivation of Eqs. (19) following, for themost part, the presentation of Bessel (1825). Laplace (1829,Book 1,§8) shows that the path of a geodesic on a surface isthe same as the motion of a particle constrained to the surfacebut subject to no external forces. For a spheroid of revolution,conservation of angular momentum gives the relation foundby Clairaut (1735),

R sinα = a sinα0, (A1)

whereR is the distance from the axis of revolution (i.e., theradius of the circle of latitude),a is the maximum radius of thebody,α is the azimuth of the geodesic with respect to a merid-ian, andα0 is the azimuth at the latitude of maximum radius.BecauseR ≤ a, R can be written asa cosβ, whereβ is the

0 aR = a cosβ

a

b

Z

a sinβ

β φ

FIG. 15 The construction for the reduced latitude. The heavycurveshows a quarter meridian of the spheroid for which the latitude φis defined as the angle between the normal and the equator. Pointsare transferred from the ellipsoid to the auxiliary sphere,shown as alight curve, by preserving the radius of the circle of latitudeR. Thelatitudeβ on the auxiliary sphere is the reduced latitude defined byR = a cos β.

latitude on the auxiliary sphere (see Fig. 15), and Eq. (A1)becomes

cosβ sinα = sinα0. (A2)

This is the sine rule applied to the anglesα0 andπ − α in thetriangleNEP on the auxiliary sphere in Fig. 2 and establishesthe correspondence with a geodesic on a spheroid with a greatcircle on the auxiliary sphere. It remains to establish the re-lations betweenλ ands and their counterparts on the sphereω andσ. For a given geodesic on the spheroid, an elementarydistanceds is related to changes in latitude and longitude by(Bessel, 1825, Eqs. (1))

cosα ds = ρ dφ = −dR/ sinφ, sinα ds = R dλ, (A3)

whereρ is the meridional radius of curvature. The corre-sponding equations on the auxiliary sphere are

a cosα dσ = −dR/ sinβ, a sinα dσ = R dω. (A4)

Dividing Eqs. (A3) by Eqs. (A4) gives (Bessel, 1825, Eqs. (4))

1

a

ds

dσ=

dω=

sinβ

sinφ. (A5)

These relations hold for geodesics on any spheroid of revolu-tion. Specializing now to an ellipsoid of revolution, paramet-rically given byR = a cosβ andZ = b sinβ. The slope ofthe meridian ellipse is given by

dZ

dR= −b cosβ

a sinβ= −cosφ

sinφ.

This gives the formula for the reduced latitude, Eq. (8), andleads to

sinβ

sinφ=

1− e2 cos2 β = w.

Substituting this into Eqs. (A5) gives Eqs. (19).

Page 25: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

25

Appendix B: Transforming geocentric coordinates

Vermeille (2002) presented a closed-form transformationfrom geocentric to geodetic coordinates. However, his so-lution does not apply near the center of the earth. Here, Iremove this restriction and improve the numerical stability ofthe method so that the method is valid everywhere. A keyequation in Vermeille’s method is the same as Eq. (65) and thismethod given here can therefore by used to solve this equa-tion. While this paper was being prepared, Vermeille (2011)published an update on his earlier paper which addresses someof the same problems.

As in the main body of this paper, the earth is treatedas an ellipsoid with equatorial radiusa and eccentricitye.The geocentric coordinates are represented by(X,Y, Z) andthe method transforms this to geodetic coordinates(λ, φ, h)whereh is the height measured normally from the surface ofthe ellipsoid. Geocentric coordinates are given in terms ofge-ographic coordinates by

X = (a cosβ + h cosφ) cosλ,

Y = (a cosβ + h cosφ) sin λ,

Z = b sinβ + h sinφ,

wheresinβ = w sinφ, cosβ = w cosφ/√1− e2 andw is

given by Eq. (20). In inverting these equations, the determi-nation ofλ is trivial,

λ = ph(X + iY ).

This reduces the problem to a two-dimensional one, convert-ing (R,Z) to (φ, h) whereR =

√X2 + Y 2. Vermeille re-

duces the problem to the solution of an algebraic equation

κ4+2e2κ3− (x2 + y2− e4)κ2 − 2e2y2κ− e4y2 = 0, (B1)

where

x = R/a, y =√

1− e2Z/a.

Descartes’ rule of signs shows that fory 6= 0, Eq. (B1) hasone positive root (Olveret al., 2010,§1.11(ii)). Similarly forx 6= 0, it has one root satisfyingκ < −e2. Inside the astroid,x2/3 + y2/3 < e4/3, there are two additional roots satisfying−e2 < κ < 0.

The geodetic coordinates are given by substituting the realsolutions forκ into

φ = ph(

R/(κ+ e2) + iZ/κ)

, (B2)

h =

(

1− 1− e2

κ

)

D2 + Z2, (B3)

whereD = κR/(κ + e2). The positive real root gives thelargest value ofh and I call this the “standard solution”.

Equation (B1) may be solved by standard methods(Olveret al., 2010,§1.11(iii)). Here, I summarize Vermeille’ssolution modifying it to extend its range of validity and to im-

prove the accuracy. The solution proceeds as follows

r = 16 (x

2 + y2 − e4),

S = 14e

4x2y2,

d = S(S + 2r3),

T =(

S + r3 ±√d)1/3

,

u = r + T + r2/T.

Ford ≥ 0, the sign of the square root in the expression forTshould match the sign ofS + r3 in order to minimize round-off errors; also, the real cube root should be taken. IfT = 0,then takeu = 0. Ford < 0, T is complex, andu is given by

ψ = ph(

−S − r3 + i√−d

)

,

T = r exp 13 iψ,

u = r(

1 + 2 cos 13ψ

)

.

The right-hand side of Eq. (B1) may now be factored into 2quadratic terms in terms ofu

κ2 +(v ± u)∓ y2

ve2κ∓ (v ± u), (B4)

where

v =√

u2 + e4y2,

v ± u =e4y2

v ∓ u, for u ≶ 0,

and where the latter equation merely gives a way to avoidround-off error in the computation ofv ± u. Only the fac-tor with the upper signs in Eq. (B4) has a positive root givenby

κ =v + u

(v + u) + w2 + w, (B5)

where

w =(v + u)− y2

2ve2.

The number of real roots of Eq. (B1) is determined as follows.The conditiond ≷ 0 is equivalent tox2/3 + y2/3 ≷ e4/3.For d > 0, only the quadratic factor with the upper signs inEq. (B4) has real roots (satisfyingκ > 0 andκ < −e2, re-spectively). Ford < 0, both factors have real roots yieldingthe four real roots of Eq. (B1).

Equations (B2) and (B3) may become ill-defined ifx or yvanishes. Solving Eq. (B1) in the limitx→ 0 gives

κ = ±y, κ = −e2 ± e2x/√

e4 − y2. (B6)

Similarly in the limity → 0, Eq. (B1) yields

κ = −e2 ± x, κ = ±e2y/√

e4 − x2. (B7)

The only case where this these limiting forms are needed indetermining the standard solution are fory = 0 andx ≤ e2.

Page 26: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

26

Substituting the roots given by the second equation (B7) intoEqs. (B2) and (B3) gives

φ = ph(

1− e2x± i√

e4 − x2)

,

h = −b√

1− x2/e2.

In the solution given here, I assumed that the ellipsoid isoblate. This solution encompasses also the spherical limit,e→ 0; the solution becomesκ2 → x2+ y2. The method mayalso be applied to a prolate ellipsoid,e2 < 0. Substitutingx = y′, y = x′, κ = κ′ − e2 in Eq. (B1) gives

κ′4 − 2e2κ′3 − (x′2 + y′2 − e4)κ′2 + 2e2y′2κ′ − e4y′2 = 0,

which transforms the problem for a prolate ellipsoid into anequivalent problem for an oblate one.

In applying the results of this appendix to the inverse geo-desic problem, sete = 1 in order to convert Eq. (B1) intoEq. (65).

Appendix C: Area of a spherical polygon

The areaS12, Eq. (104), includes the termc2(α2 − α1).Round-off errors in the evaluation of this term is a potentialsource of error in determiningS12. In this appendix, I inves-tigate ways to compute this term accurately. This term

E12 = α2 − α1 (C1)

is of course merely the spherical excess for the quadrilateralAFGB in Fig. 1 transferred to the auxiliary sphere. ThusE12 is the spherical excess for the quadrilateral with vertices(β1, ω1), (0, ω1), (0, ω2), and(β2, ω2).

If the geodesicAB is determined by its arc lengthσ12 andits azimuthα1 atA then use Eq. (12) to determineα2 and sowrite

tanE12 =sinα0 cosα0(cos σ1 − cosσ2)

sin2 α0 + cos2 α0 cosσ1 cosσ2, (C2)

with

cosσ1 − cosσ2 =

sinσ12

(

cosσ1 sinσ121 + cosσ12

+ sinσ1

)

, if cosσ12 > 0,

cosσ1(1− cosσ12) + sinσ12 sinσ1, otherwise.

Here,α0 andσ1 can be determined as described in Sect. 6.If the geodesicAB is determined by the latitude and lon-

gitude of its end points, then, for long arcs, determineα1 andα2 from Eqs. (68) and (69), and substitute these values intoEq. (C1). If, on the other hand, the arc is short, use

tanE12

2=

tan 12β1 + tan 1

2β2

1 + tan 12β1 tan

12β2

tanω12

2, (C3)

where, if sin θ andcos θ are already known,tan 12θ may be

evaluated assin θ/(1 + cos θ),. This relation is the spherical

generalization of the trapezoidal area; in the limitβ1 → 0,β2 → 0, ω12 → 0, Eq. (C3) becomes

E12 → β1 + β22

ω12.

Equation (C3) takes on a simpler form if the latitude is ex-pressed in terms of the so-called isometric latitude,ψ =2 tanh−1 tan 1

2β = sinh−1 tanβ, namely

tanE12

2= tanh

ψ1 + ψ2

2tan

ω12

2.

I obtained Eq. (C3) from the formula for the area of a spher-ical triangle,E, in terms of two of the sides,a andb, and theirincluded angleγ (Todhunter, 1871,§103),

tanE

2=

tan 12a tan

12b sin γ

1 + tan 12a tan

12b cosγ

,

by substitutinga = 12π + β1, b = 1

2π + β2 γ = ω12, andforming E12 = E − ω12. However, it can also be simplyfound by using a formula of Bessel (1825,§11),

tanα2 − α1

2=

sin 12 (β2 + β1)

cos 12 (β2 − β1)

tanω12

2,

which, in turn, is derived from one of Napier’s analogies(Todhunter, 1871,§52).

The area for anN -sided spherical polygon is obtained by

2πn−N∑

i=1

Ei−1,i,

wheren is the number of times the polygon encircles thesphere in the easterly direction.

Miller (1994) proposed a formula for the area of a sphericalpolygon which made use of L’Huilier’s theorem for the areaof a spherical triangle in terms of its three sides (Todhunter,1871, §102). However, any edge of the polygon which isnearly aligned with a meridian leads to an ill-conditionedtriangle which results in about half of the precision of thefloating-point numbers being lost.

Appendix D: Geodesics on a prolate ellipsoid

The focus in the paper has been on oblate ellipsoids. How-ever, most of the analysis applies also to prolate ellipsoids(f < 0). In the appendix, I detail those aspects of the problemwhich need to be treated differently in the two cases.

All the series expansions given in Sect. 5 and the expan-sions forS12 given in Sect. 15 are in terms off , n, e2 ore′2; prolate ellipsoids may be treated easily by allowing thesequantities to become negative. The method of solving the di-rect geodesic problem requires no alteration. The solutionofinverse problem, on the other hand, is slightly different. FromEq. (23), it can be seen that the longitude difference for a geo-desic encircling the auxiliary sphere exceeds2π. As a con-sequence, the shortest geodesic between any two points on

Page 27: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

27

179 179.5 18029.5

30

30.5(a)

λ2 − λ

1 (°)

φ 2 (°)

90 120 150 180

178

179

180

(b)30 29.9

φ2 = 29°

α1 (°)

λ 12 (

°)

FIG. 16 (a) Geodesics in antipodal region for a prolate ellipsoid.This figure is similar to Fig. 4a, except thatf = −1/297. In additionthe light lines are the continuation of the symmetric set of west-goinggeodesics beyond the meridianλ12 = 180◦. (b) The dependence ofλ12 on α1 for the near antipodal case with the same value of theflattening; compare with Fig. 7b.

the equator is equatorial; however, the shortest geodesicsbe-tween two points on the same meridian may not run alongthe meridian if the points are nearly antipodal. The test formeridional geodesics needs therefore to include the require-mentm12 ≥ 0. The solution for the inverse geodesic problemis also unchanged except that the method of choosing start-ing points for Newton’s method needs to be altered in case3 in Fig. 9. The envelope of the geodesics forms an astroid,Fig. 16a, however, thex andy axes need to be interchanged tomatch Fig. 4a, and with this substitution, the derivation ofthestarting point depicted in Fig. 5 applies. Similarly region3b inFig. 9, now lies along the meridianλ12 = π. The techniquesfor solving the antipodal problem for a prolate ellipsoid mirrorclosely those needed to transform geocentric coordinates asdescribed at the end of Appendix B. The longitude differenceλ12 as a function ofα1 is no longer monotonic when the ellip-soid is prolate; see Fig. 16b. This potentially complicatesthedetermination ofα1; nevertheless, the starting points used in

region 3 are sufficiently accurate that Newton’s method con-verges. The geodesic classes in GeographicLib handle prolateellipsoids; however, the algorithms have not been thoroughlytested with geodesics on prolate ellipsoids.

Some of the closed form expressions can be recast into realterms for prolate ellipsoids. Thus Eqs. (36)–(41) should bereplaced by

I1(σ) =

∫ u2

0

dn2(u′, k2) du′ = E(σ, k2), (D1)

I2(σ) = u2 = F (σ, k2), (D2)

I3(σ) = −1− f

f

∫ u2

0

dn2(u′, k2)

1− cos2 α0 sn2(u′, k2)du′

+tan−1(sinα0 tanσ)

f sinα0

= −1− f

fG(σ, cos2 α0, k2)

+tan−1(sinα0 tanσ)

f sinα0, (D3)

wherek2 =√−k2,

am(u2, k2) = σ,

sn(x, k) and dn(x, k) are Jacobian elliptic functions(Olveret al., 2010, §22.2), andG(φ, α2, k) is defined byEq. (42), as before. In this form, the integration constantsvanish. Finally, Eq. (105) becomes

c2 =a2

2+b2

2

tan−1√−e2√

−e2, (D4)

and Eq. (109), which appears in the integral for the geodesicarea, should be replaced by

t(−y) = −y +√

y−1 − 1 sin−1 √y. (D5)

References

G. V. Bagratuni, 1967,Course in spheroidal geodesy, Technical Re-port FTD-MT-64-390, US Air Force, translation ofKurs sfer-oidicheskoi geodezii(Geodezizdat, Moscow, 1962), by ForeignTechnology Division, Wright-Patterson AFB, http://handle.dtic.mil/100.2/AD650520.

E. Beltrami, 1865,Risoluzione del problema: Riportare i punti diuna superficie sopra un piano in modo che le linee geodetichevengano rappresentate da linee rette, Annali Mat. Pura App.,7,185–204, http://books.google.com/books?id=dfgEAAAAYAAJ&pg=PA185.

F. W. Bessel, 1825,Uber die Berechnung der geographischenLangen und Breiten aus geodatischen Vermessungen, Astron.Nachr.,4(86), 241–254, doi:10.1002/asna.201011352, translatedinto English by C. F. F. Karney and R. E. Deakin asThe cal-culation of longitude and latitude from geodesic measurements,Astron. Nachr.331(8), 852–861 (2010), E-print arXiv:0908.1824,http://adsabs.harvard.edu/abs/1825AN......4..241B.

P. O. Bonnet, 1848,Memoire sur la theorie generale des surfaces, J.l’ Ecole Polytechnique,19(32), 1–146, http://books.google.com/books?id=VGoAAAAcAAJ&pg=PA1.

Page 28: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

28

B. R. Bowring, 1996,Total inverse solutions of the geodesic andgreat elliptic, Survey Review,33(261), 461–476.

—, 1997,The central projection of the spheroid and surface lines,Survey Review,34(265), 163–173.

L. M. Bugayevskiy and J. P. Snyder, 1995,Map Projections: A Ref-erence Manual(Taylor & Francis, London), http://www.worldcat.org/oclc/31737484.

R. Bulirsch, 1965, Numerical calculation of elliptic integralsand elliptic functions, Num. Math., 7(1), 78–90, doi:10.1007/BF01397975.

B. C. Carlson, 1995,Numerical computation of real or complex ellip-tic integrals, Numerical Algorithms,10(1), 13–26, doi:10.1007/BF02198293, E-print arXiv:math/9409227.

A. Cayley, 1870,On the geodesic lines on an oblate spheroid,Phil. Mag. (4th ser.),40(268), 329–340, http://books.google.com/books?id=Zk0wAAAAIAAJ&pg=PA329.

E. B. Christoffel, 1910, Allgemeine Theorie der geodatischenDreiecke (1868), in L. Maurer, editor,Gesammelte Mathematis-che Abhandlungen, volume 1, chapter 16, pp. 297–346 (Teub-ner, Leipzig), reprint of Math. Abhand. Konig. Akad. der Wiss.zu Berlin 8, 119–176 (1868), http://books.google.com/books?id=9W9tAAAAMAAJ&pg=PA297.

A. C. Clairaut, 1735,Determination geometrique de la perpendicu-laire a la meridienne tracee par M. Cassini, Mem. de l’Acad. Roy.des Sciences de Paris 1733, pp. 406–416, http://books.google.com/books?id=GOAEAAAAQAAJ&pg=PA406.

C. W. Clenshaw, 1955,A note on the summation of Chebyshev series,Math. Tables Aids Comput.,9(51), 118–120, http://www.jstor.org/stable/2002068.

J. F. Cox, 1946,The double equidistant projection, Bull. Geod.,2(1),74–76, doi:10.1007/BF02521618.

—, 1951,La projection equidistante pour deux points, Bull. Geod.,19(1), 57–60, doi:10.1007/BF02527404.

J. Danielsen, 1989,The area under the geodesic, Survey Review,30(232), 61–66.

J. G. Darboux, 1894,Lecons sur la Theorie Generale des Sur-faces, volume 3 (Gauthier-Villars, Paris), http://books.google.com/books?id=hGMSAAAAIAAJ.

A. P. Dionis du Sejour, 1789,Traite Analytique des Mouvemens ap-parens des Corps Celestes, volume 2 (Valade, Paris), http://books.google.com/books?id=tnHOAAAAMAAJ.

L. P. Eisenhart, 1909,A Treatise on the Differential Geometry ofCurves and Surfaces(Ginn & Co., Boston), http://books.google.com/books?id=hkENAAAAYAAJ.

—, 1940,An Introduction to Differential Geometry(Princeton Univ.Press), http://www.worldcat.org/oclc/3165048.

L. Euler, 1755,Elemens de la trigonometrie spheroıdique tires de lamethode des plus grands et plus petits, Mem. de l’Acad. Roy. desSciences de Berlin,9, 258–293, http://books.google.com/books?id=QIIfAAAAYAAJ&pg=PA258.

R. A. Finkel and J. L. Bentley, 1974,Quad Trees, a data structurefor retrieval on composite keys, Acta Informatica,4(1), 1–9, doi:10.1007/BF00288933.

A. R. Forsyth, 1896, Geodesics on an oblate spheroid,Mess. Math., 25, 81–124, http://books.google.com/books?id=YsAKAAAAIAAJ&pg=PA81.

C. F. Gauss, 1902,General Investigations of Curved Surfacesof 1827 and 1825(Princeton Univ. Lib.), translation ofDis-quisitiones generales circa superficies curvas, by J. C. More-head and A. M. Hiltebeitel, http://books.google.com/books?id=a1wTJR3kHwUC.

—, 1903,Werke, volume 9 (Teubner, Leipzig), http://books.google.com/books?id=ICwPAAAAIAAJ.

I. Gillissen, 1993,Area computation of a polygon on an ellipsoid,

Survey Review,32(248), 92–98.F. R. Helmert, 1880,Die Mathematischen und Physikalischen The-

orieen der Hoheren Geodasie, volume 1 (Teubner, Leipzig),translated into English by Aeronautical Chart and Informa-tion Center (St. Louis, 1964) asMathematical and Physi-cal Theories of Higher Geodesy, Part 1(http://geographiclib.sf.net/geodesic-papers/helmert80-en.html), http://books.google.com/books?id=qt2CAAAAIAAJ.

D. Hilbert and S. Cohn-Vossen, 1952,Geometry and the Imagina-tion (Chelsea, New York), translation ofAnschauliche Geometrie(1932), by P. Nemenyi, http://www.worldcat.org/oclc/301610346.

A. R. Hinks, 1929,A retro-azimuthal equidistant projection of thewhole sphere, Geog. J.,73(3), 245–247, http://www.jstor.org/stable/1784715.

C. G. J. Jacobi, 1855,Solution nouvelle d’un probleme de geodesiefondamental, Astron. Nachr.,41(974), 209–216, doi:10.1002/asna.18550411401, op. post., communicated by E. Luther, http://adsabs.harvard.edu/abs/1855AN.....41..209J.

—, 1891, Uber die Curve, welche alle von einem Punkte ausge-henden geodatischen Linien eines Rotationsellipsoides beruhrt, inK. T. W. Weierstrass, editor,Gesammelte Werke, volume 7, pp.72–87 (Reimer, Berlin), op. post., completed by A. Wangerin,http://books.google.com/books?id=09tAAAAMAAJ&pg=PA72.

W. M. Kahan, 1965,Further remarks on reducing truncation errors,Comm. ACM,8(1), 40, doi:10.1145/363707.363723.

C. F. F. Karney, 2009,An online geodesic bibliography, http://geographiclib.sf.net/geodesic-papers/biblio.html.

—, 2010,GeographicLib, version 1.7, http://geographiclib.sf.net.—, 2011,Transverse Mercator with an accuracy of a few nanome-

ters, J. Geod., doi:10.1007/s00190-011-0445-3, in press, E-printarXiv:1002.1417.

J. L. Lagrange, 1869,Nouvelle methode pour resoudre les equationslitterales par le moyen des series (1770), in Oeuvres, volume 3,pp. 5–73 (Gauthier-Villars, Paris), reprint of Mem. de l’Acad.Roy. des Sciences de Berlin24, 251–326 (1770), http://books.google.com/books?id=YywPAAAAIAAJ&pg=PA5.

P. S. Laplace, 1829,Celestial Mechanics (1799), volume 1 (Hillard,Gray, Little, & Wilkins, Boston), translation with commentary ofMecanique Celeste, by N. I. Bowditch, http://books.google.com/books?id=k-cRAAAAYAAJ.

A. M. Legendre, 1789,Memoire sur les operations trigonometriques,dont les resultats dependent de la figure de la Terre, Mem. del’Acad. Roy. des Sciences de Paris, 1787, pp. 352–383, http://books.google.com/books?id=0uIEAAAAQAAJ&pg=PA352.

—, 1806, Analyse des triangles traces sur la surface d’unspheroıde, Mem. de l’Inst. Nat. de France, 1st sem., pp. 130–161, http://books.google.com/books?id=-d0EAAAAQAAJ&pg=PA130-IA4.

—, 1811,Exercices de Calcul Integral sur Divers Ordres de Tran-scendantes et sur les Quadratures, volume 1 (Courcier, Paris),http://books.google.com/books?id=riIOAAAAQAAJ.

I. G. Letoval’tsev, 1963,Generalization of the gnomonic projectionfor a spheroid and the principal geodetic problems involvedinthe alignment of surface routes, Geodesy and Aerophotography,5, 271–274, translation of Geodeziya i Aerofotos’emka5, 61–68(1963).

J.-J. Levallois, 1970,Geodesie Generale, volume 2 (Eyrolles, Paris),http://www.worldcat.org/oclc/3870605.

J.-J. Levallois and M. Dupuy, 1952,Note sur le calcul des grandesgeodesiques, Technical report, IGN, Paris, http://www.worldcat.org/oclc/31726404.

E. Luther, 1856,Jacobi’s Ableitung in seinem Aufsatze: “Solutionnouvelle d’un probleme de geodesie fondamental” enthaltenenFormeln, Astron. Nachr.,42(1006), 337–358, doi:10.1002/asna.

Page 29: arXiv:1102.1215v1 [physics.geo-ph] 7 Feb 2011 · 2011-02-08 · 2 original papers on geodesics, the fruits of which are available on-line (Karney, 2009). These contained other little

29

18550422201, http://adsabs.harvard.edu/abs/1856AN.....42..337J.Maxima, 2009,A computer algebra system, version 5.20.1, http://

maxima.sf.net.R. D. Miller, 1994,Computing the area of a spherical polygon, in

P. S. Heckbert, editor,Graphics Gems IV, pp. 132–137 (AcademicPress), http://www.worldcat.org/oclc/29565566.

F. Minding, 1830, Uber die Curven des kurzesten Perime-ters auf krummen Flachen, J. Reine Angew. Math., 5,297–304, doi:10.1515/crll.1830.5.297, http://books.google.com/books?id=Y6wGAAAAYAAJ&pg=PA297.

F. W. J. Olver, D. W. Lozier, R. F. Boisvert, and C. W. Clark, ed-itors, 2010,NIST Handbook of Mathematical Functions(Cam-bridge Univ. Press), http://dlmf.nist.gov.

B. Oriani, 1806,Elementi di trigonemetria sferoidica, Pt. 1, Mem.dell’Ist. Naz. Ital.,1(1), 118–198, http://www.archive.org/stream/memoriedellistit11isti#page/118.

—, 1808, Elementi di trigonemetria sferoidica, Pt. 2, Mem.dell’Ist. Naz. Ital., 2(1), 1–58, http://www.archive.org/stream/memoriedellistit21isti#page/1.

—, 1810, Elementi di trigonemetria sferoidica, Pt. 3, Mem.dell’Ist. Naz. Ital., 2(2), 1–58, http://www.archive.org/stream/memoriedellistit22isti#page/1.

—, 1833,Nota aggiunta agli elementi della trigonometria sferoidica,Mem. dell’Imp. Reg. Ist. del Regno Lombardo-Veneto,4, 325–331, http://books.google.com/books?id=6bsAAAAAYAAJ&pg=PA325.

M. E. Pittman, 1986,Precision direct and inverse solutions of thegeodesic, Surveying and Mapping,46(1), 47–54.

L. Puissant, 1831,Nouvel essai de trigonometrie spheroıdique,Mem. de l’Acad. Roy. des Sciences de l’Inst. de France,10, 457–529, http://books.google.com/books?id=KcjOAAAAMAAJ&pg=RA2-PA457.

H. F. Rainsford, 1955,Long geodesics on the ellipsoid, Bull. Geod.,37(1), 12–22, doi:10.1007/BF02527187.

R. H. Rapp, 1991,Geometric geodesy, part I, Technical report, OhioState Univ., http://hdl.handle.net/1811/24333.

—, 1993,Geometric geodesy, part II, Technical report, Ohio StateUniv., http://hdl.handle.net/1811/24409.

RNAV, 2007, Order 8260.54A, The United States Standard forArea Navigation, U.S. Federal Aviation Administration, Wash-ington, DC, http://www.faa.gov/documentLibrary/media/Order/8260 54A.pdf.

T. Saito, 1970,The computation of long geodesics on the ellipsoidby non-series expanding procedure, Bull. Geod.,98(1), 341–373,doi:10.1007/BF02522166.

—, 1979,The computation of long geodesics on the ellipsoid throughGaussian quadrature, J. Geod.,53(2), 165–177, doi:10.1007/BF02521087.

H. Schmidt, 2000,Berechnung geodatischer Linien auf dem Rota-tionsellipsoid im Grenzbereich diametraler Endpunkte, Z. f. Ver-mess.,125(2), 61–64, http://www.gia.rwth-aachen.de/Forschung/AngwGeodaesie/geodaetischelinie/artikel2/.

L. E. Sjoberg, 2002,Intersections on the sphere and ellipsoid, J.Geod.,76(2), 115–120, doi:10.1007/s00190-001-0230-9.

—, 2006,Determination of areas on the plane, sphere, and ellipsoid,Survey Review,38(301), 583–593.

J. P. Snyder, 1987,Map projection—a working manual, Profes-sional Paper 1395, U.S. Geological Survey, http://pubs.er.usgs.gov/publication/pp1395.

E. M. Sodano, 1958,A rigorous non-iterative procedure for rapidinverse solution of very long geodesics, Bull. Geod.,48(1), 13–25, doi:10.1007/BF02537675.

TALOS, 2006,A Manual on Technical Aspects of the United Na-tions Convention on the Law of the Sea, 1982, International Hy-drographic Bureau, Monaco, 4th edition, http://www.iho-ohi.net/iho pubs/CB/S-51Ed4-EN.pdf.

W. M. Tobey, 1928,Geodesy, Technical Report 11, Geodetic Surveyof Canada, Ottawa, http://www.worldcat.org/oclc/839082.

I. Todhunter, 1871, Spherical Trigonometry (Macmillan,London), 3rd edition, http://books.google.com/books?id=3uBHAAAAIAAJ.

H. Vermeille, 2002,Direct transformation from geocentric coordi-nates to geodetic coordinates, J. Geod.,76(9), 451–454, doi:10.1007/s00190-002-0273-6.

—, 2011, An analytical method to transform geocentric intogeodetic coordinates, J. Geod.,85(2), 105–117, doi:10.1007/s00190-010-0419-x.

T. Vincenty, 1975a,Direct and inverse solutions of geodesics on theellipsoid with application of nested equations, Survey Review,23(176), 88–93, addendum: Survey Review23(180), 294 (1976),http://www.ngs.noaa.gov/PUBSLIB/inverse.pdf.

—, 1975b, Geodetic inverse solution between antipodal points,unpublished report dated Aug. 28, http://geographiclib.sf.net/geodesic-papers/vincenty75b.pdf.

J. Weingarten, 1863,Uber die Oberflachen fur welche einer derbeiden Hauptkrummungshalbmesser eine function des anderenist, J. Reine Angew. Math.,62, 160–173, doi:10.1515/crll.1863.62.160, http://books.google.com/books?id=ggRCAAAAcAAJ&pg=PA160.

P. Wessel and W. H. F. Smith, 2010,Generic mapping tools, 4.5.5,http://gmt.soest.hawaii.edu/.

E. A. Williams, 2002,Navigation on the spheroidal earth, http://williams.best.vwh.net/ellipsoid/ellipsoid.html.

R. Williams, 1997,Gnomonic projection of the surface of an ellip-soid, J. Nav.,50(2), 314–320, doi:10.1017/S0373463300023936.


Recommended