GravityModel.hpp
Go to the documentation of this file.
1 
10 #if !defined(GEOGRAPHICLIB_GRAVITYMODEL_HPP)
11 #define GEOGRAPHICLIB_GRAVITYMODEL_HPP 1
12 
17 
18 #if defined(_MSC_VER)
19 // Squelch warnings about dll vs vector
20 # pragma warning (push)
21 # pragma warning (disable: 4251)
22 #endif
23 
24 namespace GeographicLib {
25 
26  class GravityCircle;
27 
84  private:
85  typedef Math::real real;
86  friend class GravityCircle;
87  static const int idlength_ = 8;
88  std::string _name, _dir, _description, _date, _filename, _id;
89  real _amodel, _GMmodel, _zeta0, _corrmult;
92  std::vector<real> _Cx, _Sx, _CC, _CS, _zonal;
93  real _dzonal0; // A left over contribution to _zonal.
97  void ReadMetadata(const std::string& name);
98  Math::real InternalT(real X, real Y, real Z,
99  real& deltaX, real& deltaY, real& deltaZ,
100  bool gradp, bool correct) const;
101  GravityModel(const GravityModel&); // copy constructor not allowed
102  GravityModel& operator=(const GravityModel&); // nor copy assignment
103 
104  enum captype {
105  CAP_NONE = 0U,
106  CAP_G = 1U<<0, // implies potentials W and V
107  CAP_T = 1U<<1,
108  CAP_DELTA = 1U<<2 | CAP_T, // delta implies T?
109  CAP_C = 1U<<3,
110  CAP_GAMMA0 = 1U<<4,
111  CAP_GAMMA = 1U<<5,
112  CAP_ALL = 0x3FU,
113  };
114 
115  public:
116 
121  enum mask {
126  NONE = 0U,
132  GRAVITY = CAP_G,
137  DISTURBANCE = CAP_DELTA,
143  DISTURBING_POTENTIAL = CAP_T,
148  SPHERICAL_ANOMALY = CAP_DELTA | CAP_GAMMA,
153  GEOID_HEIGHT = CAP_T | CAP_C | CAP_GAMMA0,
158  ALL = CAP_ALL,
159  };
162 
183  explicit GravityModel(const std::string& name,
184  const std::string& path = "");
186 
189 
208  Math::real Gravity(real lat, real lon, real h,
209  real& gx, real& gy, real& gz) const;
210 
227  Math::real Disturbance(real lat, real lon, real h,
228  real& deltax, real& deltay, real& deltaz)
229  const;
230 
244  Math::real GeoidHeight(real lat, real lon) const;
245 
263  void SphericalAnomaly(real lat, real lon, real h,
264  real& Dg01, real& xi, real& eta) const;
266 
269 
289  real& gX, real& gY, real& gZ) const;
290 
308  real& GX, real& GY, real& GZ) const;
309 
327  real& deltaX, real& deltaY, real& deltaZ) const
328  { return InternalT(X, Y, Z, deltaX, deltaY, deltaZ, true, true); }
329 
339  Math::real T(real X, real Y, real Z) const {
340  real dummy;
341  return InternalT(X, Y, Z, dummy, dummy, dummy, false, true);
342  }
343 
364  real& gammaX, real& gammaY, real& gammaZ) const
365  { return _earth.U(X, Y, Z, gammaX, gammaY, gammaZ); }
366 
381  Math::real Phi(real X, real Y, real& fX, real& fY) const
382  { return _earth.Phi(X, Y, fX, fY); }
384 
387 
420  GravityCircle Circle(real lat, real h, unsigned caps = ALL) const;
422 
425 
430  const NormalGravity& ReferenceEllipsoid() const { return _earth; }
431 
436  const std::string& Description() const { return _description; }
437 
441  const std::string& DateTime() const { return _date; }
442 
446  const std::string& GravityFile() const { return _filename; }
447 
452  const std::string& GravityModelName() const { return _name; }
453 
457  const std::string& GravityModelDirectory() const { return _dir; }
458 
462  Math::real MajorRadius() const { return _earth.MajorRadius(); }
463 
470  Math::real MassConstant() const { return _GMmodel; }
471 
477  { return _earth.MassConstant(); }
478 
484  { return _earth.AngularVelocity(); }
485 
489  Math::real Flattening() const { return _earth.Flattening(); }
491 
502  static std::string DefaultGravityPath();
503 
513  static std::string DefaultGravityName();
514  };
515 
516 } // namespace GeographicLib
517 
518 #if defined(_MSC_VER)
519 # pragma warning (pop)
520 #endif
521 
522 #endif // GEOGRAPHICLIB_GRAVITYMODEL_HPP
GeographicLib::GravityModel::U
Math::real U(real X, real Y, real Z, real &gammaX, real &gammaY, real &gammaZ) const
Definition: GravityModel.hpp:363
GeographicLib::GravityCircle
Gravity on a circle of latitude.
Definition: GravityCircle.hpp:41
name
Annotation for function names.
Definition: attr.h:51
GeographicLib::GravityModel::_norm
SphericalHarmonic::normalization _norm
Definition: GravityModel.hpp:90
GeographicLib::GravityModel::Description
const std::string & Description() const
Definition: GravityModel.hpp:436
GeographicLib::GravityModel::Phi
Math::real Phi(real X, real Y, real &fX, real &fY) const
Definition: GravityModel.hpp:381
GeographicLib::GravityModel::real
Math::real real
Definition: GravityModel.hpp:85
screwPose2::xi
Vector xi
Definition: testPose2.cpp:148
GeographicLib
Namespace for GeographicLib.
Definition: JacobiConformal.hpp:15
gtsam::Y
GaussianFactorGraphValuePair Y
Definition: HybridGaussianProductFactor.cpp:29
GeographicLib::GravityModel::MajorRadius
Math::real MajorRadius() const
Definition: GravityModel.hpp:462
GeographicLib::NormalGravity::MassConstant
Math::real MassConstant() const
Definition: NormalGravity.hpp:307
GeographicLib::GravityModel::_name
std::string _name
Definition: GravityModel.hpp:88
GeographicLib::GravityModel::DateTime
const std::string & DateTime() const
Definition: GravityModel.hpp:441
GeographicLib::GravityModel::MassConstant
Math::real MassConstant() const
Definition: GravityModel.hpp:470
X
#define X
Definition: icosphere.cpp:20
GeographicLib::GravityModel::_dzonal0
real _dzonal0
Definition: GravityModel.hpp:93
GEOGRAPHICLIB_EXPORT
#define GEOGRAPHICLIB_EXPORT
Definition: Constants.hpp:91
h
const double h
Definition: testSimpleHelicopter.cpp:19
GeographicLib::GravityModel::_correction
SphericalHarmonic _correction
Definition: GravityModel.hpp:96
GeographicLib::GravityModel::Flattening
Math::real Flattening() const
Definition: GravityModel.hpp:489
GeographicLib::GravityModel::ReferenceEllipsoid
const NormalGravity & ReferenceEllipsoid() const
Definition: GravityModel.hpp:430
GeographicLib::SphericalHarmonic::normalization
normalization
Definition: SphericalHarmonic.hpp:74
GeographicLib::NormalGravity::Flattening
Math::real Flattening() const
Definition: NormalGravity.hpp:336
pybind_wrapper_test_script.dummy
dummy
Definition: pybind_wrapper_test_script.py:42
GeographicLib::NormalGravity::AngularVelocity
Math::real AngularVelocity() const
Definition: NormalGravity.hpp:329
GeographicLib::Math::real
double real
Definition: Math.hpp:129
GeographicLib::NormalGravity
The normal gravity of the earth.
Definition: NormalGravity.hpp:79
SphericalHarmonic1.hpp
Header for GeographicLib::SphericalHarmonic1 class.
GeographicLib::SphericalHarmonic
Spherical harmonic series.
Definition: SphericalHarmonic.hpp:69
GeographicLib::GravityModel::_zeta0
real _zeta0
Definition: GravityModel.hpp:89
Constants.hpp
Header for GeographicLib::Constants class.
GeographicLib::GravityModel::ReferenceMassConstant
Math::real ReferenceMassConstant() const
Definition: GravityModel.hpp:476
matlab_wrap.path
path
Definition: matlab_wrap.py:66
GeographicLib::GravityModel::T
Math::real T(real X, real Y, real Z) const
Definition: GravityModel.hpp:339
GeographicLib::GravityModel::GravityFile
const std::string & GravityFile() const
Definition: GravityModel.hpp:446
gtsam.examples.CombinedImuFactorExample.GRAVITY
float GRAVITY
Definition: CombinedImuFactorExample.py:29
GeographicLib::NormalGravity::Phi
Math::real Phi(real X, real Y, real &fX, real &fY) const
Definition: src/NormalGravity.cpp:239
gtsam::symbol_shorthand::W
Key W(std::uint64_t j)
Definition: inference/Symbol.h:170
GeographicLib::GravityModel::captype
captype
Definition: GravityModel.hpp:104
GeographicLib::GravityModel::_zonal
std::vector< real > _zonal
Definition: GravityModel.hpp:92
GeographicLib::GravityModel::_disturbing
SphericalHarmonic1 _disturbing
Definition: GravityModel.hpp:95
GeographicLib::GravityModel::_gravitational
SphericalHarmonic _gravitational
Definition: GravityModel.hpp:94
U
@ U
Definition: testDecisionTree.cpp:349
V
MatrixXcd V
Definition: EigenSolver_EigenSolver_MatrixType.cpp:15
GeographicLib::GravityModel::mask
mask
Definition: GravityModel.hpp:121
lon
static const double lon
Definition: testGeographicLib.cpp:34
NormalGravity.hpp
Header for GeographicLib::NormalGravity class.
GeographicLib::GravityModel::GravityModelDirectory
const std::string & GravityModelDirectory() const
Definition: GravityModel.hpp:457
GeographicLib::GravityModel::AngularVelocity
Math::real AngularVelocity() const
Definition: GravityModel.hpp:483
Z
#define Z
Definition: icosphere.cpp:21
GeographicLib::GravityModel
Model of the earth's gravity field.
Definition: GravityModel.hpp:83
GeographicLib::SphericalHarmonic1
Spherical harmonic series with a correction to the coefficients.
Definition: SphericalHarmonic1.hpp:32
GeographicLib::GravityModel::_earth
NormalGravity _earth
Definition: GravityModel.hpp:91
real
Definition: main.h:100
GeographicLib::NormalGravity::MajorRadius
Math::real MajorRadius() const
Definition: NormalGravity.hpp:299
GeographicLib::NormalGravity::U
Math::real U(real X, real Y, real Z, real &gammaX, real &gammaY, real &gammaZ) const
Definition: src/NormalGravity.cpp:246
SphericalHarmonic.hpp
Header for GeographicLib::SphericalHarmonic class.
lat
static const double lat
Definition: testGeographicLib.cpp:34
GeographicLib::GravityModel::T
Math::real T(real X, real Y, real Z, real &deltaX, real &deltaY, real &deltaZ) const
Definition: GravityModel.hpp:326
GeographicLib::GravityModel::GravityModelName
const std::string & GravityModelName() const
Definition: GravityModel.hpp:452


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