GeographicLib: GeographicLib::GravityCircle Class Reference (original) (raw)

Gravity on a circle of latitude. More...

#include <[GeographicLib/GravityCircle.hpp](GravityCircle%5F8hpp%5Fsource.html)>

Public Member Functions
GravityCircle ()
Compute the gravitational field
Math::real Gravity (real lon, real &gx, real &gy, real &gz) const
Math::real Disturbance (real lon, real &deltax, real &deltay, real &deltaz) const
Math::real GeoidHeight (real lon) const
void SphericalAnomaly (real lon, real &Dg01, real &xi, real &eta) const
Math::real W (real lon, real &gX, real &gY, real &gZ) const
Math::real V (real lon, real &GX, real &GY, real &GZ) const
Math::real T (real lon, real &deltaX, real &deltaY, real &deltaZ) const
Math::real T (real lon) const
Inspector functions
bool Init () const
Math::real EquatorialRadius () const
Math::real Flattening () const
Math::real Latitude () const
Math::real Height () const
unsigned Capabilities () const
bool Capabilities (unsigned testcaps) const
Friends
class GravityModel

Gravity on a circle of latitude.

Evaluate the earth's gravity field on a circle of constant height and latitude. This uses a CircularEngine to pre-evaluate the inner sum of the spherical harmonic sum, allowing the values of the field at several different longitudes to be evaluated rapidly.

Use GravityModel::Circle to create a GravityCircle object. (The constructor for this class is private.)

See Geoid heights on a multi-processor system for an example of using GravityCircle (together with OpenMP) to speed up the computation of geoid heights.

Example of use:

#include

#include

using namespace std;

try {

double lat = 27.99, lon0 = 86.93, h = 8820;

{

for (int i = -5; i <= 5; ++i) {

double lon = lon0 + i * 0.2;

double gx, gy, gz;

grav.Gravity(lat, lon, h, gx, gy, gz);

cout << lon << " " << gx << " " << gy << " " << gz << "\n";

}

}

{

for (int i = -5; i <= 5; ++i) {

double lon = lon0 + i * 0.2;

double gx, gy, gz;

circ.Gravity(lon, gx, gy, gz);

cout << lon << " " << gx << " " << gy << " " << gz << "\n";

}

}

}

catch (const exception& e) {

cerr << "Caught exception: " << e.what() << "\n";

return 1;

}

}

int main(int argc, const char *const argv[])

Header for GeographicLib::GravityCircle class.

Header for GeographicLib::GravityModel class.

Gravity on a circle of latitude.

Math::real Gravity(real lon, real &gx, real &gy, real &gz) const

Model of the earth's gravity field.

Namespace for GeographicLib.

Gravity is a command-line utility providing access to the functionality of GravityModel and GravityCircle.

Definition at line 41 of file GravityCircle.hpp.

GeographicLib::GravityCircle::GravityCircle ( ) inline

Gravity()

Math::real GeographicLib::GravityCircle::Gravity ( real lon,
real & gx,
real & gy,
real & gz ) const

Evaluate the gravity.

Parameters

[in] lon the geographic longitude (degrees).
[out] gx the easterly component of the acceleration (m s−2).
[out] gy the northerly component of the acceleration (m s−2).
[out] gz the upward component of the acceleration (m s−2); this is usually negative.

Returns

W the sum of the gravitational and centrifugal potentials (m2 s−2).

The function includes the effects of the earth's rotation.

Definition at line 51 of file GravityCircle.cpp.

Disturbance()

Math::real GeographicLib::GravityCircle::Disturbance ( real lon,
real & deltax,
real & deltay,
real & deltaz ) const

Evaluate the gravity disturbance vector.

Parameters

[in] lon the geographic longitude (degrees).
[out] deltax the easterly component of the disturbance vector (m s−2).
[out] deltay the northerly component of the disturbance vector (m s−2).
[out] deltaz the upward component of the disturbance vector (m s−2).

Returns

T the corresponding disturbing potential (m2 s−2).

Definition at line 61 of file GravityCircle.cpp.

GeoidHeight()

Math::real GeographicLib::GravityCircle::GeoidHeight ( real lon ) const

Evaluate the geoid height.

Parameters

[in] lon the geographic longitude (degrees).

Returns

