Changed velocity source names

This commit is contained in:
Alexander Hirsch 2019-05-27 08:13:02 -07:00
parent 3c14579040
commit f27fe6c8aa
3 changed files with 6 additions and 6 deletions

View File

@ -159,7 +159,7 @@ def velocity(msg, rtn_sources=False):
ground track or heading (degree),
rate of climb/descent (ft/min), speed type
('GS' for ground speed, 'AS' for airspeed),
direction source ('gnd_trk' for ground track, 'mag_hdg' for
direction source ('true_north' for ground track, 'mag_north' for
magnetic heading), rate of climb/descent source ('Baro' for
barometer, 'GNSS' for GNSS constellation).

View File

@ -154,7 +154,7 @@ def surface_velocity(msg, rtn_sources=False):
(int, float, int, string, string, None): speed (kt),
ground track (degree), None for rate of climb/descend (ft/min),
and speed type ('GS' for ground speed), direction source
('gnd_trk' for ground track), None rate of climb/descent source.
('true_north' for ground track), None rate of climb/descent source.
"""
if common.typecode(msg) < 5 or common.typecode(msg) > 8:
@ -188,6 +188,6 @@ def surface_velocity(msg, rtn_sources=False):
spd = round(spd, 2)
if rtn_sources:
return spd, trk, 0, 'GS', 'gnd_trk', None
return spd, trk, 0, 'GS', 'true_north', None
else:
return spd, trk, 0, 'GS'

View File

@ -40,7 +40,7 @@ def airborne_velocity(msg, rtn_sources=False):
ground track or heading (degree),
rate of climb/descent (ft/min), speed type
('GS' for ground speed, 'AS' for airspeed),
direction source ('gnd_trk' for ground track, 'mag_hdg' for
direction source ('true_north' for ground track, 'mag_north' for
magnetic heading), rate of climb/descent source ('Baro' for
barometer, 'GNSS' for GNSS constellation)
"""
@ -74,7 +74,7 @@ def airborne_velocity(msg, rtn_sources=False):
tag = 'GS'
trk_or_hdg = round(trk, 2)
dir_type = 'gnd_trk'
dir_type = 'true_north'
else:
if mb[13] == '0':
@ -93,7 +93,7 @@ def airborne_velocity(msg, rtn_sources=False):
else:
tag = 'TAS'
dir_type = 'mag_hdg'
dir_type = 'mag_north'
vr_source = 'GNSS' if mb[35]=='0' else 'Baro'
vr_sign = -1 if mb[36]=='1' else 1