add BDS50 roll to streamer

This commit is contained in:
Junzi Sun 2018-11-30 16:51:27 +01:00
parent 9e1cc2c5a2
commit 61f2191feb

View File

@ -45,6 +45,7 @@ class Stream():
'trk': None, 'trk': None,
'roc': None, 'roc': None,
'tas': None, 'tas': None,
'roll': None,
'ias': None, 'ias': None,
'mach': None, 'mach': None,
'hdg': None, 'hdg': None,
@ -64,6 +65,7 @@ class Stream():
'PE_VPL' : None, 'PE_VPL' : None,
} }
self.acs[icao]['t'] = t
self.acs[icao]['live'] = int(t) self.acs[icao]['live'] = int(t)
if 1 <= tc <= 4: if 1 <= tc <= 4:
@ -164,10 +166,13 @@ class Stream():
if bds == 'BDS50': if bds == 'BDS50':
tas = pms.commb.tas50(msg) tas = pms.commb.tas50(msg)
roll = pms.commb.roll50(msg)
if tas:
self.acs[icao]['t50'] = t self.acs[icao]['t50'] = t
if tas:
self.acs[icao]['tas'] = tas self.acs[icao]['tas'] = tas
if roll:
self.acs[icao]['roll'] = roll
elif bds == 'BDS60': elif bds == 'BDS60':
ias = pms.commb.ias60(msg) ias = pms.commb.ias60(msg)
@ -212,6 +217,7 @@ class Stream():
"""update aircraft from last iteration""" """update aircraft from last iteration"""
newacs = dict() newacs = dict()
for ac in self.__new_acs: for ac in self.__new_acs:
if ac in self.acs:
newacs[ac] = self.acs[ac] newacs[ac] = self.acs[ac]
return newacs return newacs