pub trait Wind:
Debug
+ Send
+ Sync {
// Required method
fn wind(&self, height_msl_m: f64) -> Result<WindSample, AtmosError>;
// Provided method
fn direction_turns(&self) -> Vec<DirectionTurn> { ... }
}Expand description
A mean wind model: the wind velocity as a function of height.
Required Methods§
Sourcefn wind(&self, height_msl_m: f64) -> Result<WindSample, AtmosError>
fn wind(&self, height_msl_m: f64) -> Result<WindSample, AtmosError>
The wind at geometric height height_msl_m above mean sea level.
§Errors
AtmosError::Domain if the height is not finite.
Provided Methods§
Sourcefn direction_turns(&self) -> Vec<DirectionTurn>
fn direction_turns(&self) -> Vec<DirectionTurn>
The spans over which the model turns the wind’s direction by interpolating between two
tabulated levels’ directions, lowest first, each with its two levels as the model flies
them. A model with no tabulated directions has none, the default; a LayeredWind whose
WindInterpolation::SpeedDirection turns between two levels, neither calm, has one per
such pair. A model that wraps another and changes its wind (scales or turns it) maps its
spans the same way, so that what it reports is what it flies.
A flight reads them to warn of issue #8:
a near-calm level’s reported direction means little, yet it swings the interpolated
direction over the whole span (LayeredWind::wind).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".