bug fix in is60()

This commit is contained in:
Junzi Sun 2020-08-14 23:50:54 +02:00
parent 93fc536926
commit 2bdd638cef

View File

@ -58,9 +58,10 @@ def is60(msg):
# additional check knowing altitude
if (mach is not None) and (ias is not None) and (common.df(msg) == 20):
alt = common.altcode(msg)
ias_ = aero.mach2cas(mach, alt * aero.ft) / aero.kts
if abs(ias - ias_) > 20:
return False
if alt is not None:
ias_ = aero.mach2cas(mach, alt * aero.ft) / aero.kts
if abs(ias - ias_) > 20:
return False
return True