Main Content

atmospalt

Calculate pressure altitude based on ambient pressure

    Description

    example

    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.

    Examples

    collapse all

    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+04 *
    
             0    1.0000

    Input Arguments

    collapse all

    Ambient pressures, specified as an m-by-1 array in pascals.

    Data Types: double

    Action for out-of-range input, specified as:

    • 'Error' — Displays warning and indicates that the input is out of range.

    • 'Warning' — Displays error and indicates that the input is out of range.

    • 'None' — Does not display warning or error.

    Data Types: char | string

    Output Arguments

    collapse all

    Pressure altitudes or MSL altitudes, returned as an m-by-1 array in meters.

    References

    [1] U.S. Standard Atmosphere. Washington, DC: U.S. Government Printing Office, 1976.

    Introduced in R2006b