Fix parse error (shift on float) reported by 'engink1981'.

This commit is contained in:
Nick Foster 2015-05-07 20:47:09 -07:00
parent f0323160a0
commit d569e31a68

View File

@ -335,13 +335,13 @@ def parseBDS09_1(data):
ew = bool(data["dew"]) ew = bool(data["dew"])
subtype = data["sub"] subtype = data["sub"]
if subtype == 0x02: if subtype == 0x02:
ns_vel <<= 2 ns_vel *= 4
ew_vel <<= 2 ew_vel *= 4
velocity = math.hypot(ns_vel, ew_vel) velocity = math.hypot(ns_vel, ew_vel)
if ew: if ew:
ew_vel = 0 - ew_vel ew_vel = 0 - ew_vel
if ns_vel == 0: if ns_vel == 0:
heading = 0 heading = 0
else: else: