NormalGravity.hpp
Go to the documentation of this file.
1 
10 #if !defined(GEOGRAPHICLIB_NORMALGRAVITY_HPP)
11 #define GEOGRAPHICLIB_NORMALGRAVITY_HPP 1
12 
15 
16 namespace GeographicLib {
17 
80  private:
81  static const int maxit_ = 20;
82  typedef Math::real real;
83  friend class GravityModel;
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) {
88  // This routine obeys the identity
89  // atanzz(x, alt) = atanzz(-x/(1+x), !alt)
90  //
91  // Require x >= -1. Best to call with alt, s.t. x >= 0; this results in
92  // a call to atan, instead of asin, or to asinh, instead of atanh.
93  using std::sqrt; using std::abs; using std::atan; using std::asin;
94  real z = sqrt(abs(x));
95  return x == 0 ? 1 :
96  (alt ?
97  (!(x < 0) ? Math::asinh(z) : asin(z)) / sqrt(abs(x) / (1 + x)) :
98  (!(x < 0) ? atan(z) : Math::atanh(z)) / z);
99  }
100  static real atan7series(real x);
101  static real atan5series(real x);
102  static real Qf(real x, bool alt);
103  static real Hf(real x, bool alt);
104  static real QH3f(real x, bool alt);
105  real Jn(int n) const;
106  void Initialize(real a, real GM, real omega, real f_J2, bool geometricp);
107  public:
108 
111 
143  bool geometricp = true);
172  GEOGRAPHICLIB_DEPRECATED("Use new NormalGravity constructor")
174 
180  NormalGravity() : _a(-1) {}
182 
185 
198  Math::real SurfaceGravity(real lat) const;
199 
219  Math::real Gravity(real lat, real h, real& gammay, real& gammaz)
220  const;
221 
243  real& gammaX, real& gammaY, real& gammaZ) const;
244 
266  real& GammaX, real& GammaY, real& GammaZ) const;
267 
284  Math::real Phi(real X, real Y, real& fX, real& fY) const;
286 
289 
293  bool Init() const { return _a > 0; }
294 
300  { return Init() ? _a : Math::NaN(); }
301 
308  { return Init() ? _GM : Math::NaN(); }
309 
323  { return Init() ? ( n == 2 ? _J2 : Jn(n)) : Math::NaN(); }
324 
330  { return Init() ? _omega : Math::NaN(); }
331 
337  { return Init() ? _f : Math::NaN(); }
338 
344  { return Init() ? _gammae : Math::NaN(); }
345 
351  { return Init() ? _gammap : Math::NaN(); }
352 
358  { return Init() ? _fstar : Math::NaN(); }
359 
365  { return Init() ? _U0 : Math::NaN(); }
366 
370  const Geocentric& Earth() const { return _earth; }
372 
376  static const NormalGravity& WGS84();
377 
381  static const NormalGravity& GRS80();
382 
401  static Math::real J2ToFlattening(real a, real GM, real omega, real J2);
402 
418  static Math::real FlatteningToJ2(real a, real GM, real omega, real f);
419  };
420 
421 } // namespace GeographicLib
422 
423 #endif // GEOGRAPHICLIB_NORMALGRAVITY_HPP
initial::V0
const Vector3 V0(0, 0, 0)
GeographicLib::NormalGravity::PolarGravity
Math::real PolarGravity() const
Definition: NormalGravity.hpp:350
GeographicLib::Math::atanh
static T atanh(T x)
Definition: Math.hpp:328
GeographicLib::Math::NaN
static T NaN()
Definition: Math.hpp:830
atan
const EIGEN_DEVICE_FUNC AtanReturnType atan() const
Definition: ArrayCwiseUnaryOps.h:283
GeographicLib
Namespace for GeographicLib.
Definition: JacobiConformal.hpp:15
GeographicLib::NormalGravity::GravityFlattening
Math::real GravityFlattening() const
Definition: NormalGravity.hpp:357
gtsam::Y
GaussianFactorGraphValuePair Y
Definition: HybridGaussianProductFactor.cpp:29
GeographicLib::NormalGravity::atanzz
static real atanzz(real x, bool alt)
Definition: NormalGravity.hpp:87
x
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Definition: gnuplot_common_settings.hh:12
GeographicLib::NormalGravity::MassConstant
Math::real MassConstant() const
Definition: NormalGravity.hpp:307
X
#define X
Definition: icosphere.cpp:20
GEOGRAPHICLIB_EXPORT
#define GEOGRAPHICLIB_EXPORT
Definition: Constants.hpp:91
asin
const EIGEN_DEVICE_FUNC AsinReturnType asin() const
Definition: ArrayCwiseUnaryOps.h:311
h
const double h
Definition: testSimpleHelicopter.cpp:19
GeographicLib::NormalGravity::Flattening
Math::real Flattening() const
Definition: NormalGravity.hpp:336
GeographicLib::Geocentric
Geocentric coordinates
Definition: Geocentric.hpp:67
GeographicLib::NormalGravity::AngularVelocity
Math::real AngularVelocity() const
Definition: NormalGravity.hpp:329
biased_x_rotation::omega
const double omega
Definition: testPreintegratedRotation.cpp:32
n
int n
Definition: BiCGSTAB_simple.cpp:1
GeographicLib::Math::real
double real
Definition: Math.hpp:129
GeographicLib::NormalGravity::SurfacePotential
Math::real SurfacePotential() const
Definition: NormalGravity.hpp:364
GeographicLib::NormalGravity::Init
bool Init() const
Definition: NormalGravity.hpp:293
Geocentric.hpp
Header for GeographicLib::Geocentric class.
GeographicLib::NormalGravity
The normal gravity of the earth.
Definition: NormalGravity.hpp:79
GeographicLib::NormalGravity::real
Math::real real
Definition: NormalGravity.hpp:82
GEOGRAPHICLIB_DEPRECATED
#define GEOGRAPHICLIB_DEPRECATED(msg)
Definition: Constants.hpp:106
pybind_wrapper_test_script.z
z
Definition: pybind_wrapper_test_script.py:61
GeographicLib::Math::asinh
static T asinh(T x)
Definition: Math.hpp:311
Constants.hpp
Header for GeographicLib::Constants class.
tree::f
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Definition: testExpression.cpp:218
gtsam::GM
@ GM
Definition: GncParams.h:37
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
GeographicLib::NormalGravity::_omega2
real _omega2
Definition: NormalGravity.hpp:84
GeographicLib::NormalGravity::_U0
real _U0
Definition: NormalGravity.hpp:85
GeographicLib::NormalGravity::_earth
Geocentric _earth
Definition: NormalGravity.hpp:86
GeographicLib::NormalGravity::DynamicalFormFactor
Math::real DynamicalFormFactor(int n=2) const
Definition: NormalGravity.hpp:322
U
@ U
Definition: testDecisionTree.cpp:342
abs
#define abs(x)
Definition: datatypes.h:17
GeographicLib::NormalGravity::Earth
const Geocentric & Earth() const
Definition: NormalGravity.hpp:370
Z
#define Z
Definition: icosphere.cpp:21
GeographicLib::NormalGravity::EquatorialGravity
Math::real EquatorialGravity() const
Definition: NormalGravity.hpp:343
GeographicLib::GravityModel
Model of the earth's gravity field.
Definition: GravityModel.hpp:83
real
Definition: main.h:100
ceres::sqrt
Jet< T, N > sqrt(const Jet< T, N > &f)
Definition: jet.h:418
GeographicLib::NormalGravity::MajorRadius
Math::real MajorRadius() const
Definition: NormalGravity.hpp:299
lat
static const double lat
Definition: testGeographicLib.cpp:34


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:12:24