10#if !defined(GEOGRAPHICLIB_NORMALGRAVITY_HPP)
11#define GEOGRAPHICLIB_NORMALGRAVITY_HPP 1
82 static const int maxit_ = 20;
85 real _a, _gGM, _omega, _f, _jJ2, _omega2, _aomega2;
86 real _e2, _ep2, _b, _eE, _uU0, _gammae, _gammap, _qQ0, _k, _fstar;
88 static real atanzz(real x,
bool alt) {
94 using std::sqrt;
using std::fabs;
using std::atan;
using std::asin;
95 using std::asinh;
using std::atanh;
96 real z = sqrt(fabs(x));
99 (!(x < 0) ? asinh(z) : asin(z)) / sqrt(fabs(x) / (1 + x)) :
100 (!(x < 0) ? atan(z) : atanh(z)) / z);
107 real Jn(
int n)
const;
145 bool geometricp =
true);
265 bool Init()
const {
return _a > 0; }
272 {
return Init() ? _a : Math::NaN(); }
280 {
return Init() ? _gGM : Math::NaN(); }
295 {
return Init() ? ( n == 2 ? _jJ2 : Jn(n)) : Math::NaN(); }
302 {
return Init() ? _omega : Math::NaN(); }
309 {
return Init() ? _f : Math::NaN(); }
316 {
return Init() ? _gammae : Math::NaN(); }
323 {
return Init() ? _gammap : Math::NaN(); }
330 {
return Init() ? _fstar : Math::NaN(); }
337 {
return Init() ? _uU0 : Math::NaN(); }
Header for GeographicLib::Constants class.
#define GEOGRAPHICLIB_EXPORT
Header for GeographicLib::Geocentric class.
GeographicLib::Math::real real
Model of the earth's gravity field.
The normal gravity of the earth.
Math::real EquatorialRadius() const
Math::real Flattening() const
const Geocentric & Earth() const
Math::real PolarGravity() const
Math::real DynamicalFormFactor(int n=2) const
Math::real AngularVelocity() const
Math::real MassConstant() const
Math::real GravityFlattening() const
Math::real SurfacePotential() const
Math::real EquatorialGravity() const
Namespace for GeographicLib.