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 
288  Math::real W(real X, real Y, real Z,
289  real& gX, real& gY, real& gZ) const;
290 
307  Math::real V(real X, real Y, real Z,
308  real& GX, real& GY, real& GZ) const;
309 
326  Math::real T(real X, real Y, real Z,
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 
363  Math::real U(real X, real Y, real Z,
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
Math::real Phi(real X, real Y, real &fX, real &fY) const
const std::string & GravityModelName() const
const char Y
Math::real T(real X, real Y, real Z, real &deltaX, real &deltaY, real &deltaZ) const
#define GEOGRAPHICLIB_EXPORT
Definition: Constants.hpp:91
SphericalHarmonic::normalization _norm
Math::real MajorRadius() const
const std::string & Description() const
static const double lat
The normal gravity of the earth.
Math::real Flattening() const
SphericalHarmonic _correction
Key W(std::uint64_t j)
const NormalGravity & ReferenceEllipsoid() const
Math::real MassConstant() const
const std::string & DateTime() const
Math::real Flattening() const
#define Z
Definition: icosphere.cpp:21
Math::real MassConstant() const
Header for GeographicLib::SphericalHarmonic1 class.
Namespace for GeographicLib.
Vector xi
Definition: testPose2.cpp:148
Header for GeographicLib::SphericalHarmonic class.
Model of the earth&#39;s gravity field.
std::vector< real > _zonal
const double h
Math::real ReferenceMassConstant() const
Math::real AngularVelocity() const
Header for GeographicLib::NormalGravity class.
const std::string & GravityFile() const
Math::real T(real X, real Y, real Z) const
Header for GeographicLib::Constants class.
Spherical harmonic series with a correction to the coefficients.
SphericalHarmonic1 _disturbing
static const double lon
SphericalHarmonic _gravitational
Math::real AngularVelocity() const
Annotation for function names.
Definition: attr.h:48
#define X
Definition: icosphere.cpp:20
Spherical harmonic series.
Math::real Phi(real X, real Y, real &fX, real &fY) const
const std::string & GravityModelDirectory() const
Math::real MajorRadius() const
Math::real U(real X, real Y, real Z, real &gammaX, real &gammaY, real &gammaZ) const
Math::real U(real X, real Y, real Z, real &gammaX, real &gammaY, real &gammaZ) const
Gravity on a circle of latitude.


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:19