GeographicLib 2.3

Geodesic.hpp
Go to the documentation of this file.
1/**
2 * \file Geodesic.hpp
3 * \brief Header for GeographicLib::Geodesic class
4 *
5 * Copyright (c) Charles Karney (2009-2023) <karney@alum.mit.edu> and licensed
6 * under the MIT/X11 License. For more information, see
7 * https://geographiclib.sourceforge.io/
8 **********************************************************************/
9
10#if !defined(GEOGRAPHICLIB_GEODESIC_HPP)
11#define GEOGRAPHICLIB_GEODESIC_HPP 1
12
13#include <GeographicLib/Constants.hpp>
14#include <GeographicLib/GeodesicExact.hpp>
15
16#if !defined(GEOGRAPHICLIB_GEODESIC_ORDER)
17/**
18 * The order of the expansions used by Geodesic.
19 * GEOGRAPHICLIB_GEODESIC_ORDER can be set to any integer in [3, 8].
20 **********************************************************************/
21# define GEOGRAPHICLIB_GEODESIC_ORDER \
22 (GEOGRAPHICLIB_PRECISION == 2 ? 6 : \
23 (GEOGRAPHICLIB_PRECISION == 1 ? 3 : \
24 (GEOGRAPHICLIB_PRECISION == 3 ? 7 : 8)))
25#endif
26
27 namespace GeographicLib {
28
29 class GeodesicLine;
30
31 /**
32 * \brief %Geodesic calculations
33 *
34 * The shortest path between two points on an ellipsoid at (\e lat1, \e lon1)
35 * and (\e lat2, \e lon2) is called the geodesic. Its length is \e s12 and
36 * the geodesic from point 1 to point 2 has azimuths \e azi1 and \e azi2 at
37 * the two end points. (The azimuth is the heading measured clockwise from
38 * north. \e azi2 is the "forward" azimuth, i.e., the heading that takes you
39 * beyond point 2 not back to point 1.) In the figure below, latitude is
40 * labeled &phi;, longitude &lambda; (with &lambda;<sub>12</sub> =
41 * &lambda;<sub>2</sub> &minus; &lambda;<sub>1</sub>), and azimuth &alpha;.
42 *
43 * <img src="https://upload.wikimedia.org/wikipedia/commons/c/cb/Geodesic_problem_on_an_ellipsoid.svg" width=250 alt="spheroidal triangle">
44 *
45 * Given \e lat1, \e lon1, \e azi1, and \e s12, we can determine \e lat2, \e
46 * lon2, and \e azi2. This is the \e direct geodesic problem and its
47 * solution is given by the function Geodesic::Direct. (If \e s12 is
48 * sufficiently large that the geodesic wraps more than halfway around the
49 * earth, there will be another geodesic between the points with a smaller \e
50 * s12.)
51 *
52 * Given \e lat1, \e lon1, \e lat2, and \e lon2, we can determine \e azi1, \e
53 * azi2, and \e s12. This is the \e inverse geodesic problem, whose solution
54 * is given by Geodesic::Inverse. Usually, the solution to the inverse
55 * problem is unique. In cases where there are multiple solutions (all with
56 * the same \e s12, of course), all the solutions can be easily generated
57 * once a particular solution is provided.
58 *
59 * The standard way of specifying the direct problem is the specify the
60 * distance \e s12 to the second point. However it is sometimes useful
61 * instead to specify the arc length \e a12 (in degrees) on the auxiliary
62 * sphere. This is a mathematical construct used in solving the geodesic
63 * problems. The solution of the direct problem in this form is provided by
64 * Geodesic::ArcDirect. An arc length in excess of 180&deg; indicates that
65 * the geodesic is not a shortest path. In addition, the arc length between
66 * an equatorial crossing and the next extremum of latitude for a geodesic is
67 * 90&deg;.
68 *
69 * This class can also calculate several other quantities related to
70 * geodesics. These are:
71 * - <i>reduced length</i>. If we fix the first point and increase \e azi1
72 * by \e dazi1 (radians), the second point is displaced \e m12 \e dazi1 in
73 * the direction \e azi2 + 90&deg;. The quantity \e m12 is called
74 * the "reduced length" and is symmetric under interchange of the two
75 * points. On a curved surface the reduced length obeys a symmetry
76 * relation, \e m12 + \e m21 = 0. On a flat surface, we have \e m12 = \e
77 * s12. The ratio <i>s12</i>/\e m12 gives the azimuthal scale for an
78 * azimuthal equidistant projection.
79 * - <i>geodesic scale</i>. Consider a reference geodesic and a second
80 * geodesic parallel to this one at point 1 and separated by a small
81 * distance \e dt. The separation of the two geodesics at point 2 is \e
82 * M12 \e dt where \e M12 is called the "geodesic scale". \e M21 is
83 * defined similarly (with the geodesics being parallel at point 2). On a
84 * flat surface, we have \e M12 = \e M21 = 1. The quantity 1/\e M12 gives
85 * the scale of the Cassini-Soldner projection.
86 * - <i>area</i>. The area between the geodesic from point 1 to point 2 and
87 * the equation is represented by \e S12; it is the area, measured
88 * counter-clockwise, of the geodesic quadrilateral with corners
89 * (<i>lat1</i>,<i>lon1</i>), (0,<i>lon1</i>), (0,<i>lon2</i>), and
90 * (<i>lat2</i>,<i>lon2</i>). It can be used to compute the area of any
91 * geodesic polygon.
92 *
93 * Overloaded versions of Geodesic::Direct, Geodesic::ArcDirect, and
94 * Geodesic::Inverse allow these quantities to be returned. In addition
95 * there are general functions Geodesic::GenDirect, and Geodesic::GenInverse
96 * which allow an arbitrary set of results to be computed. The quantities \e
97 * m12, \e M12, \e M21 which all specify the behavior of nearby geodesics
98 * obey addition rules. If points 1, 2, and 3 all lie on a single geodesic,
99 * then the following rules hold:
100 * - \e s13 = \e s12 + \e s23
101 * - \e a13 = \e a12 + \e a23
102 * - \e S13 = \e S12 + \e S23
103 * - \e m13 = \e m12 \e M23 + \e m23 \e M21
104 * - \e M13 = \e M12 \e M23 &minus; (1 &minus; \e M12 \e M21) \e m23 / \e m12
105 * - \e M31 = \e M32 \e M21 &minus; (1 &minus; \e M23 \e M32) \e m12 / \e m23
106 *
107 * Additional functionality is provided by the GeodesicLine class, which
108 * allows a sequence of points along a geodesic to be computed.
109 *
110 * The shortest distance returned by the solution of the inverse problem is
111 * (obviously) uniquely defined. However, in a few special cases there are
112 * multiple azimuths which yield the same shortest distance. Here is a
113 * catalog of those cases:
114 * - \e lat1 = &minus;\e lat2 (with neither point at a pole). If \e azi1 =
115 * \e azi2, the geodesic is unique. Otherwise there are two geodesics and
116 * the second one is obtained by setting [\e azi1, \e azi2] &rarr; [\e
117 * azi2, \e azi1], [\e M12, \e M21] &rarr; [\e M21, \e M12], \e S12 &rarr;
118 * &minus;\e S12. (This occurs when the longitude difference is near
119 * &plusmn;180&deg; for oblate ellipsoids.)
120 * - \e lon2 = \e lon1 &plusmn; 180&deg; (with neither point at a pole). If
121 * \e azi1 = 0&deg; or &plusmn;180&deg;, the geodesic is unique. Otherwise
122 * there are two geodesics and the second one is obtained by setting [\e
123 * azi1, \e azi2] &rarr; [&minus;\e azi1, &minus;\e azi2], \e S12 &rarr;
124 * &minus;\e S12. (This occurs when \e lat2 is near &minus;\e lat1 for
125 * prolate ellipsoids.)
126 * - Points 1 and 2 at opposite poles. There are infinitely many geodesics
127 * which can be generated by setting [\e azi1, \e azi2] &rarr; [\e azi1, \e
128 * azi2] + [\e d, &minus;\e d], for arbitrary \e d. (For spheres, this
129 * prescription applies when points 1 and 2 are antipodal.)
130 * - \e s12 = 0 (coincident points). There are infinitely many geodesics
131 * which can be generated by setting [\e azi1, \e azi2] &rarr;
132 * [\e azi1, \e azi2] + [\e d, \e d], for arbitrary \e d.
133 *
134 * The calculations are accurate to better than 15 nm (15 nanometers) for the
135 * WGS84 ellipsoid. See Sec. 9 of
136 * <a href="https://arxiv.org/abs/1102.1215v1">arXiv:1102.1215v1</a> for
137 * details. With \e exact = false (the default) in the constructor,
138 * the algorithms used by this class are based on series expansions
139 * using the flattening \e f as a small parameter. These are only accurate
140 * for |<i>f</i>| &lt; 0.02; however reasonably accurate results will be
141 * obtained for |<i>f</i>| &lt; 0.2. Here is a table of the approximate
142 * maximum error (expressed as a distance) for an ellipsoid with the same
143 * equatorial radius as the WGS84 ellipsoid and different values of the
144 * flattening.<pre>
145 * |f| error
146 * 0.01 25 nm
147 * 0.02 30 nm
148 * 0.05 10 um
149 * 0.1 1.5 mm
150 * 0.2 300 mm
151 * </pre>
152 * For very eccentric ellipsoids, set \e exact to true in the constructor;
153 * this will delegate the calculations to the GeodesicExact class.
154 *
155 * The algorithms are described in
156 * - C. F. F. Karney,
157 * <a href="https://doi.org/10.1007/s00190-012-0578-z">
158 * Algorithms for geodesics</a>,
159 * J. Geodesy <b>87</b>, 43--55 (2013);
160 * DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
161 * 10.1007/s00190-012-0578-z</a>;
162 * addenda:
163 * <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
164 * geod-addenda.html</a>.
165 * .
166 * For more information on geodesics see \ref geodesic.
167 *
168 * Example of use:
169 * \include example-Geodesic.cpp
170 *
171 * <a href="GeodSolve.1.html">GeodSolve</a> is a command-line utility
172 * providing access to the functionality of Geodesic and GeodesicLine.
173 **********************************************************************/
174
175 class GEOGRAPHICLIB_EXPORT Geodesic {
176 private:
177 typedef Math::real real;
178 friend class GeodesicLine;
179 static const int nA1_ = GEOGRAPHICLIB_GEODESIC_ORDER;
180 static const int nC1_ = GEOGRAPHICLIB_GEODESIC_ORDER;
181 static const int nC1p_ = GEOGRAPHICLIB_GEODESIC_ORDER;
182 static const int nA2_ = GEOGRAPHICLIB_GEODESIC_ORDER;
183 static const int nC2_ = GEOGRAPHICLIB_GEODESIC_ORDER;
184 static const int nA3_ = GEOGRAPHICLIB_GEODESIC_ORDER;
185 static const int nA3x_ = nA3_;
186 static const int nC3_ = GEOGRAPHICLIB_GEODESIC_ORDER;
187 static const int nC3x_ = (nC3_ * (nC3_ - 1)) / 2;
188 static const int nC4_ = GEOGRAPHICLIB_GEODESIC_ORDER;
189 static const int nC4x_ = (nC4_ * (nC4_ + 1)) / 2;
190 // Size for temporary array
191 // nC = max(max(nC1_, nC1p_, nC2_) + 1, max(nC3_, nC4_))
192 static const int nC_ = GEOGRAPHICLIB_GEODESIC_ORDER + 1;
193 static const unsigned maxit1_ = 20;
194 unsigned maxit2_;
195 real tiny_, tol0_, tol1_, tol2_, tolb_, xthresh_;
196
197 enum captype {
198 CAP_NONE = 0U,
199 CAP_C1 = 1U<<0,
200 CAP_C1p = 1U<<1,
201 CAP_C2 = 1U<<2,
202 CAP_C3 = 1U<<3,
203 CAP_C4 = 1U<<4,
204 CAP_ALL = 0x1FU,
205 CAP_MASK = CAP_ALL,
206 OUT_ALL = 0x7F80U,
207 OUT_MASK = 0xFF80U, // Includes LONG_UNROLL
208 };
209
210 static real SinCosSeries(bool sinp,
211 real sinx, real cosx, const real c[], int n);
212 static real Astroid(real x, real y);
213
214 real _a, _f;
215 bool _exact;
216 real _f1, _e2, _ep2, _n, _b, _c2, _etol2;
217 real _aA3x[nA3x_], _cC3x[nC3x_], _cC4x[nC4x_];
218 GeodesicExact _geodexact;
219
220 void Lengths(real eps, real sig12,
221 real ssig1, real csig1, real dn1,
222 real ssig2, real csig2, real dn2,
223 real cbet1, real cbet2, unsigned outmask,
224 real& s12s, real& m12a, real& m0,
225 real& M12, real& M21, real Ca[]) const;
226 real InverseStart(real sbet1, real cbet1, real dn1,
227 real sbet2, real cbet2, real dn2,
228 real lam12, real slam12, real clam12,
229 real& salp1, real& calp1,
230 real& salp2, real& calp2, real& dnm,
231 real Ca[]) const;
232 real Lambda12(real sbet1, real cbet1, real dn1,
233 real sbet2, real cbet2, real dn2,
234 real salp1, real calp1, real slam120, real clam120,
235 real& salp2, real& calp2, real& sig12,
236 real& ssig1, real& csig1, real& ssig2, real& csig2,
237 real& eps, real& domg12,
238 bool diffp, real& dlam12, real Ca[]) const;
239 real GenInverse(real lat1, real lon1, real lat2, real lon2,
240 unsigned outmask, real& s12,
241 real& salp1, real& calp1, real& salp2, real& calp2,
242 real& m12, real& M12, real& M21, real& S12) const;
243
244 // These are Maxima generated functions to provide series approximations to
245 // the integrals for the ellipsoidal geodesic.
246 static real A1m1f(real eps);
247 static void C1f(real eps, real c[]);
248 static void C1pf(real eps, real c[]);
249 static real A2m1f(real eps);
250 static void C2f(real eps, real c[]);
251
252 void A3coeff();
253 real A3f(real eps) const;
254 void C3coeff();
255 void C3f(real eps, real c[]) const;
256 void C4coeff();
257 void C4f(real k2, real c[]) const;
258 public:
259
260 /**
261 * Bit masks for what calculations to do. These masks do double duty.
262 * They signify to the GeodesicLine constructor and to
263 * Geodesic::Line what capabilities should be included in the GeodesicLine
264 * object. They also specify which results to return in the general
265 * routines Geodesic::GenDirect and Geodesic::GenInverse routines.
266 * GeodesicLine::mask is a duplication of this enum.
267 **********************************************************************/
268 enum mask {
269 /**
270 * No capabilities, no output.
271 * @hideinitializer
272 **********************************************************************/
273 NONE = 0U,
274 /**
275 * Calculate latitude \e lat2. (It's not necessary to include this as a
276 * capability to GeodesicLine because this is included by default.)
277 * @hideinitializer
278 **********************************************************************/
279 LATITUDE = 1U<<7 | CAP_NONE,
280 /**
281 * Calculate longitude \e lon2.
282 * @hideinitializer
283 **********************************************************************/
284 LONGITUDE = 1U<<8 | CAP_C3,
285 /**
286 * Calculate azimuths \e azi1 and \e azi2. (It's not necessary to
287 * include this as a capability to GeodesicLine because this is included
288 * by default.)
289 * @hideinitializer
290 **********************************************************************/
291 AZIMUTH = 1U<<9 | CAP_NONE,
292 /**
293 * Calculate distance \e s12.
294 * @hideinitializer
295 **********************************************************************/
296 DISTANCE = 1U<<10 | CAP_C1,
297 /**
298 * A combination of the common capabilities: Geodesic::LATITUDE,
299 * Geodesic::LONGITUDE, Geodesic::AZIMUTH, Geodesic::DISTANCE.
300 * @hideinitializer
301 **********************************************************************/
302 STANDARD = LATITUDE | LONGITUDE | AZIMUTH | DISTANCE,
303 /**
304 * Allow distance \e s12 to be used as input in the direct geodesic
305 * problem.
306 * @hideinitializer
307 **********************************************************************/
308 DISTANCE_IN = 1U<<11 | CAP_C1 | CAP_C1p,
309 /**
310 * Calculate reduced length \e m12.
311 * @hideinitializer
312 **********************************************************************/
313 REDUCEDLENGTH = 1U<<12 | CAP_C1 | CAP_C2,
314 /**
315 * Calculate geodesic scales \e M12 and \e M21.
316 * @hideinitializer
317 **********************************************************************/
318 GEODESICSCALE = 1U<<13 | CAP_C1 | CAP_C2,
319 /**
320 * Calculate area \e S12.
321 * @hideinitializer
322 **********************************************************************/
323 AREA = 1U<<14 | CAP_C4,
324 /**
325 * Unroll \e lon2 in the direct calculation.
326 * @hideinitializer
327 **********************************************************************/
328 LONG_UNROLL = 1U<<15,
329 /**
330 * All capabilities, calculate everything. (Geodesic::LONG_UNROLL is not
331 * included in this mask.)
332 * @hideinitializer
333 **********************************************************************/
334 ALL = OUT_ALL| CAP_ALL,
335 };
336
337 /** \name Constructor
338 **********************************************************************/
339 ///@{
340 /**
341 * Constructor for an ellipsoid with
342 *
343 * @param[in] a equatorial radius (meters).
344 * @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
345 * Negative \e f gives a prolate ellipsoid.
346 * @param[in] exact if true use exact formulation in terms of elliptic
347 * integrals instead of series expansions (default false).
348 * @exception GeographicErr if \e a or (1 &minus; \e f) \e a is not
349 * positive.
350 *
351 * With \e exact = true, this class delegates the calculations to the
352 * GeodesicExact and GeodesicLineExact classes which solve the geodesic
353 * problems in terms of elliptic integrals.
354 **********************************************************************/
355 Geodesic(real a, real f, bool exact = false);
356 ///@}
357
358 /** \name Direct geodesic problem specified in terms of distance.
359 **********************************************************************/
360 ///@{
361 /**
362 * Solve the direct geodesic problem where the length of the geodesic
363 * is specified in terms of distance.
364 *
365 * @param[in] lat1 latitude of point 1 (degrees).
366 * @param[in] lon1 longitude of point 1 (degrees).
367 * @param[in] azi1 azimuth at point 1 (degrees).
368 * @param[in] s12 distance between point 1 and point 2 (meters); it can be
369 * negative.
370 * @param[out] lat2 latitude of point 2 (degrees).
371 * @param[out] lon2 longitude of point 2 (degrees).
372 * @param[out] azi2 (forward) azimuth at point 2 (degrees).
373 * @param[out] m12 reduced length of geodesic (meters).
374 * @param[out] M12 geodesic scale of point 2 relative to point 1
375 * (dimensionless).
376 * @param[out] M21 geodesic scale of point 1 relative to point 2
377 * (dimensionless).
378 * @param[out] S12 area under the geodesic (meters<sup>2</sup>).
379 * @return \e a12 arc length of between point 1 and point 2 (degrees).
380 *
381 * \e lat1 should be in the range [&minus;90&deg;, 90&deg;]. The values of
382 * \e lon2 and \e azi2 returned are in the range [&minus;180&deg;,
383 * 180&deg;].
384 *
385 * If either point is at a pole, the azimuth is defined by keeping the
386 * longitude fixed, writing \e lat = &plusmn;(90&deg; &minus; &epsilon;),
387 * and taking the limit &epsilon; &rarr; 0+. An arc length greater that
388 * 180&deg; signifies a geodesic which is not a shortest path. (For a
389 * prolate ellipsoid, an additional condition is necessary for a shortest
390 * path: the longitudinal extent must not exceed of 180&deg;.)
391 *
392 * The following functions are overloaded versions of Geodesic::Direct
393 * which omit some of the output parameters. Note, however, that the arc
394 * length is always computed and returned as the function value.
395 **********************************************************************/
396 Math::real Direct(real lat1, real lon1, real azi1, real s12,
397 real& lat2, real& lon2, real& azi2,
398 real& m12, real& M12, real& M21, real& S12)
399 const {
400 real t;
401 return GenDirect(lat1, lon1, azi1, false, s12,
402 LATITUDE | LONGITUDE | AZIMUTH |
403 REDUCEDLENGTH | GEODESICSCALE | AREA,
404 lat2, lon2, azi2, t, m12, M12, M21, S12);
405 }
406
407 /**
408 * See the documentation for Geodesic::Direct.
409 **********************************************************************/
410 Math::real Direct(real lat1, real lon1, real azi1, real s12,
411 real& lat2, real& lon2)
412 const {
413 real t;
414 return GenDirect(lat1, lon1, azi1, false, s12,
415 LATITUDE | LONGITUDE,
416 lat2, lon2, t, t, t, t, t, t);
417 }
418
419 /**
420 * See the documentation for Geodesic::Direct.
421 **********************************************************************/
422 Math::real Direct(real lat1, real lon1, real azi1, real s12,
423 real& lat2, real& lon2, real& azi2)
424 const {
425 real t;
426 return GenDirect(lat1, lon1, azi1, false, s12,
427 LATITUDE | LONGITUDE | AZIMUTH,
428 lat2, lon2, azi2, t, t, t, t, t);
429 }
430
431 /**
432 * See the documentation for Geodesic::Direct.
433 **********************************************************************/
434 Math::real Direct(real lat1, real lon1, real azi1, real s12,
435 real& lat2, real& lon2, real& azi2, real& m12)
436 const {
437 real t;
438 return GenDirect(lat1, lon1, azi1, false, s12,
439 LATITUDE | LONGITUDE | AZIMUTH | REDUCEDLENGTH,
440 lat2, lon2, azi2, t, m12, t, t, t);
441 }
442
443 /**
444 * See the documentation for Geodesic::Direct.
445 **********************************************************************/
446 Math::real Direct(real lat1, real lon1, real azi1, real s12,
447 real& lat2, real& lon2, real& azi2,
448 real& M12, real& M21)
449 const {
450 real t;
451 return GenDirect(lat1, lon1, azi1, false, s12,
452 LATITUDE | LONGITUDE | AZIMUTH | GEODESICSCALE,
453 lat2, lon2, azi2, t, t, M12, M21, t);
454 }
455
456 /**
457 * See the documentation for Geodesic::Direct.
458 **********************************************************************/
459 Math::real Direct(real lat1, real lon1, real azi1, real s12,
460 real& lat2, real& lon2, real& azi2,
461 real& m12, real& M12, real& M21)
462 const {
463 real t;
464 return GenDirect(lat1, lon1, azi1, false, s12,
465 LATITUDE | LONGITUDE | AZIMUTH |
466 REDUCEDLENGTH | GEODESICSCALE,
467 lat2, lon2, azi2, t, m12, M12, M21, t);
468 }
469 ///@}
470
471 /** \name Direct geodesic problem specified in terms of arc length.
472 **********************************************************************/
473 ///@{
474 /**
475 * Solve the direct geodesic problem where the length of the geodesic
476 * is specified in terms of arc length.
477 *
478 * @param[in] lat1 latitude of point 1 (degrees).
479 * @param[in] lon1 longitude of point 1 (degrees).
480 * @param[in] azi1 azimuth at point 1 (degrees).
481 * @param[in] a12 arc length between point 1 and point 2 (degrees); it can
482 * be negative.
483 * @param[out] lat2 latitude of point 2 (degrees).
484 * @param[out] lon2 longitude of point 2 (degrees).
485 * @param[out] azi2 (forward) azimuth at point 2 (degrees).
486 * @param[out] s12 distance between point 1 and point 2 (meters).
487 * @param[out] m12 reduced length of geodesic (meters).
488 * @param[out] M12 geodesic scale of point 2 relative to point 1
489 * (dimensionless).
490 * @param[out] M21 geodesic scale of point 1 relative to point 2
491 * (dimensionless).
492 * @param[out] S12 area under the geodesic (meters<sup>2</sup>).
493 *
494 * \e lat1 should be in the range [&minus;90&deg;, 90&deg;]. The values of
495 * \e lon2 and \e azi2 returned are in the range [&minus;180&deg;,
496 * 180&deg;].
497 *
498 * If either point is at a pole, the azimuth is defined by keeping the
499 * longitude fixed, writing \e lat = &plusmn;(90&deg; &minus; &epsilon;),
500 * and taking the limit &epsilon; &rarr; 0+. An arc length greater that
501 * 180&deg; signifies a geodesic which is not a shortest path. (For a
502 * prolate ellipsoid, an additional condition is necessary for a shortest
503 * path: the longitudinal extent must not exceed of 180&deg;.)
504 *
505 * The following functions are overloaded versions of Geodesic::Direct
506 * which omit some of the output parameters.
507 **********************************************************************/
508 void ArcDirect(real lat1, real lon1, real azi1, real a12,
509 real& lat2, real& lon2, real& azi2, real& s12,
510 real& m12, real& M12, real& M21, real& S12)
511 const {
512 GenDirect(lat1, lon1, azi1, true, a12,
513 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
514 REDUCEDLENGTH | GEODESICSCALE | AREA,
515 lat2, lon2, azi2, s12, m12, M12, M21, S12);
516 }
517
518 /**
519 * See the documentation for Geodesic::ArcDirect.
520 **********************************************************************/
521 void ArcDirect(real lat1, real lon1, real azi1, real a12,
522 real& lat2, real& lon2) const {
523 real t;
524 GenDirect(lat1, lon1, azi1, true, a12,
525 LATITUDE | LONGITUDE,
526 lat2, lon2, t, t, t, t, t, t);
527 }
528
529 /**
530 * See the documentation for Geodesic::ArcDirect.
531 **********************************************************************/
532 void ArcDirect(real lat1, real lon1, real azi1, real a12,
533 real& lat2, real& lon2, real& azi2) const {
534 real t;
535 GenDirect(lat1, lon1, azi1, true, a12,
536 LATITUDE | LONGITUDE | AZIMUTH,
537 lat2, lon2, azi2, t, t, t, t, t);
538 }
539
540 /**
541 * See the documentation for Geodesic::ArcDirect.
542 **********************************************************************/
543 void ArcDirect(real lat1, real lon1, real azi1, real a12,
544 real& lat2, real& lon2, real& azi2, real& s12)
545 const {
546 real t;
547 GenDirect(lat1, lon1, azi1, true, a12,
548 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE,
549 lat2, lon2, azi2, s12, t, t, t, t);
550 }
551
552 /**
553 * See the documentation for Geodesic::ArcDirect.
554 **********************************************************************/
555 void ArcDirect(real lat1, real lon1, real azi1, real a12,
556 real& lat2, real& lon2, real& azi2,
557 real& s12, real& m12) const {
558 real t;
559 GenDirect(lat1, lon1, azi1, true, a12,
560 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
561 REDUCEDLENGTH,
562 lat2, lon2, azi2, s12, m12, t, t, t);
563 }
564
565 /**
566 * See the documentation for Geodesic::ArcDirect.
567 **********************************************************************/
568 void ArcDirect(real lat1, real lon1, real azi1, real a12,
569 real& lat2, real& lon2, real& azi2, real& s12,
570 real& M12, real& M21) const {
571 real t;
572 GenDirect(lat1, lon1, azi1, true, a12,
573 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
574 GEODESICSCALE,
575 lat2, lon2, azi2, s12, t, M12, M21, t);
576 }
577
578 /**
579 * See the documentation for Geodesic::ArcDirect.
580 **********************************************************************/
581 void ArcDirect(real lat1, real lon1, real azi1, real a12,
582 real& lat2, real& lon2, real& azi2, real& s12,
583 real& m12, real& M12, real& M21) const {
584 real t;
585 GenDirect(lat1, lon1, azi1, true, a12,
586 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
587 REDUCEDLENGTH | GEODESICSCALE,
588 lat2, lon2, azi2, s12, m12, M12, M21, t);
589 }
590 ///@}
591
592 /** \name General version of the direct geodesic solution.
593 **********************************************************************/
594 ///@{
595
596 /**
597 * The general direct geodesic problem. Geodesic::Direct and
598 * Geodesic::ArcDirect are defined in terms of this function.
599 *
600 * @param[in] lat1 latitude of point 1 (degrees).
601 * @param[in] lon1 longitude of point 1 (degrees).
602 * @param[in] azi1 azimuth at point 1 (degrees).
603 * @param[in] arcmode boolean flag determining the meaning of the \e
604 * s12_a12.
605 * @param[in] s12_a12 if \e arcmode is false, this is the distance between
606 * point 1 and point 2 (meters); otherwise it is the arc length between
607 * point 1 and point 2 (degrees); it can be negative.
608 * @param[in] outmask a bitor'ed combination of Geodesic::mask values
609 * specifying which of the following parameters should be set.
610 * @param[out] lat2 latitude of point 2 (degrees).
611 * @param[out] lon2 longitude of point 2 (degrees).
612 * @param[out] azi2 (forward) azimuth at point 2 (degrees).
613 * @param[out] s12 distance between point 1 and point 2 (meters).
614 * @param[out] m12 reduced length of geodesic (meters).
615 * @param[out] M12 geodesic scale of point 2 relative to point 1
616 * (dimensionless).
617 * @param[out] M21 geodesic scale of point 1 relative to point 2
618 * (dimensionless).
619 * @param[out] S12 area under the geodesic (meters<sup>2</sup>).
620 * @return \e a12 arc length of between point 1 and point 2 (degrees).
621 *
622 * The Geodesic::mask values possible for \e outmask are
623 * - \e outmask |= Geodesic::LATITUDE for the latitude \e lat2;
624 * - \e outmask |= Geodesic::LONGITUDE for the latitude \e lon2;
625 * - \e outmask |= Geodesic::AZIMUTH for the latitude \e azi2;
626 * - \e outmask |= Geodesic::DISTANCE for the distance \e s12;
627 * - \e outmask |= Geodesic::REDUCEDLENGTH for the reduced length \e
628 * m12;
629 * - \e outmask |= Geodesic::GEODESICSCALE for the geodesic scales \e
630 * M12 and \e M21;
631 * - \e outmask |= Geodesic::AREA for the area \e S12;
632 * - \e outmask |= Geodesic::ALL for all of the above;
633 * - \e outmask |= Geodesic::LONG_UNROLL to unroll \e lon2 instead of
634 * wrapping it into the range [&minus;180&deg;, 180&deg;].
635 * .
636 * The function value \e a12 is always computed and returned and this
637 * equals \e s12_a12 is \e arcmode is true. If \e outmask includes
638 * Geodesic::DISTANCE and \e arcmode is false, then \e s12 = \e s12_a12.
639 * It is not necessary to include Geodesic::DISTANCE_IN in \e outmask; this
640 * is automatically included is \e arcmode is false.
641 *
642 * With the Geodesic::LONG_UNROLL bit set, the quantity \e lon2 &minus; \e
643 * lon1 indicates how many times and in what sense the geodesic encircles
644 * the ellipsoid.
645 **********************************************************************/
646 Math::real GenDirect(real lat1, real lon1, real azi1,
647 bool arcmode, real s12_a12, unsigned outmask,
648 real& lat2, real& lon2, real& azi2,
649 real& s12, real& m12, real& M12, real& M21,
650 real& S12) const;
651 ///@}
652
653 /** \name Inverse geodesic problem.
654 **********************************************************************/
655 ///@{
656 /**
657 * Solve the inverse geodesic problem.
658 *
659 * @param[in] lat1 latitude of point 1 (degrees).
660 * @param[in] lon1 longitude of point 1 (degrees).
661 * @param[in] lat2 latitude of point 2 (degrees).
662 * @param[in] lon2 longitude of point 2 (degrees).
663 * @param[out] s12 distance between point 1 and point 2 (meters).
664 * @param[out] azi1 azimuth at point 1 (degrees).
665 * @param[out] azi2 (forward) azimuth at point 2 (degrees).
666 * @param[out] m12 reduced length of geodesic (meters).
667 * @param[out] M12 geodesic scale of point 2 relative to point 1
668 * (dimensionless).
669 * @param[out] M21 geodesic scale of point 1 relative to point 2
670 * (dimensionless).
671 * @param[out] S12 area under the geodesic (meters<sup>2</sup>).
672 * @return \e a12 arc length of between point 1 and point 2 (degrees).
673 *
674 * \e lat1 and \e lat2 should be in the range [&minus;90&deg;, 90&deg;].
675 * The values of \e azi1 and \e azi2 returned are in the range
676 * [&minus;180&deg;, 180&deg;].
677 *
678 * If either point is at a pole, the azimuth is defined by keeping the
679 * longitude fixed, writing \e lat = &plusmn;(90&deg; &minus; &epsilon;),
680 * and taking the limit &epsilon; &rarr; 0+.
681 *
682 * The solution to the inverse problem is found using Newton's method. If
683 * this fails to converge (this is very unlikely in geodetic applications
684 * but does occur for very eccentric ellipsoids), then the bisection method
685 * is used to refine the solution.
686 *
687 * The following functions are overloaded versions of Geodesic::Inverse
688 * which omit some of the output parameters. Note, however, that the arc
689 * length is always computed and returned as the function value.
690 **********************************************************************/
691 Math::real Inverse(real lat1, real lon1, real lat2, real lon2,
692 real& s12, real& azi1, real& azi2, real& m12,
693 real& M12, real& M21, real& S12) const {
694 return GenInverse(lat1, lon1, lat2, lon2,
695 DISTANCE | AZIMUTH |
696 REDUCEDLENGTH | GEODESICSCALE | AREA,
697 s12, azi1, azi2, m12, M12, M21, S12);
698 }
699
700 /**
701 * See the documentation for Geodesic::Inverse.
702 **********************************************************************/
703 Math::real Inverse(real lat1, real lon1, real lat2, real lon2,
704 real& s12) const {
705 real t;
706 return GenInverse(lat1, lon1, lat2, lon2,
707 DISTANCE,
708 s12, t, t, t, t, t, t);
709 }
710
711 /**
712 * See the documentation for Geodesic::Inverse.
713 **********************************************************************/
714 Math::real Inverse(real lat1, real lon1, real lat2, real lon2,
715 real& azi1, real& azi2) const {
716 real t;
717 return GenInverse(lat1, lon1, lat2, lon2,
718 AZIMUTH,
719 t, azi1, azi2, t, t, t, t);
720 }
721
722 /**
723 * See the documentation for Geodesic::Inverse.
724 **********************************************************************/
725 Math::real Inverse(real lat1, real lon1, real lat2, real lon2,
726 real& s12, real& azi1, real& azi2)
727 const {
728 real t;
729 return GenInverse(lat1, lon1, lat2, lon2,
730 DISTANCE | AZIMUTH,
731 s12, azi1, azi2, t, t, t, t);
732 }
733
734 /**
735 * See the documentation for Geodesic::Inverse.
736 **********************************************************************/
737 Math::real Inverse(real lat1, real lon1, real lat2, real lon2,
738 real& s12, real& azi1, real& azi2, real& m12)
739 const {
740 real t;
741 return GenInverse(lat1, lon1, lat2, lon2,
742 DISTANCE | AZIMUTH | REDUCEDLENGTH,
743 s12, azi1, azi2, m12, t, t, t);
744 }
745
746 /**
747 * See the documentation for Geodesic::Inverse.
748 **********************************************************************/
749 Math::real Inverse(real lat1, real lon1, real lat2, real lon2,
750 real& s12, real& azi1, real& azi2,
751 real& M12, real& M21) const {
752 real t;
753 return GenInverse(lat1, lon1, lat2, lon2,
754 DISTANCE | AZIMUTH | GEODESICSCALE,
755 s12, azi1, azi2, t, M12, M21, t);
756 }
757
758 /**
759 * See the documentation for Geodesic::Inverse.
760 **********************************************************************/
761 Math::real Inverse(real lat1, real lon1, real lat2, real lon2,
762 real& s12, real& azi1, real& azi2, real& m12,
763 real& M12, real& M21) const {
764 real t;
765 return GenInverse(lat1, lon1, lat2, lon2,
766 DISTANCE | AZIMUTH |
767 REDUCEDLENGTH | GEODESICSCALE,
768 s12, azi1, azi2, m12, M12, M21, t);
769 }
770 ///@}
771
772 /** \name General version of inverse geodesic solution.
773 **********************************************************************/
774 ///@{
775 /**
776 * The general inverse geodesic calculation. Geodesic::Inverse is defined
777 * in terms of this function.
778 *
779 * @param[in] lat1 latitude of point 1 (degrees).
780 * @param[in] lon1 longitude of point 1 (degrees).
781 * @param[in] lat2 latitude of point 2 (degrees).
782 * @param[in] lon2 longitude of point 2 (degrees).
783 * @param[in] outmask a bitor'ed combination of Geodesic::mask values
784 * specifying which of the following parameters should be set.
785 * @param[out] s12 distance between point 1 and point 2 (meters).
786 * @param[out] azi1 azimuth at point 1 (degrees).
787 * @param[out] azi2 (forward) azimuth at point 2 (degrees).
788 * @param[out] m12 reduced length of geodesic (meters).
789 * @param[out] M12 geodesic scale of point 2 relative to point 1
790 * (dimensionless).
791 * @param[out] M21 geodesic scale of point 1 relative to point 2
792 * (dimensionless).
793 * @param[out] S12 area under the geodesic (meters<sup>2</sup>).
794 * @return \e a12 arc length of between point 1 and point 2 (degrees).
795 *
796 * The Geodesic::mask values possible for \e outmask are
797 * - \e outmask |= Geodesic::DISTANCE for the distance \e s12;
798 * - \e outmask |= Geodesic::AZIMUTH for the latitude \e azi2;
799 * - \e outmask |= Geodesic::REDUCEDLENGTH for the reduced length \e
800 * m12;
801 * - \e outmask |= Geodesic::GEODESICSCALE for the geodesic scales \e
802 * M12 and \e M21;
803 * - \e outmask |= Geodesic::AREA for the area \e S12;
804 * - \e outmask |= Geodesic::ALL for all of the above.
805 * .
806 * The arc length is always computed and returned as the function value.
807 **********************************************************************/
808 Math::real GenInverse(real lat1, real lon1, real lat2, real lon2,
809 unsigned outmask,
810 real& s12, real& azi1, real& azi2,
811 real& m12, real& M12, real& M21, real& S12) const;
812 ///@}
813
814 /** \name Interface to GeodesicLine.
815 **********************************************************************/
816 ///@{
817
818 /**
819 * Typedef for the class for computing multiple points on a geodesic.
820 **********************************************************************/
821 typedef GeodesicLine LineClass;
822
823 /**
824 * Set up to compute several points on a single geodesic.
825 *
826 * @param[in] lat1 latitude of point 1 (degrees).
827 * @param[in] lon1 longitude of point 1 (degrees).
828 * @param[in] azi1 azimuth at point 1 (degrees).
829 * @param[in] caps bitor'ed combination of Geodesic::mask values
830 * specifying the capabilities the GeodesicLine object should possess,
831 * i.e., which quantities can be returned in calls to
832 * GeodesicLine::Position.
833 * @return a GeodesicLine object.
834 *
835 * \e lat1 should be in the range [&minus;90&deg;, 90&deg;].
836 *
837 * The Geodesic::mask values are
838 * - \e caps |= Geodesic::LATITUDE for the latitude \e lat2; this is
839 * added automatically;
840 * - \e caps |= Geodesic::LONGITUDE for the latitude \e lon2;
841 * - \e caps |= Geodesic::AZIMUTH for the azimuth \e azi2; this is
842 * added automatically;
843 * - \e caps |= Geodesic::DISTANCE for the distance \e s12;
844 * - \e caps |= Geodesic::REDUCEDLENGTH for the reduced length \e m12;
845 * - \e caps |= Geodesic::GEODESICSCALE for the geodesic scales \e M12
846 * and \e M21;
847 * - \e caps |= Geodesic::AREA for the area \e S12;
848 * - \e caps |= Geodesic::DISTANCE_IN permits the length of the
849 * geodesic to be given in terms of \e s12; without this capability the
850 * length can only be specified in terms of arc length;
851 * - \e caps |= Geodesic::ALL for all of the above.
852 * .
853 * The default value of \e caps is Geodesic::ALL.
854 *
855 * If the point is at a pole, the azimuth is defined by keeping \e lon1
856 * fixed, writing \e lat1 = &plusmn;(90 &minus; &epsilon;), and taking the
857 * limit &epsilon; &rarr; 0+.
858 **********************************************************************/
859 GeodesicLine Line(real lat1, real lon1, real azi1, unsigned caps = ALL)
860 const;
861
862 /**
863 * Define a GeodesicLine in terms of the inverse geodesic problem.
864 *
865 * @param[in] lat1 latitude of point 1 (degrees).
866 * @param[in] lon1 longitude of point 1 (degrees).
867 * @param[in] lat2 latitude of point 2 (degrees).
868 * @param[in] lon2 longitude of point 2 (degrees).
869 * @param[in] caps bitor'ed combination of Geodesic::mask values
870 * specifying the capabilities the GeodesicLine object should possess,
871 * i.e., which quantities can be returned in calls to
872 * GeodesicLine::Position.
873 * @return a GeodesicLine object.
874 *
875 * This function sets point 3 of the GeodesicLine to correspond to point 2
876 * of the inverse geodesic problem.
877 *
878 * \e lat1 and \e lat2 should be in the range [&minus;90&deg;, 90&deg;].
879 **********************************************************************/
880 GeodesicLine InverseLine(real lat1, real lon1, real lat2, real lon2,
881 unsigned caps = ALL) const;
882
883 /**
884 * Define a GeodesicLine in terms of the direct geodesic problem specified
885 * in terms of distance.
886 *
887 * @param[in] lat1 latitude of point 1 (degrees).
888 * @param[in] lon1 longitude of point 1 (degrees).
889 * @param[in] azi1 azimuth at point 1 (degrees).
890 * @param[in] s12 distance between point 1 and point 2 (meters); it can be
891 * negative.
892 * @param[in] caps bitor'ed combination of Geodesic::mask values
893 * specifying the capabilities the GeodesicLine object should possess,
894 * i.e., which quantities can be returned in calls to
895 * GeodesicLine::Position.
896 * @return a GeodesicLine object.
897 *
898 * This function sets point 3 of the GeodesicLine to correspond to point 2
899 * of the direct geodesic problem.
900 *
901 * \e lat1 should be in the range [&minus;90&deg;, 90&deg;].
902 **********************************************************************/
903 GeodesicLine DirectLine(real lat1, real lon1, real azi1, real s12,
904 unsigned caps = ALL) const;
905
906 /**
907 * Define a GeodesicLine in terms of the direct geodesic problem specified
908 * in terms of arc length.
909 *
910 * @param[in] lat1 latitude of point 1 (degrees).
911 * @param[in] lon1 longitude of point 1 (degrees).
912 * @param[in] azi1 azimuth at point 1 (degrees).
913 * @param[in] a12 arc length between point 1 and point 2 (degrees); it can
914 * be negative.
915 * @param[in] caps bitor'ed combination of Geodesic::mask values
916 * specifying the capabilities the GeodesicLine object should possess,
917 * i.e., which quantities can be returned in calls to
918 * GeodesicLine::Position.
919 * @return a GeodesicLine object.
920 *
921 * This function sets point 3 of the GeodesicLine to correspond to point 2
922 * of the direct geodesic problem.
923 *
924 * \e lat1 should be in the range [&minus;90&deg;, 90&deg;].
925 **********************************************************************/
926 GeodesicLine ArcDirectLine(real lat1, real lon1, real azi1, real a12,
927 unsigned caps = ALL) const;
928
929 /**
930 * Define a GeodesicLine in terms of the direct geodesic problem specified
931 * in terms of either distance or arc length.
932 *
933 * @param[in] lat1 latitude of point 1 (degrees).
934 * @param[in] lon1 longitude of point 1 (degrees).
935 * @param[in] azi1 azimuth at point 1 (degrees).
936 * @param[in] arcmode boolean flag determining the meaning of the \e
937 * s12_a12.
938 * @param[in] s12_a12 if \e arcmode is false, this is the distance between
939 * point 1 and point 2 (meters); otherwise it is the arc length between
940 * point 1 and point 2 (degrees); it can be negative.
941 * @param[in] caps bitor'ed combination of Geodesic::mask values
942 * specifying the capabilities the GeodesicLine object should possess,
943 * i.e., which quantities can be returned in calls to
944 * GeodesicLine::Position.
945 * @return a GeodesicLine object.
946 *
947 * This function sets point 3 of the GeodesicLine to correspond to point 2
948 * of the direct geodesic problem.
949 *
950 * \e lat1 should be in the range [&minus;90&deg;, 90&deg;].
951 **********************************************************************/
952 GeodesicLine GenDirectLine(real lat1, real lon1, real azi1,
953 bool arcmode, real s12_a12,
954 unsigned caps = ALL) const;
955 ///@}
956
957 /** \name Inspector functions.
958 **********************************************************************/
959 ///@{
960
961 /**
962 * @return \e a the equatorial radius of the ellipsoid (meters). This is
963 * the value used in the constructor.
964 **********************************************************************/
965 Math::real EquatorialRadius() const { return _a; }
966
967 /**
968 * @return \e f the flattening of the ellipsoid. This is the
969 * value used in the constructor.
970 **********************************************************************/
971 Math::real Flattening() const { return _f; }
972
973 /**
974 * @return \e exact whether the exact formulation is used. This is the
975 * value used in the constructor.
976 **********************************************************************/
977 bool Exact() const { return _exact; }
978
979 /**
980 * @return total area of ellipsoid in meters<sup>2</sup>. The area of a
981 * polygon encircling a pole can be found by adding
982 * Geodesic::EllipsoidArea()/2 to the sum of \e S12 for each side of the
983 * polygon.
984 **********************************************************************/
985 Math::real EllipsoidArea() const
986 { return 4 * Math::pi() * _c2; }
987 ///@}
988
989 /**
990 * A global instantiation of Geodesic with the parameters for the WGS84
991 * ellipsoid.
992 **********************************************************************/
993 static const Geodesic& WGS84();
994
995 };
996
997} // namespace GeographicLib
998
999#endif // GEOGRAPHICLIB_GEODESIC_HPP
Constants.hpp
Header for GeographicLib::Constants class.
GEOGRAPHICLIB_EXPORT
#define GEOGRAPHICLIB_EXPORT
Definition: Constants.hpp:67
real
GeographicLib::Math::real real
Definition: GeodSolve.cpp:29
GeodesicExact.hpp
Header for GeographicLib::GeodesicExact class.
GEOGRAPHICLIB_GEODESIC_ORDER
#define GEOGRAPHICLIB_GEODESIC_ORDER
Definition: Geodesic.hpp:21
GeographicLib::GeodesicExact
Exact geodesic calculations.
Definition: GeodesicExact.hpp:84
GeographicLib::GeodesicLine
A geodesic line.
Definition: GeodesicLine.hpp:74
GeographicLib::Geodesic
Geodesic calculations
Definition: Geodesic.hpp:175
GeographicLib::Geodesic::Direct
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &m12) const
Definition: Geodesic.hpp:434
GeographicLib::Geodesic::Direct
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2) const
Definition: Geodesic.hpp:422
GeographicLib::Geodesic::ArcDirect
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &M12, real &M21) const
Definition: Geodesic.hpp:568
GeographicLib::Geodesic::Inverse
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &m12, real &M12, real &M21) const
Definition: Geodesic.hpp:761
GeographicLib::Geodesic::Flattening
Math::real Flattening() const
Definition: Geodesic.hpp:971
GeographicLib::Geodesic::ArcDirect
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2) const
Definition: Geodesic.hpp:521
GeographicLib::Geodesic::Inverse
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &M12, real &M21) const
Definition: Geodesic.hpp:749
GeographicLib::Geodesic::ArcDirect
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21) const
Definition: Geodesic.hpp:581
GeographicLib::Geodesic::LineClass
GeodesicLine LineClass
Definition: Geodesic.hpp:821
GeographicLib::Geodesic::Direct
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &m12, real &M12, real &M21, real &S12) const
Definition: Geodesic.hpp:396
GeographicLib::Geodesic::EquatorialRadius
Math::real EquatorialRadius() const
Definition: Geodesic.hpp:965
GeographicLib::Geodesic::Inverse
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &m12) const
Definition: Geodesic.hpp:737
GeographicLib::Geodesic::ArcDirect
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12) const
Definition: Geodesic.hpp:543
GeographicLib::Geodesic::Exact
bool Exact() const
Definition: Geodesic.hpp:977
GeographicLib::Geodesic::Direct
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &M12, real &M21) const
Definition: Geodesic.hpp:446
GeographicLib::Geodesic::Inverse
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2) const
Definition: Geodesic.hpp:725
GeographicLib::Geodesic::Direct
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2) const
Definition: Geodesic.hpp:410
GeographicLib::Geodesic::mask
mask
Definition: Geodesic.hpp:268
GeographicLib::Geodesic::ArcDirect
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21, real &S12) const
Definition: Geodesic.hpp:508
GeographicLib::Geodesic::Inverse
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &azi1, real &azi2) const
Definition: Geodesic.hpp:714
GeographicLib::Geodesic::Inverse
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12) const
Definition: Geodesic.hpp:703
GeographicLib::Geodesic::ArcDirect
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12) const
Definition: Geodesic.hpp:555
GeographicLib::Geodesic::EllipsoidArea
Math::real EllipsoidArea() const
Definition: Geodesic.hpp:985
GeographicLib::Geodesic::Direct
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &m12, real &M12, real &M21) const
Definition: Geodesic.hpp:459
GeographicLib::Geodesic::ArcDirect
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2) const
Definition: Geodesic.hpp:532
GeographicLib::Geodesic::Inverse
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &m12, real &M12, real &M21, real &S12) const
Definition: Geodesic.hpp:691
GeographicLib::Math::pi
static T pi()
Definition: Math.hpp:183
GeographicLib::Math::real
double real
Definition: Math.hpp:100
GeographicLib
Namespace for GeographicLib.
Definition: Accumulator.cpp:12