update api doc

This commit is contained in:
Junzi Sun 2019-04-03 09:40:27 +02:00
parent 72fe72c16c
commit 652ef65bbb
65 changed files with 755 additions and 710 deletions

View File

@ -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:

3
doc/.gitignore vendored
View File

@ -1,3 +0,0 @@
_build
_static
_templates

View File

@ -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 <target>' where <target> 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"
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
.PHONY: help Makefile
.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."
.PHONY: pseudoxml
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
.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)

7
doc/README.rst Normal file
View File

@ -0,0 +1,7 @@
How to generate the apidoc
====================================
::
cd doc
make html

View File

@ -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.
# "<project> v<release> 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 <link> 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

View File

@ -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:

View File

@ -1 +0,0 @@
pyModeS==1.1.0

188
doc/source/conf.py Normal file
View File

@ -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

30
doc/source/index.rst Normal file
View File

@ -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`

35
doc/source/make.bat Normal file
View File

@ -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

7
doc/source/modules.rst Normal file
View File

@ -0,0 +1,7 @@
pyModeS
=======
.. toctree::
:maxdepth: 4
pyModeS

View File

@ -0,0 +1,7 @@
pyModeS.decoder.acas module
===========================
.. automodule:: pyModeS.decoder.acas
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.adsb module
===========================
.. automodule:: pyModeS.decoder.adsb
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.allcall module
==============================
.. automodule:: pyModeS.decoder.allcall
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds05 module
================================
.. automodule:: pyModeS.decoder.bds.bds05
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds06 module
================================
.. automodule:: pyModeS.decoder.bds.bds06
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds08 module
================================
.. automodule:: pyModeS.decoder.bds.bds08
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds09 module
================================
.. automodule:: pyModeS.decoder.bds.bds09
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds10 module
================================
.. automodule:: pyModeS.decoder.bds.bds10
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds17 module
================================
.. automodule:: pyModeS.decoder.bds.bds17
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds20 module
================================
.. automodule:: pyModeS.decoder.bds.bds20
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds30 module
================================
.. automodule:: pyModeS.decoder.bds.bds30
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds40 module
================================
.. automodule:: pyModeS.decoder.bds.bds40
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds44 module
================================
.. automodule:: pyModeS.decoder.bds.bds44
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds50 module
================================
.. automodule:: pyModeS.decoder.bds.bds50
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds53 module
================================
.. automodule:: pyModeS.decoder.bds.bds53
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.bds.bds60 module
================================
.. automodule:: pyModeS.decoder.bds.bds60
:members:
:undoc-members:
:show-inheritance:

View File

@ -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

View File

@ -0,0 +1,7 @@
pyModeS.decoder.commb module
============================
.. automodule:: pyModeS.decoder.commb
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.common module
=============================
.. automodule:: pyModeS.decoder.common
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.ehs module
==========================
.. automodule:: pyModeS.decoder.ehs
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.els module
==========================
.. automodule:: pyModeS.decoder.els
:members:
:undoc-members:
:show-inheritance:

View File

@ -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

View File

@ -0,0 +1,7 @@
pyModeS.decoder.surv module
===========================
.. automodule:: pyModeS.decoder.surv
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.decoder.uncertainty module
==================================
.. automodule:: pyModeS.decoder.uncertainty
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.extra.aero module
=========================
.. automodule:: pyModeS.extra.aero
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,16 @@
pyModeS.extra package
=====================
.. automodule:: pyModeS.extra
:members:
:undoc-members:
:show-inheritance:
Submodules
----------
.. toctree::
pyModeS.extra.aero
pyModeS.extra.tcpclient

View File

@ -0,0 +1,7 @@
pyModeS.extra.tcpclient module
==============================
.. automodule:: pyModeS.extra.tcpclient
:members:
:undoc-members:
:show-inheritance:

17
doc/source/pyModeS.rst Normal file
View File

@ -0,0 +1,17 @@
pyModeS package
===============
.. automodule:: pyModeS
:members:
:undoc-members:
:show-inheritance:
Subpackages
-----------
.. toctree::
pyModeS.decoder
pyModeS.extra
pyModeS.streamer

View File

@ -0,0 +1,16 @@
pyModeS.streamer package
========================
.. automodule:: pyModeS.streamer
:members:
:undoc-members:
:show-inheritance:
Submodules
----------
.. toctree::
pyModeS.streamer.screen
pyModeS.streamer.stream

View File

@ -0,0 +1,7 @@
pyModeS.streamer.screen module
==============================
.. automodule:: pyModeS.streamer.screen
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,7 @@
pyModeS.streamer.stream module
==============================
.. automodule:: pyModeS.streamer.stream
:members:
:undoc-members:
:show-inheritance:

View File

@ -15,6 +15,8 @@
"""
Decoding Air-Air Surveillance (ACAS) DF=0/16
[To be implemented]
"""
from __future__ import absolute_import, print_function, division

View File

@ -13,8 +13,19 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
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

View File

@ -15,6 +15,8 @@
"""
Decoding all call replies DF=11
[To be implemented]
"""
from __future__ import absolute_import, print_function, division

View File

@ -14,13 +14,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
------------------------------------------
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

View File

@ -14,13 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
------------------------------------------
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

View File

@ -14,13 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
------------------------------------------
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

View File

@ -14,13 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
------------------------------------------
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

View File

@ -13,14 +13,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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

View File

@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ------------------------------------------
# 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

View File

@ -13,14 +13,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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

View File

@ -13,14 +13,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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

View File

@ -13,15 +13,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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

View File

@ -13,14 +13,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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

View File

@ -13,14 +13,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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)

View File

@ -13,14 +13,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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)

View File

@ -13,14 +13,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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

View File

@ -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

View File

@ -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

View File

@ -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 *

View File

@ -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

View File

@ -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 = {

View File

@ -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

View File

@ -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):