diff --git a/pyModeS/decoder/bds/bds09.py b/pyModeS/decoder/bds/bds09.py index 641f53c..fcb24e3 100644 --- a/pyModeS/decoder/bds/bds09.py +++ b/pyModeS/decoder/bds/bds09.py @@ -74,8 +74,9 @@ def airborne_velocity(msg): hdg = None else: hdg = common.bin2int(mb[14:24]) / 1024.0 * 360.0 + hdg = round(hdg, 2) - trk_or_hdg = round(hdg, 2) + trk_or_hdg = hdg spd = common.bin2int(mb[25:35]) spd = None if spd==0 else spd-1 diff --git a/pyModeS/streamer/stream.py b/pyModeS/streamer/stream.py index 947f4af..f139bfd 100644 --- a/pyModeS/streamer/stream.py +++ b/pyModeS/streamer/stream.py @@ -61,6 +61,8 @@ class Stream(): spd, trk, roc, tag = vdata if tag != 'GS': continue + if (spd is None) or (trk is None): + continue self.acs[icao]['gs'] = spd self.acs[icao]['trk'] = trk