GeographicLib  1.37
Ellipsoid.hpp
Go to the documentation of this file.
1 /**
2  * \file Ellipsoid.hpp
3  * \brief Header for GeographicLib::Ellipsoid class
4  *
5  * Copyright (c) Charles Karney (2012) <charles@karney.com> and licensed under
6  * the MIT/X11 License. For more information, see
7  * http://geographiclib.sourceforge.net/
8  **********************************************************************/
9 
10 #if !defined(GEOGRAPHICLIB_ELLIPSOID_HPP)
11 #define GEOGRAPHICLIB_ELLIPSOID_HPP 1
12 
17 
18 namespace GeographicLib {
19 
20  /**
21  * \brief Properties of an ellipsoid
22  *
23  * This class returns various properties of the ellipsoid and converts
24  * between various types of latitudes. The latitude conversions are also
25  * possible using the various projections supported by %GeographicLib; but
26  * Ellipsoid provides more direct access (sometimes using private functions
27  * of the projection classes). Ellipsoid::RectifyingLatitude,
28  * Ellipsoid::InverseRectifyingLatitude, and Ellipsoid::MeridianDistance
29  * provide functionality which can be provided by the Geodesic class.
30  * However Geodesic uses a series approximation (valid for abs \e f < 1/150),
31  * whereas Ellipsoid computes these quantities using EllipticFunction which
32  * provides accurate results even when \e f is large. Use of this class
33  * should be limited to &minus;3 < \e f < 3/4 (i.e., 1/4 < b/a < 4).
34  *
35  * Example of use:
36  * \include example-Ellipsoid.cpp
37  **********************************************************************/
38 
40  private:
41  typedef Math::real real;
42  static const int numit_ = 10;
43  real stol_;
44  real _a, _f, _f1, _f12, _e2, _e, _e12, _n, _b;
46  EllipticFunction _ell;
47  AlbersEqualArea _au;
48  static inline real tand(real x) {
49  using std::abs; using std::tan;
50  return
51  abs(x) == real(90) ? (x < 0 ?
52  - TransverseMercator::overflow()
53  : TransverseMercator::overflow()) :
54  tan(x * Math::degree());
55  }
56  static inline real atand(real x)
57  { using std::atan; return atan(x) / Math::degree(); }
58 
59  // These are the alpha and beta coefficients in the Krueger series from
60  // TransverseMercator. Thy are used by RhumbSolve to compute
61  // (psi2-psi1)/(mu2-mu1).
62  const Math::real* ConformalToRectifyingCoeffs() const { return _tm._alp; }
63  const Math::real* RectifyingToConformalCoeffs() const { return _tm._bet; }
64  friend class Rhumb; friend class RhumbLine;
65  public:
66  /** \name Constructor
67  **********************************************************************/
68  ///@{
69 
70  /**
71  * Constructor for a ellipsoid with
72  *
73  * @param[in] a equatorial radius (meters).
74  * @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
75  * Negative \e f gives a prolate ellipsoid. If \e f &gt; 1, set
76  * flattening to 1/\e f.
77  * @exception GeographicErr if \e a or (1 &minus; \e f) \e a is not
78  * positive.
79  **********************************************************************/
80  Ellipsoid(real a, real f);
81  ///@}
82 
83  /** \name %Ellipsoid dimensions.
84  **********************************************************************/
85  ///@{
86 
87  /**
88  * @return \e a the equatorial radius of the ellipsoid (meters). This is
89  * the value used in the constructor.
90  **********************************************************************/
91  Math::real MajorRadius() const { return _a; }
92 
93  /**
94  * @return \e b the polar semi-axis (meters).
95  **********************************************************************/
96  Math::real MinorRadius() const { return _b; }
97 
98  /**
99  * @return \e L the distance between the equator and a pole along a
100  * meridian (meters). For a sphere \e L = (&pi;/2) \e a. The radius
101  * of a sphere with the same meridian length is \e L / (&pi;/2).
102  **********************************************************************/
103  Math::real QuarterMeridian() const;
104 
105  /**
106  * @return \e A the total area of the ellipsoid (meters<sup>2</sup>). For
107  * a sphere \e A = 4&pi; <i>a</i><sup>2</sup>. The radius of a sphere
108  * with the same area is sqrt(\e A / (4&pi;)).
109  **********************************************************************/
110  Math::real Area() const;
111 
112  /**
113  * @return \e V the total volume of the ellipsoid (meters<sup>3</sup>).
114  * For a sphere \e V = (4&pi; / 3) <i>a</i><sup>3</sup>. The radius of
115  * a sphere with the same volume is cbrt(\e V / (4&pi;/3)).
116  **********************************************************************/
118  { return (4 * Math::pi()) * Math::sq(_a) * _b / 3; }
119  ///@}
120 
121  /** \name %Ellipsoid shape
122  **********************************************************************/
123  ///@{
124 
125  /**
126  * @return \e f = (\e a &minus; \e b) / \e a, the flattening of the
127  * ellipsoid. This is the value used in the constructor. This is zero,
128  * positive, or negative for a sphere, oblate ellipsoid, or prolate
129  * ellipsoid.
130  **********************************************************************/
131  Math::real Flattening() const { return _f; }
132 
133  /**
134  * @return \e f ' = (\e a &minus; \e b) / \e b, the second flattening of
135  * the ellipsoid. This is zero, positive, or negative for a sphere,
136  * oblate ellipsoid, or prolate ellipsoid.
137  **********************************************************************/
138  Math::real SecondFlattening() const { return _f / (1 - _f); }
139 
140  /**
141  * @return \e n = (\e a &minus; \e b) / (\e a + \e b), the third flattening
142  * of the ellipsoid. This is zero, positive, or negative for a sphere,
143  * oblate ellipsoid, or prolate ellipsoid.
144  **********************************************************************/
145  Math::real ThirdFlattening() const { return _n; }
146 
147  /**
148  * @return <i>e</i><sup>2</sup> = (<i>a</i><sup>2</sup> &minus;
149  * <i>b</i><sup>2</sup>) / <i>a</i><sup>2</sup>, the eccentricity squared
150  * of the ellipsoid. This is zero, positive, or negative for a sphere,
151  * oblate ellipsoid, or prolate ellipsoid.
152  **********************************************************************/
153  Math::real EccentricitySq() const { return _e2; }
154 
155  /**
156  * @return <i>e'</i> <sup>2</sup> = (<i>a</i><sup>2</sup> &minus;
157  * <i>b</i><sup>2</sup>) / <i>b</i><sup>2</sup>, the second eccentricity
158  * squared of the ellipsoid. This is zero, positive, or negative for a
159  * sphere, oblate ellipsoid, or prolate ellipsoid.
160  **********************************************************************/
161  Math::real SecondEccentricitySq() const { return _e12; }
162 
163  /**
164  * @return <i>e''</i> <sup>2</sup> = (<i>a</i><sup>2</sup> &minus;
165  * <i>b</i><sup>2</sup>) / (<i>a</i><sup>2</sup> + <i>b</i><sup>2</sup>),
166  * the third eccentricity squared of the ellipsoid. This is zero,
167  * positive, or negative for a sphere, oblate ellipsoid, or prolate
168  * ellipsoid.
169  **********************************************************************/
170  Math::real ThirdEccentricitySq() const { return _e2 / (2 - _e2); }
171  ///@}
172 
173  /** \name Latitude conversion.
174  **********************************************************************/
175  ///@{
176 
177  /**
178  * @param[in] phi the geographic latitude (degrees).
179  * @return &beta; the parametric latitude (degrees).
180  *
181  * The geographic latitude, &phi;, is the angle beween the equatorial
182  * plane and a vector normal to the surface of the ellipsoid.
183  *
184  * The parametric latitude (also called the reduced latitude), &beta;,
185  * allows the cartesian coordinated of a meridian to be expressed
186  * conveniently in parametric form as
187  * - \e R = \e a cos &beta;
188  * - \e Z = \e b sin &beta;
189  * .
190  * where \e a and \e b are the equatorial radius and the polar semi-axis.
191  * For a sphere &beta; = &phi;.
192  *
193  * &phi; must lie in the range [&minus;90&deg;, 90&deg;]; the
194  * result is undefined if this condition does not hold. The returned value
195  * &beta; lies in [&minus;90&deg;, 90&deg;].
196  **********************************************************************/
197  Math::real ParametricLatitude(real phi) const;
198 
199  /**
200  * @param[in] beta the parametric latitude (degrees).
201  * @return &phi; the geographic latitude (degrees).
202  *
203  * &beta; must lie in the range [&minus;90&deg;, 90&deg;]; the
204  * result is undefined if this condition does not hold. The returned value
205  * &phi; lies in [&minus;90&deg;, 90&deg;].
206  **********************************************************************/
207  Math::real InverseParametricLatitude(real beta) const;
208 
209  /**
210  * @param[in] phi the geographic latitude (degrees).
211  * @return &theta; the geocentric latitude (degrees).
212  *
213  * The geocentric latitude, &theta;, is the angle beween the equatorial
214  * plane and a line between the center of the ellipsoid and a point on the
215  * ellipsoid. For a sphere &theta; = &phi;.
216  *
217  * &phi; must lie in the range [&minus;90&deg;, 90&deg;]; the
218  * result is undefined if this condition does not hold. The returned value
219  * &theta; lies in [&minus;90&deg;, 90&deg;].
220  **********************************************************************/
221  Math::real GeocentricLatitude(real phi) const;
222 
223  /**
224  * @param[in] theta the geocentric latitude (degrees).
225  * @return &phi; the geographic latitude (degrees).
226  *
227  * &theta; must lie in the range [&minus;90&deg;, 90&deg;]; the
228  * result is undefined if this condition does not hold. The returned value
229  * &phi; lies in [&minus;90&deg;, 90&deg;].
230  **********************************************************************/
231  Math::real InverseGeocentricLatitude(real theta) const;
232 
233  /**
234  * @param[in] phi the geographic latitude (degrees).
235  * @return &mu; the rectifying latitude (degrees).
236  *
237  * The rectifying latitude, &mu;, has the property that the distance along
238  * a meridian of the ellipsoid between two points with rectifying latitudes
239  * &mu;<sub>1</sub> and &mu;<sub>2</sub> is equal to
240  * (&mu;<sub>2</sub> - &mu;<sub>1</sub>) \e L / 90&deg;,
241  * where \e L = QuarterMeridian(). For a sphere &mu; = &phi;.
242  *
243  * &phi; must lie in the range [&minus;90&deg;, 90&deg;]; the
244  * result is undefined if this condition does not hold. The returned value
245  * &mu; lies in [&minus;90&deg;, 90&deg;].
246  **********************************************************************/
247  Math::real RectifyingLatitude(real phi) const;
248 
249  /**
250  * @param[in] mu the rectifying latitude (degrees).
251  * @return &phi; the geographic latitude (degrees).
252  *
253  * &mu; must lie in the range [&minus;90&deg;, 90&deg;]; the
254  * result is undefined if this condition does not hold. The returned value
255  * &phi; lies in [&minus;90&deg;, 90&deg;].
256  **********************************************************************/
257  Math::real InverseRectifyingLatitude(real mu) const;
258 
259  /**
260  * @param[in] phi the geographic latitude (degrees).
261  * @return &xi; the authalic latitude (degrees).
262  *
263  * The authalic latitude, &xi;, has the property that the area of the
264  * ellipsoid between two circles with authalic latitudes
265  * &xi;<sub>1</sub> and &xi;<sub>2</sub> is equal to (sin
266  * &xi;<sub>2</sub> - sin &xi;<sub>1</sub>) \e A / 2, where \e A
267  * = Area(). For a sphere &xi; = &phi;.
268  *
269  * &phi; must lie in the range [&minus;90&deg;, 90&deg;]; the
270  * result is undefined if this condition does not hold. The returned value
271  * &xi; lies in [&minus;90&deg;, 90&deg;].
272  **********************************************************************/
273  Math::real AuthalicLatitude(real phi) const;
274 
275  /**
276  * @param[in] xi the authalic latitude (degrees).
277  * @return &phi; the geographic latitude (degrees).
278  *
279  * &xi; must lie in the range [&minus;90&deg;, 90&deg;]; the
280  * result is undefined if this condition does not hold. The returned value
281  * &phi; lies in [&minus;90&deg;, 90&deg;].
282  **********************************************************************/
283  Math::real InverseAuthalicLatitude(real xi) const;
284 
285  /**
286  * @param[in] phi the geographic latitude (degrees).
287  * @return &chi; the conformal latitude (degrees).
288  *
289  * The conformal latitude, &chi;, gives the mapping of the ellipsoid to a
290  * sphere which which is conformal (angles are preserved) and in which the
291  * equator of the ellipsoid maps to the equator of the sphere. For a
292  * sphere &chi; = &phi;.
293  *
294  * &phi; must lie in the range [&minus;90&deg;, 90&deg;]; the
295  * result is undefined if this condition does not hold. The returned value
296  * &chi; lies in [&minus;90&deg;, 90&deg;].
297  **********************************************************************/
298  Math::real ConformalLatitude(real phi) const;
299 
300  /**
301  * @param[in] chi the conformal latitude (degrees).
302  * @return &phi; the geographic latitude (degrees).
303  *
304  * &chi; must lie in the range [&minus;90&deg;, 90&deg;]; the
305  * result is undefined if this condition does not hold. The returned value
306  * &phi; lies in [&minus;90&deg;, 90&deg;].
307  **********************************************************************/
308  Math::real InverseConformalLatitude(real chi) const;
309 
310  /**
311  * @param[in] phi the geographic latitude (degrees).
312  * @return &psi; the isometric latitude (degrees).
313  *
314  * The isometric latitude gives the mapping of the ellipsoid to a plane
315  * which which is conformal (angles are preserved) and in which the equator
316  * of the ellipsoid maps to a straight line of constant scale; this mapping
317  * defines the Mercator projection. For a sphere &psi; =
318  * sinh<sup>&minus;1</sup> tan &phi;.
319  *
320  * &phi; must lie in the range [&minus;90&deg;, 90&deg;]; the result is
321  * undefined if this condition does not hold. The value returned for &phi;
322  * = &plusmn;90&deg; is some (positive or negative) large but finite value,
323  * such that InverseIsometricLatitude returns the original value of &phi;.
324  **********************************************************************/
325  Math::real IsometricLatitude(real phi) const;
326 
327  /**
328  * @param[in] psi the isometric latitude (degrees).
329  * @return &phi; the geographic latitude (degrees).
330  *
331  * The returned value &phi; lies in [&minus;90&deg;, 90&deg;]. For a
332  * sphere &phi; = tan<sup>&minus;1</sup> sinh &psi;.
333  **********************************************************************/
334  Math::real InverseIsometricLatitude(real psi) const;
335  ///@}
336 
337  /** \name Other quantities.
338  **********************************************************************/
339  ///@{
340 
341  /**
342  * @param[in] phi the geographic latitude (degrees).
343  * @return \e R = \e a cos &beta; the radius of a circle of latitude
344  * &phi; (meters). \e R (&pi;/180&deg;) gives meters per degree
345  * longitude measured along a circle of latitude.
346  *
347  * &phi; must lie in the range [&minus;90&deg;, 90&deg;]; the
348  * result is undefined if this condition does not hold.
349  **********************************************************************/
350  Math::real CircleRadius(real phi) const;
351 
352  /**
353  * @param[in] phi the geographic latitude (degrees).
354  * @return \e Z = \e b sin &beta; the distance of a circle of latitude
355  * &phi; from the equator measured parallel to the ellipsoid axis
356  * (meters).
357  *
358  * &phi; must lie in the range [&minus;90&deg;, 90&deg;]; the
359  * result is undefined if this condition does not hold.
360  **********************************************************************/
361  Math::real CircleHeight(real phi) const;
362 
363  /**
364  * @param[in] phi the geographic latitude (degrees).
365  * @return \e s the distance along a meridian
366  * between the equator and a point of latitude &phi; (meters). \e s is
367  * given by \e s = &mu; \e L / 90&deg;, where \e L =
368  * QuarterMeridian()).
369  *
370  * &phi; must lie in the range [&minus;90&deg;, 90&deg;]; the
371  * result is undefined if this condition does not hold.
372  **********************************************************************/
373  Math::real MeridianDistance(real phi) const;
374 
375  /**
376  * @param[in] phi the geographic latitude (degrees).
377  * @return &rho; the meridional radius of curvature of the ellipsoid at
378  * latitude &phi; (meters); this is the curvature of the meridian. \e
379  * rho is given by &rho; = (180&deg;/&pi;) d\e s / d&phi;,
380  * where \e s = MeridianDistance(); thus &rho; (&pi;/180&deg;)
381  * gives meters per degree latitude measured along a meridian.
382  *
383  * &phi; must lie in the range [&minus;90&deg;, 90&deg;]; the
384  * result is undefined if this condition does not hold.
385  **********************************************************************/
386  Math::real MeridionalCurvatureRadius(real phi) const;
387 
388  /**
389  * @param[in] phi the geographic latitude (degrees).
390  * @return &nu; the transverse radius of curvature of the ellipsoid at
391  * latitude &phi; (meters); this is the curvature of a curve on the
392  * ellipsoid which also lies in a plane perpendicular to the ellipsoid
393  * and to the meridian. &nu; is related to \e R = CircleRadius() by \e
394  * R = &nu; cos &phi;.
395  *
396  * &phi; must lie in the range [&minus;90&deg;, 90&deg;]; the
397  * result is undefined if this condition does not hold.
398  **********************************************************************/
399  Math::real TransverseCurvatureRadius(real phi) const;
400 
401  /**
402  * @param[in] phi the geographic latitude (degrees).
403  * @param[in] azi the angle between the meridian and the normal section
404  * (degrees).
405  * @return the radius of curvature of the ellipsoid in the normal
406  * section at latitude &phi; inclined at an angle \e azi to the
407  * meridian (meters).
408  *
409  * &phi; must lie in the range [&minus;90&deg;, 90&deg;] and \e
410  * azi must lie in the range [&minus;540&deg;, 540&deg;); the
411  * result is undefined if either of conditions does not hold.
412  **********************************************************************/
413  Math::real NormalCurvatureRadius(real phi, real azi) const;
414  ///@}
415 
416  /** \name Eccentricity conversions.
417  **********************************************************************/
418  ///@{
419 
420  /**
421  * @param[in] fp = \e f ' = (\e a &minus; \e b) / \e b, the second
422  * flattening.
423  * @return \e f = (\e a &minus; \e b) / \e a, the flattening.
424  *
425  * \e f ' should lie in (&minus;1, &infin;).
426  * The returned value \e f lies in (&minus;&infin;, 1).
427  **********************************************************************/
429  { return fp / (1 + fp); }
430 
431  /**
432  * @param[in] f = (\e a &minus; \e b) / \e a, the flattening.
433  * @return \e f ' = (\e a &minus; \e b) / \e b, the second flattening.
434  *
435  * \e f should lie in (&minus;&infin;, 1).
436  * The returned value \e f ' lies in (&minus;1, &infin;).
437  **********************************************************************/
439  { return f / (1 - f); }
440 
441  /**
442  * @param[in] n = (\e a &minus; \e b) / (\e a + \e b), the third
443  * flattening.
444  * @return \e f = (\e a &minus; \e b) / \e a, the flattening.
445  *
446  * \e n should lie in (&minus;1, 1).
447  * The returned value \e f lies in (&minus;&infin;, 1).
448  **********************************************************************/
450  { return 2 * n / (1 + n); }
451 
452  /**
453  * @param[in] f = (\e a &minus; \e b) / \e a, the flattening.
454  * @return \e n = (\e a &minus; \e b) / (\e a + \e b), the third
455  * flattening.
456  *
457  * \e f should lie in (&minus;&infin;, 1).
458  * The returned value \e n lies in (&minus;1, 1).
459  **********************************************************************/
461  { return f / (2 - f); }
462 
463  /**
464  * @param[in] e2 = <i>e</i><sup>2</sup> = (<i>a</i><sup>2</sup> &minus;
465  * <i>b</i><sup>2</sup>) / <i>a</i><sup>2</sup>, the eccentricity
466  * squared.
467  * @return \e f = (\e a &minus; \e b) / \e a, the flattening.
468  *
469  * <i>e</i><sup>2</sup> should lie in (&minus;&infin;, 1).
470  * The returned value \e f lies in (&minus;&infin;, 1).
471  **********************************************************************/
473  { using std::sqrt; return e2 / (sqrt(1 - e2) + 1); }
474 
475  /**
476  * @param[in] f = (\e a &minus; \e b) / \e a, the flattening.
477  * @return <i>e</i><sup>2</sup> = (<i>a</i><sup>2</sup> &minus;
478  * <i>b</i><sup>2</sup>) / <i>a</i><sup>2</sup>, the eccentricity
479  * squared.
480  *
481  * \e f should lie in (&minus;&infin;, 1).
482  * The returned value <i>e</i><sup>2</sup> lies in (&minus;&infin;, 1).
483  **********************************************************************/
485  { return f * (2 - f); }
486 
487  /**
488  * @param[in] ep2 = <i>e'</i> <sup>2</sup> = (<i>a</i><sup>2</sup> &minus;
489  * <i>b</i><sup>2</sup>) / <i>b</i><sup>2</sup>, the second eccentricity
490  * squared.
491  * @return \e f = (\e a &minus; \e b) / \e a, the flattening.
492  *
493  * <i>e'</i> <sup>2</sup> should lie in (&minus;1, &infin;).
494  * The returned value \e f lies in (&minus;&infin;, 1).
495  **********************************************************************/
497  { using std::sqrt; return ep2 / (sqrt(1 + ep2) + 1 + ep2); }
498 
499  /**
500  * @param[in] f = (\e a &minus; \e b) / \e a, the flattening.
501  * @return <i>e'</i> <sup>2</sup> = (<i>a</i><sup>2</sup> &minus;
502  * <i>b</i><sup>2</sup>) / <i>b</i><sup>2</sup>, the second eccentricity
503  * squared.
504  *
505  * \e f should lie in (&minus;&infin;, 1).
506  * The returned value <i>e'</i> <sup>2</sup> lies in (&minus;1, &infin;).
507  **********************************************************************/
509  { return f * (2 - f) / Math::sq(1 - f); }
510 
511  /**
512  * @param[in] epp2 = <i>e''</i> <sup>2</sup> = (<i>a</i><sup>2</sup>
513  * &minus; <i>b</i><sup>2</sup>) / (<i>a</i><sup>2</sup> +
514  * <i>b</i><sup>2</sup>), the third eccentricity squared.
515  * @return \e f = (\e a &minus; \e b) / \e a, the flattening.
516  *
517  * <i>e''</i> <sup>2</sup> should lie in (&minus;1, 1).
518  * The returned value \e f lies in (&minus;&infin;, 1).
519  **********************************************************************/
521  { return 2 * epp2 / (sqrt((1 - epp2) * (1 + epp2)) + 1 + epp2); }
522 
523  /**
524  * @param[in] f = (\e a &minus; \e b) / \e a, the flattening.
525  * @return <i>e''</i> <sup>2</sup> = (<i>a</i><sup>2</sup> &minus;
526  * <i>b</i><sup>2</sup>) / (<i>a</i><sup>2</sup> + <i>b</i><sup>2</sup>),
527  * the third eccentricity squared.
528  *
529  * \e f should lie in (&minus;&infin;, 1).
530  * The returned value <i>e''</i> <sup>2</sup> lies in (&minus;1, 1).
531  **********************************************************************/
533  { return f * (2 - f) / (1 + Math::sq(1 - f)); }
534 
535  ///@}
536 
537  /**
538  * A global instantiation of Ellipsoid with the parameters for the WGS84
539  * ellipsoid.
540  **********************************************************************/
541  static const Ellipsoid& WGS84();
542  };
543 
544 } // namespace GeographicLib
545 
546 #endif // GEOGRAPHICLIB_ELLIPSOID_HPP
Math::real SecondFlattening() const
Definition: Ellipsoid.hpp:138
static T pi()
Definition: Math.hpp:213
#define GEOGRAPHICLIB_EXPORT
Definition: Constants.hpp:70
Math::real SecondEccentricitySq() const
Definition: Ellipsoid.hpp:161
GeographicLib::Math::real real
Definition: GeodSolve.cpp:40
static Math::real SecondFlatteningToFlattening(real fp)
Definition: Ellipsoid.hpp:428
Transverse Mercator projection.
Elliptic integrals and functions.
Header for GeographicLib::TransverseMercator class.
static Math::real FlatteningToEccentricitySq(real f)
Definition: Ellipsoid.hpp:484
static Math::real ThirdEccentricitySqToFlattening(real epp2)
Definition: Ellipsoid.hpp:520
Header for GeographicLib::AlbersEqualArea class.
Albers equal area conic projection.
Math::real EccentricitySq() const
Definition: Ellipsoid.hpp:153
static Math::real ThirdFlatteningToFlattening(real n)
Definition: Ellipsoid.hpp:449
static T sq(T x)
Definition: Math.hpp:243
Math::real MajorRadius() const
Definition: Ellipsoid.hpp:91
Math::real MinorRadius() const
Definition: Ellipsoid.hpp:96
Namespace for GeographicLib.
Definition: Accumulator.cpp:12
static Math::real FlatteningToThirdEccentricitySq(real f)
Definition: Ellipsoid.hpp:532
Header for GeographicLib::EllipticFunction class.
static Math::real SecondEccentricitySqToFlattening(real ep2)
Definition: Ellipsoid.hpp:496
static T degree()
Definition: Math.hpp:227
Properties of an ellipsoid.
Definition: Ellipsoid.hpp:39
static Math::real FlatteningToThirdFlattening(real f)
Definition: Ellipsoid.hpp:460
Math::real Volume() const
Definition: Ellipsoid.hpp:117
Header for GeographicLib::Constants class.
Solve of the direct and inverse rhumb problems.
Definition: Rhumb.hpp:48
static Math::real EccentricitySqToFlattening(real e2)
Definition: Ellipsoid.hpp:472
static Math::real FlatteningToSecondFlattening(real f)
Definition: Ellipsoid.hpp:438
Find a sequence of points on a single rhumb line.
Definition: Rhumb.hpp:275
Math::real ThirdFlattening() const
Definition: Ellipsoid.hpp:145
static Math::real FlatteningToSecondEccentricitySq(real f)
Definition: Ellipsoid.hpp:508
Math::real ThirdEccentricitySq() const
Definition: Ellipsoid.hpp:170
Math::real Flattening() const
Definition: Ellipsoid.hpp:131