Skip to content

Commit

Permalink
a slew of updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ampledata committed Jan 13, 2025
1 parent 9b81630 commit 0a13647
Show file tree
Hide file tree
Showing 11 changed files with 308 additions and 187 deletions.
53 changes: 39 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Makefile from https://github.com/snstac/pytak
# PyTAK Makefile
#
# Copyright Sensors & Signals LLC https://www.snstac.com
# 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,
Expand All @@ -14,10 +14,14 @@
# limitations under the License.
#

this_app = adsbxcot
.DEFAULT_GOAL := all
REPO_NAME ?= $(shell echo $(wildcard */__init__.py) | awk -F'/' '{print $$1}')
SHELL := /bin/bash
.DEFAULT_GOAL := editable
# postinst = $(wildcard debian/*.postinst.sh)
# service = $(wildcard debian/*.service)

all: editable
prepare:
mkdir -p build/

develop:
python3 setup.py develop
Expand All @@ -26,13 +30,13 @@ editable:
python3 -m pip install -e .

install_test_requirements:
python3 -m pip install -r requirements_test.txt
python3 -m pip install -r requirements_test.txt

install:
python3 setup.py install

uninstall:
python3 -m pip uninstall -y $(this_app)
python3 -m pip uninstall -y $(REPO_NAME)

reinstall: uninstall install

Expand All @@ -43,16 +47,16 @@ clean:
@rm -rf *.egg* build dist *.py[oc] */*.py[co] cover doctest_pypi.cfg \
nosetests.xml pylint.log output.xml flake8.log tests.log \
test-result.xml htmlcov fab.log .coverage __pycache__ \
*/__pycache__
*/__pycache__ deb_dist .mypy_cache

pep8:
flake8 --max-line-length=88 --extend-ignore=E203,E231 --exit-zero $(this_app)/*.py
flake8 --max-line-length=88 --extend-ignore=E203 --exit-zero $(REPO_NAME)/*.py

flake8: pep8

lint:
pylint --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" \
--max-line-length=88 -r n $(this_app)/*.py || exit 0
--max-line-length=88 -r n $(REPO_NAME)/*.py || exit 0

pylint: lint

Expand All @@ -68,11 +72,32 @@ pytest:
test: editable install_test_requirements pytest

test_cov:
pytest --cov=$(this_app)
pytest --cov=$(REPO_NAME) --cov-report term-missing

black:
black .

mkdocs:
pip install -r docs/requirements.txt
mkdocs serve
mkdocs serve

deb_dist:
python3 setup.py --command-packages=stdeb.command sdist_dsc

deb_custom:
cp debian/$(REPO_NAME).conf $(wildcard deb_dist/*/debian)/$(REPO_NAME).default
cp debian/$(REPO_NAME).postinst $(wildcard deb_dist/*/debian)/$(REPO_NAME).postinst
cp debian/$(REPO_NAME).service $(wildcard deb_dist/*/debian)/$(REPO_NAME).service

bdist_deb: deb_dist deb_custom
cd deb_dist/$(REPO_NAME)-*/ && dpkg-buildpackage -rfakeroot -uc -us

faux_latest:
cp deb_dist/$(REPO_NAME)_*-1_all.deb deb_dist/$(REPO_NAME)_latest_all.deb
cp deb_dist/$(REPO_NAME)_*-1_all.deb deb_dist/python3-$(REPO_NAME)_latest_all.deb

package: bdist_deb faux_latest

extract:
dpkg-deb -e $(wildcard deb_dist/*latest_all.deb) deb_dist/extract
dpkg-deb -x $(wildcard deb_dist/*latest_all.deb) deb_dist/extract
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
![ATAK screenshot with PyTAK logo.](https://adsbcot.readthedocs.io/en/latest/media/atak_screenshot_with_pytak_logo-x25.png)

# Display Aircraft in TAK - ADS-B feed to TAK Gateway

ADSBXCOT is software for monitoring and analyzing aviation surveillance data via the Team Awareness Kit (TAK) ecosystem of products.

For detailed documentation, visit the [official documentation](https://adsbxcot.rtfd.io).

## Features

- Converts ADS-B messages to Cursor on Target (CoT) format.
- Compatible with TAK products: ATAK, WinTAK, and iTAK.
- Supports multiple ADS-B data aggregators.
- Retains aircraft track, course, speed, and metadata.
- Runs on Python 3.7+ in both Windows and Linux environments.

## Supported ADS-B Aggregators

- ADS-B Exchange: https://www.adsbexchange.com/
- adsb.fi: https://adsb.fi/
- ADS-B Hub: https://www.adsbhub.org/
- Airplanes.Live: https://airplanes.live/

## Related Projects

- [ADSBCOT](https://adsbcot.rtfd.io): For users with their own ADS-B receiver.
- [AirTAK](https://www.snstac.com/store/p/airtak-v1): A turn-key ADS-B to TAK Gateway solution.

## Copyright & 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.

41 changes: 0 additions & 41 deletions README.rst

This file was deleted.

28 changes: 5 additions & 23 deletions adsbxcot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,10 @@
# limitations under the License.
#

"""
Display Aircraft in TAK.
"""Display Aircraft in TAK."""

:author: Greg Albrecht <[email protected]>
:copyright: Copyright Sensors & Signals LLC https://www.snstac.com
:license: Apache License, Version 2.0
:source: <https://github.com/snstac/adsbxcot>
"""
__version__ = "7.0.0"

__version__ = "6.0.4"
__author__ = "Greg Albrecht <[email protected]>"
__copyright__ = "Copyright Sensors & Signals LLC https://www.snstac.com"
__license__ = "Apache License, Version 2.0"

# Python 3.6 test/build work-around:
try:
from .constants import DEFAULT_POLL_INTERVAL, DEFAULT_LIGHT_COT # NOQA
from .functions import adsbx_to_cot, create_tasks # NOQA
from .classes import ADSBXWorker # NOQA
except ImportError:
import warnings

warnings.warn(
"Unable to import required modules, ignoring (Python 3.6 build work-around)."
)
from .constants import DEFAULT_POLL_INTERVAL, DEFAULT_RAPIDAPI_HOST # NOQA
from .functions import adsbx_to_cot, create_tasks # NOQA
from .classes import ADSBXWorker # NOQA
Loading

0 comments on commit 0a13647

Please sign in to comment.