Merge branch 'master' into adsb_encoder
This commit is contained in:
commit
59d21de725
74
README.rst
74
README.rst
@ -1,6 +1,42 @@
|
|||||||
The Python ADS-B/Mode-S Decoder
|
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.
|
||||||
|
|
||||||
|
This is a project created by Junzi Sun, who works at `TU Delft <https://www.tudelft.nl/en/>`_, `Aerospace Engineering Faculty <https://www.tudelft.nl/en/ae/>`_, `CNS/ATM research group <http://cs.lr.tudelft.nl/atm/>`_. It is supported by many `contributors <https://github.com/junzis/pyModeS/graphs/contributors>`_ from different institutions.
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
------------
|
||||||
|
|
||||||
|
pyModeS supports the decoding of following types of messages:
|
||||||
|
|
||||||
|
- DF4 / DF20: Altitude code
|
||||||
|
- DF5 / DF21: Identity code (squawk code)
|
||||||
|
|
||||||
|
- DF17 / DF18: Automatic Dependent Surveillance-Broadcast (ADS-B)
|
||||||
|
|
||||||
|
- TC=1-4 / BDS 0,8: Aircraft identification and category
|
||||||
|
- TC=5-8 / BDS 0,6: Surface position
|
||||||
|
- TC=9-18 / BDS 0,5: Airborne position
|
||||||
|
- TC=19 / BDS 0,9: Airborne velocity
|
||||||
|
- TC=28 / BDS 6,1: Airborne status [to be implemented]
|
||||||
|
- TC=29 / BDS 6,2: Target state and status information [to be implemented]
|
||||||
|
- TC=31 / BDS 6,5: Aircraft operational status [to be implemented]
|
||||||
|
|
||||||
|
- DF20 / DF21: Mode-S Comm-B messages
|
||||||
|
|
||||||
|
- BDS 1,0: Data link capability report
|
||||||
|
- BDS 1,7: Common usage GICB capability report
|
||||||
|
- BDS 2,0: Aircraft identification
|
||||||
|
- BDS 3,0: ACAS active resolution advisory
|
||||||
|
- BDS 4,0: Selected vertical intention
|
||||||
|
- BDS 4,4: Meteorological routine air report (experimental)
|
||||||
|
- BDS 4,5: Meteorological hazard report (experimental)
|
||||||
|
- BDS 5,0: Track and turn report
|
||||||
|
- BDS 6,0: Heading and speed report
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If you find this project useful for your research, please considering cite this tool as::
|
If you find this project useful for your research, please considering cite this tool as::
|
||||||
|
|
||||||
@article{sun2019pymodes,
|
@article{sun2019pymodes,
|
||||||
@ -14,40 +50,6 @@ If you find this project useful for your research, please considering cite this
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Introduction
|
|
||||||
---------------------
|
|
||||||
PyModeS is a Python library designed to decode Mode-S (including ADS-B) message. It can be imported to your python project or be used as a standalone tool to view and save live traffic data.
|
|
||||||
|
|
||||||
Messages with following Downlink Formats (DF) are supported:
|
|
||||||
|
|
||||||
**DF17 / DF18: Automatic Dependent Surveillance-Broadcast (ADS-B)**
|
|
||||||
|
|
||||||
- TC=1-4 / BDS 0,8: Aircraft identification and category
|
|
||||||
- TC=5-8 / BDS 0,6: Surface position
|
|
||||||
- TC=9-18 / BDS 0,5: Airborne position
|
|
||||||
- TC=19 / BDS 0,9: Airborne velocity
|
|
||||||
- TC=28 / BDS 6,1: Airborne status [to be implemented]
|
|
||||||
- TC=29 / BDS 6,2: Target state and status information [to be implemented]
|
|
||||||
- TC=31 / BDS 6,5: Aircraft operational status [to be implemented]
|
|
||||||
|
|
||||||
|
|
||||||
**DF20 / DF21: Mode-S Comm-B replies**
|
|
||||||
|
|
||||||
- BDS 1,0: Data link capability report
|
|
||||||
- BDS 1,7: Common usage GICB capability report
|
|
||||||
- BDS 2,0: Aircraft identification
|
|
||||||
- BDS 3,0: ACAS active resolution advisory
|
|
||||||
- BDS 4,0: Selected vertical intention
|
|
||||||
- BDS 4,4: Meteorological routine air report (experimental)
|
|
||||||
- BDS 4,5: Meteorological hazard report (experimental)
|
|
||||||
- BDS 5,0: Track and turn report
|
|
||||||
- BDS 6,0: Heading and speed report
|
|
||||||
|
|
||||||
|
|
||||||
**DF4 / DF20: Altitude code**
|
|
||||||
|
|
||||||
**DF5 / DF21: Identity code (squawk code)**
|
|
||||||
|
|
||||||
|
|
||||||
Resources
|
Resources
|
||||||
-----------
|
-----------
|
||||||
@ -55,10 +57,10 @@ Check out and contribute to this open-source project at:
|
|||||||
https://github.com/junzis/pyModeS
|
https://github.com/junzis/pyModeS
|
||||||
|
|
||||||
Detailed manual on Mode-S decoding is published at:
|
Detailed manual on Mode-S decoding is published at:
|
||||||
https://mode-s.org/decode.
|
https://mode-s.org/decode
|
||||||
|
|
||||||
The API documentation of pyModeS is at:
|
The API documentation of pyModeS is at:
|
||||||
http://pymodes.readthedocs.io
|
https://mode-s.org/api
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,5 +17,5 @@ help:
|
|||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
%: Makefile
|
%: Makefile
|
||||||
rm -f source/pyModeS*.rst source/modules.rst
|
rm -f source/pyModeS*.rst source/modules.rst
|
||||||
sphinx-apidoc -f -e -M -o source/ ../pyModeS
|
sphinx-apidoc -f -e -M -o source/ ../pyModeS ../pyModeS/decoder/ehs.py ../pyModeS/decoder/els.py ../pyModeS/streamer ../pyModeS/extra
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
17
doc/source/_templates/layout.html
Normal file
17
doc/source/_templates/layout.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{% extends "!layout.html" %}
|
||||||
|
|
||||||
|
{% block footer %}
|
||||||
|
{{ super() }}
|
||||||
|
|
||||||
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-74700456-1"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'UA-74700456-1');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -14,19 +14,20 @@
|
|||||||
#
|
#
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
sys.path.insert(0, os.path.abspath('../..'))
|
|
||||||
|
sys.path.insert(0, os.path.abspath("../.."))
|
||||||
|
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
project = 'pyModeS'
|
project = "pyModeS"
|
||||||
copyright = '2019, Junzi Sun'
|
copyright = "2019, Junzi Sun"
|
||||||
author = 'Junzi Sun'
|
author = "Junzi Sun"
|
||||||
|
|
||||||
# The short X.Y version
|
# The short X.Y version
|
||||||
version = ''
|
version = ""
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = ''
|
release = ""
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
@ -39,26 +40,24 @@ release = ''
|
|||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
# ones.
|
# ones.
|
||||||
extensions = [
|
extensions = [
|
||||||
'sphinx.ext.autodoc',
|
"sphinx.ext.autodoc",
|
||||||
'sphinx.ext.todo',
|
"sphinx.ext.mathjax",
|
||||||
'sphinx.ext.coverage',
|
"sphinx.ext.viewcode",
|
||||||
'sphinx.ext.mathjax',
|
"sphinx.ext.githubpages",
|
||||||
'sphinx.ext.viewcode',
|
"sphinx.ext.napoleon",
|
||||||
'sphinx.ext.githubpages',
|
|
||||||
'sphinx.ext.napoleon',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
# templates_path = ['']
|
templates_path = ["_templates"]
|
||||||
|
|
||||||
# The suffix(es) of source filenames.
|
# The suffix(es) of source filenames.
|
||||||
# You can specify multiple suffix as a list of string:
|
# You can specify multiple suffix as a list of string:
|
||||||
#
|
#
|
||||||
# source_suffix = ['.rst', '.md']
|
# source_suffix = ['.rst', '.md']
|
||||||
source_suffix = '.rst'
|
source_suffix = ".rst"
|
||||||
|
|
||||||
# The master toctree document.
|
# The master toctree document.
|
||||||
master_doc = 'index'
|
master_doc = "index"
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
@ -82,6 +81,10 @@ pygments_style = None
|
|||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
#
|
#
|
||||||
# html_theme = 'alabaster'
|
# html_theme = 'alabaster'
|
||||||
|
html_theme = "neo_rtd_theme"
|
||||||
|
import sphinx_theme
|
||||||
|
|
||||||
|
html_theme_path = [sphinx_theme.get_html_theme_path()]
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
# Theme options are theme-specific and customize the look and feel of a theme
|
||||||
# further. For a list of options available for each theme, see the
|
# further. For a list of options available for each theme, see the
|
||||||
@ -108,7 +111,7 @@ pygments_style = None
|
|||||||
# -- Options for HTMLHelp output ---------------------------------------------
|
# -- Options for HTMLHelp output ---------------------------------------------
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
# Output file base name for HTML help builder.
|
||||||
htmlhelp_basename = 'pyModeSdoc'
|
htmlhelp_basename = "pyModeSdoc"
|
||||||
|
|
||||||
|
|
||||||
# -- Options for LaTeX output ------------------------------------------------
|
# -- Options for LaTeX output ------------------------------------------------
|
||||||
@ -117,15 +120,12 @@ latex_elements = {
|
|||||||
# The paper size ('letterpaper' or 'a4paper').
|
# The paper size ('letterpaper' or 'a4paper').
|
||||||
#
|
#
|
||||||
# 'papersize': 'letterpaper',
|
# 'papersize': 'letterpaper',
|
||||||
|
|
||||||
# The font size ('10pt', '11pt' or '12pt').
|
# The font size ('10pt', '11pt' or '12pt').
|
||||||
#
|
#
|
||||||
# 'pointsize': '10pt',
|
# 'pointsize': '10pt',
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
# Additional stuff for the LaTeX preamble.
|
||||||
#
|
#
|
||||||
# 'preamble': '',
|
# 'preamble': '',
|
||||||
|
|
||||||
# Latex figure (float) alignment
|
# Latex figure (float) alignment
|
||||||
#
|
#
|
||||||
# 'figure_align': 'htbp',
|
# 'figure_align': 'htbp',
|
||||||
@ -135,8 +135,7 @@ latex_elements = {
|
|||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
(master_doc, 'pyModeS.tex', 'pyModeS Documentation',
|
(master_doc, "pyModeS.tex", "pyModeS Documentation", "Junzi Sun", "manual")
|
||||||
'Junzi Sun', 'manual'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -144,10 +143,7 @@ latex_documents = [
|
|||||||
|
|
||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [(master_doc, "pymodes", "pyModeS Documentation", [author], 1)]
|
||||||
(master_doc, 'pymodes', 'pyModeS Documentation',
|
|
||||||
[author], 1)
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Texinfo output ----------------------------------------------
|
# -- Options for Texinfo output ----------------------------------------------
|
||||||
@ -156,9 +152,15 @@ man_pages = [
|
|||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [
|
||||||
(master_doc, 'pyModeS', 'pyModeS Documentation',
|
(
|
||||||
author, 'pyModeS', 'One line description of project.',
|
master_doc,
|
||||||
'Miscellaneous'),
|
"pyModeS",
|
||||||
|
"pyModeS Documentation",
|
||||||
|
author,
|
||||||
|
"pyModeS",
|
||||||
|
"One line description of project.",
|
||||||
|
"Miscellaneous",
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -177,7 +179,7 @@ epub_title = project
|
|||||||
# epub_uid = ''
|
# epub_uid = ''
|
||||||
|
|
||||||
# A list of files that should not be packed into the epub file.
|
# A list of files that should not be packed into the epub file.
|
||||||
epub_exclude_files = ['search.html']
|
epub_exclude_files = ["search.html"]
|
||||||
|
|
||||||
|
|
||||||
# -- Extension configuration -------------------------------------------------
|
# -- Extension configuration -------------------------------------------------
|
||||||
|
@ -9,11 +9,49 @@ Welcome to pyModeS documentation!
|
|||||||
The source code can be found at: https://github.com/junzis/pyModeS
|
The source code can be found at: https://github.com/junzis/pyModeS
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 3
|
:caption: Core modules
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
pyModeS.decoder.adsb
|
||||||
|
pyModeS.decoder.commb
|
||||||
|
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:caption: ADS-B messages
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
pyModeS.decoder.bds.bds05
|
||||||
|
pyModeS.decoder.bds.bds06
|
||||||
|
pyModeS.decoder.bds.bds08
|
||||||
|
pyModeS.decoder.bds.bds09
|
||||||
|
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:caption: ELS - elementary surveillance
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
pyModeS.decoder.bds.bds10
|
||||||
|
pyModeS.decoder.bds.bds17
|
||||||
|
pyModeS.decoder.bds.bds20
|
||||||
|
pyModeS.decoder.bds.bds30
|
||||||
|
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:caption: EHS - enhanced surveillance
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
pyModeS.decoder.bds.bds40
|
||||||
|
pyModeS.decoder.bds.bds50
|
||||||
|
pyModeS.decoder.bds.bds60
|
||||||
|
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:caption: MRAR / MHR
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
pyModeS.decoder.bds.bds44
|
||||||
|
pyModeS.decoder.bds.bds45
|
||||||
|
|
||||||
pyModeS.decoder
|
|
||||||
pyModeS.streamer
|
|
||||||
pyModeS.extra
|
|
||||||
|
|
||||||
|
|
||||||
----
|
----
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
@ECHO OFF
|
|
||||||
|
|
||||||
pushd %~dp0
|
|
||||||
|
|
||||||
REM Command file for Sphinx documentation
|
|
||||||
|
|
||||||
if "%SPHINXBUILD%" == "" (
|
|
||||||
set SPHINXBUILD=sphinx-build
|
|
||||||
)
|
|
||||||
set SOURCEDIR=.
|
|
||||||
set BUILDDIR=_build
|
|
||||||
|
|
||||||
if "%1" == "" goto help
|
|
||||||
|
|
||||||
%SPHINXBUILD% >NUL 2>NUL
|
|
||||||
if errorlevel 9009 (
|
|
||||||
echo.
|
|
||||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
|
||||||
echo.installed, then set the SPHINXBUILD environment variable to point
|
|
||||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
|
||||||
echo.may add the Sphinx directory to PATH.
|
|
||||||
echo.
|
|
||||||
echo.If you don't have Sphinx installed, grab it from
|
|
||||||
echo.http://sphinx-doc.org/
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
|
||||||
goto end
|
|
||||||
|
|
||||||
:help
|
|
||||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
|
||||||
|
|
||||||
:end
|
|
||||||
popd
|
|
7
doc/source/pyModeS.c_common.rst
Normal file
7
doc/source/pyModeS.c_common.rst
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
pyModeS.c\_common module
|
||||||
|
========================
|
||||||
|
|
||||||
|
.. automodule:: pyModeS.c_common
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
7
doc/source/pyModeS.common.rst
Normal file
7
doc/source/pyModeS.common.rst
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
pyModeS.common module
|
||||||
|
=====================
|
||||||
|
|
||||||
|
.. automodule:: pyModeS.common
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
@ -2,6 +2,6 @@ pyModeS.decoder.acas module
|
|||||||
===========================
|
===========================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.acas
|
.. automodule:: pyModeS.decoder.acas
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.adsb module
|
|||||||
===========================
|
===========================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.adsb
|
.. automodule:: pyModeS.decoder.adsb
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.allcall module
|
|||||||
==============================
|
==============================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.allcall
|
.. automodule:: pyModeS.decoder.allcall
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds05 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds05
|
.. automodule:: pyModeS.decoder.bds.bds05
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds06 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds06
|
.. automodule:: pyModeS.decoder.bds.bds06
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds08 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds08
|
.. automodule:: pyModeS.decoder.bds.bds08
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds09 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds09
|
.. automodule:: pyModeS.decoder.bds.bds09
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds10 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds10
|
.. automodule:: pyModeS.decoder.bds.bds10
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds17 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds17
|
.. automodule:: pyModeS.decoder.bds.bds17
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds20 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds20
|
.. automodule:: pyModeS.decoder.bds.bds20
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds30 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds30
|
.. automodule:: pyModeS.decoder.bds.bds30
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds40 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds40
|
.. automodule:: pyModeS.decoder.bds.bds40
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds44 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds44
|
.. automodule:: pyModeS.decoder.bds.bds44
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds45 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds45
|
.. automodule:: pyModeS.decoder.bds.bds45
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds50 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds50
|
.. automodule:: pyModeS.decoder.bds.bds50
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds53 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds53
|
.. automodule:: pyModeS.decoder.bds.bds53
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.bds.bds60 module
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds.bds60
|
.. automodule:: pyModeS.decoder.bds.bds60
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,14 +2,15 @@ pyModeS.decoder.bds package
|
|||||||
===========================
|
===========================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.bds
|
.. automodule:: pyModeS.decoder.bds
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
|
||||||
Submodules
|
Submodules
|
||||||
----------
|
----------
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
:maxdepth: 4
|
||||||
|
|
||||||
pyModeS.decoder.bds.bds05
|
pyModeS.decoder.bds.bds05
|
||||||
pyModeS.decoder.bds.bds06
|
pyModeS.decoder.bds.bds06
|
||||||
@ -25,4 +26,3 @@ Submodules
|
|||||||
pyModeS.decoder.bds.bds50
|
pyModeS.decoder.bds.bds50
|
||||||
pyModeS.decoder.bds.bds53
|
pyModeS.decoder.bds.bds53
|
||||||
pyModeS.decoder.bds.bds60
|
pyModeS.decoder.bds.bds60
|
||||||
|
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.commb module
|
|||||||
============================
|
============================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.commb
|
.. automodule:: pyModeS.decoder.commb
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
pyModeS.decoder.common module
|
|
||||||
=============================
|
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.common
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
@ -1,7 +0,0 @@
|
|||||||
pyModeS.decoder.ehs module
|
|
||||||
==========================
|
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.ehs
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
@ -1,7 +0,0 @@
|
|||||||
pyModeS.decoder.els module
|
|
||||||
==========================
|
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.els
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
@ -2,29 +2,28 @@ pyModeS.decoder package
|
|||||||
=======================
|
=======================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder
|
.. automodule:: pyModeS.decoder
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
|
||||||
Subpackages
|
Subpackages
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
:maxdepth: 4
|
||||||
|
|
||||||
pyModeS.decoder.bds
|
pyModeS.decoder.bds
|
||||||
|
|
||||||
Submodules
|
Submodules
|
||||||
----------
|
----------
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
:maxdepth: 4
|
||||||
|
|
||||||
pyModeS.decoder.acas
|
pyModeS.decoder.acas
|
||||||
pyModeS.decoder.adsb
|
pyModeS.decoder.adsb
|
||||||
pyModeS.decoder.allcall
|
pyModeS.decoder.allcall
|
||||||
pyModeS.decoder.commb
|
pyModeS.decoder.commb
|
||||||
pyModeS.decoder.common
|
|
||||||
pyModeS.decoder.ehs
|
|
||||||
pyModeS.decoder.els
|
|
||||||
pyModeS.decoder.surv
|
pyModeS.decoder.surv
|
||||||
pyModeS.decoder.uncertainty
|
pyModeS.decoder.uncertainty
|
||||||
|
pyModeS.decoder.uplink
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.surv module
|
|||||||
===========================
|
===========================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.surv
|
.. automodule:: pyModeS.decoder.surv
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
@ -2,6 +2,6 @@ pyModeS.decoder.uncertainty module
|
|||||||
==================================
|
==================================
|
||||||
|
|
||||||
.. automodule:: pyModeS.decoder.uncertainty
|
.. automodule:: pyModeS.decoder.uncertainty
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
7
doc/source/pyModeS.decoder.uplink.rst
Normal file
7
doc/source/pyModeS.decoder.uplink.rst
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
pyModeS.decoder.uplink module
|
||||||
|
=============================
|
||||||
|
|
||||||
|
.. automodule:: pyModeS.decoder.uplink
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
@ -1,7 +0,0 @@
|
|||||||
pyModeS.extra.aero module
|
|
||||||
=========================
|
|
||||||
|
|
||||||
.. automodule:: pyModeS.extra.aero
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
@ -1,16 +0,0 @@
|
|||||||
pyModeS.extra package
|
|
||||||
=====================
|
|
||||||
|
|
||||||
.. automodule:: pyModeS.extra
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
|
||||||
Submodules
|
|
||||||
----------
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
|
|
||||||
pyModeS.extra.aero
|
|
||||||
pyModeS.extra.tcpclient
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
|||||||
pyModeS.extra.tcpclient module
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. automodule:: pyModeS.extra.tcpclient
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
@ -2,16 +2,23 @@ pyModeS package
|
|||||||
===============
|
===============
|
||||||
|
|
||||||
.. automodule:: pyModeS
|
.. automodule:: pyModeS
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
|
||||||
Subpackages
|
Subpackages
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
:maxdepth: 4
|
||||||
|
|
||||||
pyModeS.decoder
|
pyModeS.decoder
|
||||||
pyModeS.extra
|
|
||||||
pyModeS.streamer
|
|
||||||
|
|
||||||
|
Submodules
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 4
|
||||||
|
|
||||||
|
pyModeS.c_common
|
||||||
|
pyModeS.common
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
pyModeS.streamer package
|
|
||||||
========================
|
|
||||||
|
|
||||||
.. automodule:: pyModeS.streamer
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
|
||||||
Submodules
|
|
||||||
----------
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
|
|
||||||
pyModeS.streamer.screen
|
|
||||||
pyModeS.streamer.stream
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
|||||||
pyModeS.streamer.screen module
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. automodule:: pyModeS.streamer.screen
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
@ -1,7 +0,0 @@
|
|||||||
pyModeS.streamer.stream module
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. automodule:: pyModeS.streamer.stream
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
0
doc/warnings
Normal file
0
doc/warnings
Normal file
@ -15,8 +15,6 @@ from .decoder import bds
|
|||||||
from .extra import aero
|
from .extra import aero
|
||||||
from .extra import tcpclient
|
from .extra import tcpclient
|
||||||
|
|
||||||
from .encoder import encode_adsb
|
|
||||||
|
|
||||||
|
|
||||||
warnings.simplefilter("once", DeprecationWarning)
|
warnings.simplefilter("once", DeprecationWarning)
|
||||||
|
|
||||||
|
@ -1,15 +1,11 @@
|
|||||||
"""ADS-B Wrapper.
|
"""ADS-B module.
|
||||||
|
|
||||||
The ADS-B wrapper also imports functions from the following modules:
|
The ADS-B module also imports functions from the following modules:
|
||||||
|
|
||||||
- pyModeS.decoder.bds.bds05
|
- pyModeS.decoder.bds.bds05: ``airborne_position()``, ``airborne_position_with_ref()``, ``altitude()``
|
||||||
Functions: ``airborne_position``, ``airborne_position_with_ref``, ``altitude``
|
- pyModeS.decoder.bds.bds06: ``surface_position()``, ``surface_position_with_ref()``, ``surface_velocity()``
|
||||||
- pyModeS.decoder.bds.bds06
|
- pyModeS.decoder.bds.bds08: ``category()``, ``callsign()``
|
||||||
Functions: ``surface_position``, ``surface_position_with_ref``, ``surface_velocity``
|
- pyModeS.decoder.bds.bds09: ``airborne_velocity()``, ``altitude_diff()``
|
||||||
- pyModeS.decoder.bds.bds08
|
|
||||||
Functions: ``category``, ``callsign``
|
|
||||||
- pyModeS.decoder.bds.bds09
|
|
||||||
Functions: ``airborne_velocity``, ``altitude_diff``
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -47,27 +43,32 @@ def typecode(msg):
|
|||||||
|
|
||||||
|
|
||||||
def position(msg0, msg1, t0, t1, lat_ref=None, lon_ref=None):
|
def position(msg0, msg1, t0, t1, lat_ref=None, lon_ref=None):
|
||||||
"""Decode position from a pair of even and odd position message
|
"""Decode surface or airborne position from a pair of even and odd
|
||||||
(works with both airborne and surface position messages)
|
position messages.
|
||||||
|
|
||||||
|
Note, that to decode surface position using the position message pair,
|
||||||
|
the reference position has to be provided.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg0 (string): even message (28 hexdigits)
|
msg0 (string): even message (28 hexdigits)
|
||||||
msg1 (string): odd message (28 hexdigits)
|
msg1 (string): odd message (28 hexdigits)
|
||||||
t0 (int): timestamps for the even message
|
t0 (int): timestamps for the even message
|
||||||
t1 (int): timestamps for the odd message
|
t1 (int): timestamps for the odd message
|
||||||
|
lat_ref (float): latitude of reference position
|
||||||
|
lon_ref (float): longitude of reference position
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(float, float): (latitude, longitude) of the aircraft
|
(float, float): (latitude, longitude) of the aircraft
|
||||||
|
|
||||||
"""
|
"""
|
||||||
tc0 = typecode(msg0)
|
tc0 = typecode(msg0)
|
||||||
tc1 = typecode(msg1)
|
tc1 = typecode(msg1)
|
||||||
|
|
||||||
if 5 <= tc0 <= 8 and 5 <= tc1 <= 8:
|
if 5 <= tc0 <= 8 and 5 <= tc1 <= 8:
|
||||||
if (not lat_ref) or (not lon_ref):
|
if lat_ref is None or lon_ref is None:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"Surface position encountered, a reference \
|
"Surface position encountered, a reference position"
|
||||||
position lat/lon required. Location of \
|
" lat/lon required. Location of receiver can be used."
|
||||||
receiver can be used."
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return surface_position(msg0, msg1, t0, t1, lat_ref, lon_ref)
|
return surface_position(msg0, msg1, t0, t1, lat_ref, lon_ref)
|
||||||
@ -81,19 +82,20 @@ 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 inconsistent 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):
|
||||||
"""Decode position with only one message,
|
"""Decode position with only one message.
|
||||||
knowing reference nearby location, such as previously
|
|
||||||
calculated location, ground station, or airport location, etc.
|
A reference position is required, which can be previously
|
||||||
Works with both airborne and surface position messages.
|
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 with in 180NM (airborne) or 45NM (surface)
|
||||||
of the true position.
|
of the true position.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): even message (28 hexdigits)
|
msg (str): even message (28 hexdigits)
|
||||||
lat_ref: previous known latitude
|
lat_ref: previous known latitude
|
||||||
lon_ref: previous known longitude
|
lon_ref: previous known longitude
|
||||||
|
|
||||||
@ -114,15 +116,15 @@ def position_with_ref(msg, lat_ref, lon_ref):
|
|||||||
|
|
||||||
|
|
||||||
def altitude(msg):
|
def altitude(msg):
|
||||||
"""Decode aircraft altitude
|
"""Decode aircraft altitude.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: altitude in feet
|
int: altitude in feet
|
||||||
"""
|
|
||||||
|
|
||||||
|
"""
|
||||||
tc = typecode(msg)
|
tc = typecode(msg)
|
||||||
|
|
||||||
if tc < 5 or tc == 19 or tc > 22:
|
if tc < 5 or tc == 19 or tc > 22:
|
||||||
@ -137,36 +139,31 @@ def altitude(msg):
|
|||||||
return altitude05(msg)
|
return altitude05(msg)
|
||||||
|
|
||||||
|
|
||||||
def velocity(msg, rtn_sources=False):
|
def velocity(msg, source=False):
|
||||||
"""Calculate the speed, heading, and vertical rate
|
"""Calculate the speed, heading, and vertical rate (handles both airborne or surface message).
|
||||||
(handles both airborne or surface message)
|
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
rtn_source (boolean): If the function will return
|
source (boolean): Include direction and vertical rate sources in return. Default to False.
|
||||||
the sources for direction of travel and vertical
|
If set to True, the function will return six value instead of four.
|
||||||
rate. This will change the return value from a four
|
|
||||||
element array to a six element array.
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(int, float, int, string, string, string): speed (kt),
|
int, float, int, string, [string], [string]: Four or six parameters, including:
|
||||||
ground track or heading (degree),
|
- Speed (kt)
|
||||||
rate of climb/descent (ft/min), speed type
|
- Angle (degree), either ground track or heading
|
||||||
('GS' for ground speed, 'AS' for airspeed),
|
- Vertical rate (ft/min)
|
||||||
direction source ('true_north' for ground track / true north
|
- Speed type ('GS' for ground speed, 'AS' for airspeed)
|
||||||
as reference, 'mag_north' for magnetic north as reference),
|
- [Optional] Direction source ('TRUE_NORTH' or 'MAGENTIC_NORTH')
|
||||||
rate of climb/descent source ('Baro' for barometer, 'GNSS'
|
- [Optional] Vertical rate source ('BARO' or 'GNSS')
|
||||||
for GNSS constellation).
|
|
||||||
|
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:
|
if 5 <= typecode(msg) <= 8:
|
||||||
return surface_velocity(msg, rtn_sources)
|
return surface_velocity(msg, source)
|
||||||
|
|
||||||
elif typecode(msg) == 19:
|
elif typecode(msg) == 19:
|
||||||
return airborne_velocity(msg, rtn_sources)
|
return airborne_velocity(msg, source)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
@ -179,7 +176,7 @@ def speed_heading(msg):
|
|||||||
(handles both airborne or surface message)
|
(handles both airborne or surface message)
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(int, float): speed (kt), ground track or heading (degree)
|
(int, float): speed (kt), ground track or heading (degree)
|
||||||
@ -191,7 +188,7 @@ def speed_heading(msg):
|
|||||||
def oe_flag(msg):
|
def oe_flag(msg):
|
||||||
"""Check the odd/even flag. Bit 54, 0 for even, 1 for odd.
|
"""Check the odd/even flag. Bit 54, 0 for even, 1 for odd.
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
Returns:
|
Returns:
|
||||||
int: 0 or 1, for even or odd frame
|
int: 0 or 1, for even or odd frame
|
||||||
"""
|
"""
|
||||||
@ -203,7 +200,7 @@ def version(msg):
|
|||||||
"""ADS-B Version
|
"""ADS-B Version
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string, TC = 31
|
msg (str): 28 hexdigits string, TC = 31
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: version number
|
int: version number
|
||||||
@ -225,7 +222,7 @@ def nuc_p(msg):
|
|||||||
"""Calculate NUCp, Navigation Uncertainty Category - Position (ADS-B version 1)
|
"""Calculate NUCp, Navigation Uncertainty Category - Position (ADS-B version 1)
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string,
|
msg (str): 28 hexdigits string,
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: Horizontal Protection Limit
|
int: Horizontal Protection Limit
|
||||||
@ -261,7 +258,7 @@ def nuc_v(msg):
|
|||||||
"""Calculate NUCv, Navigation Uncertainty Category - Velocity (ADS-B version 1)
|
"""Calculate NUCv, Navigation Uncertainty Category - Velocity (ADS-B version 1)
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string,
|
msg (str): 28 hexdigits string,
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int or string: 95% Horizontal Velocity Error
|
int or string: 95% Horizontal Velocity Error
|
||||||
@ -290,7 +287,7 @@ def nic_v1(msg, NICs):
|
|||||||
"""Calculate NIC, navigation integrity category, for ADS-B version 1
|
"""Calculate NIC, navigation integrity category, for ADS-B version 1
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
NICs (int or string): NIC supplement
|
NICs (int or string): NIC supplement
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -324,7 +321,7 @@ def nic_v2(msg, NICa, NICbc):
|
|||||||
"""Calculate NIC, navigation integrity category, for ADS-B version 2
|
"""Calculate NIC, navigation integrity category, for ADS-B version 2
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
NICa (int or string): NIC supplement - A
|
NICa (int or string): NIC supplement - A
|
||||||
NICbc (int or srting): NIC supplement - B or C
|
NICbc (int or srting): NIC supplement - B or C
|
||||||
|
|
||||||
@ -362,7 +359,7 @@ def nic_s(msg):
|
|||||||
"""Obtain NIC supplement bit, TC=31 message
|
"""Obtain NIC supplement bit, TC=31 message
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: NICs number (0 or 1)
|
int: NICs number (0 or 1)
|
||||||
@ -384,7 +381,7 @@ def nic_a_c(msg):
|
|||||||
"""Obtain NICa/c, navigation integrity category supplements a and c
|
"""Obtain NICa/c, navigation integrity category supplements a and c
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(int, int): NICa and NICc number (0 or 1)
|
(int, int): NICa and NICc number (0 or 1)
|
||||||
@ -407,7 +404,7 @@ def nic_b(msg):
|
|||||||
"""Obtain NICb, navigation integrity category supplement-b
|
"""Obtain NICb, navigation integrity category supplement-b
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: NICb number (0 or 1)
|
int: NICb number (0 or 1)
|
||||||
@ -429,7 +426,7 @@ def nac_p(msg):
|
|||||||
"""Calculate NACp, Navigation Accuracy Category - Position
|
"""Calculate NACp, Navigation Accuracy Category - Position
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string, TC = 29 or 31
|
msg (str): 28 hexdigits string, TC = 29 or 31
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int or string: 95% horizontal accuracy bounds, Estimated Position Uncertainty
|
int or string: 95% horizontal accuracy bounds, Estimated Position Uncertainty
|
||||||
@ -464,7 +461,7 @@ def nac_v(msg):
|
|||||||
"""Calculate NACv, Navigation Accuracy Category - Velocity
|
"""Calculate NACv, Navigation Accuracy Category - Velocity
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string, TC = 19
|
msg (str): 28 hexdigits string, TC = 19
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int or string: 95% horizontal accuracy bounds for velocity, Horizontal Figure of Merit
|
int or string: 95% horizontal accuracy bounds for velocity, Horizontal Figure of Merit
|
||||||
@ -493,7 +490,7 @@ def sil(msg, version):
|
|||||||
"""Calculate SIL, Surveillance Integrity Level
|
"""Calculate SIL, Surveillance Integrity Level
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string with TC = 29, 31
|
msg (str): 28 hexdigits string with TC = 29, 31
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int or string: Probability of exceeding Horizontal Radius of Containment RCu
|
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.
|
"""Use reference ground speed and trk to determine BDS50 and DBS60.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
spd_ref (float): reference speed (ADS-B ground speed), kts
|
spd_ref (float): reference speed (ADS-B ground speed), kts
|
||||||
trk_ref (float): reference track (ADS-B track angle), deg
|
trk_ref (float): reference track (ADS-B track angle), deg
|
||||||
alt_ref (float): reference altitude (ADS-B altitude), ft
|
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.
|
"""Estimate the most likely BDS code of an message.
|
||||||
|
|
||||||
Args:
|
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.
|
mrar (bool): Also infer MRAR (BDS 44) and MHR (BDS 45). Defaults to False.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -85,7 +85,7 @@ def airborne_position_with_ref(msg, lat_ref, lon_ref):
|
|||||||
be with in 180NM of the true position.
|
be with in 180NM of the true position.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): even message (28 hexdigits)
|
msg (str): even message (28 hexdigits)
|
||||||
lat_ref: previous known latitude
|
lat_ref: previous known latitude
|
||||||
lon_ref: previous known longitude
|
lon_ref: previous known longitude
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ def altitude(msg):
|
|||||||
"""Decode aircraft altitude
|
"""Decode aircraft altitude
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: altitude in feet
|
int: altitude in feet
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# ------------------------------------------
|
# ------------------------------------------
|
||||||
# BDS 0,6
|
# BDS 0,6
|
||||||
# ADS-B TC=5-8
|
# ADS-B TC=5-8
|
||||||
# Surface position
|
# Surface movment
|
||||||
# ------------------------------------------
|
# ------------------------------------------
|
||||||
|
|
||||||
from pyModeS import common
|
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.
|
be with in 45NM of the true position.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): even message (28 hexdigits)
|
msg (str): even message (28 hexdigits)
|
||||||
lat_ref: previous known latitude
|
lat_ref: previous known latitude
|
||||||
lon_ref: previous known longitude
|
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)
|
return round(lat, 5), round(lon, 5)
|
||||||
|
|
||||||
|
|
||||||
def surface_velocity(msg, rtn_sources=False):
|
def surface_velocity(msg, source=False):
|
||||||
"""Decode surface velocity from from a surface position message
|
"""Decode surface velocity from a surface position message
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
rtn_source (boolean): If the function will return
|
source (boolean): Include direction and vertical rate sources in return. Default to False.
|
||||||
the sources for direction of travel and vertical
|
If set to True, the function will return six value instead of four.
|
||||||
rate. This will change the return value from a four
|
|
||||||
element array to a six element array.
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(int, float, int, string, string, None): speed (kt),
|
int, float, int, string, [string], [string]: Four or six parameters, including:
|
||||||
ground track (degree), None for rate of climb/descend (ft/min),
|
- Speed (kt)
|
||||||
and speed type ('GS' for ground speed), direction source
|
- Angle (degree), ground track
|
||||||
('true_north' for ground track / true north as reference),
|
- Vertical rate, always 0
|
||||||
None rate of climb/descent source.
|
- 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:
|
if common.typecode(msg) < 5 or common.typecode(msg) > 8:
|
||||||
raise RuntimeError("%s: Not a surface message, expecting 5<TC<8" % msg)
|
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 = kts[i - 1] + (mov - movs[i - 1]) * step
|
||||||
spd = round(spd, 2)
|
spd = round(spd, 2)
|
||||||
|
|
||||||
if rtn_sources:
|
if source:
|
||||||
return spd, trk, 0, "GS", "true_north", None
|
return spd, trk, 0, "GS", "TRUE_NORTH", None
|
||||||
else:
|
else:
|
||||||
return spd, trk, 0, "GS"
|
return spd, trk, 0, "GS"
|
||||||
|
@ -11,7 +11,7 @@ def category(msg):
|
|||||||
"""Aircraft category number
|
"""Aircraft category number
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: category number
|
int: category number
|
||||||
@ -29,7 +29,7 @@ def callsign(msg):
|
|||||||
"""Aircraft callsign
|
"""Aircraft callsign
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
string: callsign
|
string: callsign
|
||||||
|
@ -10,27 +10,24 @@ from pyModeS import common
|
|||||||
import math
|
import math
|
||||||
|
|
||||||
|
|
||||||
def airborne_velocity(msg, rtn_sources=False):
|
def airborne_velocity(msg, source=False):
|
||||||
"""Calculate the speed, track (or heading), and vertical rate
|
"""Decode airborne velocity.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
rtn_source (boolean): If the function will return
|
source (boolean): Include direction and vertical rate sources in return. Default to False.
|
||||||
the sources for direction of travel and vertical
|
If set to True, the function will return six value instead of four.
|
||||||
rate. This will change the return value from a four
|
|
||||||
element array to a six element array.
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(int, float, int, string, string, string): speed (kt),
|
int, float, int, string, [string], [string]: Four or six parameters, including:
|
||||||
ground track or heading (degree),
|
- Speed (kt)
|
||||||
rate of climb/descent (ft/min), speed type
|
- Angle (degree), either ground track or heading
|
||||||
('GS' for ground speed, 'AS' for airspeed),
|
- Vertical rate (ft/min)
|
||||||
direction source ('true_north' for ground track / true north
|
- Speed type ('GS' for ground speed, 'AS' for airspeed)
|
||||||
as reference, 'mag_north' for magnetic north as reference),
|
- [Optional] Direction source ('TRUE_NORTH' or 'MAGENTIC_NORTH')
|
||||||
rate of climb/descent source ('Baro' for barometer, 'GNSS'
|
- [Optional] Vertical rate source ('BARO' or 'GNSS')
|
||||||
for GNSS constellation).
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
"""
|
||||||
if common.typecode(msg) != 19:
|
if common.typecode(msg) != 19:
|
||||||
raise RuntimeError("%s: Not a airborne velocity message, expecting TC=19" % msg)
|
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 = math.degrees(trk) # convert to degrees
|
||||||
trk = trk if trk >= 0 else trk + 360 # no negative val
|
trk = trk if trk >= 0 else trk + 360 # no negative val
|
||||||
|
|
||||||
tag = "GS"
|
spd_type = "GS"
|
||||||
trk_or_hdg = round(trk, 2)
|
trk_or_hdg = round(trk, 2)
|
||||||
dir_type = "true_north"
|
dir_type = "TRUE_NORTH"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if mb[13] == "0":
|
if mb[13] == "0":
|
||||||
@ -81,32 +78,33 @@ def airborne_velocity(msg, rtn_sources=False):
|
|||||||
spd *= 4
|
spd *= 4
|
||||||
|
|
||||||
if mb[24] == "0":
|
if mb[24] == "0":
|
||||||
tag = "IAS"
|
spd_type = "IAS"
|
||||||
else:
|
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_sign = -1 if mb[36] == "1" else 1
|
||||||
vr = common.bin2int(mb[37:46])
|
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:
|
if source:
|
||||||
return spd, trk_or_hdg, rocd, tag, dir_type, vr_source
|
return spd, trk_or_hdg, vs, spd_type, dir_type, vr_source
|
||||||
else:
|
else:
|
||||||
return spd, trk_or_hdg, rocd, tag
|
return spd, trk_or_hdg, vs, spd_type
|
||||||
|
|
||||||
|
|
||||||
def altitude_diff(msg):
|
def altitude_diff(msg):
|
||||||
"""Decode the differece between GNSS and barometric altitude
|
"""Decode the differece between GNSS and barometric altitude.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (string): 28 bytes hexadecimal message string, TC=19
|
msg (str): 28 hexdigits string, TC=19
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: Altitude difference in ft. Negative value indicates GNSS altitude
|
int: Altitude difference in feet. Negative value indicates GNSS altitude
|
||||||
below barometric altitude.
|
below barometric altitude.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
tc = common.typecode(msg)
|
tc = common.typecode(msg)
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ def is10(msg):
|
|||||||
"""Check if a message is likely to be BDS code 1,0
|
"""Check if a message is likely to be BDS code 1,0
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True or False
|
bool: True or False
|
||||||
@ -42,7 +42,7 @@ def ovc10(msg):
|
|||||||
"""Return the overlay control capability
|
"""Return the overlay control capability
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: Whether the transponder is OVC capable
|
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
|
"""Check if a message is likely to be BDS code 1,7
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True or False
|
bool: True or False
|
||||||
@ -42,7 +42,7 @@ def cap17(msg):
|
|||||||
"""Extract capacities from BDS 1,7 message
|
"""Extract capacities from BDS 1,7 message
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
list: list of support BDS codes
|
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
|
"""Check if a message is likely to be BDS code 2,0
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True or False
|
bool: True or False
|
||||||
@ -36,7 +36,7 @@ def cs20(msg):
|
|||||||
"""Aircraft callsign
|
"""Aircraft callsign
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS40) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
string: callsign, max. 8 chars
|
string: callsign, max. 8 chars
|
||||||
|
@ -10,7 +10,7 @@ def is30(msg):
|
|||||||
"""Check if a message is likely to be BDS code 2,0
|
"""Check if a message is likely to be BDS code 2,0
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True or False
|
bool: True or False
|
||||||
|
@ -11,7 +11,7 @@ def is40(msg):
|
|||||||
"""Check if a message is likely to be BDS code 4,0
|
"""Check if a message is likely to be BDS code 4,0
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True or False
|
bool: True or False
|
||||||
@ -54,7 +54,7 @@ def selalt40mcp(msg):
|
|||||||
"""Selected altitude, MCP/FCU
|
"""Selected altitude, MCP/FCU
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS40) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: altitude in feet
|
int: altitude in feet
|
||||||
@ -72,7 +72,7 @@ def selalt40fms(msg):
|
|||||||
"""Selected altitude, FMS
|
"""Selected altitude, FMS
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS40) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: altitude in feet
|
int: altitude in feet
|
||||||
@ -90,7 +90,7 @@ def p40baro(msg):
|
|||||||
"""Barometric pressure setting
|
"""Barometric pressure setting
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS40) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
float: pressure in millibar
|
float: pressure in millibar
|
||||||
|
@ -12,7 +12,7 @@ def is44(msg):
|
|||||||
Meteorological routine air report
|
Meteorological routine air report
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True or False
|
bool: True or False
|
||||||
@ -55,7 +55,7 @@ def wind44(msg):
|
|||||||
"""Wind speed and direction.
|
"""Wind speed and direction.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(int, float): speed (kt), direction (degree)
|
(int, float): speed (kt), direction (degree)
|
||||||
@ -77,7 +77,7 @@ def temp44(msg):
|
|||||||
"""Static air temperature.
|
"""Static air temperature.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
float, float: temperature and alternative temperature in Celsius degree.
|
float, float: temperature and alternative temperature in Celsius degree.
|
||||||
@ -106,7 +106,7 @@ def p44(msg):
|
|||||||
"""Static pressure.
|
"""Static pressure.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: static pressure in hPa
|
int: static pressure in hPa
|
||||||
@ -126,7 +126,7 @@ def hum44(msg):
|
|||||||
"""humidity
|
"""humidity
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
float: percentage of humidity, [0 - 100] %
|
float: percentage of humidity, [0 - 100] %
|
||||||
@ -145,7 +145,7 @@ def turb44(msg):
|
|||||||
"""Turblence.
|
"""Turblence.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: turbulence level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
int: turbulence level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
||||||
|
@ -12,7 +12,7 @@ def is45(msg):
|
|||||||
Meteorological hazard report
|
Meteorological hazard report
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True or False
|
bool: True or False
|
||||||
@ -64,7 +64,7 @@ def turb45(msg):
|
|||||||
"""Turbulence.
|
"""Turbulence.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: Turbulence level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
int: Turbulence level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
||||||
@ -82,7 +82,7 @@ def ws45(msg):
|
|||||||
"""Wind shear.
|
"""Wind shear.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: Wind shear level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
int: Wind shear level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
||||||
@ -100,7 +100,7 @@ def mb45(msg):
|
|||||||
"""Microburst.
|
"""Microburst.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: Microburst level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
int: Microburst level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
||||||
@ -118,7 +118,7 @@ def ic45(msg):
|
|||||||
"""Icing.
|
"""Icing.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: Icing level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
int: Icing level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
||||||
@ -136,7 +136,7 @@ def wv45(msg):
|
|||||||
"""Wake vortex.
|
"""Wake vortex.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: Wake vortex level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
int: Wake vortex level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
|
||||||
@ -154,7 +154,7 @@ def temp45(msg):
|
|||||||
"""Static air temperature.
|
"""Static air temperature.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
float: tmeperature in Celsius degree
|
float: tmeperature in Celsius degree
|
||||||
@ -178,7 +178,7 @@ def p45(msg):
|
|||||||
"""Average static pressure.
|
"""Average static pressure.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: static pressure in hPa
|
int: static pressure in hPa
|
||||||
@ -195,7 +195,7 @@ def rh45(msg):
|
|||||||
"""Radio height.
|
"""Radio height.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: radio height in ft
|
int: radio height in ft
|
||||||
|
@ -11,7 +11,7 @@ def is50(msg):
|
|||||||
(Track and turn report)
|
(Track and turn report)
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True or False
|
bool: True or False
|
||||||
@ -61,7 +61,7 @@ def roll50(msg):
|
|||||||
"""Roll angle, BDS 5,0 message
|
"""Roll angle, BDS 5,0 message
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS50) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
float: angle in degrees,
|
float: angle in degrees,
|
||||||
@ -86,7 +86,7 @@ def trk50(msg):
|
|||||||
"""True track angle, BDS 5,0 message
|
"""True track angle, BDS 5,0 message
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS50) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
float: angle in degrees to true north (from 0 to 360)
|
float: angle in degrees to true north (from 0 to 360)
|
||||||
@ -115,7 +115,7 @@ def gs50(msg):
|
|||||||
"""Ground speed, BDS 5,0 message
|
"""Ground speed, BDS 5,0 message
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS50) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: ground speed in knots
|
int: ground speed in knots
|
||||||
@ -133,7 +133,7 @@ def rtrk50(msg):
|
|||||||
"""Track angle rate, BDS 5,0 message
|
"""Track angle rate, BDS 5,0 message
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS50) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
float: angle rate in degrees/second
|
float: angle rate in degrees/second
|
||||||
@ -159,7 +159,7 @@ def tas50(msg):
|
|||||||
"""Aircraft true airspeed, BDS 5,0 message
|
"""Aircraft true airspeed, BDS 5,0 message
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS50) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: true airspeed in knots
|
int: true airspeed in knots
|
||||||
|
@ -11,7 +11,7 @@ def is53(msg):
|
|||||||
(Air-referenced state vector)
|
(Air-referenced state vector)
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True or False
|
bool: True or False
|
||||||
@ -62,7 +62,7 @@ def hdg53(msg):
|
|||||||
"""Magnetic heading, BDS 5,3 message
|
"""Magnetic heading, BDS 5,3 message
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS53) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
float: angle in degrees to true north (from 0 to 360)
|
float: angle in degrees to true north (from 0 to 360)
|
||||||
@ -91,7 +91,7 @@ def ias53(msg):
|
|||||||
"""Indicated airspeed, DBS 5,3 message
|
"""Indicated airspeed, DBS 5,3 message
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message
|
msg (str): 28 hexdigits
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: indicated arispeed in knots
|
int: indicated arispeed in knots
|
||||||
@ -109,7 +109,7 @@ def mach53(msg):
|
|||||||
"""MACH number, DBS 5,3 message
|
"""MACH number, DBS 5,3 message
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message
|
msg (str): 28 hexdigits
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
float: MACH number
|
float: MACH number
|
||||||
@ -127,7 +127,7 @@ def tas53(msg):
|
|||||||
"""Aircraft true airspeed, BDS 5,3 message
|
"""Aircraft true airspeed, BDS 5,3 message
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message
|
msg (str): 28 hexdigits
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
float: true airspeed in knots
|
float: true airspeed in knots
|
||||||
@ -145,7 +145,7 @@ def vr53(msg):
|
|||||||
"""Vertical rate
|
"""Vertical rate
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS60) string
|
msg (str): 28 hexdigits (BDS60) string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: vertical rate in feet/minutes
|
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
|
"""Check if a message is likely to be BDS code 6,0
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True or False
|
bool: True or False
|
||||||
@ -61,7 +61,7 @@ def hdg60(msg):
|
|||||||
"""Megnetic heading of aircraft
|
"""Megnetic heading of aircraft
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS60) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
float: heading in degrees to megnetic north (from 0 to 360)
|
float: heading in degrees to megnetic north (from 0 to 360)
|
||||||
@ -90,7 +90,7 @@ def ias60(msg):
|
|||||||
"""Indicated airspeed
|
"""Indicated airspeed
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS60) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: indicated airspeed in knots
|
int: indicated airspeed in knots
|
||||||
@ -108,7 +108,7 @@ def mach60(msg):
|
|||||||
"""Aircraft MACH number
|
"""Aircraft MACH number
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS60) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
float: MACH number
|
float: MACH number
|
||||||
@ -126,7 +126,7 @@ def vr60baro(msg):
|
|||||||
"""Vertical rate from barometric measurement, this value may be very noisy.
|
"""Vertical rate from barometric measurement, this value may be very noisy.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS60) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: vertical rate in feet/minutes
|
int: vertical rate in feet/minutes
|
||||||
@ -152,7 +152,7 @@ def vr60ins(msg):
|
|||||||
"""Vertical rate measurd by onbard equiments (IRS, AHRS)
|
"""Vertical rate measurd by onbard equiments (IRS, AHRS)
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (String): 28 bytes hexadecimal message (BDS60) string
|
msg (str): 28 hexdigits string
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: vertical rate in feet/minutes
|
int: vertical rate in feet/minutes
|
||||||
|
@ -1,21 +1,24 @@
|
|||||||
"""Comm-B Wrapper.
|
"""Comm-B module.
|
||||||
|
|
||||||
The Comm-B wrapper imports all functions from the following modules:
|
The Comm-B module imports all functions from the following modules:
|
||||||
|
|
||||||
**ELS - elementary surveillance**
|
ELS - elementary surveillance
|
||||||
- pyModeS.decoder.bds.bds10
|
|
||||||
- pyModeS.decoder.bds.bds17
|
|
||||||
- pyModeS.decoder.bds.bds20
|
|
||||||
- pyModeS.decoder.bds.bds30
|
|
||||||
|
|
||||||
**EHS - enhanced surveillance**
|
- pyModeS.decoder.bds.bds10
|
||||||
- pyModeS.decoder.bds.bds40
|
- pyModeS.decoder.bds.bds17
|
||||||
- pyModeS.decoder.bds.bds50
|
- pyModeS.decoder.bds.bds20
|
||||||
- pyModeS.decoder.bds.bds60
|
- pyModeS.decoder.bds.bds30
|
||||||
|
|
||||||
**MRAR and MHR**
|
EHS - enhanced surveillance
|
||||||
- pyModeS.decoder.bds.bds44
|
|
||||||
- pyModeS.decoder.bds.bds45
|
- pyModeS.decoder.bds.bds40
|
||||||
|
- pyModeS.decoder.bds.bds50
|
||||||
|
- pyModeS.decoder.bds.bds60
|
||||||
|
|
||||||
|
MRAR and MHR
|
||||||
|
|
||||||
|
- pyModeS.decoder.bds.bds44
|
||||||
|
- pyModeS.decoder.bds.bds45
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user