From e39baf38edc88d07136f53677d7a9c16bd67711f Mon Sep 17 00:00:00 2001 From: Daniele Forsi Date: Sat, 9 Oct 2021 20:55:10 +0200 Subject: [PATCH] Fix typos --- README.rst | 2 +- pyModeS/c_common.pyx | 4 ++-- pyModeS/decoder/adsb.py | 8 ++++---- pyModeS/decoder/allcall.py | 2 +- pyModeS/decoder/bds/bds05.py | 2 +- pyModeS/decoder/bds/bds06.py | 6 +++--- pyModeS/decoder/bds/bds08.py | 2 +- pyModeS/decoder/bds/bds09.py | 2 +- pyModeS/decoder/bds/bds17.py | 2 +- pyModeS/decoder/bds/bds44.py | 2 +- pyModeS/decoder/bds/bds60.py | 2 +- pyModeS/py_common.py | 6 +++--- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.rst b/README.rst index fce5b9c..24f0b68 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ The Python ADS-B/Mode-S Decoder =============================== -PyModeS is a Python library designed to decode Mode-S (including ADS-B) message. It can be imported to your python project or used as a standalone tool to view and save live traffic data. +PyModeS is a Python library designed to decode Mode-S (including ADS-B) messages. It can be imported to your python project or used as a standalone tool to view and save live traffic data. This is a project created by Junzi Sun, who works at `TU Delft `_, `Aerospace Engineering Faculty `_, `CNS/ATM research group `_. It is supported by many `contributors `_ from different institutions. diff --git a/pyModeS/c_common.pyx b/pyModeS/c_common.pyx index ab9f989..71d5083 100644 --- a/pyModeS/c_common.pyx +++ b/pyModeS/c_common.pyx @@ -25,7 +25,7 @@ cdef unsigned char int_to_char(unsigned char i): @cython.boundscheck(False) @cython.overflowcheck(False) cpdef str hex2bin(str hexstr): - """Convert a hexdecimal string to binary string, with zero fillings.""" + """Convert a hexadecimal string to binary string, with zero fillings.""" # num_of_bits = len(hexstr) * 4 cdef hexbytes = bytes(hexstr.encode()) cdef Py_ssize_t len_hexstr = PyBytes_GET_SIZE(hexbytes) @@ -73,7 +73,7 @@ cpdef str bin2hex(str binstr): @cython.boundscheck(False) cpdef unsigned char df(str msg): - """Decode Downlink Format vaule, bits 1 to 5.""" + """Decode Downlink Format value, bits 1 to 5.""" cdef str dfbin = hex2bin(msg[:2]) # return min(bin2int(dfbin[0:5]), 24) cdef long df = bin2int(dfbin[0:5]) diff --git a/pyModeS/decoder/adsb.py b/pyModeS/decoder/adsb.py index 50d13f6..285db62 100644 --- a/pyModeS/decoder/adsb.py +++ b/pyModeS/decoder/adsb.py @@ -109,7 +109,7 @@ def position_with_ref(msg, lat_ref, lon_ref): 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) + The reference position shall be within 180NM (airborne) or 45NM (surface) of the true position. Args: @@ -163,10 +163,10 @@ def velocity(msg, source=False): Args: 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. + If set to True, the function will return six values instead of four. Returns: - int, float, int, string, [string], [string]: Four or six parameters, including: + (int, float, int, string, [string], [string]): Four or six parameters, including: - Speed (kt) - Angle (degree), either ground track or heading - Vertical rate (ft/min) @@ -341,7 +341,7 @@ def nic_v2(msg, NICa, NICbc): Args: msg (str): 28 hexdigits string NICa (int or string): NIC supplement - A - NICbc (int or srting): NIC supplement - B or C + NICbc (int or string): NIC supplement - B or C Returns: int or string: Horizontal Radius of Containment diff --git a/pyModeS/decoder/allcall.py b/pyModeS/decoder/allcall.py index 05ef31c..d5592c8 100644 --- a/pyModeS/decoder/allcall.py +++ b/pyModeS/decoder/allcall.py @@ -1,5 +1,5 @@ """ -Decode all-call reply messages, with dowlink format 11 +Decode all-call reply messages, with downlink format 11 """ from pyModeS import common diff --git a/pyModeS/decoder/bds/bds05.py b/pyModeS/decoder/bds/bds05.py index 2f620b3..31f6ca2 100644 --- a/pyModeS/decoder/bds/bds05.py +++ b/pyModeS/decoder/bds/bds05.py @@ -82,7 +82,7 @@ def airborne_position_with_ref(msg, lat_ref, lon_ref): """Decode airborne position with only one message, knowing reference nearby location, such as previously calculated location, ground station, or airport location, etc. The reference position shall - be with in 180NM of the true position. + be within 180NM of the true position. Args: msg (str): even message (28 hexdigits) diff --git a/pyModeS/decoder/bds/bds06.py b/pyModeS/decoder/bds/bds06.py index 46cee1a..4a9f6a9 100644 --- a/pyModeS/decoder/bds/bds06.py +++ b/pyModeS/decoder/bds/bds06.py @@ -1,7 +1,7 @@ # ------------------------------------------ # BDS 0,6 # ADS-B TC=5-8 -# Surface movment +# Surface movement # ------------------------------------------ from pyModeS import common @@ -86,7 +86,7 @@ def surface_position_with_ref(msg, lat_ref, lon_ref): """Decode surface position with only one message, knowing reference nearby location, such as previously calculated location, ground station, or airport location, etc. The reference position shall - be with in 45NM of the true position. + be within 45NM of the true position. Args: msg (str): even message (28 hexdigits) @@ -133,7 +133,7 @@ def surface_velocity(msg, source=False): Args: 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. + If set to True, the function will return six values instead of four. Returns: int, float, int, string, [string], [string]: Four or six parameters, including: diff --git a/pyModeS/decoder/bds/bds08.py b/pyModeS/decoder/bds/bds08.py index efacab6..b62d909 100644 --- a/pyModeS/decoder/bds/bds08.py +++ b/pyModeS/decoder/bds/bds08.py @@ -1,7 +1,7 @@ # ------------------------------------------ # BDS 0,8 # ADS-B TC=1-4 -# Aircraft identitification and category +# Aircraft identification and category # ------------------------------------------ from pyModeS import common diff --git a/pyModeS/decoder/bds/bds09.py b/pyModeS/decoder/bds/bds09.py index c7302e4..4c4caf9 100644 --- a/pyModeS/decoder/bds/bds09.py +++ b/pyModeS/decoder/bds/bds09.py @@ -16,7 +16,7 @@ def airborne_velocity(msg, source=False): Args: 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. + If set to True, the function will return six values instead of four. Returns: int, float, int, string, [string], [string]: Four or six parameters, including: diff --git a/pyModeS/decoder/bds/bds17.py b/pyModeS/decoder/bds/bds17.py index 80210f1..80e8bbd 100644 --- a/pyModeS/decoder/bds/bds17.py +++ b/pyModeS/decoder/bds/bds17.py @@ -45,7 +45,7 @@ def cap17(msg): msg (str): 28 hexdigits string Returns: - list: list of support BDS codes + list: list of supported BDS codes """ allbds = [ "05", diff --git a/pyModeS/decoder/bds/bds44.py b/pyModeS/decoder/bds/bds44.py index 6bc755a..351f13e 100644 --- a/pyModeS/decoder/bds/bds44.py +++ b/pyModeS/decoder/bds/bds44.py @@ -142,7 +142,7 @@ def hum44(msg): def turb44(msg): - """Turblence. + """Turbulence. Args: msg (str): 28 hexdigits string diff --git a/pyModeS/decoder/bds/bds60.py b/pyModeS/decoder/bds/bds60.py index 5ef19c5..1af3882 100644 --- a/pyModeS/decoder/bds/bds60.py +++ b/pyModeS/decoder/bds/bds60.py @@ -158,7 +158,7 @@ def vr60baro(msg): def vr60ins(msg): - """Vertical rate measurd by onbard equiments (IRS, AHRS) + """Vertical rate measured by onboard equipment (IRS, AHRS) Args: msg (str): 28 hexdigits string diff --git a/pyModeS/py_common.py b/pyModeS/py_common.py index 0b299ee..d44ee61 100644 --- a/pyModeS/py_common.py +++ b/pyModeS/py_common.py @@ -5,14 +5,14 @@ from textwrap import wrap def hex2bin(hexstr: str) -> str: - """Convert a hexdecimal string to binary string, with zero fillings.""" + """Convert a hexadecimal string to binary string, with zero fillings.""" num_of_bits = len(hexstr) * 4 binstr = bin(int(hexstr, 16))[2:].zfill(int(num_of_bits)) return binstr def hex2int(hexstr: str) -> int: - """Convert a hexdecimal string to integer.""" + """Convert a hexadecimal string to integer.""" return int(hexstr, 16) @@ -22,7 +22,7 @@ def bin2int(binstr: str) -> int: def bin2hex(binstr: str) -> str: - """Convert a binary string to hexdecimal string.""" + """Convert a binary string to hexadecimal string.""" return "{0:X}".format(int(binstr, 2))