N the height of the geoid above the reference ellipsoid (meters).

Some approximations are made in computing the geoid height so that the results of the NGA codes are reproduced accurately. Details are given in Details of the geoid height and anomaly calculations.

Definition at line 71 of file GravityCircle.cpp.

SphericalAnomaly()

void GeographicLib::GravityCircle::SphericalAnomaly ( real lon,
real & Dg01,
real & xi,
real & eta ) const

Evaluate the components of the gravity anomaly vector using the spherical approximation.

Parameters

[in] lon the geographic longitude (degrees).
[out] Dg01 the gravity anomaly (m s−2).
[out] xi the northerly component of the deflection of the vertical (degrees).
[out] eta the easterly component of the deflection of the vertical (degrees).

The spherical approximation (see Heiskanen and Moritz, Sec 2-14) is used so that the results of the NGA codes are reproduced accurately. approximations used here. Details are given in Details of the geoid height and anomaly calculations.

Definition at line 81 of file GravityCircle.cpp.

W()

Math::real GeographicLib::GravityCircle::W ( real lon, real & gX, real & gY, real & gZ ) const inline

Evaluate the components of the acceleration due to gravity and the centrifugal acceleration in geocentric coordinates.

Parameters

[in] lon the geographic longitude (degrees).
[out] gX the X component of the acceleration (m s−2).
[out] gY the Y component of the acceleration (m s−2).
[out] gZ the Z component of the acceleration (m s−2).

Returns

W = V + Φ the sum of the gravitational and centrifugal potentials (m2 s−2).

Definition at line 166 of file GravityCircle.hpp.

V()

Math::real GeographicLib::GravityCircle::V ( real lon, real & GX, real & GY, real & GZ ) const inline

Evaluate the components of the acceleration due to gravity in geocentric coordinates.

Parameters

[in] lon the geographic longitude (degrees).
[out] GX the X component of the acceleration (m s−2).
[out] GY the Y component of the acceleration (m s−2).
[out] GZ the Z component of the acceleration (m s−2).

Returns

V = W - Φ the gravitational potential (m2 s−2).

Definition at line 186 of file GravityCircle.hpp.

T() [1/2]

Math::real GeographicLib::GravityCircle::T ( real lon, real & deltaX, real & deltaY, real & deltaZ ) const inline

Evaluate the components of the gravity disturbance in geocentric coordinates.

Parameters

[in] lon the geographic longitude (degrees).
[out] deltaX the X component of the gravity disturbance (m s−2).
[out] deltaY the Y component of the gravity disturbance (m s−2).
[out] deltaZ the Z component of the gravity disturbance (m s−2).

Returns

T = W - U the disturbing potential (also called the anomalous potential) (m2 s−2).

Definition at line 206 of file GravityCircle.hpp.

T() [2/2]

Math::real GeographicLib::GravityCircle::T ( real lon) const inline

Evaluate disturbing potential in geocentric coordinates.

Parameters

[in] lon the geographic longitude (degrees).

Returns

T = W - U the disturbing potential (also called the anomalous potential) (m2 s−2).

Definition at line 220 of file GravityCircle.hpp.

Init()

bool GeographicLib::GravityCircle::Init ( ) const inline

EquatorialRadius()

Math::real GeographicLib::GravityCircle::EquatorialRadius ( ) const inline

Returns

a the equatorial radius of the ellipsoid (meters). This is the value inherited from the GravityModel object used in the constructor.

Definition at line 241 of file GravityCircle.hpp.

Flattening()

Math::real GeographicLib::GravityCircle::Flattening ( ) const inline

Returns

f the flattening of the ellipsoid. This is the value inherited from the GravityModel object used in the constructor.

Definition at line 248 of file GravityCircle.hpp.

Latitude()

Math::real GeographicLib::GravityCircle::Latitude ( ) const inline

Height()

Math::real GeographicLib::GravityCircle::Height ( ) const inline

Capabilities() [1/2]

unsigned GeographicLib::GravityCircle::Capabilities ( ) const inline

Returns

caps the computational capabilities that this object was constructed with.

Definition at line 267 of file GravityCircle.hpp.

Capabilities() [2/2]

bool GeographicLib::GravityCircle::Capabilities ( unsigned testcaps) const inline

GravityModel


The documentation for this class was generated from the following files: