The equation is DA = PA +/- 120 ÄT (ÄT is ICAO Temp corrected for a particular PA compared to the ICAO standard atmosphere - which is approximately 1013mb and 15°C. ICAO air also cools or warms at 2°C per thousand feet and 1mb pressure change is equal to 30 feet ascent or descent)
If the actual outside air temp is 15°C and the pressure is 1013mb then PA = 0ft
i.e. Lets say the current pressure is 1029 and the temp is minus 4°C...
DA = ( PA ) +/- 120ÄT
DA = (1013-1029 (x 30)) +/- 120ÄT
DA = ( -480 ) +/- 120ÄT
You have to work out PA so you can adjust ÄT (which is 15°C if PA is 0 but is lower than 15°C if PA is greater than 0 and higher than 15°C if PA is less than 0 i.e. negative figures)
So as ÄT is 15°C if PA is 0 it either cools or warms at a rate of 2°C per thousand feet (or part therof).
In our example we are at -480ft PA which means that (approximately!) it will be warmer by 1°C than ICAO therefore = 16°C (I'm sure you can make this more accurate with your converter equation!!)
Now ÄT = 16°C minus -4°C (actual air temp) = 20
Therefore:
DA = ( -480 ) +/- 120 x 20
Is it plus or minus 120 x 20? - It's Plus if the actual temp is greater than 15°C and it's minus if the actual temp is less than 15°C - so in this case we minus it:
DA = ( -480 ) - 120 x 20
DA = -480 - 2400
DA = -2800ft
Voila!
Hope this helps the equation writing.....
PPI Zulu
P.S. ÄT should read 'Delta T' as in the Greek fourth letter (a triangle) but it wont appear in this post correctly.