Merge pull request #112 from maranov/bugfix/airborne_velocity_trk
Fix UnboundLocalError in airborne_velocity when velocity is zero
This commit is contained in:
commit
a350050e6e
@ -65,8 +65,9 @@ def airborne_velocity(msg, source=False):
|
|||||||
trk = math.degrees(trk) # convert to degrees
|
trk = math.degrees(trk) # convert to degrees
|
||||||
trk = trk if trk >= 0 else trk + 360 # no negative val
|
trk = trk if trk >= 0 else trk + 360 # no negative val
|
||||||
|
|
||||||
|
trk_or_hdg = round(trk, 2)
|
||||||
|
|
||||||
spd_type = "GS"
|
spd_type = "GS"
|
||||||
trk_or_hdg = round(trk, 2)
|
|
||||||
dir_type = "TRUE_NORTH"
|
dir_type = "TRUE_NORTH"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user