pub struct Sounding {
pub station: Option<String>,
pub valid: Option<String>,
pub levels: Vec<SoundingLevel>,
}Expand description
A parsed sounding.
Fields§
§station: Option<String>Station identifier, if the header carried one.
valid: Option<String>Observation time string, if the header carried one (kept opaque: this crate never parses clocks).
levels: Vec<SoundingLevel>Measured levels in file order.
Implementations§
Source§impl Sounding
impl Sounding
Sourcepub fn surface_altitude_m(&self) -> Option<f64>
pub fn surface_altitude_m(&self) -> Option<f64>
The lowest measured altitude, metres above mean sea level. In a standard sounding this
is the station’s surface report, so it is the station’s elevation. None when there
are no levels.
Sourcepub fn to_profile_field(&self) -> Result<ProfileField>
pub fn to_profile_field(&self) -> Result<ProfileField>
The levels as a validated ProfileField (sorted and checked). Heights stay in metres
above mean sea level, as measured, so the field matches a frame whose y is altitude above
sea level (rockets-engine’s) with no conversion, wherever that frame’s ground sits.
Convert datums in one place only, never in these levels as well. This crate’s staged
types have no offset wrapper: ballistics-engine’s HeightOffset (from its next release)
wraps only ballistics-engine’s own WindField, not this crate’s (the two crates’ wind
types differ; see the crate docs). So a caller in a sea-level frame reads a
ground-relative field such as LogProfile or
EkmanProfile at y - ground elevation at its single
call site, or builds ballistics-engine’s ProfileField/LogProfile/EkmanProfile from
the same values and wraps those in HeightOffset. This field, being above sea level,
needs no offset in a sea-level frame.