; For 1.38 ver

if sqrt ( ( tgtrng * tgtrng * 10.76 ) + ( ( ownalt - tgtalt ) * ( ownalt - tgtalt ) ) ) > 500 then {
SETPRIORITY 251 intercept
SetEntVar "TRNG" TGTRNG
SetEntVar "TALT" TGTALT
SetEntVar "Homing" 1
} else { SETPRIORITY 254 TerminalHome } endif