Skip to main content

Barometer

Struct Barometer 

Source
pub struct Barometer<'a> { /* private fields */ }
Expand description

A barometric altimeter on a pad, in the air of a day: it reads the standard atmosphere’s altitude of the day’s pressure where it is, less that at the pad, H(p(z)) − H(p(z₀)) (Ussa76::pressure_altitude_m).

In the standard atmosphere itself it reads the geopotential height climbed. On a warmer day the air is thinner, pressure falls more slowly with height, and it reads less than that: in the troposphere, with the sea-level pressure unchanged, by the ratio of the standard’s sea-level temperature to the day’s.

Implementations§

Source§

impl<'a> Barometer<'a>

Source

pub fn on_pad( day: &'a dyn Atmosphere, site_msl_m: f64, pad_m: f64, ) -> Result<Self, AtmosError>

A barometer on a pad pad_m above a site site_msl_m above sea level, in day’s air.

§Errors

hpr_atmos::AtmosError if the day has no air at the pad.

Source

pub fn reading_m(&self, height_m: f64) -> Result<f64, AtmosError>

What it reads at height_m above the site, m.

§Errors

hpr_atmos::AtmosError if the day has no air there.

Source

pub fn height_m(&self, reading_m: f64) -> Result<f64, AtmosError>

The height above the site at which it reads reading_m, m: the inverse of Self::reading_m, which turns a logged barometric altitude into the height the rocket climbed in the day’s air (the private collection’s logged apogees, ADR-184).

The reading rises with height wherever the day’s pressure falls with height, so the height is bisected between the site and the first doubling of the reading’s size that reads past it, to the resolution of f64.

§Errors

hpr_atmos::AtmosError::Domain for a reading that is not finite, below what the site itself reads, or above what the day reads 100 km up; and what Self::reading_m raises.

Trait Implementations§

Source§

impl<'a> Debug for Barometer<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Barometer<'a>

§

impl<'a> !UnwindSafe for Barometer<'a>

§

impl<'a> Freeze for Barometer<'a>

§

impl<'a> Send for Barometer<'a>

§

impl<'a> Sync for Barometer<'a>

§

impl<'a> Unpin for Barometer<'a>

§

impl<'a> UnsafeUnpin for Barometer<'a>

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.