wgs84-gravity

Crates.iowgs84-gravity
lib.rswgs84-gravity
version0.1.2
created_at2025-08-11 19:19:11.59728+00
updated_at2025-09-10 20:14:09.995167+00
descriptionThis crate has been included and moved in `strapdown-ins`. Please use that one instead.
homepagehttps://github.com/andrei-ng/wgs84-gravity
repositoryhttps://github.com/andrei-ng/wgs84-gravity
max_upload_size
id1790708
size23,682
Andrei NG (andrei-ng)

documentation

https://docs.rs/wgs84-gravity

README

This crate has been included and moved in strapdown-ins. Please use that one.

wgs84-gravity

WGS84 gravity model constants and formulas for Earth radii and normal gravity.

All data inputs and outputs are in SI units.

Implementation is based on the following references

Install

[dependencies]
wgs84-gravity = "0.1"

Example

use wgs84_gravity::WGS84;

let lat = 52.0_f64.to_radians();
let alt = 100.0; // meters

// `gravity_normal` is and alias for `gravity_down`
let g = WGS84::gravity_down(lat, alt);
let g = WGS84::gravity_normal(lat, alt);

let g_surface = WGS84::gravity_surface(lat);
let g_ned = WGS84::gravity_ned(lat, alt); // north, east, down [m/s^2]

let r_m = WGS84::radius_meridian(lat);
let r_n = WGS84::radius_normal(lat);

Docs: docs.rs/wgs84-gravity

License: MIT

Commit count: 9

cargo fmt