Calculate pressure altitude based on ambient pressure
pressureAltitude = atmospalt(pressure, action) computes the pressure altitude based on ambient pressure. Pressure altitude is the altitude with specified ambient pressure in the 1976 Committee on Extension to the Standard Atmosphere (COESA) United States standard. Pressure altitude is the same as the mean sea level (MSL) altitude.
This function extrapolates altitude values logarithmically below the pressure of 0.3961 Pa (approximately 0.00006 psi) and above the pressure of 101,325 Pa (approximately 14.7 psi).
This function assumes that air is dry and an ideal gas.
Array of m-by-1 ambient pressures, in pascal.
String that defines action for out-of-range input. Specify one:
Calculate the pressure altitude at a static pressure of 101,325 Pa with warnings for out-of-range inputs:
h = atmospalt(101325) h = 0
Calculate the pressure altitude at static pressures of 101,325 Pa and 26,436 Pa with errors for out-of-range inputs:
h = atmospalt([101325 26436], 'Error' ) h = 1.0e+004 * 0 1.0000