improve isBDS60 identification
This commit is contained in:
parent
711fd889e6
commit
de6238f5e9
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@
|
|||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
.pytest_cache/
|
||||||
|
|
||||||
# C extensions
|
# C extensions
|
||||||
*.so
|
*.so
|
||||||
|
@ -843,8 +843,13 @@ def isBDS60(msg):
|
|||||||
if mach is not None and mach > 1:
|
if mach is not None and mach > 1:
|
||||||
result &= False
|
result &= False
|
||||||
|
|
||||||
# leave out the check from vertical rates,
|
vr_baro = vr60baro(msg)
|
||||||
# due to very noisy measurement
|
if vr_baro is not None and abs(vr_baro) > 6000:
|
||||||
|
result &= False
|
||||||
|
|
||||||
|
vr_ins = vr60ins(msg)
|
||||||
|
if vr_ins is not None and abs(vr_ins) > 6000:
|
||||||
|
result &= False
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@ -973,7 +978,7 @@ def BDS(msg):
|
|||||||
msg (String): 28 bytes hexadecimal message string
|
msg (String): 28 bytes hexadecimal message string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
String or None: Version: "BDS20", "BDS40", "BDS50", or "BDS60". Or None, if nothing matched
|
String or None: BDS version, or possible versions, or None if nothing matches.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if isnull(msg):
|
if isnull(msg):
|
||||||
@ -996,4 +1001,5 @@ def BDS(msg):
|
|||||||
elif sum(isBDS) == 1:
|
elif sum(isBDS) == 1:
|
||||||
return BDS[isBDS.index(True)]
|
return BDS[isBDS.index(True)]
|
||||||
else:
|
else:
|
||||||
return [bds for (bds, i) in zip(BDS, isBDS) if i]
|
bds_ = [bds for (bds, i) in zip(BDS, isBDS) if i]
|
||||||
|
return ','.join(bds_)
|
||||||
|
2
setup.py
2
setup.py
@ -85,7 +85,7 @@ setup(
|
|||||||
# your project is installed. For an analysis of "install_requires" vs pip's
|
# your project is installed. For an analysis of "install_requires" vs pip's
|
||||||
# requirements files see:
|
# requirements files see:
|
||||||
# https://packaging.python.org/en/latest/requirements.html
|
# https://packaging.python.org/en/latest/requirements.html
|
||||||
install_requires=[''],
|
install_requires=['numpy'],
|
||||||
|
|
||||||
# List additional groups of dependencies here (e.g. development
|
# List additional groups of dependencies here (e.g. development
|
||||||
# dependencies). You can install these using the following syntax,
|
# dependencies). You can install these using the following syntax,
|
||||||
|
Loading…
Reference in New Issue
Block a user