wmm 0.1.1-alpha.1

A no_std WMM library used to calculate the magnetic declination
Documentation

World Magnetic Model

build

Low footprint no_std WMM library used to calculate the magnetic declination at sea level.

It's important to note that the current model is valid from 2020 until 2025.

Example

use time::OffsetDateTime;
use wmm::declination;

fn main() {
    let date = OffsetDateTime::now_utc().date();
    let lat = 29.7363025;
    let lon = -93.8827939;
    let dec = declination(date, lat, lon).unwrap();

    println!(
        "Today's declination for coordinates {},{} is {}°",
        lat, lon, dec
    )
}

Credits

The C code this lirary refences originates from WMM_Tiny.

The WMM is a NOAA effort which is part of the US Government.

License

Licensed under either of

at your option.