Accelerating the pace of engineering and science

# Documentation Center

• Trials
• Product Updates

# atmospalt

Calculate pressure altitude based on ambient pressure

## Syntax

pressureAltitude = atmospalt(pressure, action)

## Description

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.

## Input Arguments

pressure

Array of m-by-1 ambient pressures, in pascal.

action

String that defines action for out-of-range input. Specify one:

 'Error' 'Warning' (default) 'None'

## Output Arguments

 pressureAltitude Array of m-by-1 pressure altitudes or MSL altitudes, in meters.

## Examples

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
```

## References

U.S. Standard Atmosphere, 1976, U.S. Government Printing Office, Washington, D.C.

## See Also

Was this topic helpful?