pub struct StationOrigin {
pub pressure: StationPressureOrigin,
pub qnh_hpa: Option<f64>,
pub temperature: StationTemperatureOrigin,
}Expand description
Where a station’s pressure and temperature came from, as a surface that resolved the station
itself states them to a refusal of its air
(crate::cli_api::AtmosphericConditions::air_refusal_from): the reading to blame, and the
QNH as it was given when the pressure was one, so the refusal quotes what was sent, never the
station pressure reduced from it as if it had been sent.
Build one with Self::of or Self::resolving (from the pressure as given, a QNH before
its reduction) or Self::density_altitude.
Fields§
§pressure: StationPressureOriginWhere the station pressure came from.
qnh_hpa: Option<f64>The QNH, hPa, the station pressure was reduced from, when the pressure was given as one;
None for a station pressure reading, an omitted pressure and a density altitude’s.
temperature: StationTemperatureOriginWhere the station temperature came from.
Implementations§
Source§impl StationOrigin
impl StationOrigin
Sourcepub fn of(given_hpa: Option<f64>, mode: PressureReferenceMode) -> Self
pub fn of(given_hpa: Option<f64>, mode: PressureReferenceMode) -> Self
StationPressureOrigin::of, keeping given_hpa as the QNH when mode declares it
one. The temperature is a reading.
Sourcepub fn resolving(
pressure_hpa: f64,
altitude_m: f64,
mode: PressureReferenceMode,
presence: StationAtmospherePresence,
) -> Self
pub fn resolving( pressure_hpa: f64, altitude_m: f64, mode: PressureReferenceMode, presence: StationAtmospherePresence, ) -> Self
StationPressureOrigin::resolving, keeping pressure_hpa as the QNH when mode
declares it one (a QNH is always reduced, so always given). The temperature is a reading.
Sourcepub fn density_altitude(temperature_given: bool) -> Self
pub fn density_altitude(temperature_given: bool) -> Self
A density altitude’s station: its pressure (and altitude) are the density altitude’s, and
so is its temperature unless one was given (temperature_given).
Trait Implementations§
Source§impl Clone for StationOrigin
impl Clone for StationOrigin
Source§fn clone(&self) -> StationOrigin
fn clone(&self) -> StationOrigin
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StationOrigin
impl Debug for StationOrigin
Source§impl Default for StationOrigin
impl Default for StationOrigin
Source§fn default() -> StationOrigin
fn default() -> StationOrigin
Source§impl PartialEq for StationOrigin
impl PartialEq for StationOrigin
impl Copy for StationOrigin
impl StructuralPartialEq for StationOrigin
Auto Trait Implementations§
impl Freeze for StationOrigin
impl RefUnwindSafe for StationOrigin
impl Send for StationOrigin
impl Sync for StationOrigin
impl Unpin for StationOrigin
impl UnwindSafe for StationOrigin
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,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.