calculate_density_altitude

Function calculate_density_altitude 

Source
pub fn calculate_density_altitude(
    _altitude_ft: f64,
    pressure_inhg: f64,
    temp_f: f64,
) -> f64
Expand description

Calculate density altitude from environmental conditions

MBA-643: Fixed to interpret pressure as STATION PRESSURE (actual local pressure), not altimeter setting (sea-level corrected). This matches how weather stations and most ballistic tools report pressure.

Pressure altitude follows the published NWS station-pressure equation: PA = 145366.45 * (1 - (P_hPa/1013.25)^0.190284) https://www.weather.gov/media/epz/wxcalc/pressureAltitude.pdf

DA = PA + 66.7 * (OAT_F - ISA_temp_F)