10#if !defined(GEOGRAPHICLIB_NORMALGRAVITY_HPP)
11#define GEOGRAPHICLIB_NORMALGRAVITY_HPP 1
81 static const int maxit_ = 20;
84 real _a, _GM, _omega, _f, _J2, _omega2, _aomega2;
85 real _e2, _ep2, _b, _E, _U0, _gammae, _gammap, _Q0, _k, _fstar;
87 static real atanzz(real x,
bool alt) {
93 using std::sqrt;
using std::abs;
using std::atan;
using std::asin;
94 using std::asinh;
using std::atanh;
95 real z = sqrt(abs(x));
98 (!(x < 0) ? asinh(z) : asin(z)) / sqrt(abs(x) / (1 + x)) :
99 (!(x < 0) ? atan(z) : atanh(z)) / z);
106 real Jn(
int n)
const;
144 bool geometricp =
true);
264 bool Init()
const {
return _a > 0; }
271 {
return Init() ? _a : Math::NaN(); }
279 {
return Init() ? _GM : Math::NaN(); }
294 {
return Init() ? ( n == 2 ? _J2 : Jn(n)) : Math::NaN(); }
301 {
return Init() ? _omega : Math::NaN(); }
308 {
return Init() ? _f : Math::NaN(); }
315 {
return Init() ? _gammae : Math::NaN(); }
322 {
return Init() ? _gammap : Math::NaN(); }
329 {
return Init() ? _fstar : Math::NaN(); }
336 {
return Init() ? _U0 : Math::NaN(); }
347 Math::real MajorRadius()
const {
return EquatorialRadius(); }
Header for GeographicLib::Constants class.
#define GEOGRAPHICLIB_EXPORT
#define GEOGRAPHICLIB_DEPRECATED(msg)
Header for GeographicLib::Geocentric class.
GeographicLib::Math::real real
Model of the earth's gravity field.
Mathematical functions needed by GeographicLib.
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.