nitrogen_geodesy 0.2.0

Geodetic (lat/lon) coordinates with excellent usability and strong unit type guarantees.
Documentation

CI License Crates.io Downloads Docs

Geodesy

Geodetic (lat/lon) coordinates with excellent usability and strong unit type guarantees.

Usage

Add geodesy (and absolute_unit) to your Cargo.toml. You'll need absolute_unit to construct unit-typed values to use with geodesy:

nitrogen_geodesy = "0.2" # or latest version
absolute_unit = "0.11"

Examples

use absolute_unit::prelude::*;
use nitrogen_geodesy::Geodetic;
let coord = Geodetic::new(degrees!(20), degrees!(30), meters!(10));
assert!(coord.asl::<Feet>() > feet!(3));
assert!(coord.lat::<ArcSeconds>().f64() > coord.lat::<ArcMinutes>());