This function calculates the pressure altitude and the density altitude.

The pressure altitude is the altitude indicated when the altimeter is set to 29.92 inches of mercury.

The density altitude is the indicated altitude corrected to account for air density (pressure and temperature).



Indicated Altitude: 7,000 Ft

Barometric Pressure: 29.82 inches of mercury

True Temperature: 10°C



Pressure Altitude: 7,100 Ft

Density Altitude: 8,154 Ft