#[non_exhaustive]pub struct MagneticField {Show 15 fields
pub north_nt: f64,
pub east_nt: f64,
pub down_nt: f64,
pub horizontal_nt: f64,
pub total_nt: f64,
pub inclination_rad: f64,
pub declination_rad: f64,
pub grid_variation_rad: Option<f64>,
pub north_rate_nt_per_year: f64,
pub east_rate_nt_per_year: f64,
pub down_rate_nt_per_year: f64,
pub horizontal_rate_nt_per_year: f64,
pub total_rate_nt_per_year: f64,
pub inclination_rate_rad_per_year: f64,
pub declination_rate_rad_per_year: f64,
}Expand description
The magnetic elements at one place and time, and their rates of change.
Components are in the local geodetic north-east-down frame of the WGS 84 ellipsoid, as the
report gives them (hpr’s launch frame is east-north-up: see MagneticField::enu_nt); angles
are in radians; rates are per year.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.north_nt: f64X, the northward component, nT.
east_nt: f64Y, the eastward component, nT.
down_nt: f64Z, the downward component, nT.
horizontal_nt: f64H = √(X² + Y²), the horizontal intensity, nT.
total_nt: f64F = √(H² + Z²), the total intensity, nT.
inclination_rad: f64I = atan2(Z, H), the inclination or dip, rad, positive down.
declination_rad: f64D = atan2(Y, X), the declination, rad, positive east of true north.
grid_variation_rad: Option<f64>The grid variation poleward of 55° (report, equation 1): D − λ north of 55° N, D + λ
south of 55° S, in (−π, π]; None elsewhere.
north_rate_nt_per_year: f64Ẋ, nT per year.
east_rate_nt_per_year: f64Ẏ, nT per year.
down_rate_nt_per_year: f64Ż, nT per year.
horizontal_rate_nt_per_year: f64Ḣ = (X Ẋ + Y Ẏ) / H, nT per year.
total_rate_nt_per_year: f64Ḟ = (X Ẋ + Y Ẏ + Z Ż) / F, nT per year.
inclination_rate_rad_per_year: f64İ = (H Ż − Z Ḣ) / F², rad per year.
declination_rate_rad_per_year: f64Ḋ = (X Ẏ − Y Ẋ) / H², rad per year. The grid variation changes at the same rate.
Implementations§
Source§impl MagneticField
impl MagneticField
Sourcepub fn enu_nt(&self) -> DVec3
pub fn enu_nt(&self) -> DVec3
The field as east, north and up components, nT: (Y, X, −Z), the axes of hpr’s launch
frame (docs/physics/frames.md).
Sourcepub fn compass_zone(&self) -> CompassZone
pub fn compass_zone(&self) -> CompassZone
The compass zone at this place, from the horizontal intensity (report, section 1.8). A horizontal intensity that is not a number counts as the blackout zone.
Sourcepub fn declination_uncertainty_rad(&self) -> f64
pub fn declination_uncertainty_rad(&self) -> f64
The model’s own estimate of its declination error, one standard deviation, rad (report, section 3.4, equation 43):
δD = √(0.26² + (5417 / H)²) degrees, with H in nTAbout 0.29° where the field is strongest and growing without bound toward a magnetic pole.
It covers the coefficients’ and the forecast’s errors, the crust’s local fields the model
leaves out, and magnetic storms; a steel rail or car beside a compass adds its own. The
report fits it on the ellipsoid’s surface; at height it uses that height’s H, which is
weaker, so the estimate grows a little (negligibly at a rocket’s heights).
Sourcepub fn true_from_magnetic_rad(&self, magnetic_bearing_rad: f64) -> f64
pub fn true_from_magnetic_rad(&self, magnetic_bearing_rad: f64) -> f64
A true bearing from a magnetic one: true = magnetic + D, rad, in [0, 2π).
Trait Implementations§
Source§impl Clone for MagneticField
impl Clone for MagneticField
Source§fn clone(&self) -> MagneticField
fn clone(&self) -> MagneticField
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MagneticField
Source§impl Debug for MagneticField
impl Debug for MagneticField
Source§impl<'de> Deserialize<'de> for MagneticField
impl<'de> Deserialize<'de> for MagneticField
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for MagneticField
impl PartialEq for MagneticField
Source§fn eq(&self, other: &MagneticField) -> bool
fn eq(&self, other: &MagneticField) -> bool
self and other values to be equal, and is used by ==.