GeographicLib
1.35
|
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, real J2) | |
NormalGravity () | |
Compute the gravity | |
Math::real | SurfaceGravity (real lat) const throw () |
Math::real | Gravity (real lat, real h, real &gammay, real &gammaz) const throw () |
Math::real | U (real X, real Y, real Z, real &gammaX, real &gammaY, real &gammaZ) const throw () |
Math::real | V0 (real X, real Y, real Z, real &GammaX, real &GammaY, real &GammaZ) const throw () |
Math::real | Phi (real X, real Y, real &fX, real &fY) const throw () |
Inspector functions | |
bool | Init () const throw () |
Math::real | MajorRadius () const throw () |
Math::real | MassConstant () const throw () |
Math::real | DynamicalFormFactor (int n=2) const throw () |
Math::real | AngularVelocity () const throw () |
Math::real | Flattening () const throw () |
Math::real | EquatorialGravity () const throw () |
Math::real | PolarGravity () const throw () |
Math::real | GravityFlattening () const throw () |
Math::real | SurfacePotential () const throw () |
const Geocentric & | Earth () const throw () |
Static Public Attributes | |
static const NormalGravity | WGS84 |
static const NormalGravity | GRS80 |
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 surface of the ellipsoid is a surface of constant potential (gravitational plus centrifugal). The acceleration due to gravity is therefore perpendicular to the surface of the ellipsoid.
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 two leading terms. However these series include sufficient terms to give full machine precision.
Definitions:
References:
Example of use:
Definition at line 60 of file NormalGravity.hpp.
GeographicLib::NormalGravity::NormalGravity | ( | real | a, |
real | GM, | ||
real | omega, | ||
real | f, | ||
real | J2 | ||
) |
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 | the flattening of the ellipsoid. |
[in] | J2 | dynamical form factor. |
if | a is not positive or the other constants are inconsistent (see below). |
Exactly one of f and J2 should be positive and this will be used to define the ellipsoid. The shape of the ellipsoid can be given in one of two ways:
Definition at line 16 of file NormalGravity.cpp.
References GeographicLib::Math::isfinite().
|
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 108 of file NormalGravity.hpp.
Math::real GeographicLib::NormalGravity::SurfaceGravity | ( | real | lat | ) | const |
throw | ( | ||||
) |
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 149 of file NormalGravity.cpp.
References GeographicLib::Math::sq().
Referenced by GeographicLib::GravityModel::Circle().
Math::real GeographicLib::NormalGravity::Gravity | ( | real | lat, |
real | h, | ||
real & | gammay, | ||
real & | gammaz | ||
) | const | ||
throw | ( | ||
) |
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 220 of file NormalGravity.cpp.
Math::real GeographicLib::NormalGravity::U | ( | real | X, |
real | Y, | ||
real | Z, | ||
real & | gammaX, | ||
real & | gammaY, | ||
real & | gammaZ | ||
) | const | ||
throw | ( | ||
) |
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 210 of file NormalGravity.cpp.
Referenced by GeographicLib::GravityModel::Circle().
Math::real GeographicLib::NormalGravity::V0 | ( | real | X, |
real | Y, | ||
real | Z, | ||
real & | GammaX, | ||
real & | GammaY, | ||
real & | GammaZ | ||
) | const | ||
throw | ( | ||
) |
Evaluate the components of the acceleration due to gravity alone 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 gravity (m s−2). |
[out] | GammaY | the Y component of the acceleration due to gravity (m s−2). |
[out] | GammaZ | the Z component of the acceleration due to gravity (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 157 of file NormalGravity.cpp.
References GeographicLib::Math::hypot(), and GeographicLib::Math::sq().
Math::real GeographicLib::NormalGravity::Phi | ( | real | X, |
real | Y, | ||
real & | fX, | ||
real & | fY | ||
) | const | ||
throw | ( | ||
) |
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 202 of file NormalGravity.cpp.
References GeographicLib::Math::sq().
Referenced by GeographicLib::GravityModel::Circle().
|
inline |
Definition at line 221 of file NormalGravity.hpp.
|
inline |
Definition at line 227 of file NormalGravity.hpp.
|
inline |
Definition at line 235 of file NormalGravity.hpp.
Referenced by GeographicLib::GravityModel::GravityModel().
|
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 249 of file NormalGravity.hpp.
|
inline |
Definition at line 256 of file NormalGravity.hpp.
|
inline |
Definition at line 263 of file NormalGravity.hpp.
|
inline |
Definition at line 270 of file NormalGravity.hpp.
|
inline |
Definition at line 277 of file NormalGravity.hpp.
|
inline |
Definition at line 284 of file NormalGravity.hpp.
|
inline |
Definition at line 291 of file NormalGravity.hpp.
|
inline |
Definition at line 297 of file NormalGravity.hpp.
Referenced by GeographicLib::GravityModel::Circle().
|
friend |
Definition at line 64 of file NormalGravity.hpp.
|
static |
A global instantiation of NormalGravity for the WGS84 ellipsoid.
Definition at line 303 of file NormalGravity.hpp.
|
static |
A global instantiation of NormalGravity for the GRS80 ellipsoid.
Definition at line 308 of file NormalGravity.hpp.