pub struct AtmosphericProfile {
pub body_name: String,
pub surface_pressure_pa: f64,
pub surface_temperature_k: f64,
pub molar_mass_kg_mol: f64,
pub scale_height_m: f64,
pub composition: Vec<(&'static str, f64)>,
}Expand description
An atmospheric profile for a celestial body (OCS §2.5).
Fields§
§body_name: String§surface_pressure_pa: f64Surface pressure in Pascals
surface_temperature_k: f64Surface temperature in Kelvin
molar_mass_kg_mol: f64Molar mass of the atmosphere (kg/mol)
scale_height_m: f64Scale height in meters
composition: Vec<(&'static str, f64)>Composition: list of (gas, fraction)
Implementations§
Source§impl AtmosphericProfile
impl AtmosphericProfile
Sourcepub fn pressure_at_altitude(&self, altitude_m: f64) -> f64
pub fn pressure_at_altitude(&self, altitude_m: f64) -> f64
Compute pressure at a given altitude using the barometric formula (OCS §2.5). P(h) = P₀ * exp(-h / H)
Sourcepub fn temperature_at_altitude(&self, altitude_m: f64) -> f64
pub fn temperature_at_altitude(&self, altitude_m: f64) -> f64
Compute temperature at a given altitude (simplified adiabatic lapse, OCS §2.5). Uses a linear lapse rate of -6.5 K/km in the troposphere.
Sourcepub fn layer_at_altitude(&self, altitude_m: f64) -> AtmosphericLayer
pub fn layer_at_altitude(&self, altitude_m: f64) -> AtmosphericLayer
Determine which atmospheric layer an altitude falls into (OCS §2.5).
Trait Implementations§
Source§impl Clone for AtmosphericProfile
impl Clone for AtmosphericProfile
Source§impl Debug for AtmosphericProfile
impl Debug for AtmosphericProfile
Source§impl PartialEq for AtmosphericProfile
impl PartialEq for AtmosphericProfile
impl StructuralPartialEq for AtmosphericProfile
Auto Trait Implementations§
impl Freeze for AtmosphericProfile
impl RefUnwindSafe for AtmosphericProfile
impl Send for AtmosphericProfile
impl Sync for AtmosphericProfile
impl Unpin for AtmosphericProfile
impl UnsafeUnpin for AtmosphericProfile
impl UnwindSafe for AtmosphericProfile
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
Mutably borrows from an owned value. Read more