Go to the documentation of this file.
16 #if !defined(GEOGRAPHICLIB_DATA)
18 # define GEOGRAPHICLIB_DATA "C:/ProgramData/GeographicLib"
20 # define GEOGRAPHICLIB_DATA "/usr/local/share/GeographicLib"
24 #if !defined(GEOGRAPHICLIB_GRAVITY_DEFAULT_NAME)
25 # define GEOGRAPHICLIB_GRAVITY_DEFAULT_NAME "egm96"
30 # pragma warning (disable: 4996)
40 , _description(
"NONE")
42 , _amodel(
Math::NaN())
43 , _GMmodel(
Math::NaN())
53 ifstream coeffstr(coeff.c_str(), ios::binary);
61 if (
_id !=
string(
id))
65 if (!(
N >= 0 &&
M >= 0))
78 int pos =
int(coeffstr.tellg());
80 if (
pos != coeffstr.tellg())
92 for (
int n = 2;
n <= nmx;
n += 2) {
120 const char* spaces =
" \t\n\v\f\r";
126 getline(metastr, line);
127 if (!(line.size() >= 6 && line.substr(0,5) ==
"EGMF-"))
129 string::size_type
n = line.find_first_of(spaces, 5);
130 if (
n != string::npos)
137 while (getline(metastr, line)) {
143 else if (
key ==
"Description")
145 else if (
key ==
"ReleaseDate")
147 else if (
key ==
"ModelRadius")
148 _amodel = Utility::val<real>(val);
149 else if (
key ==
"ModelMass")
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")
165 else if (
key ==
"Normalization") {
166 if (val ==
"FULL" || val ==
"Full" || val ==
"full")
168 else if (val ==
"SCHMIDT" || val ==
"Schmidt" || val ==
"schmidt")
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"))
177 }
else if (
key ==
"ID")
187 throw GeographicErr(
"Correction multiplier must be positive");
200 bool gradp,
bool correct)
const {
210 deltaX = deltaY = deltaZ = 0;
254 deltax, deltay, deltaz,
256 clam =
M[3], slam = -
M[0],
260 cpsi =
R != 0 ?
P /
R :
M[7],
261 spsi =
R != 0 ?
Z /
R :
M[8];
267 Dg01 = - deltaz - 2 *
T /
R;
268 real gammaX, gammaY, gammaZ;
286 return T/gamma0 + correction;
299 real& deltaz)
const {
343 char* gravitypath = getenv(
"GEOGRAPHICLIB_GRAVITY_PATH");
345 path = string(gravitypath);
348 char* datapath = getenv(
"GEOGRAPHICLIB_DATA");
350 path = string(datapath);
356 char* gravityname = getenv(
"GEOGRAPHICLIB_GRAVITY_NAME");
358 name = string(gravityname);
Gravity on a circle of latitude.
Annotation for function names.
SphericalHarmonic::normalization _norm
Header for GeographicLib::SphericalEngine class.
void ReadMetadata(const std::string &name)
void IntForward(real lat, real lon, real h, real &X, real &Y, real &Z, real M[dim2_]) const
Namespace for GeographicLib.
GaussianFactorGraphValuePair Y
static bool isfinite(T x)
CircularEngine Circle(real tau, real p, real z, bool gradp) const
Math::real MassConstant() const
SphericalHarmonic _correction
Header for GeographicLib::GravityModel class.
Math::real InternalT(real X, real Y, real Z, real &deltaX, real &deltaY, real &deltaZ, bool gradp, bool correct) const
Exception handling for GeographicLib.
static void readcoeffs(std::istream &stream, int &N, int &M, std::vector< real > &C, std::vector< real > &S)
Mathematical functions needed by GeographicLib.
Header for GeographicLib::GravityCircle class.
The normal gravity of the earth.
Math::real Gravity(real lat, real lon, real h, real &gx, real &gy, real &gz) const
Spherical harmonic sums for a circle.
Spherical harmonic series.
#define GEOGRAPHICLIB_DATA
Header for GeographicLib::Utility class.
Math::real Disturbance(real lat, real lon, real h, real &deltax, real &deltay, real &deltaz) const
static bool ParseLine(const std::string &line, std::string &key, std::string &val)
friend class GravityCircle
static std::string DefaultGravityName()
const gtsam::Symbol key('X', 0)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
static const size_t dim2_
static void Unrotate(real M[dim2_], real X, real Y, real Z, real &x, real &y, real &z)
Math::real Phi(real X, real Y, real &fX, real &fY) const
const SphericalEngine::coeff & Coefficients() const
static const int idlength_
GravityModel(const GravityModel &)
std::vector< real > _zonal
SphericalHarmonic1 _disturbing
#define GEOGRAPHICLIB_GRAVITY_DEFAULT_NAME
static std::string DefaultGravityPath()
GravityCircle Circle(real lat, real h, unsigned caps=ALL) const
Math::real V(real X, real Y, real Z, real &GX, real &GY, real &GZ) const
SphericalHarmonic _gravitational
static void Rotation(real sphi, real cphi, real slam, real clam, real M[dim2_])
static const EIGEN_DEPRECATED end_t end
void SphericalAnomaly(real lat, real lon, real h, real &Dg01, real &xi, real &eta) const
Math::real SurfaceGravity(real lat) const
const Geocentric & Earth() const
Spherical harmonic series with a correction to the coefficients.
Math::real GeoidHeight(real lat, real lon) const
CircularEngine Circle(real p, real z, bool gradp) const
Math::real W(real X, real Y, real Z, real &gX, real &gY, real &gZ) const
Jet< T, N > sqrt(const Jet< T, N > &f)
Rot2 R(Rot2::fromAngle(0.1))
Math::real U(real X, real Y, real Z, real &gammaX, real &gammaY, real &gammaZ) const
Math::real T(real X, real Y, real Z, real &deltaX, real &deltaY, real &deltaZ) const
Matrix< RealScalar, Dynamic, Dynamic > M
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:23