The effects of compressibility on temp readings varies with installation effects so there's no exact formula for general use.
Here's more info:
Mach Number (M) = TAS/CS
CS = sound speed= 38.967854*sqrt(T+273.15) where T is the OAT in celsius.
TAS is true airspeed in knots. Because of compressibility, the measured IAT (indicated air temperature) is higher than the actual true OAT. Approximately:
IAT=OAT+K*TAS^2/7592 The recovery factor K, depends on installation, and is usually in the range 0.95 to 1.0, but can be as low as 0.7. Temperatures are Celsius, TAS in knots.
Also:
OAT = (IAT + 273.15) / (1 + 0.2*K*M^2) - 273.15 The airspeed indicator measures the differential pressure, DP, between the pitot tube and the static port, the resulting indicated airspeed (IAS), when corrected for calibration and installation error is called "calibrated airspeed" (CAS).
For low-speed (M<0.3) airplanes the true airspeed can be obtained from CAS and the density altitude, DA.
TAS = CAS*(rho_0/rho)^0.5=CAS/(1-6.8755856*10^-6 * DA)^2.127940 (DA<36,089.24ft) Roughly, TAS increases by 1.5% per 1000ft.
When compressibility is taken into account, the calculation of the TAS is more elaborate:
DP=P_0*((1 + 0.2*(IAS/CS_0)^2)^3.5 -1)
M=(5*( (DP/P + 1)^(2/7) -1) )^0.5 (*)
TAS= M*CS [(*) If this results in M>1 - ie supersonic flight, we have to account for the shock wave ahead of the pitot tube, using
Rayliegh's Supersonic Pitot equation.
Using the M from above as the first guess on the RHS, iterate:
M=0.881285 sqrt((DP/P + 1)(1 - 1/(7*M^2))^(5/2))
to convergence.] P_0 is is (standard) sea-level pressure, CS_0 is the speed of sound at sea-level, CS is the speed of sound at altitude, and P is the pressure at altitude.
These are given by earlier formulae:
P_0= 29.92126 "Hg = 1013.25 mB = 2116.2166 lbs/ft^2
P= P_0*(1-6.8755856*10^-6*PA)^5.2558797, pressure altitude, PA<36,089.24ft
CS= 38.967854*sqrt(T+273.15) where T is the (static/true) OAT in Celsius.
CS_0=38.967854*sqrt(15+273.15)=661.4786 knots
[Example: CAS=250 knots, PA=10000ft, IAT=2°C, recovery factor=0.8
DP=29.92126*((1+0.2*(250/661.4786)^2)^3.5 -1)= 3.1001 "
P=29.92126*(1-6.8755856*10^-6 *10000)^5.2558797= 20.577 "
M= (5*( (3.1001/20.577 +1)^(2/7) -1) )^0.5= 0.4523 Mach
OAT=(2+273.15)/(1 + 0.2*0.8*0.4523^2) - 273.15= -6.72C
CS= 38.967854*sqrt(-6.7+273.15)=636.08 knots
TAS=636.08*0.4523=287.7 knots] In the reverse direction, given Mach number M and pressure altitude PA, we can find the IAS with:
x=(1-6.8755856e-6*PA)^5.2558797
ias=661.4786*(5*((1 + x*((1 + M^2/5)^3.5 - 1))^(2/7.) - 1))^0.5 (for M <=1)
Some notes on the origins of some of the "magic" number constants in the preceeding section:
6.8755856*10^-6 = T'/T_0, where T' is the standard temperature lapse rate and T_0 is the standard sea-level temperature.
5.2558797 = Mg/RT', where M is the (average) molecular weight of air, g is the acceleration of gravity and R is the gas constant.
0.2233609 = ratio of the pressure at the tropopause to sea-level pressure.
4.806346*10^-5 = Mg/RT_tr, where T_tr is the temperature at the tropopause.
4.2558797 = Mg/RT' -1
0.2970756 = ratio of the density at the tropopause to the density at SL (rho_0)
145442 = T_0/T'
38.967854 = sqrt(gamma R/M) (in knots/Kelvin^0.5), where gamma is the ratio of the specific heats of air