Skip to contents

Functions to calculate ICAO standard atmospheric properties: temperature, density, and pressure.

Usage

atmtemp(alt = NULL, units = NULL, ret_units = FALSE)

atmpres(alt = NULL, units = NULL, ret_units = FALSE)

atmdens(alt = NULL, units = NULL, ret_units = FALSE)

Arguments

alt

the altitude (above mean sea level). If excluded, sea level is assumed [\(m\) or \(ft\)]

units

character vector that contains the system of units [options are SI for International System of Units and Eng for English (US customary) units.

ret_units

If set to TRUE the value(s) returned are of class units with units attached to the value. [Default is FALSE]

Value

the temperature of air for the standard atmosphere for the atmtemp function [\(^{\circ}C\) or \(^{\circ}F\)]

the absolute pressure of air for the standard atmosphere for the atmpres function [\(N m^{-2}\) or \(lbf ft^{-2}\)]

the density of air for the standard atmosphere for the atmdens function [\({kg}\,{m^{-3}}\) or \({slug}\,{ft^{-3}}\)]

Author

Ed Maurer

Examples


#Find standard atmospheric temperature at altitude 8000 m
atmtemp(alt = 8000, units = 'SI')
#> [1] -36.93477

#Find standard atmospheric pressure assuming default altitude of zero (sea-level)
atmpres(units = 'Eng', ret_units = TRUE)
#> 
#> Altitude not given.
#> Assuming alt = 0 ft
#> 2116.216 [lbf/ft^2]

#Find standard atmospheric density at altitude 15000 ft 
atmdens(alt = 15000, units = 'Eng')
#> [1] 0.00149495