diff --git a/pyModeS/decoder/adsb.py b/pyModeS/decoder/adsb.py index d3699ba..521ce1d 100644 --- a/pyModeS/decoder/adsb.py +++ b/pyModeS/decoder/adsb.py @@ -151,9 +151,16 @@ def velocity(msg): msg (string): 28 bytes hexadecimal message string Returns: - (int, float, int, string): speed (kt), ground track or heading (degree), - rate of climb/descend (ft/min), and speed type - ('GS' for ground speed, 'AS' for airspeed) + (int, float, int, string, string, string): speed (kt), + 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 + magnetic heading), rate of climb/descent source ('Baro' for + barometer, 'GNSS' for GNSS constellation). + + In the case of surface messages, None will be put in place + for direction, vertical rate, and their respective sources. """ if 5 <= typecode(msg) <= 8: diff --git a/pyModeS/decoder/bds/bds06.py b/pyModeS/decoder/bds/bds06.py index bceb643..03ce272 100644 --- a/pyModeS/decoder/bds/bds06.py +++ b/pyModeS/decoder/bds/bds06.py @@ -147,9 +147,10 @@ def surface_velocity(msg): msg (string): 28 bytes hexadecimal message string Returns: - (int, float, int, string): speed (kt), ground track (degree), - rate of climb/descend (ft/min), and speed type - ('GS' for ground speed, 'AS' for airspeed) + (int, float, None, string, None, 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. """ if common.typecode(msg) < 5 or common.typecode(msg) > 8: @@ -182,4 +183,4 @@ def surface_velocity(msg): spd = kts[i-1] + (mov-movs[i-1]) * step spd = round(spd, 2) - return spd, trk, 0, 'GS' + return spd, trk, None, 'GS', None, None