wmm

Crates.iowmm
lib.rswmm
version0.2.3
sourcesrc
created_at2020-08-07 21:48:58.759693
updated_at2022-11-14 09:53:16.486843
description WMM no_std library used to calculate the magnetic declination
homepage
repositoryhttps://github.com/sevenseas-io/wmm
max_upload_size
id274134
size36,684
René Herrero (reneherrero)

documentation

https://docs.rs/wmm

README

wmm

ci license version minimum rustc: 1.59 docs

Low footprint no_std World Magnetic Model (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
    )
}

Minimum Supported Rust Version (MSRV)

This crate is guaranteed to compile on stable Rust 1.59 and up.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Credits

The C code this library refences originates from WMM_Tiny.

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

Commit count: 72

cargo fmt