diff --git a/.readthedocs.yml b/.readthedocs.yml index 35671f9..e941dac 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -2,30 +2,16 @@ # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details -# Required version: 2 -# Set the version of Python and other tools you might need build: os: ubuntu-22.04 tools: python: "3.11" - # You can also specify other tool versions: - # nodejs: "19" - # rust: "1.64" - # golang: "1.19" -# Build documentation in the docs/ directory with Sphinx -sphinx: - configuration: docs/source/conf.py +mkdocs: + configuration: mkdocs.yml -# If using Sphinx, optionally build your docs in additional formats such as PDF -# formats: -# - pdf - -# Optionally declare the Python requirements required to build your docs python: - install: - - requirements: docs/requirements.txt - - method: pip - path: . + install: + - requirements: docs/requirements.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 80d435d..46d1fd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,27 +1,30 @@ -ADSBCOT 6.1.0 -------------- -Added optional altitude filters: ALT_UPPER, ALT_LOWER +## ADSBCOT beta +- Fixed formatting of CHANGELOG.md + +## ADSBCOT 6.1.0 + +Added optional altitude filters: ALT_UPPER, ALT_LOWER: - ALT_UPPER: Upper Altitude Limit, geometric (GNSS / INS) altitude in feet referenced to the WGS84 ellipsoid. - ALT_LOWER: Lower Altitude Limit, same ref as ALT_UPPER. -ADSBCOT 6.0.0 -------------- +## ADSBCOT 6.0.0 + Improved support for AirTAK. - Added a Read the Docs documentation site: https://adsbcot.readthedocs.io - Added ability to read file:// URLs, including reading aircraft.json from local fs. - Replaced setup.py metadata with setup.cfg. - Code cleanup. -ADSBCOT 5.1.2 -------------- +## ADSBCOT 5.1.2 + - Fixed #17: Incorrect course/track for some dump1090 feeds. Thanks @dnlbaldwin - Code cleanup. -ADSBCOT 5.1.1 -------------- +## ADSBCOT 5.1.1 + Adding CoT XML Declaration to output CoT. -ADSBCOT 5.0.5 -------------- +## ADSBCOT 5.0.5 + Updated adsbexchange.com Raspberry Pi installation instructions. diff --git a/LICENSE b/LICENSE index f09ac21..52df472 100644 --- a/LICENSE +++ b/LICENSE @@ -1,8 +1,199 @@ -Copyright 2023 Sensors & Signals LLC + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all +other entities that control, are controlled by, or are under common +control with that entity. For the purposes of this definition, +"control" means (i) the power, direct or indirect, to cause the +direction or management of such entity, whether by contract or +otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity +exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation +source, and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or +Object form, made available under the License, as indicated by a +copyright notice that is included in or attached to the work +(an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object +form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain +separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including +the original version of the Work and any modifications or additions +to that Work or Derivative Works thereof, that is intentionally +submitted to Licensor for inclusion in the Work by the copyright owner +or by an individual or Legal Entity authorized to submit on behalf of +the copyright owner. For the purposes of this definition, "submitted" +means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, +and issue tracking systems that are managed by, or on behalf of, the +Licensor for the purpose of discussing and improving the Work, but +excluding communication that is conspicuously marked or otherwise +designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the +Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work, +where such license applies only to those patent claims licensable +by such Contributor that are necessarily infringed by their +Contribution(s) alone or by combination of their Contribution(s) +with the Work to which such Contribution(s) was submitted. If You +institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work +or a Contribution incorporated within the Work constitutes direct +or contributory patent infringement, then any patent licenses +granted to You under this License for that Work shall terminate +as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the +Work or Derivative Works thereof in any medium, with or without +modifications, and in Source or Object form, provided that You +meet the following conditions: + +(a) You must give any other recipients of the Work or +Derivative Works a copy of this License; and + +(b) You must cause any modified files to carry prominent notices +stating that You changed the files; and + +(c) You must retain, in the Source form of any Derivative Works +that You distribute, all copyright, patent, trademark, and +attribution notices from the Source form of the Work, +excluding those notices that do not pertain to any part of +the Derivative Works; and + +(d) If the Work includes a "NOTICE" text file as part of its +distribution, then any Derivative Works that You distribute must +include a readable copy of the attribution notices contained +within such NOTICE file, excluding those notices that do not +pertain to any part of the Derivative Works, in at least one +of the following places: within a NOTICE text file distributed +as part of the Derivative Works; within the Source form or +documentation, if provided along with the Derivative Works; or, +within a display generated by the Derivative Works, if and +wherever such third-party notices normally appear. The contents +of the NOTICE file are for informational purposes only and +do not modify the License. You may add Your own attribution +notices within Derivative Works that You distribute, alongside +or as an addendum to the NOTICE text from the Work, provided +that such additional attribution notices cannot be construed +as modifying the License. + +You may add Your own copyright statement to Your modifications and +may provide additional or different license terms and conditions +for use, reproduction, or distribution of Your modifications, or +for any such Derivative Works as a whole, provided Your use, +reproduction, and distribution of the Work otherwise complies with +the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following +boilerplate notice, with the fields enclosed by brackets "[]" +replaced with your own identifying information. (Don't include +the brackets!) The text should be enclosed in the appropriate +comment syntax for the file format. We also recommend that a +file or class name and description of purpose be included on the +same "printed page" as the copyright notice for easier +identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/Makefile b/Makefile index 53bb188..e9c6fce 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# Copyright 2023 Sensors & Signals LLC +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,9 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# Author:: Greg Albrecht -# License:: Apache License, Version 2.0 -# this_app = adsbcot .DEFAULT_GOAL := all @@ -75,3 +72,7 @@ test_cov: black: black . + +mkdocs: + pip install -r docs/requirements.txt + mkdocs serve \ No newline at end of file diff --git a/README.rst b/README.rst index cadd928..d060563 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,50 @@ -ADS-B to TAK Gateway -******************** +.. image:: https://adsbxcot.readthedocs.io/en/latest/atak_screenshot_with_pytak_logo-x25.png + :alt: ATAK screenshot with PyTAK logo. -.. image:: https://github.com/snstac/adsbcot/blob/main/docs/atak_screenshot_with_pytak_logo-x25.jpg - :alt: ATAK Screenshot with PyTAK Logo. - :target: https://github.com/snstac/adsbcot/blob/main/docs/atak_screenshot_with_pytak_logo.jpg +Display Aircraft in TAK +************************ + +ADSBCOT is software for monitoring and analyzing aviation surveillance data via the Team Awareness Kit (TAK) ecosystem of products. + +ADSBCOT captures & reports real-time ADS-B data received from aircraft (or other airbrone vehicles and drones) into TAK products using native TAK protocols, including Cursor on Target (CoT). + +ADSBCOT has been evaluated with WinTAK, iTAK, ATAK & TAK Server. + +ADSBCOT is in active use today in a variety of missions. + +`Documentation is available here. `_ + + Use ADS-B Aggregators? Check out my sister software `ADSBXCOT `_. + +License +======= + +Copyright Sensors & Signals LLC https://www.snstac.com + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + + +Tracks within TAK retain the aircraft's position, course & speed, and remarks contain the received Flight, Tail & Category ADS-B data. + +ADSBCOT includes a set of filters and transforms TK TK TK. + + +ADSBCOT runs in any Python 3.6+ environment, including Windows & Linux. + + + + + +ADSBCOT is a PyTAK gatew The ADS-B to TAK Gateway (ADSBCOT) transforms Automatic Dependent Surveillance-Broadcast (ADS-B) aircraft position information into Cursor on diff --git a/adsbcot/__init__.py b/adsbcot/__init__.py index 5acad40..91993f8 100644 --- a/adsbcot/__init__.py +++ b/adsbcot/__init__.py @@ -1,11 +1,13 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# Copyright 2023 Sensors & Signals LLC +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -16,13 +18,12 @@ """ADS-B to TAK Gateway. -:author: Greg Albrecht :source: """ __version__ = "6.2.0-beta5" __author__ = "Greg Albrecht " -__copyright__ = "Copyright 2023 Sensors & Signals LLC" +__copyright__ = "Copyright Sensors & Signals LLC https://www.snstac.com" __license__ = "Apache License, Version 2.0" # Python 3.6 test/build work-around: @@ -37,6 +38,9 @@ from .functions import adsb_to_cot, create_tasks # NOQA from .classes import ADSBWorker, ADSBNetReceiver, ADSBNetWorker # NOQA -except ImportError: +except ImportError as exc: import warnings - warnings.warn("Unable to import required modules, ignoring (Python 3.6 build work-around).") + warnings.warn( + "Unable to import required modules, IGNORING for Python 3.6 compat. Original Exception: " + ) + warnings.warn(str(exc)) diff --git a/adsbcot/classes.py b/adsbcot/classes.py index 06d8e68..7d30744 100644 --- a/adsbcot/classes.py +++ b/adsbcot/classes.py @@ -1,11 +1,13 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# Copyright 2023 Sensors & Signals LLC +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -48,7 +50,7 @@ __author__ = "Greg Albrecht " -__copyright__ = "Copyright 2023 Sensors & Signals LLC" +__copyright__ = "Copyright Sensors & Signals LLC https://www.snstac.com" __license__ = "Apache License, Version 2.0" diff --git a/adsbcot/commands.py b/adsbcot/commands.py index 0cf0141..a7db558 100644 --- a/adsbcot/commands.py +++ b/adsbcot/commands.py @@ -1,11 +1,13 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# Copyright 2023 Sensors & Signals LLC +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -13,15 +15,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# Author:: Greg Albrecht -# """PyTAK Command Line.""" import pytak __author__ = "Greg Albrecht " -__copyright__ = "Copyright 2023 Sensors & Signals LLC" +__copyright__ = "Copyright Sensors & Signals LLC https://www.snstac.com" __license__ = "Apache License, Version 2.0" diff --git a/adsbcot/constants.py b/adsbcot/constants.py index e3b922c..c08b67b 100644 --- a/adsbcot/constants.py +++ b/adsbcot/constants.py @@ -1,11 +1,13 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# Copyright 2023 Sensors & Signals LLC +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +19,7 @@ """ADSBCOT Constants.""" __author__ = "Greg Albrecht " -__copyright__ = "Copyright 2023 Sensors & Signals LLC" +__copyright__ = "Copyright Sensors & Signals LLC https://www.snstac.com" __license__ = "Apache License, Version 2.0" diff --git a/adsbcot/functions.py b/adsbcot/functions.py index 82769f1..abf0b8e 100644 --- a/adsbcot/functions.py +++ b/adsbcot/functions.py @@ -1,11 +1,13 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# Copyright 2023 Sensors & Signals LLC +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -30,7 +32,7 @@ import adsbcot __author__ = "Greg Albrecht " -__copyright__ = "Copyright 2023 Sensors & Signals LLC" +__copyright__ = "Copyright Sensors & Signals LLC https://www.snstac.com" __license__ = "Apache License, Version 2.0" diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d0c3cbf..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 6247f7e..0000000 --- a/docs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -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% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd diff --git a/docs/requirements.txt b/docs/requirements.txt index ed75bfd..b00f781 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,8 +1,23 @@ -pillow -mock==1.0.1 -alabaster>=0.7,<0.8,!=0.7.5 -commonmark==0.9.1 -recommonmark==0.5.0 -sphinx -sphinx-rtd-theme -readthedocs-sphinx-ext<2.3 +click +ghp-import +griffe +importlib-metadata +jinja2 +markdown +markdown-include +markupsafe +mergedeep +mkdocs +mkdocs-autorefs +mkdocs-include-markdown-plugin +mkdocs-material +mkdocstrings-python +mkdocstrings[python] +packaging +pymdown-extensions +pyparsing +python-dateutil +pyyaml +pyyaml-env-tag +six +zipp diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index 76764df..0000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,38 +0,0 @@ -# Configuration file for the Sphinx documentation builder. - -# -- Project information - -project = "ADSBCOT" -copyright = "2023 Sensors & Signals LLC" -author = "Greg Albrecht" - -release = '0.1.1' -version = '0.1.1' - -# -- General configuration - -master_doc = 'index' - -extensions = [ - 'sphinx.ext.duration', - 'sphinx.ext.doctest', - 'sphinx.ext.autodoc', - 'sphinx.ext.autosummary', - 'sphinx.ext.intersphinx', - 'sphinx.ext.coverage', -] - -intersphinx_mapping = { - 'python': ('https://docs.python.org/3/', None), - 'sphinx': ('https://www.sphinx-doc.org/en/master/', None), -} -intersphinx_disabled_domains = ['std'] - -templates_path = ['_templates'] - -# -- Options for HTML output - -html_theme = 'sphinx_rtd_theme' - -# -- Options for EPUB output -epub_show_urls = 'footnote' diff --git a/docs/source/config.rst b/docs/source/config.rst deleted file mode 100644 index 35d20f9..0000000 --- a/docs/source/config.rst +++ /dev/null @@ -1,76 +0,0 @@ -Configuration -============= - -ADSBCOT's configuration parameters can be set two ways: - -1. In an INI-style configuration file, typically ``adsbcot.ini`` -2. As environment variables. - -ADSBCOT has the following built-in configuration parameters: - -.. describe:: COT_URL (optional) - - Destination for Cursor on Target messages. Defaults to ``udp+wo://239.2.3.1:6969`` (ATAK 'Mesh SA' default, multicast) - -.. describe:: FEED_URL (optional) - - Source of dump1090 decoded ADS-B data. Should start with one of: ``tcp://``, ``tcp+beast://``, ``tcp+raw://``, ``http://``, or ``file://``. Defaults to ``file:///run/dump1090-fa/aircraft.json`` (dump1090-fa's local JSON file). - -.. describe:: POLL_INTERVAL (optional) - - Period, in seconds, to poll the FEED_URL, if the FEED_URL is of the type HTTP. - -.. describe:: ALT_UPPER (optional) - - Upper Altitude Limit, geometric (GNSS / INS) altitude in feet referenced to the WGS84 ellipsoid. - -.. describe:: ALT_LOWER: (optional) - - Lower Altitude Limit, geometric (GNSS / INS) altitude in feet referenced to the WGS84 ellipsoid. - -There are other configuration parameters, including TLS support, are described in the `PyTAK `_ documentation. - -Configuration parameters are imported in the following priority order: - -1. config.ini (if exists) or -c (if specified). -2. Environment Variables (if set). -3. Defaults. - - -Example Configurations ----------------------- - -**Example 1**: Connect to dump1090's Beast TCP running on host 172.17.2.122, -port 30003 & forward COT to host 172.17.2.152, port 8087 use following config.ini:: - - [adsbcot] - COT_URL = tcp://172.17.2.152:8087 - FEED_URL = tcp+beast://172.17.2.122:30003 - -.. image:: https://raw.githubusercontent.com/snstac/adsbcot/main/docs/adsbcot_example.png - :alt: ADSBCOT Example Setup. - :target: https://github.com/snstac/adsbcot/blob/main/docs/adsbcot_example.png - -**Example 2**: Connect to dump1090's Raw TCP running on host 172.17.2.122, -port 30005 & forward COT to UDP Multicast Group 239.2.3.1 port 6969:: - - [adsbcot] - COT_URL = udp://239.2.3.1:6969 - FEED_URL = tcp+raw://172.17.2.122:30005 - -**Example 3**: Poll dump1090's JSON API at -http://172.17.2.122:8080/data/aircraft.json with a 10 second interval & -forward COT to host 172.17.2.152, port 8089 using TLS:: - - [adsbcot] - PYTAK_TLS_CLIENT_CERT = /etc/my_client_cert.pem - COT_URL = tls://tak.example.com:8088 - FEED_URL = http://172.17.2.122:8080/data/aircraft.json - POLL_INTERVAL = 10 - -**Example 4**: Use environment variables to set configuration parameters:: - - $ export COT_URL="udp://10.9.8.7:8087" - $ export FEED_URL="tcp+raw://127.0.0.1:30002" - $ adsbcot - diff --git a/docs/source/index.rst b/docs/source/index.rst deleted file mode 100644 index 643c27f..0000000 --- a/docs/source/index.rst +++ /dev/null @@ -1,49 +0,0 @@ -.. image:: https://github.com/snstac/adsbcot/blob/main/docs/atak_screenshot_with_pytak_logo-x25.jpg - :alt: ATAK Screenshot with PyTAK Logo. - :target: https://github.com/snstac/adsbcot/blob/main/docs/atak_screenshot_with_pytak_logo.jpg - -ADS-B to TAK Gateway Documentation -================================== - -The ADS-B to TAK Gateway (ADSBCOT) transforms Automatic Dependent -Surveillance-Broadcast (ADS-B) aircraft position information into Cursor on -Target for display on `TAK Products `_ such as ATAK, WinTAK & iTAK. - -ADS-B data can be recevied from dump1090 using the following network formats: - -1. Local file. -2. Aircraft JSON HTTP feed. See `dump1090 README-json.md `_. -3. Raw TCP (via `pyModeS `_) -4. Beast TCP (via `pyModeS `_) - -.. image:: https://raw.githubusercontent.com/snstac/adsbcot/main/docs/adsbcot_operation.png - :alt: ADSBCOT Operation Diagram. - :target: https://github.com/snstac/adsbcot/blob/main/docs/adsbcot_operation.png - -If you'd like to feed ADS-B from another source, consider these tools: - -* `adsbxcot `_: ADSBExchange.com & adsb.fi to TAK Gateway. -* `stratuxcot `_: Stratux ADS-B to TAK Gateway. - - -Contents --------- -.. toctree:: - :maxdepth: 2 - - install - config - running - - -.. seealso:: - - `adsbcot source code on Github `_ - -Indices and tables -================== -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - -(adsbcot |version|) \ No newline at end of file diff --git a/docs/source/install.rst b/docs/source/install.rst deleted file mode 100644 index 4d0eba0..0000000 --- a/docs/source/install.rst +++ /dev/null @@ -1,49 +0,0 @@ -Installation -============ - -Functionality is provided by a command-line tool called ``adsbcot``, which can -be installed either from the Python Package Index, or directly from source. - - -Most Users ----------- - -**Most Users**: Install ADSBCOT with file:// & http:// support ONLY. - -If you're planning to run ADSBCOT on the same system running dump1090, you should -install ADSBCOT from the Python Package Index (PyPI):: - - $ sudo python3 -m pip install adsbcot - -**Other**: Install ADSBCOT with TCP Beast & TCP Raw support. - -If you'd like to read decoded ADS-B data over the network, you must install ADSBCOT -with the extra `pymodes` package:: - - $ sudo python3 -m pip install adsbcot[with_pymodes] - -**Alternate / Developers** - -Install ADSBCOT from the release zip file:: - - $ wget https://github.com ... - $ unzip .. - $ cd adsbcot/ - $ python3 -m pip install - -Install ADSBCOT from the GitHub hosted source repository:: - - $ git clone https://github.com/snstac/adsbcot.git - $ cd adsbcot/ - $ python3 -m pip install . - - -ADSBExchange.com Raspberry Pi image ONLY ----------------------------------------- - -These instructions are exclusively for systems running the ADSBExchange.com -Raspberry Pi image:: - - $ sudo apt update - $ sudo apt install -y python3-pip - $ sudo python3 -m pip install adsbcot diff --git a/docs/source/running.rst b/docs/source/running.rst deleted file mode 100644 index 08951d5..0000000 --- a/docs/source/running.rst +++ /dev/null @@ -1,47 +0,0 @@ -Running -======= - -In a terminal -------------- - -ADSBCOT should run on most systems out of the box by logging into a terminal (ssh) and typing: ``adsbcot`` - -This will run ADSBCOT in the 'foreground' of your terminal. If you exit or disconnect -from your terminal, ADSBCOT will also exit. - -To run ADSBCOT with a specific configuration file, you can type: ``adsbcot -c config.ini``, -where ``config.ini`` is the name of your configuration file. For configuration options; see :doc:`config`. - -As a background system service ------------------------------- - -To keep ADSBCOT running in the background, it is recommended to run it as a system service ("daemon") using systemd. -This example assumes ADSBCOT was installed with ``pip`` and its executable is located at ``/usr/local/bin/adsbcot``. -If your system differs, you'll need to change the following code-block to match the installation location for the -``adsbcot`` executable and, if applicable, the configuration file. (Try: ``find / -name adsbcot -type f``) - -1. Copy the following code block to ``/etc/systemd/system/adsbcot.service``:: - - [Unit] - Description=ADS-B to TAK Gateway - After=network.target - [Service] - ExecStart=/usr/local/bin/adsbcot -c /etc/adsbcot.ini - Restart=always - RestartSec=5 - [Install] - WantedBy=network.target - -(You can create ``adsbcot.service`` using Nano: ``$ sudo nano /etc/systemd/system/adsbcot.service``) - -2. Create the ``/etc/adsbcot.ini`` file and add an appropriate configuration (See also: :doc:`config`):: - - $ sudo nano /etc/adsbcot.ini - -3. Enable cotproxy systemd service:: - - $ sudo systemctl daemon-reload - $ sudo systemctl enable adsbcot - $ sudo systemctl start adsbcot - -4. You can view logs with: ``$ sudo journalctl -fu adsbcot`` diff --git a/setup.cfg b/setup.cfg index 44359dd..d6e101c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,10 +1,12 @@ # Setup configuration for ADSBCOT: ADS-B to TAK Gateway # -# Copyright 2023 Sensors & Signals LLC +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -12,9 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# Source:: https://github.com/snstac/adsbcot -# - [metadata] name = adsbcot diff --git a/setup.py b/setup.py index b6b7fd8..7c4f9b1 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,13 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# Copyright 2023 Sensors & Signals LLC +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS,