Ellipsoid.hpp
Go to the documentation of this file.
1 
10 #if !defined(GEOGRAPHICLIB_ELLIPSOID_HPP)
11 #define GEOGRAPHICLIB_ELLIPSOID_HPP 1
12 
17 
18 namespace GeographicLib {
19 
40  private:
41  typedef Math::real real;
42  static const int numit_ = 10;
43  real stol_;
44  real _a, _f, _f1, _f12, _e2, _es, _e12, _n, _b;
48 
49  // These are the alpha and beta coefficients in the Krueger series from
50  // TransverseMercator. Thy are used by RhumbSolve to compute
51  // (psi2-psi1)/(mu2-mu1).
52  const Math::real* ConformalToRectifyingCoeffs() const { return _tm._alp; }
53  const Math::real* RectifyingToConformalCoeffs() const { return _tm._bet; }
54  friend class Rhumb; friend class RhumbLine;
55  public:
58 
69  Ellipsoid(real a, real f);
71 
74 
80  Math::real MajorRadius() const { return _a; }
81 
85  Math::real MinorRadius() const { return _b; }
86 
92  Math::real QuarterMeridian() const;
93 
99  Math::real Area() const;
100 
107  { return (4 * Math::pi()) * Math::sq(_a) * _b / 3; }
109 
112 
120  Math::real Flattening() const { return _f; }
121 
127  Math::real SecondFlattening() const { return _f / (1 - _f); }
128 
134  Math::real ThirdFlattening() const { return _n; }
135 
142  Math::real EccentricitySq() const { return _e2; }
143 
150  Math::real SecondEccentricitySq() const { return _e12; }
151 
159  Math::real ThirdEccentricitySq() const { return _e2 / (2 - _e2); }
161 
164 
186  Math::real ParametricLatitude(real phi) const;
187 
196  Math::real InverseParametricLatitude(real beta) const;
197 
210  Math::real GeocentricLatitude(real phi) const;
211 
220  Math::real InverseGeocentricLatitude(real theta) const;
221 
236  Math::real RectifyingLatitude(real phi) const;
237 
246  Math::real InverseRectifyingLatitude(real mu) const;
247 
262  Math::real AuthalicLatitude(real phi) const;
263 
272  Math::real InverseAuthalicLatitude(real xi) const;
273 
287  Math::real ConformalLatitude(real phi) const;
288 
297  Math::real InverseConformalLatitude(real chi) const;
298 
314  Math::real IsometricLatitude(real phi) const;
315 
323  Math::real InverseIsometricLatitude(real psi) const;
325 
328 
339  Math::real CircleRadius(real phi) const;
340 
350  Math::real CircleHeight(real phi) const;
351 
362  Math::real MeridianDistance(real phi) const;
363 
375  Math::real MeridionalCurvatureRadius(real phi) const;
376 
388  Math::real TransverseCurvatureRadius(real phi) const;
389 
401  Math::real NormalCurvatureRadius(real phi, real azi) const;
403 
406 
417  { return fp / (1 + fp); }
418 
427  { return f / (1 - f); }
428 
438  { return 2 * n / (1 + n); }
439 
449  { return f / (2 - f); }
450 
461  { using std::sqrt; return e2 / (sqrt(1 - e2) + 1); }
462 
473  { return f * (2 - f); }
474 
485  { using std::sqrt; return ep2 / (sqrt(1 + ep2) + 1 + ep2); }
486 
497  { return f * (2 - f) / Math::sq(1 - f); }
498 
509  using std::sqrt;
510  return 2 * epp2 / (sqrt((1 - epp2) * (1 + epp2)) + 1 + epp2);
511  }
512 
523  { return f * (2 - f) / (1 + Math::sq(1 - f)); }
524 
526 
531  static const Ellipsoid& WGS84();
532  };
533 
534 } // namespace GeographicLib
535 
536 #endif // GEOGRAPHICLIB_ELLIPSOID_HPP
Math::real SecondFlattening() const
Definition: Ellipsoid.hpp:127
static T pi()
Definition: Math.hpp:202
#define GEOGRAPHICLIB_EXPORT
Definition: Constants.hpp:91
Math::real SecondEccentricitySq() const
Definition: Ellipsoid.hpp:150
double mu
static Math::real SecondFlatteningToFlattening(real fp)
Definition: Ellipsoid.hpp:416
int n
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Transverse Mercator projection.
Elliptic integrals and functions.
Rot2 theta
Header for GeographicLib::TransverseMercator class.
static Math::real FlatteningToEccentricitySq(real f)
Definition: Ellipsoid.hpp:472
Array33i a
static Math::real ThirdEccentricitySqToFlattening(real epp2)
Definition: Ellipsoid.hpp:508
Header for GeographicLib::AlbersEqualArea class.
Albers equal area conic projection.
Math::real EccentricitySq() const
Definition: Ellipsoid.hpp:142
static Math::real ThirdFlatteningToFlattening(real n)
Definition: Ellipsoid.hpp:437
EllipticFunction _ell
Definition: Ellipsoid.hpp:46
static T sq(T x)
Definition: Math.hpp:232
Math::real MajorRadius() const
Definition: Ellipsoid.hpp:80
Math::real MinorRadius() const
Definition: Ellipsoid.hpp:85
AlbersEqualArea _au
Definition: Ellipsoid.hpp:47
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Namespace for GeographicLib.
static Math::real FlatteningToThirdEccentricitySq(real f)
Definition: Ellipsoid.hpp:522
Header for GeographicLib::EllipticFunction class.
static Math::real SecondEccentricitySqToFlattening(real ep2)
Definition: Ellipsoid.hpp:484
Vector xi
Definition: testPose2.cpp:150
Properties of an ellipsoid.
Definition: Ellipsoid.hpp:39
static Math::real FlatteningToThirdFlattening(real f)
Definition: Ellipsoid.hpp:448
Math::real Volume() const
Definition: Ellipsoid.hpp:106
Header for GeographicLib::Constants class.
Solve of the direct and inverse rhumb problems.
Definition: Rhumb.hpp:66
TransverseMercator _tm
Definition: Ellipsoid.hpp:45
static Math::real EccentricitySqToFlattening(real e2)
Definition: Ellipsoid.hpp:460
static Math::real FlatteningToSecondFlattening(real f)
Definition: Ellipsoid.hpp:426
Find a sequence of points on a single rhumb line.
Definition: Rhumb.hpp:437
Math::real ThirdFlattening() const
Definition: Ellipsoid.hpp:134
const Math::real * RectifyingToConformalCoeffs() const
Definition: Ellipsoid.hpp:53
static Math::real FlatteningToSecondEccentricitySq(real f)
Definition: Ellipsoid.hpp:496
Math::real ThirdEccentricitySq() const
Definition: Ellipsoid.hpp:159
Math::real Flattening() const
Definition: Ellipsoid.hpp:120
const Math::real * ConformalToRectifyingCoeffs() const
Definition: Ellipsoid.hpp:52


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:42:01