pub fn gravity(latitude: &f64, altitude: &f64) -> f64Expand description
Calculate the WGS84 gravity scalar
The gravity model is based on the Somigliana method, which models the Earth’s gravity as a function of the latitude and altitude. The gravity model is used to calculate the gravitational force scalar in the local-level frame. Free-air correction is applied.
§Arguments
latitude- The WGS84 latitude in degreesaltitude- The WGS84 altitude in meters
§Returns
The gravitational force scalar in m/s^2
§Example
use strapdown::earth;
let latitude: f64 = 45.0;
let altitude: f64 = 1000.0;
let grav = earth::gravity(&latitude, &altitude);