StationAtmospherePresence

Struct StationAtmospherePresence 

Source
pub struct StationAtmospherePresence {
    pub temperature_supplied: bool,
    pub pressure_supplied: bool,
}
Expand description

Which of a station temperature / pressure pair the caller actually supplied (0.49.0).

A field that is not supplied is resolved by the pre-0.49.0 default-sentinel rule (resolve_station_temperature / resolve_station_pressure_with_mode): the ICAO standard at |altitude| > 1 m when the value is the sea-level default, the value itself otherwise. That makes Self::NEITHER exactly the old behaviour of every presence-blind API, which is why it is the Default, and makes a supplied field authoritative whatever its value: a typed 15 °C, 59 °F, 1013.25 hPa or 29.92 inHg at altitude flies as typed.

Pass it to resolve_station_conditions_with_presence, or to one of the *_with_station_presence twins of the solver, zero, Monte Carlo, lead, hold-curve and truing entry points.

Fields§

§temperature_supplied: bool

The station temperature was a reading the caller supplied.

§pressure_supplied: bool

The station pressure (or the QNH it is reduced from) was a reading the caller supplied.

Implementations§

Source§

impl StationAtmospherePresence

Source

pub const NEITHER: Self

Neither value was supplied: the pre-0.49.0 default-sentinel rule, bit for bit.

Source

pub const BOTH: Self

Both values were supplied: both fly as given (a declared QNH after its reduction).

Source

pub const fn new(temperature_supplied: bool, pressure_supplied: bool) -> Self

Presence from two flags.

Source

pub const fn from_readings( temperature: StationReading, pressure: StationReading, ) -> Self

Presence of a temperature reading and a pressure reading.

Trait Implementations§

Source§

impl Clone for StationAtmospherePresence

Source§

fn clone(&self) -> StationAtmospherePresence

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StationAtmospherePresence

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StationAtmospherePresence

Source§

fn default() -> StationAtmospherePresence

Returns the “default value” for a type. Read more
Source§

impl Hash for StationAtmospherePresence

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for StationAtmospherePresence

Source§

fn eq(&self, other: &StationAtmospherePresence) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for StationAtmospherePresence

Source§

impl Eq for StationAtmospherePresence

Source§

impl StructuralPartialEq for StationAtmospherePresence

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,