Fix typos

Fixed with the command:
  codespell --write-changes --ignore-words-list hve,vas
codespell is available at https://github.com/lucasdemarchi/codespell
This commit is contained in:
Daniele Forsi 2019-10-31 13:36:26 +01:00
parent ec2721cfdc
commit 489c405de0
16 changed files with 25 additions and 25 deletions

View File

@ -141,7 +141,7 @@ Common functions
pms.hex2bin(str) # Convert hexadecimal string to binary string pms.hex2bin(str) # Convert hexadecimal string to binary string
pms.bin2int(str) # Convert binary string to integer pms.bin2int(str) # Convert binary string to integer
pms.hex2int(str) # Convert hexadecimal string to integer pms.hex2int(str) # Convert hexadecimal string to integer
pms.gray2int(str) # Convert grey code to interger pms.gray2int(str) # Convert grey code to integer
Core functions for ADS-B decoding Core functions for ADS-B decoding

View File

@ -20,7 +20,7 @@ def tell(msg):
_print("Downlink Format", df) _print("Downlink Format", df)
if df == 17: if df == 17:
_print("Protocal", "Mode-S Extended Squitter (ADS-B)") _print("Protocol", "Mode-S Extended Squitter (ADS-B)")
tc = common.typecode(msg) tc = common.typecode(msg)
if 1 <= tc <= 4: # callsign if 1 <= tc <= 4: # callsign
@ -29,7 +29,7 @@ def tell(msg):
_print("Callsign:", callsign) _print("Callsign:", callsign)
if 5 <= tc <= 8: # surface position if 5 <= tc <= 8: # surface position
_print("Type", "Surface postition") _print("Type", "Surface position")
oe = adsb.oe_flag(msg) oe = adsb.oe_flag(msg)
msgbin = common.hex2bin(msg) msgbin = common.hex2bin(msg)
cprlat = common.bin2int(msgbin[54:71]) / 131072.0 cprlat = common.bin2int(msgbin[54:71]) / 131072.0
@ -75,11 +75,11 @@ def tell(msg):
_print("Altitude", alt, "feet") _print("Altitude", alt, "feet")
if df == 20: if df == 20:
_print("Protocal", "Mode-S Comm-B altitude reply") _print("Protocol", "Mode-S Comm-B altitude reply")
_print("Altitude", common.altcode(msg), "feet") _print("Altitude", common.altcode(msg), "feet")
if df == 21: if df == 21:
_print("Protocal", "Mode-S Comm-B identity reply") _print("Protocol", "Mode-S Comm-B identity reply")
_print("Squawk code", common.idcode(msg)) _print("Squawk code", common.idcode(msg))
if df == 20 or df == 21: if df == 20 or df == 21:

View File

@ -96,7 +96,7 @@ def position(msg0, msg1, t0, t1, lat_ref=None, lon_ref=None):
return airborne_position(msg0, msg1, t0, t1) return airborne_position(msg0, msg1, t0, t1)
else: else:
raise RuntimeError("incorrect or inconsistant message types") raise RuntimeError("incorrect or inconsistent message types")
def position_with_ref(msg, lat_ref, lon_ref): def position_with_ref(msg, lat_ref, lon_ref):
@ -125,7 +125,7 @@ def position_with_ref(msg, lat_ref, lon_ref):
return airborne_position_with_ref(msg, lat_ref, lon_ref) return airborne_position_with_ref(msg, lat_ref, lon_ref)
else: else:
raise RuntimeError("incorrect or inconsistant message types") raise RuntimeError("incorrect or inconsistent message types")
def altitude(msg): def altitude(msg):
@ -174,7 +174,7 @@ def velocity(msg, rtn_sources=False):
rate of climb/descent (ft/min), speed type rate of climb/descent (ft/min), speed type
('GS' for ground speed, 'AS' for airspeed), ('GS' for ground speed, 'AS' for airspeed),
direction source ('true_north' for ground track / true north direction source ('true_north' for ground track / true north
as refrence, 'mag_north' for magnetic north as reference), as reference, 'mag_north' for magnetic north as reference),
rate of climb/descent source ('Baro' for barometer, 'GNSS' rate of climb/descent source ('Baro' for barometer, 'GNSS'
for GNSS constellation). for GNSS constellation).
@ -190,7 +190,7 @@ def velocity(msg, rtn_sources=False):
else: else:
raise RuntimeError( raise RuntimeError(
"incorrect or inconsistant message types, expecting 4<TC<9 or TC=19" "incorrect or inconsistent message types, expecting 4<TC<9 or TC=19"
) )
@ -524,7 +524,7 @@ def sil(msg, version):
if tc not in [29, 31]: if tc not in [29, 31]:
raise RuntimeError( raise RuntimeError(
"%s: Not a target state and status messag, \ "%s: Not a target state and status message, \
or operation status message, expecting TC = 29 or 31" or operation status message, expecting TC = 29 or 31"
% msg % msg
) )

View File

@ -125,7 +125,7 @@ def infer(msg, mrar=False):
tc = common.typecode(msg) tc = common.typecode(msg)
if 1 <= tc <= 4: if 1 <= tc <= 4:
return "BDS08" # indentification and category return "BDS08" # identification and category
if 5 <= tc <= 8: if 5 <= tc <= 8:
return "BDS06" # surface movement return "BDS06" # surface movement
if 9 <= tc <= 18: if 9 <= tc <= 18:

View File

@ -175,7 +175,7 @@ def surface_velocity(msg, rtn_sources=False):
else: else:
trk = None trk = None
# ground movment / speed # ground movement / speed
mov = common.bin2int(mb[5:12]) mov = common.bin2int(mb[5:12])
if mov == 0 or mov > 124: if mov == 0 or mov > 124:

