Skip to content

Commit

Permalink
final v6
Browse files Browse the repository at this point in the history
  • Loading branch information
ampledata committed Jun 10, 2022
1 parent 43de2c6 commit 47e82d3
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Build Debian/Apt bdist_deb
run: |
export REPO_NAME=$(echo ${github.repository} | awk -F"/" '{print $2}')
export REPO_NAME=$(echo ${{ github.repository }} | awk -F"/" '{print $2}')
python3 setup.py --command-packages=stdeb.command bdist_deb
ls -al deb_dist/
cp deb_dist/python3-${REPO_NAME}_*_all.deb deb_dist/python3-${REPO_NAME}_latest_all.deb
Expand Down
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

70 changes: 42 additions & 28 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
aprscot - APRS Cursor-on-Target Gateway.
****************************************

IF YOU HAVE AN URGENT OPERATIONAL NEED: Email [email protected] or call/sms +1-415-598-8226

.. image:: https://raw.githubusercontent.com/ampledata/aprscot/main/docs/screenshot_1637083240_16797-50p.png
:alt: Screenshot of APRS PLI in ATAK..
:alt: Screenshot of APRS PLI in ATAK.
:target: https://raw.githubusercontent.com/ampledata/aprscot/main/docs/screenshot_1637083240_16797.png

The ``aprscot`` "APRS to Cursor On Target (COT) Gateway" provides beyond
line-of-sight blue force tracking capabilities using commercial off the shelf
components. This gateway uses the Automatic Packet Reporting System (APRS)
and APRS-IS network to forward APRS position reports to Cursor On Target (COT)
clients such as the Android Team Awareness Kit (ATAK), WinTAK, et al. Other
The APRS to Cursor On Target Gateway (APRSCOT) provides beyond line-of-sight
blue force tracking capabilities using commercial off the shelf components.
This gateway uses the Automatic Packet Reporting System (APRS) and APRS-IS
network to forward APRS position reports to Cursor On Target (COT) clients
such as the Android Team Awareness Kit (ATAK), WinTAK, et al. Other
situational awareness & common operating picture platforms are supported
through use of COT, such as TAKX & COPERS.

Expand All @@ -37,25 +35,27 @@ Concept:
:alt: APRSCOT concept diagram.
:target: https://raw.githubusercontent.com/ampledata/aprscot/main/docs/aprscot-concept.png

Support aprscot Development
============================

aprscot has been developed for the Disaster Response, Public Safety, and
Frontline community. This software is currently provided at no-cost to
our end-users. All development is self-funded and all time-spent is entirely
voluntary. Any contribution you can make to further these software development
efforts, and the mission of aprscot to provide ongoing SA capabilities to our
end-users, is greatly appreciated:
Support Development
===================

**Tech Support**: Email [email protected] or Signal/WhatsApp: +1-310-621-9598

This tool has been developed for the Disaster Response, Public Safety and
Frontline Healthcare community. This software is currently provided at no-cost
to users. Any contribution you can make to further this project's development
efforts is greatly appreciated.

.. image:: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
:target: https://www.buymeacoffee.com/ampledata
:alt: Support aprscot development: Buy me a coffee!
:alt: Support Development: Buy me a coffee!


Installation
============

The APRS to COT gateway is service started with a command-line tool
called `aprscot`. There are three options for installing `aprscot`, in order
called ``aprscot``. There are three options for installing ``aprscot``, in order
preferred option they are:

**Option I: Install as a Debian / Ubuntu Package**::
Expand All @@ -70,20 +70,20 @@ preferred option they are:

Option II: Install from the Python Package Index (PyPI)::

$ pip install aprscot
$ python3 -m pip install aprscot


Option III: Install from this source tree::

$ git clone https://github.com/ampledata/aprscot.git
$ cd aprscot/
$ python setup.py install
$ python3 setup.py install


Usage
=====

The `aprscot` program has one command-line argument::
The ``aprscot`` program has one command-line argument::

$ aprscot -h
usage: aprscot [-h] [-c CONFIG_FILE]
Expand All @@ -92,13 +92,13 @@ The `aprscot` program has one command-line argument::
-h, --help show this help message and exit
-c CONFIG_FILE, --CONFIG_FILE CONFIG_FILE

You must create a configuration file, see `example-config.ini` in the source
You must create a configuration file, see ``example-config.ini`` in the source
repository.

An example config, `COT_URL` is our COT destination server or client::
An example config, ``COT_URL`` is our COT destination server or client::

