src/GravityModel.cpp
Go to the documentation of this file.
1 
11 #include <fstream>
15 
16 #if !defined(GEOGRAPHICLIB_DATA)
17 # if defined(_WIN32)
18 # define GEOGRAPHICLIB_DATA "C:/ProgramData/GeographicLib"
19 # else
20 # define GEOGRAPHICLIB_DATA "/usr/local/share/GeographicLib"
21 # endif
22 #endif
23 
24 #if !defined(GEOGRAPHICLIB_GRAVITY_DEFAULT_NAME)
25 # define GEOGRAPHICLIB_GRAVITY_DEFAULT_NAME "egm96"
26 #endif
27 
28 #if defined(_MSC_VER)
29 // Squelch warnings about unsafe use of getenv
30 # pragma warning (disable: 4996)
31 #endif
32 
33 namespace GeographicLib {
34 
35  using namespace std;
36 
37  GravityModel::GravityModel(const std::string& name,const std::string& path)
38  : _name(name)
39  , _dir(path)
40  , _description("NONE")
41  , _date("UNKNOWN")
42  , _amodel(Math::NaN())
43  , _GMmodel(Math::NaN())
44  , _zeta0(0)
45  , _corrmult(1)
46  , _norm(SphericalHarmonic::FULL)
47  {
48  if (_dir.empty())
51  {
52  string coeff = _filename + ".cof";
53  ifstream coeffstr(coeff.c_str(), ios::binary);
54  if (!coeffstr.good())
55  throw GeographicErr("Error opening " + coeff);
56  char id[idlength_ + 1];
57  coeffstr.read(id, idlength_);
58  if (!coeffstr.good())
59  throw GeographicErr("No header in " + coeff);
60  id[idlength_] = '\0';
61  if (_id != string(id))
62  throw GeographicErr("ID mismatch: " + _id + " vs " + id);
63  int N, M;
65  if (!(N >= 0 && M >= 0))
66  throw GeographicErr("Degree and order must be at least 0");
67  if (_Cx[0] != 0)
68  throw GeographicErr("A degree 0 term should be zero");
69  _Cx[0] = 1; // Include the 1/r term in the sum
72  if (N < 0) {
73  N = M = 0;
74  _CC.resize(1, real(0));
75  }
76  _CC[0] += _zeta0 / _corrmult;
78  int pos = int(coeffstr.tellg());
79  coeffstr.seekg(0, ios::end);
80  if (pos != coeffstr.tellg())
81  throw GeographicErr("Extra data in " + coeff);
82  }
83  int nmx = _gravitational.Coefficients().nmx();
84  // Adjust the normalization of the normal potential to match the model.
85  real mult = _earth._GM / _GMmodel;
86  real amult = Math::sq(_earth._a / _amodel);
87  // The 0th term in _zonal should be is 1 + _dzonal0. Instead set it to 1
88  // to give exact cancellation with the (0,0) term in the model and account
89  // for _dzonal0 separately.
90  _zonal.clear(); _zonal.push_back(1);
92  for (int n = 2; n <= nmx; n += 2) {
93  // Only include as many normal zonal terms as matter. Figuring the limit
94  // in this way works because the coefficients of the normal potential
95  // (which is smooth) decay much more rapidly that the corresponding
96  // coefficient of the model potential (which is bumpy). Typically this
97  // goes out to n = 18.
98  mult *= amult;
99  real
100  r = _Cx[n], // the model term
101  s = - mult * _earth.Jn(n) / sqrt(real(2 * n + 1)), // the normal term
102  t = r - s; // the difference
103  if (t == r) // the normal term is negligible
104  break;
105  _zonal.push_back(0); // index = n - 1; the odd terms are 0
106  _zonal.push_back(s);
107  }
108  int nmx1 = int(_zonal.size()) - 1;
112  _zonal,
113  _zonal, // This is not accessed!
114  nmx1, nmx1, 0,
115  _amodel,
117  }
118 
119  void GravityModel::ReadMetadata(const std::string& name) {
120  const char* spaces = " \t\n\v\f\r";
121  _filename = _dir + "/" + name + ".egm";
122  ifstream metastr(_filename.c_str());
123  if (!metastr.good())
124  throw GeographicErr("Cannot open " + _filename);
125  string line;
126  getline(metastr, line);
127  if (!(line.size() >= 6 && line.substr(0,5) == "EGMF-"))
128  throw GeographicErr(_filename + " does not contain EGMF-n signature");
129  string::size_type n = line.find_first_of(spaces, 5);
130  if (n != string::npos)
131  n -= 5;
132  string version(line, 5, n);
133  if (version != "1")
134  throw GeographicErr("Unknown version in " + _filename + ": " + version);
135  string key, val;
136  real a = Math::NaN(), GM = a, omega = a, f = a, J2 = a;
137  while (getline(metastr, line)) {
138  if (!Utility::ParseLine(line, key, val))
139  continue;
140  // Process key words
141  if (key == "Name")
142  _name = val;
143  else if (key == "Description")
144  _description = val;
145  else if (key == "ReleaseDate")
146  _date = val;
147  else if (key == "ModelRadius")
148  _amodel = Utility::val<real>(val);
149  else if (key == "ModelMass")
150  _GMmodel = Utility::val<real>(val);
151  else if (key == "AngularVelocity")
152  omega = Utility::val<real>(val);
153  else if (key == "ReferenceRadius")
154  a = Utility::val<real>(val);
155  else if (key == "ReferenceMass")
156  GM = Utility::val<real>(val);
157  else if (key == "Flattening")
158  f = Utility::fract<real>(val);
159  else if (key == "DynamicalFormFactor")
160  J2 = Utility::fract<real>(val);
161  else if (key == "HeightOffset")
162  _zeta0 = Utility::fract<real>(val);
163  else if (key == "CorrectionMultiplier")
164  _corrmult = Utility::fract<real>(val);
165  else if (key == "Normalization") {
166  if (val == "FULL" || val == "Full" || val == "full")
168  else if (val == "SCHMIDT" || val == "Schmidt" || val == "schmidt")
170  else
171  throw GeographicErr("Unknown normalization " + val);
172  } else if (key == "ByteOrder") {
173  if (val == "Big" || val == "big")
174  throw GeographicErr("Only little-endian ordering is supported");
175  else if (!(val == "Little" || val == "little"))
176  throw GeographicErr("Unknown byte ordering " + val);
177  } else if (key == "ID")
178  _id = val;
179  // else unrecognized keywords are skipped
180  }
181  // Check values
182  if (!(Math::isfinite(_amodel) && _amodel > 0))
183  throw GeographicErr("Model radius must be positive");
184  if (!(Math::isfinite(_GMmodel) && _GMmodel > 0))
185  throw GeographicErr("Model mass constant must be positive");
186  if (!(Math::isfinite(_corrmult) && _corrmult > 0))
187  throw GeographicErr("Correction multiplier must be positive");
188  if (!(Math::isfinite(_zeta0)))
189  throw GeographicErr("Height offset must be finite");
190  if (int(_id.size()) != idlength_)
191  throw GeographicErr("Invalid ID");
192  if (Math::isfinite(f) && Math::isfinite(J2))
193  throw GeographicErr("Cannot specify both f and J2");
195  Math::isfinite(f) ? f : J2, Math::isfinite(f));
196  }
197 
199  real& deltaX, real& deltaY, real& deltaZ,
200  bool gradp, bool correct) const {
201  // If correct, then produce the correct T = W - U. Otherwise, neglect the
202  // n = 0 term (which is proportial to the difference in the model and
203  // reference values of GM).
204  if (_dzonal0 == 0)
205  // No need to do the correction
206  correct = false;
207  real T, invR = correct ? 1 / Math::hypot(Math::hypot(X, Y), Z) : 1;
208  if (gradp) {
209  // initial values to suppress warnings
210  deltaX = deltaY = deltaZ = 0;
211  T = _disturbing(-1, X, Y, Z, deltaX, deltaY, deltaZ);
212  real f = _GMmodel / _amodel;
213  deltaX *= f;
214  deltaY *= f;
215  deltaZ *= f;
216  if (correct) {
217  invR = _GMmodel * _dzonal0 * invR * invR * invR;
218  deltaX += X * invR;
219  deltaY += Y * invR;
220  deltaZ += Z * invR;
221  }
222  } else
223  T = _disturbing(-1, X, Y, Z);
224  T = (T / _amodel - (correct ? _dzonal0 : 0) * invR) * _GMmodel;
225  return T;
226  }
227 
229  real& GX, real& GY, real& GZ) const {
230  real
231  Vres = _gravitational(X, Y, Z, GX, GY, GZ),
232  f = _GMmodel / _amodel;
233  Vres *= f;
234  GX *= f;
235  GY *= f;
236  GZ *= f;
237  return Vres;
238  }
239 
241  real& gX, real& gY, real& gZ) const {
242  real fX, fY,
243  Wres = V(X, Y, Z, gX, gY, gZ) + _earth.Phi(X, Y, fX, fY);
244  gX += fX;
245  gY += fY;
246  return Wres;
247  }
248 
250  real& Dg01, real& xi, real& eta) const {
251  real X, Y, Z, M[Geocentric::dim2_];
252  _earth.Earth().IntForward(lat, lon, h, X, Y, Z, M);
253  real
254  deltax, deltay, deltaz,
255  T = InternalT(X, Y, Z, deltax, deltay, deltaz, true, false),
256  clam = M[3], slam = -M[0],
257  P = Math::hypot(X, Y),
258  R = Math::hypot(P, Z),
259  // psi is geocentric latitude
260  cpsi = R != 0 ? P / R : M[7],
261  spsi = R != 0 ? Z / R : M[8];
262  // Rotate cartesian into spherical coordinates
264  Geocentric::Rotation(spsi, cpsi, slam, clam, MC);
265  Geocentric::Unrotate(MC, deltax, deltay, deltaz, deltax, deltay, deltaz);
266  // H+M, Eq 2-151c
267  Dg01 = - deltaz - 2 * T / R;
268  real gammaX, gammaY, gammaZ;
269  _earth.U(X, Y, Z, gammaX, gammaY, gammaZ);
270  real gamma = Math::hypot( Math::hypot(gammaX, gammaY), gammaZ);
271  xi = -(deltay/gamma) / Math::degree();
272  eta = -(deltax/gamma) / Math::degree();
273  }
274 
276  {
277  real X, Y, Z;
278  _earth.Earth().IntForward(lat, lon, 0, X, Y, Z, NULL);
279  real
280  gamma0 = _earth.SurfaceGravity(lat),
281  dummy,
282  T = InternalT(X, Y, Z, dummy, dummy, dummy, false, false),
283  invR = 1 / Math::hypot(Math::hypot(X, Y), Z),
284  correction = _corrmult * _correction(invR * X, invR * Y, invR * Z);
285  // _zeta0 has been included in _correction
286  return T/gamma0 + correction;
287  }
288 
290  real& gx, real& gy, real& gz) const {
291  real X, Y, Z, M[Geocentric::dim2_];
292  _earth.Earth().IntForward(lat, lon, h, X, Y, Z, M);
293  real Wres = W(X, Y, Z, gx, gy, gz);
294  Geocentric::Unrotate(M, gx, gy, gz, gx, gy, gz);
295  return Wres;
296  }
298  real& deltax, real& deltay,
299  real& deltaz) const {
300  real X, Y, Z, M[Geocentric::dim2_];
301  _earth.Earth().IntForward(lat, lon, h, X, Y, Z, M);
302  real Tres = InternalT(X, Y, Z, deltax, deltay, deltaz, true, true);
303  Geocentric::Unrotate(M, deltax, deltay, deltaz, deltax, deltay, deltaz);
304  return Tres;
305  }
306 
307  GravityCircle GravityModel::Circle(real lat, real h, unsigned caps) const {
308  if (h != 0)
309  // Disallow invoking GeoidHeight unless h is zero.
310  caps &= ~(CAP_GAMMA0 | CAP_C);
311  real X, Y, Z, M[Geocentric::dim2_];
312  _earth.Earth().IntForward(lat, 0, h, X, Y, Z, M);
313  // Y = 0, cphi = M[7], sphi = M[8];
314  real
315  invR = 1 / Math::hypot(X, Z),
316  gamma0 = (caps & CAP_GAMMA0 ?_earth.SurfaceGravity(lat)
317  : Math::NaN()),
318  fx, fy, fz, gamma;
319  if (caps & CAP_GAMMA) {
320  _earth.U(X, Y, Z, fx, fy, fz); // fy = 0
321  gamma = Math::hypot(fx, fz);
322  } else
323  gamma = Math::NaN();
324  _earth.Phi(X, Y, fx, fy);
325  return GravityCircle(GravityCircle::mask(caps),
326  _earth._a, _earth._f, lat, h, Z, X, M[7], M[8],
328  gamma0, gamma, fx,
329  caps & CAP_G ?
330  _gravitational.Circle(X, Z, true) :
331  CircularEngine(),
332  // N.B. If CAP_DELTA is set then CAP_T should be too.
333  caps & CAP_T ?
334  _disturbing.Circle(-1, X, Z, (caps&CAP_DELTA) != 0) :
335  CircularEngine(),
336  caps & CAP_C ?
337  _correction.Circle(invR * X, invR * Z, false) :
338  CircularEngine());
339  }
340 
342  string path;
343  char* gravitypath = getenv("GEOGRAPHICLIB_GRAVITY_PATH");
344  if (gravitypath)
345  path = string(gravitypath);
346  if (!path.empty())
347  return path;
348  char* datapath = getenv("GEOGRAPHICLIB_DATA");
349  if (datapath)
350  path = string(datapath);
351  return (!path.empty() ? path : string(GEOGRAPHICLIB_DATA)) + "/gravity";
352  }
353 
355  string name;
356  char* gravityname = getenv("GEOGRAPHICLIB_GRAVITY_NAME");
357  if (gravityname)
358  name = string(gravityname);
359  return !name.empty() ? name : string(GEOGRAPHICLIB_GRAVITY_DEFAULT_NAME);
360  }
361 
362 } // namespace GeographicLib
gtsam.examples.DogLegOptimizerExample.int
int
Definition: DogLegOptimizerExample.py:111
GeographicLib::GravityCircle
Gravity on a circle of latitude.
Definition: GravityCircle.hpp:41
GeographicLib::Math::NaN
static T NaN()
Definition: Math.hpp:830
name
Annotation for function names.
Definition: attr.h:51
GeographicLib::GravityModel::_norm
SphericalHarmonic::normalization _norm
Definition: GravityModel.hpp:90
SphericalEngine.hpp
Header for GeographicLib::SphericalEngine class.
GeographicLib::GravityModel::ReadMetadata
void ReadMetadata(const std::string &name)
Definition: src/GravityModel.cpp:119
GeographicLib::Geocentric::IntForward
void IntForward(real lat, real lon, real h, real &X, real &Y, real &Z, real M[dim2_]) const
Definition: src/Geocentric.cpp:36
s
RealScalar s
Definition: level1_cplx_impl.h:126
GeographicLib::SphericalHarmonic::SCHMIDT
@ SCHMIDT
Definition: SphericalHarmonic.hpp:118
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
fx
const double fx
Definition: testSmartStereoFactor_iSAM2.cpp:47
gtsam::Y
GaussianFactorGraphValuePair Y
Definition: HybridGaussianProductFactor.cpp:29
GeographicLib::Math::isfinite
static bool isfinite(T x)
Definition: Math.hpp:806
GeographicLib::GravityModel::CAP_G
@ CAP_G
Definition: GravityModel.hpp:106
GeographicLib::SphericalHarmonic1::Circle
CircularEngine Circle(real tau, real p, real z, bool gradp) const
Definition: SphericalHarmonic1.hpp:246
GeographicLib::NormalGravity::MassConstant
Math::real MassConstant() const
Definition: NormalGravity.hpp:307
GeographicLib::GravityModel::CAP_GAMMA
@ CAP_GAMMA
Definition: GravityModel.hpp:111
GeographicLib::SphericalHarmonic::FULL
@ FULL
Definition: SphericalHarmonic.hpp:96
GeographicLib::GravityModel::_dir
std::string _dir
Definition: GravityModel.hpp:88
GeographicLib::GravityModel::_name
std::string _name
Definition: GravityModel.hpp:88
GeographicLib::GravityModel::_date
std::string _date
Definition: GravityModel.hpp:88
X
#define X
Definition: icosphere.cpp:20
GeographicLib::GravityModel::_dzonal0
real _dzonal0
Definition: GravityModel.hpp:93
h
const double h
Definition: testSimpleHelicopter.cpp:19
GeographicLib::GravityModel::_correction
SphericalHarmonic _correction
Definition: GravityModel.hpp:96
GravityModel.hpp
Header for GeographicLib::GravityModel class.
GeographicLib::GravityModel::InternalT
Math::real InternalT(real X, real Y, real Z, real &deltaX, real &deltaY, real &deltaZ, bool gradp, bool correct) const
Definition: src/GravityModel.cpp:198
GeographicLib::GeographicErr
Exception handling for GeographicLib.
Definition: Constants.hpp:389
pybind_wrapper_test_script.dummy
dummy
Definition: pybind_wrapper_test_script.py:42
GeographicLib::SphericalEngine::coeff::readcoeffs
static void readcoeffs(std::istream &stream, int &N, int &M, std::vector< real > &C, std::vector< real > &S)
Definition: SphericalEngine.cpp:387
name
static char name[]
Definition: rgamma.c:72
GeographicLib::GravityModel::_description
std::string _description
Definition: GravityModel.hpp:88
biased_x_rotation::omega
const double omega
Definition: testPreintegratedRotation.cpp:32
n
int n
Definition: BiCGSTAB_simple.cpp:1
GeographicLib::SphericalEngine::coeff::mmx
int mmx() const
Definition: SphericalEngine.hpp:179
GeographicLib::Math::real
double real
Definition: Math.hpp:129
GeographicLib::Math
Mathematical functions needed by GeographicLib.
Definition: Math.hpp:102
GeographicLib::Math::degree
static T degree()
Definition: Math.hpp:216
GravityCircle.hpp
Header for GeographicLib::GravityCircle class.
GeographicLib::SphericalEngine::coeff::N
int N() const
Definition: SphericalEngine.hpp:171
GeographicLib::NormalGravity
The normal gravity of the earth.
Definition: NormalGravity.hpp:79
GeographicLib::GravityModel::_Cx
std::vector< real > _Cx
Definition: GravityModel.hpp:92
GeographicLib::GravityModel::Gravity
Math::real Gravity(real lat, real lon, real h, real &gx, real &gy, real &gz) const
Definition: src/GravityModel.cpp:289
GeographicLib::CircularEngine
Spherical harmonic sums for a circle.
Definition: CircularEngine.hpp:52
GeographicLib::SphericalHarmonic
Spherical harmonic series.
Definition: SphericalHarmonic.hpp:69
GeographicLib::GravityModel::CAP_GAMMA0
@ CAP_GAMMA0
Definition: GravityModel.hpp:110
GEOGRAPHICLIB_DATA
#define GEOGRAPHICLIB_DATA
Definition: src/GravityModel.cpp:20
GeographicLib::NormalGravity::Jn
real Jn(int n) const
Definition: src/NormalGravity.cpp:165
GeographicLib::GravityModel::_CC
std::vector< real > _CC
Definition: GravityModel.hpp:92
GeographicLib::GravityModel::_zeta0
real _zeta0
Definition: GravityModel.hpp:89
Utility.hpp
Header for GeographicLib::Utility class.
GeographicLib::GravityModel::CAP_DELTA
@ CAP_DELTA
Definition: GravityModel.hpp:108
GeographicLib::GravityModel::Disturbance
Math::real Disturbance(real lat, real lon, real h, real &deltax, real &deltay, real &deltaz) const
Definition: src/GravityModel.cpp:297
GeographicLib::Utility::ParseLine
static bool ParseLine(const std::string &line, std::string &key, std::string &val)
Definition: Utility.cpp:22
conf.version
version
Definition: gtsam/3rdparty/GeographicLib/python/doc/conf.py:67
GeographicLib::GravityModel::GravityCircle
friend class GravityCircle
Definition: GravityModel.hpp:86
Eigen::Triplet< double >
GeographicLib::NormalGravity::_a
real _a
Definition: NormalGravity.hpp:84
GeographicLib::GravityModel::CAP_C
@ CAP_C
Definition: GravityModel.hpp:109
gamma
#define gamma
Definition: mconf.h:85
GeographicLib::GravityModel::_amodel
real _amodel
Definition: GravityModel.hpp:89
GeographicLib::GravityModel::DefaultGravityName
static std::string DefaultGravityName()
Definition: src/GravityModel.cpp:354
matlab_wrap.path
path
Definition: matlab_wrap.py:66
key
const gtsam::Symbol key('X', 0)
tree::f
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Definition: testExpression.cpp:218
GeographicLib::Geocentric::dim2_
static const size_t dim2_
Definition: Geocentric.hpp:77
GeographicLib::GravityCircle::mask
mask
Definition: GravityCircle.hpp:44
gtsam::GM
@ GM
Definition: GncParams.h:37
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
GeographicLib::GravityModel::_corrmult
real _corrmult
Definition: GravityModel.hpp:89
GeographicLib::SphericalEngine::coeff::nmx
int nmx() const
Definition: SphericalEngine.hpp:175
GeographicLib::Geocentric::Unrotate
static void Unrotate(real M[dim2_], real X, real Y, real Z, real &x, real &y, real &z)
Definition: Geocentric.hpp:89
GeographicLib::NormalGravity::Phi
Math::real Phi(real X, real Y, real &fX, real &fY) const
Definition: src/NormalGravity.cpp:239
GeographicLib::GravityModel::_Sx
std::vector< real > _Sx
Definition: GravityModel.hpp:92
GeographicLib::NormalGravity::_f
real _f
Definition: NormalGravity.hpp:84
GeographicLib::SphericalHarmonic::Coefficients
const SphericalEngine::coeff & Coefficients() const
Definition: SphericalHarmonic.hpp:348
GeographicLib::GravityModel::idlength_
static const int idlength_
Definition: GravityModel.hpp:87
GeographicLib::GravityModel::GravityModel
GravityModel(const GravityModel &)
GeographicLib::GravityModel::_CS
std::vector< real > _CS
Definition: GravityModel.hpp:92
GeographicLib::GravityModel::_zonal
std::vector< real > _zonal
Definition: GravityModel.hpp:92
GeographicLib::GravityModel::_disturbing
SphericalHarmonic1 _disturbing
Definition: GravityModel.hpp:95
std
Definition: BFloat16.h:88
GeographicLib::GravityModel::_id
std::string _id
Definition: GravityModel.hpp:88
GEOGRAPHICLIB_GRAVITY_DEFAULT_NAME
#define GEOGRAPHICLIB_GRAVITY_DEFAULT_NAME
Definition: src/GravityModel.cpp:25
GeographicLib::GravityModel::DefaultGravityPath
static std::string DefaultGravityPath()
Definition: src/GravityModel.cpp:341
GeographicLib::SphericalHarmonic1::normalization
normalization
Definition: SphericalHarmonic1.hpp:37
GeographicLib::GravityModel::Circle
GravityCircle Circle(real lat, real h, unsigned caps=ALL) const
Definition: src/GravityModel.cpp:307
GeographicLib::GravityModel::V
Math::real V(real X, real Y, real Z, real &GX, real &GY, real &GZ) const
Definition: src/GravityModel.cpp:228
GeographicLib::GravityModel::_gravitational
SphericalHarmonic _gravitational
Definition: GravityModel.hpp:94
P
static double P[]
Definition: ellpe.c:68
GeographicLib::Geocentric::Rotation
static void Rotation(real sphi, real cphi, real slam, real clam, real M[dim2_])
Definition: src/Geocentric.cpp:155
N
#define N
Definition: igam.h:9
lon
static const double lon
Definition: testGeographicLib.cpp:34
NULL
#define NULL
Definition: ccolamd.c:609
Eigen::placeholders::end
static const EIGEN_DEPRECATED end_t end
Definition: IndexedViewHelper.h:181
GeographicLib::GravityModel::SphericalAnomaly
void SphericalAnomaly(real lat, real lon, real h, real &Dg01, real &xi, real &eta) const
Definition: src/GravityModel.cpp:249
GeographicLib::NormalGravity::SurfaceGravity
Math::real SurfaceGravity(real lat) const
Definition: src/NormalGravity.cpp:177
pos
Definition: example-NearestNeighbor.cpp:32
GeographicLib::Math::sq
static T sq(T x)
Definition: Math.hpp:232
align_3::t
Point2 t(10, 10)
GeographicLib::NormalGravity::Earth
const Geocentric & Earth() const
Definition: NormalGravity.hpp:370
Z
#define Z
Definition: icosphere.cpp:21
GeographicLib::Math::hypot
static T hypot(T x, T y)
Definition: Math.hpp:243
GeographicLib::SphericalHarmonic1
Spherical harmonic series with a correction to the coefficients.
Definition: SphericalHarmonic1.hpp:32
GeographicLib::GravityModel::GeoidHeight
Math::real GeoidHeight(real lat, real lon) const
Definition: src/GravityModel.cpp:275
GeographicLib::GravityModel::_earth
NormalGravity _earth
Definition: GravityModel.hpp:91
GeographicLib::SphericalHarmonic::Circle
CircularEngine Circle(real p, real z, bool gradp) const
Definition: SphericalHarmonic.hpp:324
GeographicLib::GravityModel::W
Math::real W(real X, real Y, real Z, real &gX, real &gY, real &gZ) const
Definition: src/GravityModel.cpp:240
real
Definition: main.h:100
ceres::sqrt
Jet< T, N > sqrt(const Jet< T, N > &f)
Definition: jet.h:418
GeographicLib::GravityModel::CAP_T
@ CAP_T
Definition: GravityModel.hpp:107
GeographicLib::GravityModel::_filename
std::string _filename
Definition: GravityModel.hpp:88
R
Rot2 R(Rot2::fromAngle(0.1))
GeographicLib::NormalGravity::U
Math::real U(real X, real Y, real Z, real &gammaX, real &gammaY, real &gammaZ) const
Definition: src/NormalGravity.cpp:246
GeographicLib::GravityModel::_GMmodel
real _GMmodel
Definition: GravityModel.hpp:89
GeographicLib::NormalGravity::_GM
real _GM
Definition: NormalGravity.hpp:84
fy
const double fy
Definition: testSmartStereoFactor_iSAM2.cpp:48
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
M
Matrix< RealScalar, Dynamic, Dynamic > M
Definition: bench_gemm.cpp:51


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:38