geopotential
Spherical-harmonic gravity fields in pure Rust, with no dependencies. It is the engine behind geoid, gravity and GRACE water-storage maps, and behind error spectra for simulated satellite missions.
- Legendre functions: fully normalized (4π, no Condon–Shortley phase), with first and second latitude derivatives, stable to degree 2700 at every latitude (Holmes & Featherstone 2002) and exact at the poles.
- Coefficients: with their
GM, radius and tide system, plus degree variances and amplitudes, tide-system conversion (IERS 2010),GM/radius rescaling and truncation. - Time-variable models: ICGEM
gfct/trnd/acos/asinterms evaluated at any epoch. - Synthesis: potential with its gradient and Hessian at a point, and grids of geoid height, gravity disturbance and anomaly, radial gradient or equivalent water height.
use ;
// A J2-only field: the geoid it implies at the equator and the pole.
let mut j2 = zeros;
j2.set;
let n = j2.grid;
assert!;
Read ICGEM .gfc files with gravity-field.
Validation. The tests cover closed forms, the addition theorem to degree 2700 near the pole, finite differences, Laplace's equation, and the IERS C̄20 tide offset. Separately, synthesis of the real degree-300 GOCO06s model agreed with an independent implementation to about 1e-15 in potential and 1e-6 µGal in gravity.
Licensed under either of MIT or Apache-2.0 at your option.