Expand description
Enhanced atmospheric calculations for ballistics.
This module provides Rust-accelerated implementations of atmospheric calculations with full ICAO Standard Atmosphere support for improved accuracy at all altitudes.
Structs§
- Atmo
Sock - Downrange-segmented atmosphere handler (MBA-1137), the density analogue of
crate::wind::WindSock.
Enums§
- Pressure
Reference Mode - Whether a station-pressure input is already absolute (station) pressure, or a sea-level- corrected altimeter setting (QNH / “barometer” reading) that must be reduced to station pressure at the shooter’s altitude before use (MBA-1397).
Functions§
- calculate_
air_ density_ cimp - Enhanced air density calculation using CIPM formula with ICAO atmosphere.
- calculate_
air_ density_ cipm - Legacy function name for backwards compatibility
- calculate_
atmosphere - Enhanced atmospheric calculation with ICAO Standard Atmosphere.
- get_
direct_ atmosphere - Direct atmosphere calculation for simple cases.
- get_
local_ atmosphere - Enhanced local atmospheric calculation with variable lapse rates.
- get_
local_ atmosphere_ humid - Humidity-aware companion to
get_local_atmosphere: identical local density, but the speed of sound is the moist-air value (moist_speed_of_sound) evaluated at the LOCAL temperature and pressure. - moist_
speed_ of_ sound - Speed of sound using an ideal-gas moist-air mixture approximation, first order in the water-vapor mole fraction.
- reduce_
qnh_ to_ station_ pressure - Reduce a sea-level-corrected altimeter setting (QNH) to the station pressure at
altitude_m(MBA-1397), using the inverse of the ICAO troposphere barometric formula: - resolve_
atmosphere_ for_ density_ altitude - Back-solve an ISA-equivalent station altitude/temperature/pressure from a directly-declared density altitude (MBA-1366) — the single-value atmosphere entry mode Shooter, Nosler, AB Analytics, Ballistic AE, and TRASOL all support as an alternative to altitude + pressure + temperature.
- resolve_
station_ conditions - Return the station temperature and pressure that
calculate_atmospherewill use after applying the default-at-altitude resolution rules. - resolve_
station_ conditions_ with_ pressure_ mode - Mode-aware counterpart of
resolve_station_conditions(MBA-1397): identical forPressureReferenceMode::Absolute(byte-identical delegate —resolve_station_conditionsitself now forwards here), and reduces an explicit QNH pressure to station pressure viaresolve_station_pressure_with_modeforPressureReferenceMode::Qnhbefore applying the same standard-atmosphere fallback used when either input is left at its sea-level default. - resolve_
station_ pressure - Resolve the station-pressure override for an air-density calculation.
- resolve_
station_ pressure_ with_ mode - Mode-aware counterpart of
resolve_station_pressure(MBA-1397). Does NOT change that function’s signature or behavior —PressureReferenceMode::Absoluteis a pure passthrough to it — so this is a new function alongside the original, not a replacement. - resolve_
station_ temperature - Resolve the temperature override for an air-density calculation, mirroring
resolve_station_pressure.
Type Aliases§
- Atmo
Segment - A single downrange-referenced atmosphere zone:
(temp_c, pressure_hpa, humidity_percent, until_distance_m).