GeographicLib 2.1.2
|
The normal gravity of the earth. More...
#include <GeographicLib/NormalGravity.hpp>
Public Member Functions | |
Setting up the normal gravity | |
NormalGravity (real a, real GM, real omega, real f_J2, bool geometricp=true) | |
NormalGravity () | |
Compute the gravity | |
Math::real | SurfaceGravity (real lat) const |
Math::real | Gravity (real lat, real h, real &gammay, real &gammaz) const |
Math::real | U (real X, real Y, real Z, real &gammaX, real &gammaY, real &gammaZ) const |
Math::real | V0 (real X, real Y, real Z, real &GammaX, real &GammaY, real &GammaZ) const |
Math::real | Phi (real X, real Y, real &fX, real &fY) const |
Inspector functions | |
bool | Init () const |
Math::real | EquatorialRadius () const |
Math::real | MassConstant () const |
Math::real | DynamicalFormFactor (int n=2) const |
Math::real | AngularVelocity () const |
Math::real | Flattening () const |
Math::real | EquatorialGravity () const |
Math::real | PolarGravity () const |
Math::real | GravityFlattening () const |
Math::real | SurfacePotential () const |
const Geocentric & | Earth () const |
Static Public Member Functions | |
static const NormalGravity & | WGS84 () |
static const NormalGravity & | GRS80 () |
static Math::real | J2ToFlattening (real a, real GM, real omega, real J2) |
static Math::real | FlatteningToJ2 (real a, real GM, real omega, real f) |
Friends | |
class | GravityModel |
The normal gravity of the earth.
"Normal" gravity refers to an idealization of the earth which is modeled as an rotating ellipsoid. The eccentricity of the ellipsoid, the rotation speed, and the distribution of mass within the ellipsoid are such that the ellipsoid is a "level ellipoid", a surface of constant potential (gravitational plus centrifugal). The acceleration due to gravity is therefore perpendicular to the surface of the ellipsoid.
Because the distribution of mass within the ellipsoid is unspecified, only the potential exterior to the ellipsoid is well defined. In this class, the mass is assumed to be to concentrated on a "focal disc" of radius, (a2 − b2)1/2, where a is the equatorial radius of the ellipsoid and b is its polar semi-axis. In the case of an oblate ellipsoid, the mass is concentrated on a "focal rod" of length 2(b2 − a2)1/2. As a result the potential is well defined everywhere.
There is a closed solution to this problem which is implemented here. Series "approximations" are only used to evaluate certain combinations of elementary functions where use of the closed expression results in a loss of accuracy for small arguments due to cancellation of the leading terms. However these series include sufficient terms to give full machine precision.
Although the formulation used in this class applies to ellipsoids with arbitrary flattening, in practice, its use should be limited to about b/a ∈ [0.01, 100] or f ∈ [−99, 0.99].
Definitions:
References:
For more information on normal gravity see Normal gravity.
Example of use:
Definition at line 79 of file NormalGravity.hpp.
GeographicLib::NormalGravity::NormalGravity | ( | real | a, |
real | GM, | ||
real | omega, | ||
real | f_J2, | ||
bool | geometricp = true |
||
) |
Constructor for the normal gravity.
[in] | a | equatorial radius (meters). |
[in] | GM | mass constant of the ellipsoid (meters3/seconds2); this is the product of G the gravitational constant and M the mass of the earth (usually including the mass of the earth's atmosphere). |
[in] | omega | the angular velocity (rad s−1). |
[in] | f_J2 | either the flattening of the ellipsoid f or the the dynamical form factor J2. |
[out] | geometricp | if true (the default), then f_J2 denotes the flattening, else it denotes the dynamical form factor J2. |
if | a is not positive or if the other parameters do not obey the restrictions given below. |
The shape of the ellipsoid can be given in one of two ways:
Definition at line 61 of file NormalGravity.cpp.
|
inline |
A default constructor for the normal gravity. This sets up an uninitialized object and is used by GravityModel which constructs this object before it has read in the parameters for the reference ellipsoid.
Definition at line 151 of file NormalGravity.hpp.
Math::real GeographicLib::NormalGravity::SurfaceGravity | ( | real | lat | ) | const |
Evaluate the gravity on the surface of the ellipsoid.
[in] | lat | the geographic latitude (degrees). |
Due to the axial symmetry of the ellipsoid, the result is independent of the value of the longitude. This acceleration is perpendicular to the surface of the ellipsoid. It includes the effects of the earth's rotation.
Definition at line 159 of file NormalGravity.cpp.
References GeographicLib::Math::LatFix(), GeographicLib::Math::sind(), and GeographicLib::Math::sq().
Referenced by GeographicLib::GravityModel::Circle(), and GeographicLib::GravityModel::GeoidHeight().
Math::real GeographicLib::NormalGravity::Gravity | ( | real | lat, |
real | h, | ||
real & | gammay, | ||
real & | gammaz | ||
) | const |
Evaluate the gravity at an arbitrary point above (or below) the ellipsoid.
[in] | lat | the geographic latitude (degrees). |
[in] | h | the height above the ellipsoid (meters). |
[out] | gammay | the northerly component of the acceleration (m s−2). |
[out] | gammaz | the upward component of the acceleration (m s−2); this is usually negative. |
Due to the axial symmetry of the ellipsoid, the result is independent of the value of the longitude and the easterly component of the acceleration vanishes, gammax = 0. The function includes the effects of the earth's rotation. When h = 0, this function gives gammay = 0 and the returned value matches that of NormalGravity::SurfaceGravity.
Definition at line 237 of file NormalGravity.cpp.
References U().
Math::real GeographicLib::NormalGravity::U | ( | real | X, |
real | Y, | ||
real | Z, | ||
real & | gammaX, | ||
real & | gammaY, | ||
real & | gammaZ | ||
) | const |
Evaluate the components of the acceleration due to gravity and the centrifugal acceleration in geocentric coordinates.
[in] | X | geocentric coordinate of point (meters). |
[in] | Y | geocentric coordinate of point (meters). |
[in] | Z | geocentric coordinate of point (meters). |
[out] | gammaX | the X component of the acceleration (m s−2). |
[out] | gammaY | the Y component of the acceleration (m s−2). |
[out] | gammaZ | the Z component of the acceleration (m s−2). |
The acceleration given by γ = ∇U = ∇V0 + ∇Φ = Γ + f.
Definition at line 228 of file NormalGravity.cpp.
Referenced by GeographicLib::GravityModel::Circle(), Gravity(), GeographicLib::GravityModel::SphericalAnomaly(), and GeographicLib::GravityModel::U().
Math::real GeographicLib::NormalGravity::V0 | ( | real | X, |
real | Y, | ||
real | Z, | ||
real & | GammaX, | ||
real & | GammaY, | ||
real & | GammaZ | ||
) | const |
Evaluate the components of the acceleration due to the gravitational force in geocentric coordinates.
[in] | X | geocentric coordinate of point (meters). |
[in] | Y | geocentric coordinate of point (meters). |
[in] | Z | geocentric coordinate of point (meters). |
[out] | GammaX | the X component of the acceleration due to the gravitational force (m s−2). |
[out] | GammaY | the Y component of the acceleration due to the |
[out] | GammaZ | the Z component of the acceleration due to the gravitational force (m s−2). |
This function excludes the centrifugal acceleration and is appropriate to use for space applications. In terrestrial applications, the function NormalGravity::U (which includes this effect) should usually be used.
Definition at line 165 of file NormalGravity.cpp.
References GeographicLib::Math::pi(), GeographicLib::Math::sq(), and std::swap().
Referenced by U().
Math::real GeographicLib::NormalGravity::Phi | ( | real | X, |
real | Y, | ||
real & | fX, | ||
real & | fY | ||
) | const |
Evaluate the centrifugal acceleration in geocentric coordinates.
[in] | X | geocentric coordinate of point (meters). |
[in] | Y | geocentric coordinate of point (meters). |
[out] | fX | the X component of the centrifugal acceleration (m s−2). |
[out] | fY | the Y component of the centrifugal acceleration (m s−2). |
Φ is independent of Z, thus fZ = 0. This function NormalGravity::U sums the results of NormalGravity::V0 and NormalGravity::Phi.
Definition at line 221 of file NormalGravity.cpp.
References GeographicLib::Math::sq().
Referenced by GeographicLib::GravityModel::Circle(), GeographicLib::GravityModel::Phi(), U(), and GeographicLib::GravityModel::W().
|
inline |
Definition at line 264 of file NormalGravity.hpp.
|
inline |
Definition at line 270 of file NormalGravity.hpp.
References GeographicLib::Math::NaN().
Referenced by GeographicLib::GravityModel::EquatorialRadius().
|
inline |
Definition at line 278 of file NormalGravity.hpp.
References GeographicLib::Math::NaN().
Referenced by GeographicLib::GravityModel::GravityModel(), and GeographicLib::GravityModel::ReferenceMassConstant().
|
inline |
If n = 2 (the default), this is the value of J2 used in the constructor. Otherwise it is the zonal coefficient of the Legendre harmonic sum of the normal gravitational potential. Note that Jn = 0 if n is odd. In most gravity applications, fully normalized Legendre functions are used and the corresponding coefficient is Cn0 = −Jn / sqrt(2 n + 1).
Definition at line 293 of file NormalGravity.hpp.
References GeographicLib::Math::NaN().
|
inline |
Definition at line 300 of file NormalGravity.hpp.
References GeographicLib::Math::NaN().
Referenced by GeographicLib::GravityModel::AngularVelocity().
|
inline |
Definition at line 307 of file NormalGravity.hpp.
References GeographicLib::Math::NaN().
Referenced by GeographicLib::GravityModel::Flattening().
|
inline |
Definition at line 314 of file NormalGravity.hpp.
References GeographicLib::Math::NaN().
|
inline |
Definition at line 321 of file NormalGravity.hpp.
References GeographicLib::Math::NaN().
|
inline |
Definition at line 328 of file NormalGravity.hpp.
References GeographicLib::Math::NaN().
|
inline |
Definition at line 335 of file NormalGravity.hpp.
References GeographicLib::Math::NaN().
|
inline |
Definition at line 341 of file NormalGravity.hpp.
Referenced by GeographicLib::GravityModel::Circle(), GeographicLib::GravityModel::Disturbance(), GeographicLib::GravityModel::GeoidHeight(), GeographicLib::GravityModel::Gravity(), and GeographicLib::GravityModel::SphericalAnomaly().
|
static |
A global instantiation of NormalGravity for the WGS84 ellipsoid.
Definition at line 66 of file NormalGravity.cpp.
References GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f(), GeographicLib::Constants::WGS84_GM(), and GeographicLib::Constants::WGS84_omega().
|
static |
A global instantiation of NormalGravity for the GRS80 ellipsoid.
Definition at line 74 of file NormalGravity.cpp.
References GeographicLib::Constants::GRS80_a(), GeographicLib::Constants::GRS80_GM(), GeographicLib::Constants::GRS80_J2(), and GeographicLib::Constants::GRS80_omega().
|
static |
Compute the flattening from the dynamical form factor.
[in] | a | equatorial radius (meters). |
[in] | GM | mass constant of the ellipsoid (meters3/seconds2); this is the product of G the gravitational constant and M the mass of the earth (usually including the mass of the earth's atmosphere). |
[in] | omega | the angular velocity (rad s−1). |
[in] | J2 | the dynamical form factor. |
This routine requires a > 0, GM > 0, J2 < 1/3 − omega2a3/GM 8/(45π). A NaN is returned if these conditions do not hold. The restriction to positive GM is made because for negative GM two solutions are possible.
Definition at line 250 of file NormalGravity.cpp.
References GEOGRAPHICLIB_PANIC, GeographicLib::Math::NaN(), GeographicLib::Math::pi(), and GeographicLib::Math::sq().
|
static |
Compute the dynamical form factor from the flattening.
[in] | a | equatorial radius (meters). |
[in] | GM | mass constant of the ellipsoid (meters3/seconds2); this is the product of G the gravitational constant and M the mass of the earth (usually including the mass of the earth's atmosphere). |
[in] | omega | the angular velocity (rad s−1). |
[in] | f | the flattening of the ellipsoid. |
This routine requires a > 0, GM ≠ 0, f < 1. The values of these parameters are not checked.
Definition at line 289 of file NormalGravity.cpp.
References GeographicLib::Math::sq().
|
friend |
Definition at line 83 of file NormalGravity.hpp.