update docstring
This commit is contained in:
parent
5286355bf6
commit
d77d1f7f6b
@ -15,8 +15,6 @@ from .decoder import bds
|
||||
from .extra import aero
|
||||
from .extra import tcpclient
|
||||
|
||||
from .encoder import encode_adsb
|
||||
|
||||
|
||||
warnings.simplefilter("once", DeprecationWarning)
|
||||
|
||||
|
@ -47,8 +47,9 @@ def typecode(msg):
|
||||
|
||||
|
||||
def position(msg0, msg1, t0, t1, lat_ref=None, lon_ref=None):
|
||||
"""Decode position from a pair of even and odd position message
|
||||
(works with both airborne and surface position messages)
|
||||
"""Decode position from a pair of even and odd position message.
|
||||
|
||||
Works with both airborne and surface position messages.
|
||||
|
||||
Args:
|
||||
msg0 (string): even message (28 hexdigits)
|
||||
@ -58,6 +59,7 @@ def position(msg0, msg1, t0, t1, lat_ref=None, lon_ref=None):
|
||||
|
||||
Returns:
|
||||
(float, float): (latitude, longitude) of the aircraft
|
||||
|
||||
"""
|
||||
tc0 = typecode(msg0)
|
||||
tc1 = typecode(msg1)
|
||||
@ -85,15 +87,16 @@ def position(msg0, msg1, t0, t1, lat_ref=None, lon_ref=None):
|
||||
|
||||
|
||||
def position_with_ref(msg, lat_ref, lon_ref):
|
||||
"""Decode position with only one message,
|
||||
knowing reference nearby location, such as previously
|
||||
calculated location, ground station, or airport location, etc.
|
||||
Works with both airborne and surface position messages.
|
||||
"""Decode position with only one message.
|
||||
|
||||
A reference position is required, which can be previously
|
||||
calculated location, ground station, or airport location.
|
||||
The function works with both airborne and surface position messages.
|
||||
The reference position shall be with in 180NM (airborne) or 45NM (surface)
|
||||
of the true position.
|
||||
|
||||
Args:
|
||||
msg (string): even message (28 hexdigits)
|
||||
msg (str): even message (28 hexdigits)
|
||||
lat_ref: previous known latitude
|
||||
lon_ref: previous known longitude
|
||||
|
||||
@ -114,15 +117,15 @@ def position_with_ref(msg, lat_ref, lon_ref):
|
||||
|
||||
|
||||
def altitude(msg):
|
||||
"""Decode aircraft altitude
|
||||
"""Decode aircraft altitude.
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: altitude in feet
|
||||
"""
|
||||
|
||||
"""
|
||||
tc = typecode(msg)
|
||||
|
||||
if tc < 5 or tc == 19 or tc > 22:
|
||||
@ -137,36 +140,31 @@ def altitude(msg):
|
||||
return altitude05(msg)
|
||||
|
||||
|
||||
def velocity(msg, rtn_sources=False):
|
||||
"""Calculate the speed, heading, and vertical rate
|
||||
(handles both airborne or surface message)
|
||||
def velocity(msg, source=False):
|
||||
"""Calculate the speed, heading, and vertical rate (handles both airborne or surface message).
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
rtn_source (boolean): If the function will return
|
||||
the sources for direction of travel and vertical
|
||||
rate. This will change the return value from a four
|
||||
element array to a six element array.
|
||||
msg (str): 28 hexdigits string
|
||||
source (boolean): Include direction and vertical rate sources in return. Default to False.
|
||||
If set to True, the function will return six value instead of four.
|
||||
|
||||
Returns:
|
||||
(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 ('true_north' for ground track / true north
|
||||
as reference, 'mag_north' for magnetic north as reference),
|
||||
rate of climb/descent source ('Baro' for barometer, 'GNSS'
|
||||
for GNSS constellation).
|
||||
int, float, int, string, [string], [string]: Four or six parameters, including:
|
||||
- Speed (kt)
|
||||
- Angle (degree), either ground track or heading
|
||||
- Vertical rate (ft/min)
|
||||
- Speed type ('GS' for ground speed, 'AS' for airspeed)
|
||||
- [Optional] Direction source ('TRUE_NORTH' or 'MAGENTIC_NORTH')
|
||||
- [Optional] Vertical rate source ('BARO' or 'GNSS')
|
||||
|
||||
For surface messages, vertical rate and its respective sources are set to None.
|
||||
|
||||
In the case of surface messages, None will be put in place
|
||||
for vertical rate and its respective sources.
|
||||
"""
|
||||
|
||||
if 5 <= typecode(msg) <= 8:
|
||||
return surface_velocity(msg, rtn_sources)
|
||||
return surface_velocity(msg, source)
|
||||
|
||||
elif typecode(msg) == 19:
|
||||
return airborne_velocity(msg, rtn_sources)
|
||||
return airborne_velocity(msg, source)
|
||||
|
||||
else:
|
||||
raise RuntimeError(
|
||||
@ -179,7 +177,7 @@ def speed_heading(msg):
|
||||
(handles both airborne or surface message)
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
(int, float): speed (kt), ground track or heading (degree)
|
||||
@ -191,7 +189,7 @@ def speed_heading(msg):
|
||||
def oe_flag(msg):
|
||||
"""Check the odd/even flag. Bit 54, 0 for even, 1 for odd.
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
Returns:
|
||||
int: 0 or 1, for even or odd frame
|
||||
"""
|
||||
@ -203,7 +201,7 @@ def version(msg):
|
||||
"""ADS-B Version
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string, TC = 31
|
||||
msg (str): 28 hexdigits string, TC = 31
|
||||
|
||||
Returns:
|
||||
int: version number
|
||||
@ -225,7 +223,7 @@ def nuc_p(msg):
|
||||
"""Calculate NUCp, Navigation Uncertainty Category - Position (ADS-B version 1)
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string,
|
||||
msg (str): 28 hexdigits string,
|
||||
|
||||
Returns:
|
||||
int: Horizontal Protection Limit
|
||||
@ -261,7 +259,7 @@ def nuc_v(msg):
|
||||
"""Calculate NUCv, Navigation Uncertainty Category - Velocity (ADS-B version 1)
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string,
|
||||
msg (str): 28 hexdigits string,
|
||||
|
||||
Returns:
|
||||
int or string: 95% Horizontal Velocity Error
|
||||
@ -290,7 +288,7 @@ def nic_v1(msg, NICs):
|
||||
"""Calculate NIC, navigation integrity category, for ADS-B version 1
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
NICs (int or string): NIC supplement
|
||||
|
||||
Returns:
|
||||
@ -324,7 +322,7 @@ def nic_v2(msg, NICa, NICbc):
|
||||
"""Calculate NIC, navigation integrity category, for ADS-B version 2
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
NICa (int or string): NIC supplement - A
|
||||
NICbc (int or srting): NIC supplement - B or C
|
||||
|
||||
@ -362,7 +360,7 @@ def nic_s(msg):
|
||||
"""Obtain NIC supplement bit, TC=31 message
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: NICs number (0 or 1)
|
||||
@ -384,7 +382,7 @@ def nic_a_c(msg):
|
||||
"""Obtain NICa/c, navigation integrity category supplements a and c
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
(int, int): NICa and NICc number (0 or 1)
|
||||
@ -407,7 +405,7 @@ def nic_b(msg):
|
||||
"""Obtain NICb, navigation integrity category supplement-b
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: NICb number (0 or 1)
|
||||
@ -429,7 +427,7 @@ def nac_p(msg):
|
||||
"""Calculate NACp, Navigation Accuracy Category - Position
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string, TC = 29 or 31
|
||||
msg (str): 28 hexdigits string, TC = 29 or 31
|
||||
|
||||
Returns:
|
||||
int or string: 95% horizontal accuracy bounds, Estimated Position Uncertainty
|
||||
@ -464,7 +462,7 @@ def nac_v(msg):
|
||||
"""Calculate NACv, Navigation Accuracy Category - Velocity
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string, TC = 19
|
||||
msg (str): 28 hexdigits string, TC = 19
|
||||
|
||||
Returns:
|
||||
int or string: 95% horizontal accuracy bounds for velocity, Horizontal Figure of Merit
|
||||
@ -493,7 +491,7 @@ def sil(msg, version):
|
||||
"""Calculate SIL, Surveillance Integrity Level
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string with TC = 29, 31
|
||||
msg (str): 28 hexdigits string with TC = 29, 31
|
||||
|
||||
Returns:
|
||||
int or string: Probability of exceeding Horizontal Radius of Containment RCu
|
||||
|
@ -45,7 +45,7 @@ def is50or60(msg, spd_ref, trk_ref, alt_ref):
|
||||
"""Use reference ground speed and trk to determine BDS50 and DBS60.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
spd_ref (float): reference speed (ADS-B ground speed), kts
|
||||
trk_ref (float): reference track (ADS-B track angle), deg
|
||||
alt_ref (float): reference altitude (ADS-B altitude), ft
|
||||
@ -108,7 +108,7 @@ def infer(msg, mrar=False):
|
||||
"""Estimate the most likely BDS code of an message.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
mrar (bool): Also infer MRAR (BDS 44) and MHR (BDS 45). Defaults to False.
|
||||
|
||||
Returns:
|
||||
|
@ -85,7 +85,7 @@ def airborne_position_with_ref(msg, lat_ref, lon_ref):
|
||||
be with in 180NM of the true position.
|
||||
|
||||
Args:
|
||||
msg (string): even message (28 hexdigits)
|
||||
msg (str): even message (28 hexdigits)
|
||||
lat_ref: previous known latitude
|
||||
lon_ref: previous known longitude
|
||||
|
||||
@ -127,7 +127,7 @@ def altitude(msg):
|
||||
"""Decode aircraft altitude
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: altitude in feet
|
||||
|
@ -1,7 +1,7 @@
|
||||
# ------------------------------------------
|
||||
# BDS 0,6
|
||||
# ADS-B TC=5-8
|
||||
# Surface position
|
||||
# Surface movment
|
||||
# ------------------------------------------
|
||||
|
||||
from pyModeS import common
|
||||
@ -89,7 +89,7 @@ def surface_position_with_ref(msg, lat_ref, lon_ref):
|
||||
be with in 45NM of the true position.
|
||||
|
||||
Args:
|
||||
msg (string): even message (28 hexdigits)
|
||||
msg (str): even message (28 hexdigits)
|
||||
lat_ref: previous known latitude
|
||||
lon_ref: previous known longitude
|
||||
|
||||
@ -127,23 +127,24 @@ def surface_position_with_ref(msg, lat_ref, lon_ref):
|
||||
return round(lat, 5), round(lon, 5)
|
||||
|
||||
|
||||
def surface_velocity(msg, rtn_sources=False):
|
||||
"""Decode surface velocity from from a surface position message
|
||||
def surface_velocity(msg, source=False):
|
||||
"""Decode surface velocity from a surface position message
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
rtn_source (boolean): If the function will return
|
||||
the sources for direction of travel and vertical
|
||||
rate. This will change the return value from a four
|
||||
element array to a six element array.
|
||||
msg (str): 28 hexdigits string
|
||||
source (boolean): Include direction and vertical rate sources in return. Default to False.
|
||||
If set to True, the function will return six value instead of four.
|
||||
|
||||
Returns:
|
||||
(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
|
||||
('true_north' for ground track / true north as reference),
|
||||
None rate of climb/descent source.
|
||||
"""
|
||||
int, float, int, string, [string], [string]: Four or six parameters, including:
|
||||
- Speed (kt)
|
||||
- Angle (degree), ground track
|
||||
- Vertical rate, always 0
|
||||
- Speed type ('GS' for ground speed, 'AS' for airspeed)
|
||||
- [Optional] Direction source ('TRUE_NORTH')
|
||||
- [Optional] Vertical rate source (None)
|
||||
|
||||
"""
|
||||
if common.typecode(msg) < 5 or common.typecode(msg) > 8:
|
||||
raise RuntimeError("%s: Not a surface message, expecting 5<TC<8" % msg)
|
||||
|
||||
@ -174,7 +175,7 @@ def surface_velocity(msg, rtn_sources=False):
|
||||
spd = kts[i - 1] + (mov - movs[i - 1]) * step
|
||||
spd = round(spd, 2)
|
||||
|
||||
if rtn_sources:
|
||||
return spd, trk, 0, "GS", "true_north", None
|
||||
if source:
|
||||
return spd, trk, 0, "GS", "TRUE_NORTH", None
|
||||
else:
|
||||
return spd, trk, 0, "GS"
|
||||
|
@ -11,7 +11,7 @@ def category(msg):
|
||||
"""Aircraft category number
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: category number
|
||||
@ -29,7 +29,7 @@ def callsign(msg):
|
||||
"""Aircraft callsign
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
string: callsign
|
||||
|
@ -10,27 +10,24 @@ from pyModeS import common
|
||||
import math
|
||||
|
||||
|
||||
def airborne_velocity(msg, rtn_sources=False):
|
||||
"""Calculate the speed, track (or heading), and vertical rate
|
||||
def airborne_velocity(msg, source=False):
|
||||
"""Decode airborne velocity.
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string
|
||||
rtn_source (boolean): If the function will return
|
||||
the sources for direction of travel and vertical
|
||||
rate. This will change the return value from a four
|
||||
element array to a six element array.
|
||||
msg (str): 28 hexdigits string
|
||||
source (boolean): Include direction and vertical rate sources in return. Default to False.
|
||||
If set to True, the function will return six value instead of four.
|
||||
|
||||
Returns:
|
||||
(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 ('true_north' for ground track / true north
|
||||
as reference, 'mag_north' for magnetic north as reference),
|
||||
rate of climb/descent source ('Baro' for barometer, 'GNSS'
|
||||
for GNSS constellation).
|
||||
"""
|
||||
int, float, int, string, [string], [string]: Four or six parameters, including:
|
||||
- Speed (kt)
|
||||
- Angle (degree), either ground track or heading
|
||||
- Vertical rate (ft/min)
|
||||
- Speed type ('GS' for ground speed, 'AS' for airspeed)
|
||||
- [Optional] Direction source ('TRUE_NORTH' or 'MAGENTIC_NORTH')
|
||||
- [Optional] Vertical rate source ('BARO' or 'GNSS')
|
||||
|
||||
"""
|
||||
if common.typecode(msg) != 19:
|
||||
raise RuntimeError("%s: Not a airborne velocity message, expecting TC=19" % msg)
|
||||
|
||||
@ -62,9 +59,9 @@ def airborne_velocity(msg, rtn_sources=False):
|
||||
trk = math.degrees(trk) # convert to degrees
|
||||
trk = trk if trk >= 0 else trk + 360 # no negative val
|
||||
|
||||
tag = "GS"
|
||||
spd_type = "GS"
|
||||
trk_or_hdg = round(trk, 2)
|
||||
dir_type = "true_north"
|
||||
dir_type = "TRUE_NORTH"
|
||||
|
||||
else:
|
||||
if mb[13] == "0":
|
||||
@ -81,32 +78,33 @@ def airborne_velocity(msg, rtn_sources=False):
|
||||
spd *= 4
|
||||
|
||||
if mb[24] == "0":
|
||||
tag = "IAS"
|
||||
spd_type = "IAS"
|
||||
else:
|
||||
tag = "TAS"
|
||||
spd_type = "TAS"
|
||||
|
||||
dir_type = "mag_north"
|
||||
dir_type = "MAGENTIC_NORTH"
|
||||
|
||||
vr_source = "GNSS" if mb[35] == "0" else "Baro"
|
||||
vr_source = "GNSS" if mb[35] == "0" else "BARO"
|
||||
vr_sign = -1 if mb[36] == "1" else 1
|
||||
vr = common.bin2int(mb[37:46])
|
||||
rocd = None if vr == 0 else int(vr_sign * (vr - 1) * 64)
|
||||
vs = None if vr == 0 else int(vr_sign * (vr - 1) * 64)
|
||||
|
||||
if rtn_sources:
|
||||
return spd, trk_or_hdg, rocd, tag, dir_type, vr_source
|
||||
if source:
|
||||
return spd, trk_or_hdg, vs, spd_type, dir_type, vr_source
|
||||
else:
|
||||
return spd, trk_or_hdg, rocd, tag
|
||||
return spd, trk_or_hdg, vs, spd_type
|
||||
|
||||
|
||||
def altitude_diff(msg):
|
||||
"""Decode the differece between GNSS and barometric altitude
|
||||
"""Decode the differece between GNSS and barometric altitude.
|
||||
|
||||
Args:
|
||||
msg (string): 28 bytes hexadecimal message string, TC=19
|
||||
msg (str): 28 hexdigits string, TC=19
|
||||
|
||||
Returns:
|
||||
int: Altitude difference in ft. Negative value indicates GNSS altitude
|
||||
below barometric altitude.
|
||||
int: Altitude difference in feet. Negative value indicates GNSS altitude
|
||||
below barometric altitude.
|
||||
|
||||
"""
|
||||
tc = common.typecode(msg)
|
||||
|
||||
|
@ -10,7 +10,7 @@ def is10(msg):
|
||||
"""Check if a message is likely to be BDS code 1,0
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
bool: True or False
|
||||
@ -42,7 +42,7 @@ def ovc10(msg):
|
||||
"""Return the overlay control capability
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: Whether the transponder is OVC capable
|
||||
|
@ -10,7 +10,7 @@ def is17(msg):
|
||||
"""Check if a message is likely to be BDS code 1,7
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
bool: True or False
|
||||
@ -42,7 +42,7 @@ def cap17(msg):
|
||||
"""Extract capacities from BDS 1,7 message
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
list: list of support BDS codes
|
||||
|
@ -10,7 +10,7 @@ def is20(msg):
|
||||
"""Check if a message is likely to be BDS code 2,0
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
bool: True or False
|
||||
@ -36,7 +36,7 @@ def cs20(msg):
|
||||
"""Aircraft callsign
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS40) string
|
||||
msg (str): 28 hexdigits (BDS40) string
|
||||
|
||||
Returns:
|
||||
string: callsign, max. 8 chars
|
||||
|
@ -10,7 +10,7 @@ def is30(msg):
|
||||
"""Check if a message is likely to be BDS code 2,0
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
bool: True or False
|
||||
|
@ -11,7 +11,7 @@ def is40(msg):
|
||||
"""Check if a message is likely to be BDS code 4,0
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
bool: True or False
|
||||
@ -54,7 +54,7 @@ def selalt40mcp(msg):
|
||||
"""Selected altitude, MCP/FCU
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS40) string
|
||||
msg (str): 28 hexdigits (BDS40) string
|
||||
|
||||
Returns:
|
||||
int: altitude in feet
|
||||
@ -72,7 +72,7 @@ def selalt40fms(msg):
|
||||
"""Selected altitude, FMS
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS40) string
|
||||
msg (str): 28 hexdigits (BDS40) string
|
||||
|
||||
Returns:
|
||||
int: altitude in feet
|
||||
@ -90,7 +90,7 @@ def p40baro(msg):
|
||||
"""Barometric pressure setting
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS40) string
|
||||
msg (str): 28 hexdigits (BDS40) string
|
||||
|
||||
Returns:
|
||||
float: pressure in millibar
|
||||
|
@ -12,7 +12,7 @@ def is44(msg):
|
||||
Meteorological routine air report
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
bool: True or False
|
||||
@ -55,7 +55,7 @@ def wind44(msg):
|
||||
"""Wind speed and direction.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
(int, float): speed (kt), direction (degree)
|
||||
@ -77,7 +77,7 @@ def temp44(msg):
|
||||
"""Static air temperature.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
float, float: temperature and alternative temperature in Celsius degree.
|
||||
@ -106,7 +106,7 @@ def p44(msg):
|
||||
"""Static pressure.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: static pressure in hPa
|
||||
@ -126,7 +126,7 @@ def hum44(msg):
|
||||
"""humidity
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
float: percentage of humidity, [0 - 100] %
|
||||
@ -145,7 +145,7 @@ def turb44(msg):
|
||||
"""Turblence.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: turbulence level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
||||
|
@ -12,7 +12,7 @@ def is45(msg):
|
||||
Meteorological hazard report
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
bool: True or False
|
||||
@ -64,7 +64,7 @@ def turb45(msg):
|
||||
"""Turbulence.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: Turbulence level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
||||
@ -82,7 +82,7 @@ def ws45(msg):
|
||||
"""Wind shear.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: Wind shear level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
||||
@ -100,7 +100,7 @@ def mb45(msg):
|
||||
"""Microburst.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: Microburst level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
||||
@ -118,7 +118,7 @@ def ic45(msg):
|
||||
"""Icing.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: Icing level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
||||
@ -136,7 +136,7 @@ def wv45(msg):
|
||||
"""Wake vortex.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: Wake vortex level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
||||
@ -154,7 +154,7 @@ def temp45(msg):
|
||||
"""Static air temperature.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
float: tmeperature in Celsius degree
|
||||
@ -178,7 +178,7 @@ def p45(msg):
|
||||
"""Average static pressure.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: static pressure in hPa
|
||||
@ -195,7 +195,7 @@ def rh45(msg):
|
||||
"""Radio height.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
int: radio height in ft
|
||||
|
@ -11,7 +11,7 @@ def is50(msg):
|
||||
(Track and turn report)
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
bool: True or False
|
||||
@ -61,7 +61,7 @@ def roll50(msg):
|
||||
"""Roll angle, BDS 5,0 message
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS50) string
|
||||
msg (str): 28 hexdigits (BDS50) string
|
||||
|
||||
Returns:
|
||||
float: angle in degrees,
|
||||
@ -86,7 +86,7 @@ def trk50(msg):
|
||||
"""True track angle, BDS 5,0 message
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS50) string
|
||||
msg (str): 28 hexdigits (BDS50) string
|
||||
|
||||
Returns:
|
||||
float: angle in degrees to true north (from 0 to 360)
|
||||
@ -115,7 +115,7 @@ def gs50(msg):
|
||||
"""Ground speed, BDS 5,0 message
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS50) string
|
||||
msg (str): 28 hexdigits (BDS50) string
|
||||
|
||||
Returns:
|
||||
int: ground speed in knots
|
||||
@ -133,7 +133,7 @@ def rtrk50(msg):
|
||||
"""Track angle rate, BDS 5,0 message
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS50) string
|
||||
msg (str): 28 hexdigits (BDS50) string
|
||||
|
||||
Returns:
|
||||
float: angle rate in degrees/second
|
||||
@ -159,7 +159,7 @@ def tas50(msg):
|
||||
"""Aircraft true airspeed, BDS 5,0 message
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS50) string
|
||||
msg (str): 28 hexdigits (BDS50) string
|
||||
|
||||
Returns:
|
||||
int: true airspeed in knots
|
||||
|
@ -11,7 +11,7 @@ def is53(msg):
|
||||
(Air-referenced state vector)
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
bool: True or False
|
||||
@ -62,7 +62,7 @@ def hdg53(msg):
|
||||
"""Magnetic heading, BDS 5,3 message
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS53) string
|
||||
msg (str): 28 hexdigits (BDS53) string
|
||||
|
||||
Returns:
|
||||
float: angle in degrees to true north (from 0 to 360)
|
||||
@ -91,7 +91,7 @@ def ias53(msg):
|
||||
"""Indicated airspeed, DBS 5,3 message
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message
|
||||
msg (str): 28 hexdigits
|
||||
|
||||
Returns:
|
||||
int: indicated arispeed in knots
|
||||
@ -109,7 +109,7 @@ def mach53(msg):
|
||||
"""MACH number, DBS 5,3 message
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message
|
||||
msg (str): 28 hexdigits
|
||||
|
||||
Returns:
|
||||
float: MACH number
|
||||
@ -127,7 +127,7 @@ def tas53(msg):
|
||||
"""Aircraft true airspeed, BDS 5,3 message
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message
|
||||
msg (str): 28 hexdigits
|
||||
|
||||
Returns:
|
||||
float: true airspeed in knots
|
||||
@ -145,7 +145,7 @@ def vr53(msg):
|
||||
"""Vertical rate
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS60) string
|
||||
msg (str): 28 hexdigits (BDS60) string
|
||||
|
||||
Returns:
|
||||
int: vertical rate in feet/minutes
|
||||
|
@ -10,7 +10,7 @@ def is60(msg):
|
||||
"""Check if a message is likely to be BDS code 6,0
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message string
|
||||
msg (str): 28 hexdigits string
|
||||
|
||||
Returns:
|
||||
bool: True or False
|
||||
@ -61,7 +61,7 @@ def hdg60(msg):
|
||||
"""Megnetic heading of aircraft
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS60) string
|
||||
msg (str): 28 hexdigits (BDS60) string
|
||||
|
||||
Returns:
|
||||
float: heading in degrees to megnetic north (from 0 to 360)
|
||||
@ -90,7 +90,7 @@ def ias60(msg):
|
||||
"""Indicated airspeed
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS60) string
|
||||
msg (str): 28 hexdigits (BDS60) string
|
||||
|
||||
Returns:
|
||||
int: indicated airspeed in knots
|
||||
@ -108,7 +108,7 @@ def mach60(msg):
|
||||
"""Aircraft MACH number
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS60) string
|
||||
msg (str): 28 hexdigits (BDS60) string
|
||||
|
||||
Returns:
|
||||
float: MACH number
|
||||
@ -126,7 +126,7 @@ def vr60baro(msg):
|
||||
"""Vertical rate from barometric measurement, this value may be very noisy.
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS60) string
|
||||
msg (str): 28 hexdigits (BDS60) string
|
||||
|
||||
Returns:
|
||||
int: vertical rate in feet/minutes
|
||||
@ -152,7 +152,7 @@ def vr60ins(msg):
|
||||
"""Vertical rate measurd by onbard equiments (IRS, AHRS)
|
||||
|
||||
Args:
|
||||
msg (String): 28 bytes hexadecimal message (BDS60) string
|
||||
msg (str): 28 hexdigits (BDS60) string
|
||||
|
||||
Returns:
|
||||
int: vertical rate in feet/minutes
|
||||
|
Loading…
Reference in New Issue
Block a user