View File

@ -41,7 +41,7 @@ def airborne_velocity(msg, rtn_sources=False):
rate of climb/descent (ft/min), speed type rate of climb/descent (ft/min), speed type
('GS' for ground speed, 'AS' for airspeed), ('GS' for ground speed, 'AS' for airspeed),
direction source ('true_north' for ground track / true north direction source ('true_north' for ground track / true north
as refrence, 'mag_north' for magnetic north as reference), as reference, 'mag_north' for magnetic north as reference),
rate of climb/descent source ('Baro' for barometer, 'GNSS' rate of climb/descent source ('Baro' for barometer, 'GNSS'
for GNSS constellation). for GNSS constellation).
""" """

View File

@ -45,7 +45,7 @@ def is10(msg):
if bin2int(d[9:14]) != 0: if bin2int(d[9:14]) != 0:
return False return False
# overlay capabilty conflict # overlay capability conflict
if d[14] == "1" and bin2int(d[16:23]) < 5: if d[14] == "1" and bin2int(d[16:23]) < 5:
return False return False
if d[14] == "0" and bin2int(d[16:23]) > 4: if d[14] == "0" and bin2int(d[16:23]) > 4:

View File

@ -63,7 +63,7 @@ def cap17(msg):
msg (String): 28 bytes hexadecimal message string msg (String): 28 bytes hexadecimal message string
Returns: Returns:
list: list of suport BDS codes list: list of support BDS codes
""" """
allbds = [ allbds = [
"05", "05",

View File

@ -97,7 +97,7 @@ def temp44(msg):
Returns: Returns:
float, float: temperature and alternative temperature in Celsius degree. float, float: temperature and alternative temperature in Celsius degree.
Note: Two values returns due to what seems to be an inconsistancy Note: Two values returns due to what seems to be an inconsistency
error in ICAO 9871 (2008) Appendix A-67. error in ICAO 9871 (2008) Appendix A-67.
""" """

View File

@ -165,7 +165,7 @@ def vr60baro(msg):
def vr60ins(msg): def vr60ins(msg):
"""Vertical rate messured by onbard equiments (IRS, AHRS) """Vertical rate measurd by onbard equiments (IRS, AHRS)
Args: Args:
msg (String): 28 bytes hexadecimal message (BDS60) string msg (String): 28 bytes hexadecimal message (BDS60) string

View File

@ -42,7 +42,7 @@ def np2bin(npbin):
def df(msg): def df(msg):
"""Decode Downlink Format vaule, bits 1 to 5.""" """Decode Downlink Format value, bits 1 to 5."""
dfbin = hex2bin(msg[:2]) dfbin = hex2bin(msg[:2])
return min(bin2int(dfbin[0:5]), 24) return min(bin2int(dfbin[0:5]), 24)

View File

@ -9,9 +9,9 @@ International Standard Atmosphere
p,rho,T = atmos(H) # atmos as function of geopotential altitude H [m] p,rho,T = atmos(H) # atmos as function of geopotential altitude H [m]
a = vsound(H) # speed of sound [m/s] as function of H[m] a = vsound(H) # speed of sound [m/s] as function of H[m]
p = pressure(H) # calls atmos but retruns only pressure [Pa] p = pressure(H) # calls atmos but returns only pressure [Pa]
T = temperature(H) # calculates temperature [K] T = temperature(H) # calculates temperature [K]
rho = density(H) # calls atmos but retruns only pressure [Pa] rho = density(H) # calls atmos but returns only pressure [Pa]
Speed conversion at altitude H[m] in ISA Speed conversion at altitude H[m] in ISA
:: ::

View File

@ -170,7 +170,7 @@ class TcpClient(object):
Start character '$' Start character '$'
MS field - Payload MS field - Payload
Postion 1 through 14: Position 1 through 14:
14 bytes = 112 bits 14 bytes = 112 bits
Mode-S payload Mode-S payload
In case of DF types that only carry 7 bytes of information In case of DF types that only carry 7 bytes of information

View File

@ -27,7 +27,7 @@ class Decode:
self.dumpto = None self.dumpto = None
def process_raw(self, adsb_ts, adsb_msg, commb_ts, commb_msg, tnow=None): def process_raw(self, adsb_ts, adsb_msg, commb_ts, commb_msg, tnow=None):
"""process a chunk of adsb and commb messages recieved in the same """process a chunk of adsb and commb messages received in the same
time period. time period.
""" """
if tnow is None: if tnow is None:
@ -259,7 +259,7 @@ class Decode:
return return
def get_aircraft(self): def get_aircraft(self):
"""all aircraft that are stored in memeory""" """all aircraft that are stored in memory"""
acs = self.acs acs = self.acs
return acs return acs

View File

@ -71,7 +71,7 @@ elif SOURCE == "net":
else: else:
SERVER, PORT, DATATYPE = args.connect SERVER, PORT, DATATYPE = args.connect
if DATATYPE not in support_rawtypes: if DATATYPE not in support_rawtypes:
print("Data type not supported, avaiable ones are %s" % support_rawtypes) print("Data type not supported, available ones are %s" % support_rawtypes)
else: else:
print('Source must be "rtlsdr" or "net".') print('Source must be "rtlsdr" or "net".')

View File

@ -4,7 +4,7 @@ See:
https://packaging.python.org/en/latest/distributing.html https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject https://github.com/pypa/sampleproject
Steps for deploying a new verison: Steps for deploying a new version:
1. Increase the version number 1. Increase the version number
2. remove the old deployment under [dist] and [build] folder 2. remove the old deployment under [dist] and [build] folder
3. run: python setup.py sdist 3. run: python setup.py sdist