diff --git a/README.rst b/README.rst index 71cb997..a1df355 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ The Python ADS-B/Mode-S Decoder -========================================== +****************************************** Python library for ADS-B/Mode-S message decoding. Supported Downlink Formats (DF) are: diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index fd39b78..0000000 --- a/doc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -_build -_static -_templates diff --git a/doc/Makefile b/doc/Makefile index 9e53a29..bbe980a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,225 +1,21 @@ -# Makefile for Sphinx documentation +# Minimal makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build +SOURCEDIR = source +BUILDDIR = build -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help +# Put it first so that "make" without argument is like "make help". help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " epub3 to make an epub3" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - @echo " dummy to check syntax errors of document sources" - -.PHONY: clean -clean: - rm -rf $(BUILDDIR)/* - -.PHONY: html -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -.PHONY: dirhtml -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -.PHONY: singlehtml -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -.PHONY: pickle -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -.PHONY: json -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -.PHONY: htmlhelp -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -.PHONY: qthelp -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pyModeS.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pyModeS.qhc" - -.PHONY: applehelp -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -.PHONY: devhelp -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/pyModeS" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pyModeS" - @echo "# devhelp" - -.PHONY: epub -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -.PHONY: epub3 -epub3: - $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 - @echo - @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." - -.PHONY: latex -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -.PHONY: latexpdf -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: latexpdfja -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: text -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -.PHONY: man -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -.PHONY: texinfo -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -.PHONY: info -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -.PHONY: gettext -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -.PHONY: changes -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -.PHONY: linkcheck -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -.PHONY: doctest -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -.PHONY: coverage -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." - -.PHONY: xml -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -.PHONY: pseudoxml -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." +.PHONY: help Makefile -.PHONY: dummy -dummy: - $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy - @echo - @echo "Build finished. Dummy builder generates no files." +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + rm source/pyModeS*.rst source/modules.rst + sphinx-apidoc -f -e -M -o source/ ../pyModeS + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/README.rst b/doc/README.rst new file mode 100644 index 0000000..69b289e --- /dev/null +++ b/doc/README.rst @@ -0,0 +1,7 @@ +How to generate the apidoc +==================================== + +:: + + cd doc + make html diff --git a/doc/conf.py b/doc/conf.py deleted file mode 100644 index ce7b3cf..0000000 --- a/doc/conf.py +++ /dev/null @@ -1,337 +0,0 @@ -# -*- coding: utf-8 -*- -# -# pyModeS documentation build configuration file, created by -# sphinx-quickstart on Tue Aug 16 15:47:05 2016. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.doctest', - 'sphinx.ext.todo', - 'sphinx.ext.coverage', -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - -# The encoding of source files. -# -# source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'pyModeS' -copyright = u'2016, Junzi Sun' -author = u'Junzi Sun' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = u'1.0.5' -# The full version, including alpha/beta/rc tags. -release = u'1.0.5' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# -# today = '' -# -# Else, today_fmt is used as the format for a strftime call. -# -# today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -# -# default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -# -# add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -# -# add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -# -# show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -# modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -# keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = True - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -# html_theme = 'alabaster' - -# 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 -# documentation. -# -# html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] - -# The name for this set of Sphinx documents. -# " v documentation" by default. -# -# html_title = u'pyModeS v1.0.5' - -# A shorter title for the navigation bar. Default is the same as html_title. -# -# html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -# -# html_logo = None - -# The name of an image file (relative to this directory) to use as a favicon of -# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -# -# html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -# -# html_extra_path = [] - -# If not None, a 'Last updated on:' timestamp is inserted at every page -# bottom, using the given strftime format. -# The empty string is equivalent to '%b %d, %Y'. -# -# html_last_updated_fmt = None - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -# -# html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -# -# html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -# -# html_additional_pages = {} - -# If false, no module index is generated. -# -# html_domain_indices = True - -# If false, no index is generated. -# -# html_use_index = True - -# If true, the index is split into individual pages for each letter. -# -# html_split_index = False - -# If true, links to the reST sources are added to the pages. -# -# html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# -# html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# -# html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -# -# html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh' -# -# html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# 'ja' uses this config value. -# 'zh' user can custom change `jieba` dictionary path. -# -# html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -# -# html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = 'pyModeSdoc' - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'pyModeS.tex', u'pyModeS Documentation', - u'Junzi Sun', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# -# latex_use_parts = False - -# If true, show page references after internal links. -# -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# -# latex_appendices = [] - -# If false, no module index is generated. -# -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'pymodes', u'pyModeS Documentation', - [author], 1) -] - -# If true, show URL addresses after external links. -# -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'pyModeS', u'pyModeS Documentation', - author, 'pyModeS', 'One line description of project.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -# -# texinfo_appendices = [] - -# If false, no module index is generated. -# -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# -# texinfo_no_detailmenu = False diff --git a/doc/index.rst b/doc/index.rst deleted file mode 100644 index e05f04f..0000000 --- a/doc/index.rst +++ /dev/null @@ -1,40 +0,0 @@ -.. pyModeS documentation master file, created by - sphinx-quickstart on Tue Aug 16 15:47:05 2016. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - - -pyModeS APIs -===================== - -This document contains all the functions within pyModeS package. - -Source code and user guide: https://github.com/junzis/pyModeS - - -pyModeS.adsb module -------------------- - -.. automodule:: pyModeS.adsb - :members: - :undoc-members: - :show-inheritance: - - -pyModeS.ehs module ------------------- - -.. automodule:: pyModeS.ehs - :members: - :undoc-members: - :show-inheritance: - - -pyModeS.util module -------------------- - -.. automodule:: pyModeS.util - :members: - :undoc-members: - :show-inheritance: - diff --git a/doc/requirements.txt b/doc/requirements.txt deleted file mode 100644 index e5ace04..0000000 --- a/doc/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -pyModeS==1.1.0 diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 0000000..eaf18de --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,188 @@ +# -*- coding: utf-8 -*- +# +# Configuration file for the Sphinx documentation builder. +# +# This file does only contain a selection of the most common options. For a +# full list see the documentation: +# http://www.sphinx-doc.org/en/master/config + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../..')) + + +# -- Project information ----------------------------------------------------- + +project = 'pyModeS' +copyright = '2019, Junzi Sun' +author = 'Junzi Sun' + +# The short X.Y version +version = '' +# The full version, including alpha/beta/rc tags +release = '' + + +# -- General configuration --------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages', + 'sphinx.ext.napoleon', +] + +# Add any paths that contain templates here, relative to this directory. +# templates_path = [''] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = None + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +# html_theme = 'alabaster' + +# 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 +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +# html_static_path = [''] + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# The default sidebars (for documents that don't match any pattern) are +# defined by theme itself. Builtin themes are using these templates by +# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', +# 'searchbox.html']``. +# +# html_sidebars = {} + + +# -- Options for HTMLHelp output --------------------------------------------- + +# Output file base name for HTML help builder. +htmlhelp_basename = 'pyModeSdoc' + + +# -- Options for LaTeX output ------------------------------------------------ + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'pyModeS.tex', 'pyModeS Documentation', + 'Junzi Sun', 'manual'), +] + + +# -- Options for manual page output ------------------------------------------ + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'pymodes', 'pyModeS Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ---------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'pyModeS', 'pyModeS Documentation', + author, 'pyModeS', 'One line description of project.', + 'Miscellaneous'), +] + + +# -- Options for Epub output ------------------------------------------------- + +# Bibliographic Dublin Core info. +epub_title = project + +# The unique identifier of the text. This can be a ISBN number +# or the project homepage. +# +# epub_identifier = '' + +# A unique identification for the text. +# +# epub_uid = '' + +# A list of files that should not be packed into the epub file. +epub_exclude_files = ['search.html'] + + +# -- Extension configuration ------------------------------------------------- + +# -- Options for todo extension ---------------------------------------------- + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 0000000..40de2fc --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,30 @@ +.. pyModeS documentation master file, created by + sphinx-quickstart on Mon Apr 1 13:13:10 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to pyModeS documentation! +=================================== + +The source code can be found at: https://github.com/junzis/pyModeS + +.. toctree:: + :maxdepth: 3 + + pyModeS.decoder + pyModeS.streamer + pyModeS.extra + + +---- + +.. include:: ../../README.rst + +---- + +Indices and tables +********************** + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/doc/source/make.bat b/doc/source/make.bat new file mode 100644 index 0000000..27f573b --- /dev/null +++ b/doc/source/make.bat @@ -0,0 +1,35 @@ +@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 diff --git a/doc/source/modules.rst b/doc/source/modules.rst new file mode 100644 index 0000000..7da5b08 --- /dev/null +++ b/doc/source/modules.rst @@ -0,0 +1,7 @@ +pyModeS +======= + +.. toctree:: + :maxdepth: 4 + + pyModeS diff --git a/doc/source/pyModeS.decoder.acas.rst b/doc/source/pyModeS.decoder.acas.rst new file mode 100644 index 0000000..c02eb92 --- /dev/null +++ b/doc/source/pyModeS.decoder.acas.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.acas module +=========================== + +.. automodule:: pyModeS.decoder.acas + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.adsb.rst b/doc/source/pyModeS.decoder.adsb.rst new file mode 100644 index 0000000..5f97d15 --- /dev/null +++ b/doc/source/pyModeS.decoder.adsb.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.adsb module +=========================== + +.. automodule:: pyModeS.decoder.adsb + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.allcall.rst b/doc/source/pyModeS.decoder.allcall.rst new file mode 100644 index 0000000..a538c03 --- /dev/null +++ b/doc/source/pyModeS.decoder.allcall.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.allcall module +============================== + +.. automodule:: pyModeS.decoder.allcall + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds05.rst b/doc/source/pyModeS.decoder.bds.bds05.rst new file mode 100644 index 0000000..f48d89e --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds05.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds05 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds05 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds06.rst b/doc/source/pyModeS.decoder.bds.bds06.rst new file mode 100644 index 0000000..7cbff9a --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds06.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds06 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds06 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds08.rst b/doc/source/pyModeS.decoder.bds.bds08.rst new file mode 100644 index 0000000..1a84527 --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds08.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds08 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds08 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds09.rst b/doc/source/pyModeS.decoder.bds.bds09.rst new file mode 100644 index 0000000..2041924 --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds09.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds09 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds09 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds10.rst b/doc/source/pyModeS.decoder.bds.bds10.rst new file mode 100644 index 0000000..f3e39bf --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds10.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds10 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds10 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds17.rst b/doc/source/pyModeS.decoder.bds.bds17.rst new file mode 100644 index 0000000..a4fbcbd --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds17.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds17 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds17 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds20.rst b/doc/source/pyModeS.decoder.bds.bds20.rst new file mode 100644 index 0000000..dbe9753 --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds20.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds20 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds20 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds30.rst b/doc/source/pyModeS.decoder.bds.bds30.rst new file mode 100644 index 0000000..714376d --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds30.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds30 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds30 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds40.rst b/doc/source/pyModeS.decoder.bds.bds40.rst new file mode 100644 index 0000000..1b907f1 --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds40.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds40 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds40 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds44.rst b/doc/source/pyModeS.decoder.bds.bds44.rst new file mode 100644 index 0000000..daed300 --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds44.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds44 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds44 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds50.rst b/doc/source/pyModeS.decoder.bds.bds50.rst new file mode 100644 index 0000000..85198da --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds50.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds50 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds50 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds53.rst b/doc/source/pyModeS.decoder.bds.bds53.rst new file mode 100644 index 0000000..ac365ec --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds53.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds53 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds53 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.bds60.rst b/doc/source/pyModeS.decoder.bds.bds60.rst new file mode 100644 index 0000000..df83367 --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.bds60.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.bds.bds60 module +================================ + +.. automodule:: pyModeS.decoder.bds.bds60 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.bds.rst b/doc/source/pyModeS.decoder.bds.rst new file mode 100644 index 0000000..027cafa --- /dev/null +++ b/doc/source/pyModeS.decoder.bds.rst @@ -0,0 +1,27 @@ +pyModeS.decoder.bds package +=========================== + +.. automodule:: pyModeS.decoder.bds + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + + pyModeS.decoder.bds.bds05 + pyModeS.decoder.bds.bds06 + pyModeS.decoder.bds.bds08 + pyModeS.decoder.bds.bds09 + pyModeS.decoder.bds.bds10 + pyModeS.decoder.bds.bds17 + pyModeS.decoder.bds.bds20 + pyModeS.decoder.bds.bds30 + pyModeS.decoder.bds.bds40 + pyModeS.decoder.bds.bds44 + pyModeS.decoder.bds.bds50 + pyModeS.decoder.bds.bds53 + pyModeS.decoder.bds.bds60 + diff --git a/doc/source/pyModeS.decoder.commb.rst b/doc/source/pyModeS.decoder.commb.rst new file mode 100644 index 0000000..a5b228c --- /dev/null +++ b/doc/source/pyModeS.decoder.commb.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.commb module +============================ + +.. automodule:: pyModeS.decoder.commb + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.common.rst b/doc/source/pyModeS.decoder.common.rst new file mode 100644 index 0000000..ce3afc2 --- /dev/null +++ b/doc/source/pyModeS.decoder.common.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.common module +============================= + +.. automodule:: pyModeS.decoder.common + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.ehs.rst b/doc/source/pyModeS.decoder.ehs.rst new file mode 100644 index 0000000..5f1ae62 --- /dev/null +++ b/doc/source/pyModeS.decoder.ehs.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.ehs module +========================== + +.. automodule:: pyModeS.decoder.ehs + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.els.rst b/doc/source/pyModeS.decoder.els.rst new file mode 100644 index 0000000..81b7c16 --- /dev/null +++ b/doc/source/pyModeS.decoder.els.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.els module +========================== + +.. automodule:: pyModeS.decoder.els + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.rst b/doc/source/pyModeS.decoder.rst new file mode 100644 index 0000000..a04bff2 --- /dev/null +++ b/doc/source/pyModeS.decoder.rst @@ -0,0 +1,30 @@ +pyModeS.decoder package +======================= + +.. automodule:: pyModeS.decoder + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + + pyModeS.decoder.bds + +Submodules +---------- + +.. toctree:: + + pyModeS.decoder.acas + pyModeS.decoder.adsb + pyModeS.decoder.allcall + pyModeS.decoder.commb + pyModeS.decoder.common + pyModeS.decoder.ehs + pyModeS.decoder.els + pyModeS.decoder.surv + pyModeS.decoder.uncertainty + diff --git a/doc/source/pyModeS.decoder.surv.rst b/doc/source/pyModeS.decoder.surv.rst new file mode 100644 index 0000000..b60a658 --- /dev/null +++ b/doc/source/pyModeS.decoder.surv.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.surv module +=========================== + +.. automodule:: pyModeS.decoder.surv + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.decoder.uncertainty.rst b/doc/source/pyModeS.decoder.uncertainty.rst new file mode 100644 index 0000000..50a7878 --- /dev/null +++ b/doc/source/pyModeS.decoder.uncertainty.rst @@ -0,0 +1,7 @@ +pyModeS.decoder.uncertainty module +================================== + +.. automodule:: pyModeS.decoder.uncertainty + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.extra.aero.rst b/doc/source/pyModeS.extra.aero.rst new file mode 100644 index 0000000..9ec9755 --- /dev/null +++ b/doc/source/pyModeS.extra.aero.rst @@ -0,0 +1,7 @@ +pyModeS.extra.aero module +========================= + +.. automodule:: pyModeS.extra.aero + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.extra.rst b/doc/source/pyModeS.extra.rst new file mode 100644 index 0000000..0c38a7c --- /dev/null +++ b/doc/source/pyModeS.extra.rst @@ -0,0 +1,16 @@ +pyModeS.extra package +===================== + +.. automodule:: pyModeS.extra + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + + pyModeS.extra.aero + pyModeS.extra.tcpclient + diff --git a/doc/source/pyModeS.extra.tcpclient.rst b/doc/source/pyModeS.extra.tcpclient.rst new file mode 100644 index 0000000..53d723a --- /dev/null +++ b/doc/source/pyModeS.extra.tcpclient.rst @@ -0,0 +1,7 @@ +pyModeS.extra.tcpclient module +============================== + +.. automodule:: pyModeS.extra.tcpclient + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.rst b/doc/source/pyModeS.rst new file mode 100644 index 0000000..a2d4509 --- /dev/null +++ b/doc/source/pyModeS.rst @@ -0,0 +1,17 @@ +pyModeS package +=============== + +.. automodule:: pyModeS + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + + pyModeS.decoder + pyModeS.extra + pyModeS.streamer + diff --git a/doc/source/pyModeS.streamer.rst b/doc/source/pyModeS.streamer.rst new file mode 100644 index 0000000..66f6a95 --- /dev/null +++ b/doc/source/pyModeS.streamer.rst @@ -0,0 +1,16 @@ +pyModeS.streamer package +======================== + +.. automodule:: pyModeS.streamer + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + + pyModeS.streamer.screen + pyModeS.streamer.stream + diff --git a/doc/source/pyModeS.streamer.screen.rst b/doc/source/pyModeS.streamer.screen.rst new file mode 100644 index 0000000..0fbddee --- /dev/null +++ b/doc/source/pyModeS.streamer.screen.rst @@ -0,0 +1,7 @@ +pyModeS.streamer.screen module +============================== + +.. automodule:: pyModeS.streamer.screen + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/pyModeS.streamer.stream.rst b/doc/source/pyModeS.streamer.stream.rst new file mode 100644 index 0000000..20d068e --- /dev/null +++ b/doc/source/pyModeS.streamer.stream.rst @@ -0,0 +1,7 @@ +pyModeS.streamer.stream module +============================== + +.. automodule:: pyModeS.streamer.stream + :members: + :undoc-members: + :show-inheritance: diff --git a/pyModeS/decoder/acas.py b/pyModeS/decoder/acas.py index 6666146..c275030 100644 --- a/pyModeS/decoder/acas.py +++ b/pyModeS/decoder/acas.py @@ -15,6 +15,8 @@ """ Decoding Air-Air Surveillance (ACAS) DF=0/16 + +[To be implemented] """ from __future__ import absolute_import, print_function, division diff --git a/pyModeS/decoder/adsb.py b/pyModeS/decoder/adsb.py index d2b9a6a..d3699ba 100644 --- a/pyModeS/decoder/adsb.py +++ b/pyModeS/decoder/adsb.py @@ -13,8 +13,19 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -""" -The wrapper for decoding ADS-B messages +"""ADS-B Wrapper. + +The ADS-B wrapper also imports functions from the following modules: + +- pyModeS.decoder.bds.bds05 + Functions: ``airborne_position``, ``airborne_position_with_ref``, ``altitude`` +- pyModeS.decoder.bds.bds06 + Functions: ``surface_position``, ``surface_position_with_ref``, ``surface_velocity`` +- pyModeS.decoder.bds.bds08 + Functions: ``category``, ``callsign`` +- pyModeS.decoder.bds.bds09 + Functions: ``airborne_velocity``, ``altitude_diff`` + """ from __future__ import absolute_import, print_function, division diff --git a/pyModeS/decoder/allcall.py b/pyModeS/decoder/allcall.py index 01f63e3..6978e42 100644 --- a/pyModeS/decoder/allcall.py +++ b/pyModeS/decoder/allcall.py @@ -15,6 +15,8 @@ """ Decoding all call replies DF=11 + +[To be implemented] """ from __future__ import absolute_import, print_function, division diff --git a/pyModeS/decoder/bds/bds05.py b/pyModeS/decoder/bds/bds05.py index f175843..ea03945 100644 --- a/pyModeS/decoder/bds/bds05.py +++ b/pyModeS/decoder/bds/bds05.py @@ -14,13 +14,12 @@ # along with this program. If not, see . -""" ------------------------------------------- - BDS 0,5 - ADS-B TC=9-18 - Airborn position ------------------------------------------- -""" +# ------------------------------------------ +# BDS 0,5 +# ADS-B TC=9-18 +# Airborn position +# ------------------------------------------ + from __future__ import absolute_import, print_function, division from pyModeS.decoder import common diff --git a/pyModeS/decoder/bds/bds06.py b/pyModeS/decoder/bds/bds06.py index 0c43640..bceb643 100644 --- a/pyModeS/decoder/bds/bds06.py +++ b/pyModeS/decoder/bds/bds06.py @@ -14,13 +14,11 @@ # along with this program. If not, see . -""" ------------------------------------------- - BDS 0,6 - ADS-B TC=5-8 - Surface position ------------------------------------------- -""" +# ------------------------------------------ +# BDS 0,6 +# ADS-B TC=5-8 +# Surface position +# ------------------------------------------ from __future__ import absolute_import, print_function, division from pyModeS.decoder import common diff --git a/pyModeS/decoder/bds/bds08.py b/pyModeS/decoder/bds/bds08.py index 56cb30d..7516b13 100644 --- a/pyModeS/decoder/bds/bds08.py +++ b/pyModeS/decoder/bds/bds08.py @@ -14,13 +14,11 @@ # along with this program. If not, see . -""" ------------------------------------------- - BDS 0,8 - ADS-B TC=1-4 - Aircraft identitification and category ------------------------------------------- -""" +# ------------------------------------------ +# BDS 0,8 +# ADS-B TC=1-4 +# Aircraft identitification and category +# ------------------------------------------ from __future__ import absolute_import, print_function, division from pyModeS.decoder import common diff --git a/pyModeS/decoder/bds/bds09.py b/pyModeS/decoder/bds/bds09.py index fcb24e3..49ce794 100644 --- a/pyModeS/decoder/bds/bds09.py +++ b/pyModeS/decoder/bds/bds09.py @@ -14,13 +14,11 @@ # along with this program. If not, see . -""" ------------------------------------------- - BDS 0,9 - ADS-B TC=19 - Aircraft Airborn velocity ------------------------------------------- -""" +# ------------------------------------------ +# BDS 0,9 +# ADS-B TC=19 +# Aircraft Airborn velocity +# ------------------------------------------ from __future__ import absolute_import, print_function, division from pyModeS.decoder import common diff --git a/pyModeS/decoder/bds/bds10.py b/pyModeS/decoder/bds/bds10.py index 9317902..836a252 100644 --- a/pyModeS/decoder/bds/bds10.py +++ b/pyModeS/decoder/bds/bds10.py @@ -13,14 +13,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import absolute_import, print_function, division -from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros - # ------------------------------------------ # BDS 1,0 # Data link capability report # ------------------------------------------ +from __future__ import absolute_import, print_function, division +from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros + def is10(msg): """Check if a message is likely to be BDS code 1,0 diff --git a/pyModeS/decoder/bds/bds17.py b/pyModeS/decoder/bds/bds17.py index 5540a0a..937f8ff 100644 --- a/pyModeS/decoder/bds/bds17.py +++ b/pyModeS/decoder/bds/bds17.py @@ -14,15 +14,15 @@ # along with this program. If not, see . +# ------------------------------------------ +# BDS 1,7 +# Common usage GICB capability report +# ------------------------------------------ + + from __future__ import absolute_import, print_function, division from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros -""" ------------------------------------------- - BDS 1,7 - Common usage GICB capability report ------------------------------------------- -""" def is17(msg): """Check if a message is likely to be BDS code 1,7 diff --git a/pyModeS/decoder/bds/bds20.py b/pyModeS/decoder/bds/bds20.py index 2f13a39..7e13636 100644 --- a/pyModeS/decoder/bds/bds20.py +++ b/pyModeS/decoder/bds/bds20.py @@ -13,14 +13,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import absolute_import, print_function, division -from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros - # ------------------------------------------ # BDS 2,0 # Aircraft identification # ------------------------------------------ +from __future__ import absolute_import, print_function, division +from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros + def is20(msg): """Check if a message is likely to be BDS code 2,0 diff --git a/pyModeS/decoder/bds/bds30.py b/pyModeS/decoder/bds/bds30.py index 50e43fa..9032311 100644 --- a/pyModeS/decoder/bds/bds30.py +++ b/pyModeS/decoder/bds/bds30.py @@ -13,14 +13,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import absolute_import, print_function, division -from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros - # ------------------------------------------ # BDS 3,0 # ACAS active resolution advisory # ------------------------------------------ +from __future__ import absolute_import, print_function, division +from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros + def is30(msg): """Check if a message is likely to be BDS code 2,0 diff --git a/pyModeS/decoder/bds/bds40.py b/pyModeS/decoder/bds/bds40.py index 53a95b2..ef422e1 100644 --- a/pyModeS/decoder/bds/bds40.py +++ b/pyModeS/decoder/bds/bds40.py @@ -13,15 +13,15 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - -from __future__ import absolute_import, print_function, division -from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros, wrongstatus - # ------------------------------------------ # BDS 4,0 # Selected vertical intention # ------------------------------------------ + +from __future__ import absolute_import, print_function, division +from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros, wrongstatus + def is40(msg): """Check if a message is likely to be BDS code 4,0 @@ -47,10 +47,10 @@ def is40(msg): if wrongstatus(d, 27, 28, 39): return False - + if wrongstatus(d, 48, 49, 51): return False - + if wrongstatus(d, 54, 55, 56): return False diff --git a/pyModeS/decoder/bds/bds44.py b/pyModeS/decoder/bds/bds44.py index 764850d..c55d7fe 100644 --- a/pyModeS/decoder/bds/bds44.py +++ b/pyModeS/decoder/bds/bds44.py @@ -13,14 +13,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import absolute_import, print_function, division -from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros, wrongstatus - # ------------------------------------------ # BDS 4,4 # Meteorological routine air report # ------------------------------------------ +from __future__ import absolute_import, print_function, division +from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros, wrongstatus + def is44(msg, rev=False): """Check if a message is likely to be BDS code 4,4 Meteorological routine air report diff --git a/pyModeS/decoder/bds/bds50.py b/pyModeS/decoder/bds/bds50.py index 7f3b212..6bfedb2 100644 --- a/pyModeS/decoder/bds/bds50.py +++ b/pyModeS/decoder/bds/bds50.py @@ -13,14 +13,15 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import absolute_import, print_function, division -from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros, wrongstatus - # ------------------------------------------ # BDS 5,0 # Track and turn report # ------------------------------------------ +from __future__ import absolute_import, print_function, division +from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros, wrongstatus + + def is50(msg): """Check if a message is likely to be BDS code 5,0 (Track and turn report) diff --git a/pyModeS/decoder/bds/bds53.py b/pyModeS/decoder/bds/bds53.py index 56ee27c..e48186e 100644 --- a/pyModeS/decoder/bds/bds53.py +++ b/pyModeS/decoder/bds/bds53.py @@ -13,14 +13,15 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import absolute_import, print_function, division -from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros, wrongstatus - # ------------------------------------------ # BDS 5,3 # Air-referenced state vector # ------------------------------------------ +from __future__ import absolute_import, print_function, division +from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros, wrongstatus + + def is53(msg): """Check if a message is likely to be BDS code 5,3 (Air-referenced state vector) diff --git a/pyModeS/decoder/bds/bds60.py b/pyModeS/decoder/bds/bds60.py index 4a1c7f1..f143b24 100644 --- a/pyModeS/decoder/bds/bds60.py +++ b/pyModeS/decoder/bds/bds60.py @@ -13,14 +13,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import absolute_import, print_function, division -from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros, wrongstatus - # ------------------------------------------ # BDS 6,0 # Heading and speed report # ------------------------------------------ +from __future__ import absolute_import, print_function, division +from pyModeS.decoder.common import hex2bin, bin2int, data, allzeros, wrongstatus + def is60(msg): """Check if a message is likely to be BDS code 6,0 diff --git a/pyModeS/decoder/commb.py b/pyModeS/decoder/commb.py index f33040f..2534331 100644 --- a/pyModeS/decoder/commb.py +++ b/pyModeS/decoder/commb.py @@ -1,3 +1,23 @@ +"""Comm-B Wrapper. + +The Comm-B wrapper imports all functions from the following modules: + +**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.bds40 + - pyModeS.decoder.bds.bds50 + - pyModeS.decoder.bds.bds60 + +**MRAR** + - pyModeS.decoder.bds.bds44 import + +""" + from __future__ import absolute_import, print_function, division # ELS - elementary surveillance diff --git a/pyModeS/decoder/ehs.py b/pyModeS/decoder/ehs.py index 18fa98e..da23b8e 100644 --- a/pyModeS/decoder/ehs.py +++ b/pyModeS/decoder/ehs.py @@ -1,3 +1,14 @@ +"""EHS Wrapper. + +``pyModeS.ehs`` is deprecated, please use ``pyModeS.commb`` instead. + +The EHS wrapper imports all functions from the following modules: + - pyModeS.decoder.bds.bds40 + - pyModeS.decoder.bds.bds50 + - pyModeS.decoder.bds.bds60 + +""" + from __future__ import absolute_import, print_function, division import warnings diff --git a/pyModeS/decoder/els.py b/pyModeS/decoder/els.py index e040306..50915f6 100644 --- a/pyModeS/decoder/els.py +++ b/pyModeS/decoder/els.py @@ -1,3 +1,15 @@ +"""ELS Wrapper. + +``pyModeS.els`` is deprecated, please use ``pyModeS.commb`` instead. + +The ELS wrapper imports all functions from the following modules: + - pyModeS.decoder.bds.bds10 + - pyModeS.decoder.bds.bds17 + - pyModeS.decoder.bds.bds20 + - pyModeS.decoder.bds.bds30 + +""" + from __future__ import absolute_import, print_function, division from pyModeS.decoder.bds.bds10 import * diff --git a/pyModeS/decoder/surv.py b/pyModeS/decoder/surv.py index edd4984..45f219d 100644 --- a/pyModeS/decoder/surv.py +++ b/pyModeS/decoder/surv.py @@ -15,6 +15,8 @@ """ Warpper for short roll call surveillance replies DF=4/5 + +[To be implemented] """ from __future__ import absolute_import, print_function, division diff --git a/pyModeS/decoder/uncertainty.py b/pyModeS/decoder/uncertainty.py index dc4dab7..1a4fbe7 100644 --- a/pyModeS/decoder/uncertainty.py +++ b/pyModeS/decoder/uncertainty.py @@ -1,3 +1,8 @@ +"""Uncertainty parameters. + +See source code at: https://github.com/junzis/pyModeS/blob/master/pyModeS/decoder/uncertainty.py +""" + NA = None TC_NUCp_lookup = { diff --git a/pyModeS/extra/aero.py b/pyModeS/extra/aero.py index 8953712..9d9683b 100644 --- a/pyModeS/extra/aero.py +++ b/pyModeS/extra/aero.py @@ -1,16 +1,21 @@ """ Functions for aeronautics in this module - - physical quantities always in SI units - - lat,lon,course and heading in degrees + +- physical quantities always in SI units +- lat,lon,course and heading in degrees International Standard Atmosphere +:: + 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] p = pressure(H) # calls atmos but retruns only pressure [Pa] T = temperature(H) # calculates temperature [K] rho = density(H) # calls atmos but retruns only pressure [Pa] -Speed conversion at altitude H[m] in ISA: +Speed conversion at altitude H[m] in ISA +:: + Mach = tas2mach(Vtas,H) # true airspeed (Vtas) to mach number conversion Vtas = mach2tas(Mach,H) # true airspeed (Vtas) to mach number conversion Vtas = eas2tas(Veas,H) # equivalent airspeed to true airspeed, H in [m] @@ -19,6 +24,7 @@ Speed conversion at altitude H[m] in ISA: Vcas = tas2cas(Vtas,H) # Vtas to Vcas conversion both m/s, H in [m] Vcas = mach2cas(Mach,H) # Mach to Vcas conversion Vcas in m/s, H in [m] Mach = cas2mach(Vcas,H) # Vcas to mach copnversion Vcas in m/s, H in [m] + """ import numpy as np diff --git a/pyModeS/extra/tcpclient.py b/pyModeS/extra/tcpclient.py index 82eb5ca..22539b6 100644 --- a/pyModeS/extra/tcpclient.py +++ b/pyModeS/extra/tcpclient.py @@ -145,51 +145,60 @@ class BaseClient(Thread): return messages def read_skysense_buffer(self): - """ - ---------------------------------------------------------------------------------- - Field SS MS MS MS MS MS MS MS MS MS MS MS MS MS MS TS TS TS TS TS TS RS RS RS - ---------------------------------------------------------------------------------- - Position: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 - ---------------------------------------------------------------------------------- - - SS field - Start character - Position 0: - 1 byte = 8 bits - Start character '$' - - MS field - Payload - Postion 1 through 14: - 14 bytes = 112 bits - Mode-S payload - In case of DF types that only carry 7 bytes of information position 8 through 14 are set to 0x00. - - TS field - Time stamp - Position 15 through 20: - 6 bytes = 48 bits - Time stamp with fields as: - - Lock Status - Status of internal time keeping mechanism - Equal to 1 if operating normally - Bit 47 - 1 bit - - Time of day in UTC seconds, between 0 and 86399 - Bits 46 through 30 - 17 bits - - Nanoseconds into current second, between 0 and 999999999 - Bits 29 through 0 - 30 bits - - RS field - Signal Level - Position 21 through 23: - 3 bytes = 24 bits - RSSI (received signal strength indication) and relative noise level with fields - - RNL, Q12.4 unsigned fixed point binary with 4 fractional bits and 8 integer bits. - This is and indication of the noise level of the message. Roughly 40 counts per 10dBm. - Bits 23 through 12 - 12 bits - - RSSI, Q12.4 unsigned fixed point binary with 4 fractional bits and 8 integer bits. - This is an indication of the signal level of the received message in ADC counts. Roughly 40 counts per 10dBm. - Bits 11 through 0 - 12 bits + """Skysense stream format. + + :: + + ---------------------------------------------------------------------------------- + Field SS MS MS MS MS MS MS MS MS MS MS MS MS MS MS TS TS TS TS TS TS RS RS RS + ---------------------------------------------------------------------------------- + Position: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + ---------------------------------------------------------------------------------- + + SS field - Start character + Position 0: + 1 byte = 8 bits + Start character '$' + + MS field - Payload + Postion 1 through 14: + 14 bytes = 112 bits + Mode-S payload + In case of DF types that only carry 7 bytes of information + position 8 through 14 are set to 0x00. + + TS field - Time stamp + Position 15 through 20: + 6 bytes = 48 bits + Time stamp with fields as: + + Lock Status - Status of internal time keeping mechanism + Equal to 1 if operating normally + Bit 47 - 1 bit + + Time of day in UTC seconds, between 0 and 86399 + Bits 46 through 30 - 17 bits + + Nanoseconds into current second, between 0 and 999999999 + Bits 29 through 0 - 30 bits + + RS field - Signal Level + Position 21 through 23: + 3 bytes = 24 bits + RSSI (received signal strength indication) and relative + noise level with fields + + RNL, Q12.4 unsigned fixed point binary with 4 fractional + bits and 8 integer bits. + This is and indication of the noise level of the message. + Roughly 40 counts per 10dBm. + Bits 23 through 12 - 12 bits + + RSSI, Q12.4 unsigned fixed point binary with 4 fractional + bits and 8 integer bits. + This is an indication of the signal level of the received + message in ADC counts. Roughly 40 counts per 10dBm. + Bits 11 through 0 - 12 bits """ SS_MSGLENGTH = 24 SS_STARTCHAR = 0x24 @@ -220,7 +229,7 @@ class BaseClient(Thread): self.buffer = self.buffer[SS_MSGLENGTH:] messages.append( [msg,ts] ) else: - self.buffer = self.buffer[1:] + self.buffer = self.buffer[1:] return messages def handle_messages(self, messages):