Rust library for calculating geomagnetic field models
libgeomag = { git = "https://github.com/SanmerDev/libgeomag.git", branch = "main" }
use libgeomag::{DateTime, GeodeticLocation, ModelExt, IGRF, WMM};
fn main() {
let l = GeodeticLocation::new(102.0, 24.0, 1.9);
let t = DateTime::new(2023, 11, 1, 0, 0, 0);
let wmm = WMM::new(t.decimal).unwrap();
let igrf = IGRF::new(t.decimal).unwrap();
let m = wmm.single(l);
println!("{:?}", m);
let m = igrf.single(l);
println!("{:?}", m);
}
Name |
Range |
Unit |
Latitude |
-90.00 to +90.00 |
deg (WGS 84) |
Longitude |
-180.00 to +180.00 |
deg (WGS 84) |
Altitude |
-1.00 to 850.00 |
km (WGS 84) |
Date |
2020.00 to 2025.00 |
- |
Name |
Range |
Unit |
Latitude |
-90.00 to +90.00 |
deg (WGS 84) |
Longitude |
-180.00 to +180.00 |
deg (WGS 84) |
Altitude |
-1.00 to 600.00 |
km (WGS 84) |
Date |
1900.00 to 2025.00 |
- |
Field |
Name |
Unit |
x |
North Component |
nT |
x_dot |
North SV |
nT/yr |
y |
East Component |
nT |
y_dot |
East SV |
nT/yr |
z |
Vertical Component |
nT |
z_dot |
Vertical SV |
nT/yr |
h |
Horizontal Intensity |
nT |
h_dot |
Horizontal SV |
nT/yr |
f |
Total Intensity |
nT |
f_dot |
Total SV |
nT/yr |
d |
Declination |
rad |
d_dot |
Declination SV |
rad/yr |
i |
Inclination |
rad |
i_dot |
Inclination SV |
rad/yr |