pub struct LayeredWind { /* private fields */ }Expand description
A wind tabulated at levels, such as a sounding or a forecast, interpolated between them.
Below the lowest level and above the highest, it holds the end level’s wind and flags the sample. Put the surface observation (for example the 10 m wind) in the table as its lowest level, so the profile blends from the surface up instead of stepping at the first level aloft (Loft lesson L6: Loft’s forecast profiles stepped at the lowest level).
Implementations§
Source§impl LayeredWind
impl LayeredWind
Sourcepub fn new(
levels: Vec<WindLevel>,
interpolation: WindInterpolation,
) -> Result<Self, AtmosError>
pub fn new( levels: Vec<WindLevel>, interpolation: WindInterpolation, ) -> Result<Self, AtmosError>
A tabulated wind from levels, with directions wrapped into [0, 2π).
§Errors
AtmosError::NoLevelswith no levels.AtmosError::HeightsNotIncreasingunless heights strictly increase.AtmosError::Domainfor a negative speed or any value that is not finite.
Sourcepub fn interpolation(&self) -> WindInterpolation
pub fn interpolation(&self) -> WindInterpolation
How the table interpolates.
Trait Implementations§
Source§impl Clone for LayeredWind
impl Clone for LayeredWind
Source§fn clone(&self) -> LayeredWind
fn clone(&self) -> LayeredWind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LayeredWind
impl Debug for LayeredWind
Source§impl<'de> Deserialize<'de> for LayeredWind
impl<'de> Deserialize<'de> for LayeredWind
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 LayeredWind
impl PartialEq for LayeredWind
Source§fn eq(&self, other: &LayeredWind) -> bool
fn eq(&self, other: &LayeredWind) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for LayeredWind
impl Serialize for LayeredWind
impl StructuralPartialEq for LayeredWind
Source§impl Wind for LayeredWind
impl Wind for LayeredWind
Source§fn direction_turns(&self) -> Vec<DirectionTurn>
fn direction_turns(&self) -> Vec<DirectionTurn>
Each pair of adjacent levels that WindInterpolation::SpeedDirection turns between:
neither speed exactly 0 (a calm level takes the other’s direction, so nothing turns) and
their directions differ. WindInterpolation::Components interpolates the velocity, not a
direction, so it has none.
Source§fn wind(&self, height_msl_m: f64) -> Result<WindSample, AtmosError>
fn wind(&self, height_msl_m: f64) -> Result<WindSample, AtmosError>
height_msl_m above mean sea level. Read more