8 releases
0.2.3 | Nov 14, 2022 |
---|---|
0.2.2 | Nov 14, 2022 |
0.2.1 | Feb 11, 2022 |
0.2.0 | Oct 28, 2021 |
0.1.1-beta.1 | Aug 9, 2020 |
#430 in Science
21 downloads per month
19KB
405 lines
wmm
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
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.
Dependencies
~0.8–1.2MB
~22K SLoC