Gravity and Gravitation Estimators
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Classes: NEDGravityEstimator, ECEFGravityEstimator, ECIGravitationEstimator.
Gravity vs. gravitation
Gravitation is the fundamental mass-attraction force; it does not include any centripetal effect. Gravity is what a body actually experiences at (or near) the Earth’s surface: the gravitational acceleration plus the (outward) centrifugal acceleration caused by the Earth’s rotation. An accelerometer never measures gravity or gravitation directly — it measures specific force, the non-gravitational force per unit mass, which is zero in freefall and equal and opposite to gravity when the body is held stationary:
NEDGravityEstimator
Computes acceleration due to gravity resolved about the north, east, and down axes of the local navigation frame, for a given geodetic latitude and height, using the WGS84 Somigliana model for surface gravity plus first-order height corrections. East gravity is always zero by symmetry.
Surface gravity (Somigliana model):
North component (height correction due to the flattened, non-spherical Earth):
Down component (height and Earth-shape correction):
where is geodetic latitude, is height, is the WGS84 eccentricity, / are the WGS84 equatorial/polar radii, is the flattening, is the Earth rotation rate, and is the Earth gravitational constant. See [book-groves], §2.3.5.
double latitude = Math.toRadians(41.3851); // Barcelona, in radians
double height = 0.0; // meters
// static, stateless call - no need to instantiate the estimator
NEDGravity gravity = NEDGravityEstimator.estimateGravityAndReturnNew(latitude, height);
double gn = gravity.getGn(); // north component (m/s^2), typically near zero
double gd = gravity.getGd(); // down component (m/s^2), approximately 9.8
// an instance can be reused instead, if preferred
NEDGravityEstimator estimator = new NEDGravityEstimator();
NEDGravity result = new NEDGravity();
estimator.estimate(latitude, height, result);
ECEFGravityEstimator
Computes the same gravity vector, but resolved about ECEF-frame axes for a Cartesian position . The gravitational term uses a spherical-harmonic approximation truncated to the zonal term (Earth’s oblateness), and the centrifugal term is added explicitly since ECEF axes rotate with the Earth:
The last step adds the outward centrifugal acceleration to the gravitational acceleration, matching the general relation .
double x = 4_789_000.0; // ECEF position (m)
double y = 177_000.0;
double z = 4_195_000.0;
ECEFGravity gravity = ECEFGravityEstimator.estimateGravityAndReturnNew(x, y, z);
double gx = gravity.getGx();
double gy = gravity.getGy();
double gz = gravity.getGz();
double norm = gravity.getNorm(); // total gravity magnitude (m/s^2)
ECIGravitationEstimator
Computes gravitation only (no centrifugal term) resolved about ECI-frame axes, using the same
spherical-harmonic model as ECEFGravityEstimator. Because the ECI frame is inertial (does
not rotate with the Earth), there is no centrifugal acceleration to add — the ECI navigation equations
add that term separately when needed via the Earth-rotation skew-symmetric matrix
.
double x = 4_789_000.0; // ECI position at a given instant (m)
double y = 177_000.0;
double z = 4_195_000.0;
ECIGravitation gravitation = ECIGravitationEstimator.estimateGravitationAndReturnNew(x, y, z);
double gammaX = gravitation.getGx();
double gammaY = gravitation.getGy();
double gammaZ = gravitation.getGz();
Which one should I use?
| Class | Resolving frame | Returns |
|---|---|---|
|
Local navigation (north, east, down) |
Gravity |
|
ECEF (rotates with the Earth) |
Gravity |
|
ECI (inertial) |
Gravitation |
Where to go next
-
Kinematics Estimators — uses these gravity models to convert integrated velocity changes into specific force.
-
Radii of Curvature, Position and Velocity Estimators — radii of curvature and curvilinear position/velocity.
-
reference.adoc#bibliography — bibliography.