24 const CircularEngine& gravitational,
25 const CircularEngine& disturbing,
26 const CircularEngine& correction)
30 , _lat(Math::LatFix(lat))
34 , _invR(1 / hypot(_pPx, _zZ))
46 , _gravitational(gravitational)
47 , _disturbing(disturbing)
48 , _correction(correction)
52 real& gx, real& gy, real& gz)
const {
53 real slam, clam, M[Geocentric::dim2_];
54 Math::sincosd(lon, slam, clam);
55 real Wres = W(slam, clam, gx, gy, gz);
56 Geocentric::Rotation(_sphi, _cphi, slam, clam, M);
57 Geocentric::Unrotate(M, gx, gy, gz, gx, gy, gz);
61 Math::real GravityCircle::Disturbance(real lon, real& deltax, real& deltay,
63 real slam, clam, M[Geocentric::dim2_];
64 Math::sincosd(lon, slam, clam);
65 real Tres = InternalT(slam, clam, deltax, deltay, deltaz,
true,
true);
66 Geocentric::Rotation(_sphi, _cphi, slam, clam, M);
67 Geocentric::Unrotate(M, deltax, deltay, deltaz, deltax, deltay, deltaz);
72 if ((_caps & GEOID_HEIGHT) != GEOID_HEIGHT)
74 real slam, clam, dummy;
75 Math::sincosd(lon, slam, clam);
76 real T = InternalT(slam, clam, dummy, dummy, dummy,
false,
false);
77 real correction = _corrmult * _correction(slam, clam);
78 return T/_gamma0 + correction;
81 void GravityCircle::SphericalAnomaly(real lon,
82 real& Dg01, real& xi, real& eta)
const {
83 if ((_caps & SPHERICAL_ANOMALY) != SPHERICAL_ANOMALY) {
84 Dg01 = xi = eta = Math::NaN();
88 Math::sincosd(lon, slam, clam);
90 deltax, deltay, deltaz,
91 T = InternalT(slam, clam, deltax, deltay, deltaz,
true,
false);
93 real MC[Geocentric::dim2_];
94 Geocentric::Rotation(_spsi, _cpsi, slam, clam, MC);
95 Geocentric::Unrotate(MC, deltax, deltay, deltaz, deltax, deltay, deltaz);
97 Dg01 = - deltaz - 2 * T * _invR;
98 xi = -(deltay/_gamma) / Math::degree();
99 eta = -(deltax/_gamma) / Math::degree();
104 real Wres = V(slam, clam, gX, gY, gZ) + _frot * _pPx / 2;
112 if ((_caps & GRAVITY) != GRAVITY) {
113 GX = GY = GZ = Math::NaN();
117 Vres = _gravitational(slam, clam, GX, GY, GZ),
118 f = _gGMmodel / _amodel;
128 bool gradp,
bool correct)
const {
130 if ((_caps & DISTURBANCE) != DISTURBANCE) {
131 deltaX = deltaY = deltaZ = Math::NaN();
135 if ((_caps & DISTURBING_POTENTIAL) != DISTURBING_POTENTIAL)
141 ? _disturbing(slam, clam, deltaX, deltaY, deltaZ)
142 : _disturbing(slam, clam));
143 T = (T / _amodel - (correct ? _dzonal0 : 0) * _invR) * _gGMmodel;
145 real f = _gGMmodel / _amodel;
150 real r3 = _gGMmodel * _dzonal0 * _invR * _invR * _invR;
151 deltaX += _pPx * clam * r3;
152 deltaY += _pPx * slam * r3;
Header for GeographicLib::Geocentric class.
GeographicLib::Math::real real
Header for GeographicLib::GravityCircle class.
Namespace for GeographicLib.