pub struct AtmoSock { /* private fields */ }Expand description
Downrange-segmented atmosphere handler (MBA-1137), the density analogue of
crate::wind::WindSock.
Holds a set of station-referenced atmosphere zones ordered by their until_distance_m
threshold and answers a stateless downrange lookup (AtmoSock::atmo_for_range).
The zone T/P/H are the base (shooter-altitude) conditions for that stretch of range; the
solver swaps them into the SAME get_local_atmosphere altitude-lapse pipeline that a
single-station solve uses, so the downrange (X) zone and the vertical (Y) altitude lapse
compose orthogonally without double-counting (the zone sets the base tuple, the lapse
multiplies on top of it).
Implementations§
Source§impl AtmoSock
impl AtmoSock
Sourcepub fn new(segments: Vec<AtmoSegment>) -> Self
pub fn new(segments: Vec<AtmoSegment>) -> Self
Create a new AtmoSock from station-referenced atmosphere zones.
Each segment is (temp_c, pressure_hpa, humidity_percent, until_distance_m). Segments are
sorted by until_distance_m (NaN thresholds are ordered last, matching WindSock::new).
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
True when this sock carries no zones (a lookup falls back to sea-level ISA).
Sourcepub fn atmo_for_range(&self, downrange_m: f64) -> (f64, f64, f64)
pub fn atmo_for_range(&self, downrange_m: f64) -> (f64, f64, f64)
Stateless downrange lookup of the active zone’s (temp_c, pressure_hpa, humidity_percent).
Selection matches crate::wind::WindSock::vector_for_range_stateless: the first segment
whose until_distance_m STRICTLY exceeds downrange_m wins (thresholds are upper-exclusive).
Unlike wind — which returns zero past the last threshold — the LAST zone is used for any
distance at or beyond the final threshold (there is no “zero atmosphere”). An empty sock
returns the sea-level ISA reference (15 C, 1013.25 hPa, 0% RH).
This is stateless and safe for numerical integration (the same X may be queried repeatedly or out of order across RK substeps).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AtmoSock
impl RefUnwindSafe for AtmoSock
impl Send for AtmoSock
impl Sync for AtmoSock
impl Unpin for AtmoSock
impl UnsafeUnpin for AtmoSock
impl UnwindSafe for AtmoSock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.