GravityCircle.hpp
Go to the documentation of this file.
1 
10 #if !defined(GEOGRAPHICLIB_GRAVITYCIRCLE_HPP)
11 #define GEOGRAPHICLIB_GRAVITYCIRCLE_HPP 1
12 
13 #include <vector>
17 
18 namespace GeographicLib {
19 
42  private:
43  typedef Math::real real;
44  enum mask {
48  DISTURBING_POTENTIAL = GravityModel::DISTURBING_POTENTIAL,
50  SPHERICAL_ANOMALY = GravityModel::SPHERICAL_ANOMALY,
52  };
53 
54  unsigned _caps;
55  real _a, _f, _lat, _h, _Z, _Px, _invR, _cpsi, _spsi,
56  _cphi, _sphi, _amodel, _GMmodel, _dzonal0,
57  _corrmult, _gamma0, _gamma, _frot;
58  CircularEngine _gravitational, _disturbing, _correction;
59 
61  real Z, real P, real cphi, real sphi,
62  real amodel, real GMmodel, real dzonal0, real corrmult,
63  real gamma0, real gamma, real frot,
64  const CircularEngine& gravitational,
65  const CircularEngine& disturbing,
66  const CircularEngine& correction)
67  : _caps(caps)
68  , _a(a)
69  , _f(f)
70  , _lat(Math::LatFix(lat))
71  , _h(h)
72  , _Z(Z)
73  , _Px(P)
74  , _invR(1 / Math::hypot(_Px, _Z))
75  , _cpsi(_Px * _invR)
76  , _spsi(_Z * _invR)
77  , _cphi(cphi)
78  , _sphi(sphi)
79  , _amodel(amodel)
80  , _GMmodel(GMmodel)
81  , _dzonal0(dzonal0)
82  , _corrmult(corrmult)
83  , _gamma0(gamma0)
84  , _gamma(gamma)
85  , _frot(frot)
86  , _gravitational(gravitational)
87  , _disturbing(disturbing)
88  , _correction(correction)
89  {}
90 
91  friend class GravityModel; // GravityModel calls the private constructor
92  Math::real W(real slam, real clam,
93  real& gX, real& gY, real& gZ) const;
94  Math::real V(real slam, real clam,
95  real& gX, real& gY, real& gZ) const;
96  Math::real InternalT(real slam, real clam,
97  real& deltaX, real& deltaY, real& deltaZ,
98  bool gradp, bool correct) const;
99  public:
105  GravityCircle() : _a(-1) {}
106 
109 
125  Math::real Gravity(real lon, real& gx, real& gy, real& gz) const;
126 
140  Math::real Disturbance(real lon, real& deltax, real& deltay, real& deltaz)
141  const;
142 
154  Math::real GeoidHeight(real lon) const;
155 
171  void SphericalAnomaly(real lon, real& Dg01, real& xi, real& eta)
172  const;
173 
188  Math::real W(real lon, real& gX, real& gY, real& gZ) const {
189  real slam, clam;
190  Math::sincosd(lon, slam, clam);
191  return W(slam, clam, gX, gY, gZ);
192  }
193 
208  Math::real V(real lon, real& GX, real& GY, real& GZ) const {
209  real slam, clam;
210  Math::sincosd(lon, slam, clam);
211  return V(slam, clam, GX, GY, GZ);
212  }
213 
228  Math::real T(real lon, real& deltaX, real& deltaY, real& deltaZ)
229  const {
230  real slam, clam;
231  Math::sincosd(lon, slam, clam);
232  return InternalT(slam, clam, deltaX, deltaY, deltaZ, true, true);
233  }
234 
242  Math::real T(real lon) const {
243  real slam, clam, dummy;
244  Math::sincosd(lon, slam, clam);
245  return InternalT(slam, clam, dummy, dummy, dummy, false, true);
246  }
247 
249 
252 
256  bool Init() const { return _a > 0; }
257 
264  { return Init() ? _a : Math::NaN(); }
265 
271  { return Init() ? _f : Math::NaN(); }
272 
277  { return Init() ? _lat : Math::NaN(); }
278 
283  { return Init() ? _h : Math::NaN(); }
284 
289  unsigned Capabilities() const { return _caps; }
290 
295  bool Capabilities(unsigned testcaps) const {
296  return (_caps & testcaps) == testcaps;
297  }
299  };
300 
301 } // namespace GeographicLib
302 
303 #endif // GEOGRAPHICLIB_GRAVITYCIRCLE_HPP
GeographicLib::GravityCircle::Capabilities
bool Capabilities(unsigned testcaps) const
Definition: GravityCircle.hpp:295
GeographicLib::GravityModel::DISTURBING_POTENTIAL
@ DISTURBING_POTENTIAL
Definition: GravityModel.hpp:143
GeographicLib::GravityCircle
Gravity on a circle of latitude.
Definition: GravityCircle.hpp:41
GeographicLib::Math::NaN
static T NaN()
Definition: Math.hpp:830
GeographicLib::GravityCircle::Height
Math::real Height() const
Definition: GravityCircle.hpp:282
GeographicLib::GravityCircle::W
Math::real W(real lon, real &gX, real &gY, real &gZ) const
Definition: GravityCircle.hpp:188
screwPose2::xi
Vector xi
Definition: testPose2.cpp:148
GeographicLib
Namespace for GeographicLib.
Definition: JacobiConformal.hpp:15
GeographicLib::GravityModel::ALL
@ ALL
Definition: GravityModel.hpp:158
CircularEngine.hpp
Header for GeographicLib::CircularEngine class.
GeographicLib::Math::sincosd
static void sincosd(T x, T &sinx, T &cosx)
Definition: Math.hpp:558
GEOGRAPHICLIB_EXPORT
#define GEOGRAPHICLIB_EXPORT
Definition: Constants.hpp:91
h
const double h
Definition: testSimpleHelicopter.cpp:19
GravityModel.hpp
Header for GeographicLib::GravityModel class.
GeographicLib::GravityCircle::Latitude
Math::real Latitude() const
Definition: GravityCircle.hpp:276
pybind_wrapper_test_script.dummy
dummy
Definition: pybind_wrapper_test_script.py:42
GeographicLib::GravityCircle::V
Math::real V(real lon, real &GX, real &GY, real &GZ) const
Definition: GravityCircle.hpp:208
GeographicLib::Math::real
double real
Definition: Math.hpp:129
GeographicLib::Math
Mathematical functions needed by GeographicLib.
Definition: Math.hpp:102
GeographicLib::GravityCircle::Flattening
Math::real Flattening() const
Definition: GravityCircle.hpp:270
GeographicLib::GravityCircle::T
Math::real T(real lon) const
Definition: GravityCircle.hpp:242
GeographicLib::CircularEngine
Spherical harmonic sums for a circle.
Definition: CircularEngine.hpp:52
GeographicLib::GravityModel::DISTURBANCE
@ DISTURBANCE
Definition: GravityModel.hpp:137
GeographicLib::GravityCircle::_gravitational
CircularEngine _gravitational
Definition: GravityCircle.hpp:58
GeographicLib::GravityModel::GEOID_HEIGHT
@ GEOID_HEIGHT
Definition: GravityModel.hpp:153
GeographicLib::GravityCircle::_Z
real _Z
Definition: GravityCircle.hpp:55
gamma
#define gamma
Definition: mconf.h:85
Constants.hpp
Header for GeographicLib::Constants class.
GeographicLib::GravityCircle::MajorRadius
Math::real MajorRadius() const
Definition: GravityCircle.hpp:263
tree::f
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Definition: testExpression.cpp:218
GeographicLib::GravityCircle::mask
mask
Definition: GravityCircle.hpp:44
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
gtsam.examples.CombinedImuFactorExample.GRAVITY
float GRAVITY
Definition: CombinedImuFactorExample.py:29
GeographicLib::GravityCircle::GravityCircle
GravityCircle(mask caps, real a, real f, real lat, real h, real Z, real P, real cphi, real sphi, real amodel, real GMmodel, real dzonal0, real corrmult, real gamma0, real gamma, real frot, const CircularEngine &gravitational, const CircularEngine &disturbing, const CircularEngine &correction)
Definition: GravityCircle.hpp:60
GeographicLib::GravityCircle::T
Math::real T(real lon, real &deltaX, real &deltaY, real &deltaZ) const
Definition: GravityCircle.hpp:228
gtsam::symbol_shorthand::W
Key W(std::uint64_t j)
Definition: inference/Symbol.h:170
GeographicLib::GravityCircle::real
Math::real real
Definition: GravityCircle.hpp:43
GeographicLib::GravityCircle::_sphi
real _sphi
Definition: GravityCircle.hpp:56
GeographicLib::GravityModel::SPHERICAL_ANOMALY
@ SPHERICAL_ANOMALY
Definition: GravityModel.hpp:148
GeographicLib::GravityModel::GRAVITY
@ GRAVITY
Definition: GravityModel.hpp:132
GeographicLib::GravityCircle::_gamma0
real _gamma0
Definition: GravityCircle.hpp:57
P
static double P[]
Definition: ellpe.c:68
GeographicLib::GravityCircle::_caps
unsigned _caps
Definition: GravityCircle.hpp:54
GeographicLib::GravityModel::NONE
@ NONE
Definition: GravityModel.hpp:126
V
MatrixXcd V
Definition: EigenSolver_EigenSolver_MatrixType.cpp:15
GeographicLib::GravityCircle::Capabilities
unsigned Capabilities() const
Definition: GravityCircle.hpp:289
lon
static const double lon
Definition: testGeographicLib.cpp:34
GeographicLib::GravityCircle::Init
bool Init() const
Definition: GravityCircle.hpp:256
Z
#define Z
Definition: icosphere.cpp:21
GeographicLib::GravityModel
Model of the earth's gravity field.
Definition: GravityModel.hpp:83
real
Definition: main.h:100
GeographicLib::GravityCircle::GravityCircle
GravityCircle()
Definition: GravityCircle.hpp:105
lat
static const double lat
Definition: testGeographicLib.cpp:34


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:23