Merge branch 'master' of github.com:junzis/pyModeS

This commit is contained in:
junzis 2017-07-21 15:17:13 +02:00
commit 1220368ada

View File

@ -117,12 +117,12 @@ def df20alt(msg):
if mbit == '0': # unit in ft if mbit == '0': # unit in ft
if qbit == '1': # 25ft interval if qbit == '1': # 25ft interval
vbin = mbin[19:25] + mbin[26] + mbin[28:32] vbin = mbin[19:25] + mbin[26] + mbin[28:32]
alt = util.bin2int(vbin) * 25 alt = util.bin2int(vbin) * 25 - 1000
if qbit == '0': # 100ft interval if qbit == '0': # 100ft interval
# to be implemented # to be implemented
alt = None alt = None
if mbit == '1': # unit in meter if mbit == '1': # unit in meter
vbin = mbin[19:25] + mbin[26:32] vbin = mbin[19:25] + mbin[26:31]
alt = int(util.bin2int(vbin) * 3.28084) # convert to ft alt = int(util.bin2int(vbin) * 3.28084) # convert to ft
return alt return alt