pub struct Ussa76 { /* private fields */ }Expand description
The U.S. Standard Atmosphere, 1976, optionally offset in temperature and sea-level pressure.
It serializes as its two parameters, temperature_offset_k and sea_level_pressure_pa, and
re-checks them when deserialized.
Implementations§
Source§impl Ussa76
impl Ussa76
Sourcepub fn with_offset(
temperature_offset_k: f64,
sea_level_pressure_pa: f64,
) -> Result<Self, AtmosError>
pub fn with_offset( temperature_offset_k: f64, sea_level_pressure_pa: f64, ) -> Result<Self, AtmosError>
The standard with its molecular-scale temperature offset by temperature_offset_k at every
geopotential height, and hydrostatic pressure from sea_level_pressure_pa at H = 0.
§Errors
AtmosError::Domain if the offset is not finite or would make the temperature anywhere
in the model zero or negative (it must exceed −186.9 K), or if the sea-level pressure is
not finite and positive.
Sourcepub fn anchored(
height_msl_m: f64,
temperature_k: f64,
pressure_pa: f64,
) -> Result<Self, AtmosError>
pub fn anchored( height_msl_m: f64, temperature_k: f64, pressure_pa: f64, ) -> Result<Self, AtmosError>
The offset standard that passes through a measured kinetic temperature_k and
pressure_pa at geometric height_msl_m: ΔT makes the temperature match there, and P₀
scales the pressure profile to match. Launch-site conditions are the usual use.
The offset holds all the way up, which a real hot or cold day does not: anchoring +20 K at
a 1400 m field (at the standard’s field pressure) makes the air 5.7% thinner at 3 km but
14% denser at 20 km and 30% denser at 30 km than the standard
(validation/oracles/atmosphere/conventions.py). For flights far above the field, prefer
a sounding.
§Errors
AtmosError::Domain if the height is not finite or not above −r₀, the temperature or
pressure is not finite and positive, or the implied offset or sea-level pressure is out of
range (see Ussa76::with_offset).
Sourcepub fn temperature_offset_k(&self) -> f64
pub fn temperature_offset_k(&self) -> f64
The temperature offset ΔT, K.
Sourcepub fn sea_level_pressure_pa(&self) -> f64
pub fn sea_level_pressure_pa(&self) -> f64
The pressure at H = 0, Pa.
Sourcepub fn sample(&self, height_msl_m: f64) -> Result<AirSample, AtmosError>
pub fn sample(&self, height_msl_m: f64) -> Result<AirSample, AtmosError>
The air at geometric height height_msl_m (see Atmosphere::air).
§Errors
AtmosError::Domain if the height is not finite or not above −r₀.
Sourcepub fn pressure_altitude_m(&self, pressure_pa: f64) -> Result<f64, AtmosError>
pub fn pressure_altitude_m(&self, pressure_pa: f64) -> Result<f64, AtmosError>
The geopotential altitude H (m′) at which this atmosphere’s pressure is pressure_pa:
its pressure altitude. Of the standard itself, this is what a barometric altimeter
reads.
It inverts eqs. 33a and 33b in the layer whose base pressures bracket P:
H = H_b + (T_M,b / L_M,b) [(P / P_b)^(−R* L_M,b / (g₀′ M₀)) − 1] L_M,b ≠ 0
H = H_b − (R* T_M,b / (g₀′ M₀)) ln(P / P_b) L_M,b = 0Above sea-level pressure it extends the lowest layer, and below the 86 km top’s it
continues isothermally, as Ussa76::sample does. In the troposphere of the standard it
is the altimeter formula H = 44330.8 m [1 − (P / 101325 Pa)^0.190263].
§Errors
AtmosError::Domain if the pressure is not finite and positive.