function GetStandardAtmTemperature(Altitude) result(StandardAtmTemperature)
!+ Return standard atmosphere temperature, given the elevation (altitude).
!+ Reference:
!+ ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 4
real, intent(in) :: Altitude
!+ Altitude in ft [IP] or m [SI]
real :: StandardAtmTemperature
!+ Standard atmosphere dry-bulb temperature in °F [IP] or °C [SI]
if (isIP()) then
StandardAtmTemperature = 59.0 - 0.00356620 * Altitude
else
StandardAtmTemperature = 15.0 - 0.0065 * Altitude
end if
end function GetStandardAtmTemperature