pub struct Wind {
pub x_mps: f64,
pub y_mps: f64,
pub z_mps: f64,
}Expand description
World-frame air velocity, m/s: +X is downrange (tailwind), +Y is up, +Z is the horizontal cross axis to the right of +X (a right-handed frame, ballistics-engine’s McCoy frame). Vertical wind is zero for the horizontal field types in this crate.
Fields§
§x_mps: f64Downrange component, m/s.
y_mps: f64Vertical component, m/s.
z_mps: f64Cross-range component, m/s.
Implementations§
Source§impl Wind
impl Wind
Sourcepub fn from_speed_direction(speed_mps: f64, direction_from_deg: f64) -> Self
pub fn from_speed_direction(speed_mps: f64, direction_from_deg: f64) -> Self
Horizontal wind from a speed and a meteorological direction: the direction the air comes FROM, degrees clockwise, where 0° means from downrange (+X, so the wind blows toward −X, a headwind) and 90° means from +Z. Vertical component is zero.
Sourcepub fn direction_from_deg(&self) -> f64
pub fn direction_from_deg(&self) -> f64
Meteorological direction the air comes FROM, degrees in [0, 360).
Trait Implementations§
impl Copy for Wind
impl StructuralPartialEq for Wind
Auto Trait Implementations§
impl Freeze for Wind
impl RefUnwindSafe for Wind
impl Send for Wind
impl Sync for Wind
impl Unpin for Wind
impl UnsafeUnpin for Wind
impl UnwindSafe for Wind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more