[aprscot]
COT_URL = tcp:takserver.example.com:8088
COT_URL = tcp://takserver.example.com:8088


`APRS-IS Server-side Filter Commands <http://www.aprs-is.net/javAPRSFilter.aspx>`_
Expand All @@ -109,7 +109,7 @@ can be used to filter incoming APRS Frames::
APRSIS_FILTER = f/W6PW-10/50

PLI Transforms can be created using per-station sections. In this example,
we're overriding `W2GMD-9`'s COT Type & Callsign, and `NB6F-2`'s Callsign::
we're overriding ``W2GMD-9``'s COT Type & Callsign, and ``NB6F-2``'s Callsign::

[aprscot]
COT_URL = tcp:takserver.example.com:8088
Expand All @@ -127,18 +127,32 @@ Source
======
Github: https://github.com/ampledata/aprscot


Author
======
Greg Albrecht W2GMD [email protected]

https://ampledata.org/


Copyright
=========
Copyright 2022 Greg Albrecht

`Automatic Packet Reporting System (APRS) <http://www.aprs.org/>`_ is Copyright Bob Bruninga WB4APR (SK) [email protected]
* APRSCOT is Copyright 2022 Greg Albrecht <[email protected]>
* `Automatic Packet Reporting System (APRS) <http://www.aprs.org/>`_ is Copyright Bob Bruninga WB4APR (SK) [email protected]


License
=======
Apache License, Version 2.0. See LICENSE for details.

Copyright 2022 Greg Albrecht <[email protected]>

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.
10 changes: 8 additions & 2 deletions aprscot/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

import asyncio

from configparser import ConfigParser

import aprslib.parsing

import pytak
Expand All @@ -34,6 +36,10 @@ class APRSWorker(pytak.QueueWorker):

"""APRS Cursor-on-Target Worker Class."""

def __init__(self, queue: asyncio.Queue, config: ConfigParser):
super().__init__(queue, config)
_ = [x.setFormatter(aprscot.LOG_FORMAT) for x in self._logger.handlers]

async def handle_data(self, data: bytes) -> None:
"""Handles messages from APRS Worker."""
self._logger.debug("APRS data='%s'", data)
Expand All @@ -47,10 +53,10 @@ async def handle_data(self, data: bytes) -> None:
# Some APRS Frame types are not supported by aprslib yet:
try:
frame = aprslib.parsing.parse(data)
except aprslib.exceptions.UnknownFormat as exc:
except aprslib.exceptions.UnknownFormat:
self._logger.warning("Unhandled APRS Frame: '%s'", data)
return
except aprslib.exceptions.ParseError as exc2:
except aprslib.exceptions.ParseError:
self._logger.warning("Invalid Format: '%s'", data)
return

Expand Down
10 changes: 8 additions & 2 deletions aprscot/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
__license__ = "Apache License, Version 2.0"


# PyTAK CLI tool boilerplate:
pytak.cli(__name__.split(".")[0])
def main() -> None:
"""Main func."""
# PyTAK CLI tool boilerplate:
pytak.cli(__name__.split(".")[0])


if __name__ == "__main__":
main()
10 changes: 5 additions & 5 deletions example-config.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[aprscot]
#specify protocol:server:port to receive COT
COT_URL = tcp:127.0.0.1:8087
#fill with your callsign
# specify protocol:server:port to receive COT
COT_URL = tcp://127.0.0.1:8087
# fill with your callsign
CALLSIGN = N0CALL
#fill with aprs server side filter, ie. f/call/dist
# fill with aprs server side filter, ie. f/call/dist
APRSIS_FILTER = f/N0CALL/50
#for server other than default to rotate.aprs.net:14580, ie. local xastir
# for server other than default to rotate.aprs.net:14580, ie. local xastir
APRS_HOST = localhost
APRS_PORT = 2023
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def publish():
packages=[__title__],
package_dir={__title__: __title__},
url=f"https://github.com/ampledata/{__title__}",
entry_points={"console_scripts": [f"{__title__} = {__title__}.commands"]},
entry_points={"console_scripts": [f"{__title__} = {__title__}.commands:main"]},
description="APRS Cursor-on-Target Gateway.",
author="Greg Albrecht",
author_email="[email protected]",
Expand Down
5 changes: 0 additions & 5 deletions tox.ini

This file was deleted.

0 comments on commit 47e82d3

Please sign in to comment.