-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
219 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
AISCOT supports multiple methods of configuration: | ||
|
||
1. INI-style config file, see `config.example.ini`. Usage: `aiscot -c config.ini`. | ||
2. Environment variables. Usage: `export DEBUG=1 ; aiscot` | ||
3. If using systemd, edit `/etc/default/aiscot` | ||
|
||
AISCOT has the following built-in configuration parameters: | ||
|
||
* **`COT_URL`** | ||
* Default: ``udp+wo://239.2.3.1:6969`` (TAK Mesh SA, Multicast UDP, write-only) | ||
|
||
Destination for TAK Data (Cursor on Target Events). Supported values are: | ||
|
||
* TLS Unicast: ``tls://host:port`` | ||
* TCP Unicast: ``tcp://host:port`` | ||
* UDP Multicast: ``udp://group:port`` (aka **Mesh SA**) | ||
* UDP Unicast: ``udp://host:port`` | ||
* UDP Broadcast: ``udp+broadcast://network:port`` | ||
* UDP Write-only: ``udp+wo://host:port`` | ||
* stdout or stderr: ``log://stdout`` or ``log://stderr`` | ||
|
||
**N.B.** `+wo` modifier stands for 'write-only', and allows multiple PyTAK | ||
applications to run on a single bound-interface without monopolizing a port. If you're getting a 'cannot bind to port' or 'port occupied error', try adding the `+wo` modifier. | ||
|
||
* **`AIS_PORT`**: | ||
* Default: ``5050`` | ||
|
||
AIS UDP Listen Port, for use with Over-the-air (RF) AIS. | ||
|
||
* **`COT_STALE`**: | ||
* Default: ``3600`` (seconds) | ||
|
||
CoT Stale period ("timeout"), in seconds. | ||
|
||
* **`COT_TYPE`**: | ||
* Default: ``a-u-S-X-M`` | ||
|
||
Override COT Event Type ("marker type"). | ||
|
||
* **`KNOWN_CRAFT`**: | ||
* Default: unset | ||
|
||
CSV-style hints file for overriding callsign, icon, COT Type, etc. | ||
|
||
* **`INCLUDE_ALL_CRAFT`**: | ||
* Default: ``False`` | ||
|
||
If ``True`` and ``KNOWN_CRAFT`` is set, will forward all craft, including those transformed by the ``KNOWN_CRAFT`` database. | ||
|
||
* **`IGNORE_ATON`**: | ||
* Default: ``False`` | ||
|
||
Ignore AIS from Aids to Naviation (buoys, etc). | ||
|
||
Additional configuration parameters, including TAK Server configuration, are included in the [PyTAK Configuration](https://pytak.readthedocs.io/en/stable/configuration/) documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Concept of Operations | ||
|
||
AISCOT can operate in two different modes, as described in detail below: | ||
|
||
1. AIS Over-the-air (RF) | ||
2. AIS Aggregator (AISHUB) | ||
|
||
## AIS Over-the-air Operation (RF) | ||
|
||
![AISCOT "AIS Over the Air" CONOP](aiscot_ota.png) | ||
|
||
Receive AIS data from a VHF AIS receiver, such as the | ||
Megwatt `dAISy+ <https://shop.wegmatt.com/products/daisy-ais-receiver>`_. From there | ||
AIS can be decoded by `AIS Dispatcher <https://www.aishub.net/ais-dispatcher>`_ and | ||
forwarded to AISCOT to be transformed to COT and transmitted to COT destinations. | ||
|
||
## AIS Aggregator Operation (AISHUB.com) | ||
|
||
![AISCOT "AIS Aggregator" CONOP](aiscot_agg.png) | ||
|
||
Receive AIS data from the `AISHUB <https://www.aishub.com>`_ service. | ||
Requires a subscription to AISHUB. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
AISCOT's functionality provided by a command-line software program called `aiscot`. | ||
|
||
## Debian, Ubuntu, Raspberry Pi | ||
|
||
Install AISCOT, and prerequisite packages [PyTAK](https://pytak.rtfd.io). | ||
|
||
```sh linenums="1" | ||
sudo apt update -qq | ||
wget https://github.com/snstac/pytak/releases/latest/download/pytak_latest_all.deb | ||
sudo apt install -f ./pytak_latest_all.deb | ||
wget https://github.com/snstac/aiscot/releases/latest/download/aiscot_latest_all.deb | ||
sudo apt install -f ./aiscot_latest_all.deb | ||
``` | ||
|
||
## Windows, Linux | ||
|
||
Install from the Python Package Index (PyPI):: | ||
|
||
```sh | ||
sudo python3 -m pip install aiscot | ||
``` | ||
|
||
## Developers | ||
|
||
PRs welcome! | ||
|
||
```sh linenums="1" | ||
git clone https://github.com/snstac/aiscot.git | ||
cd aiscot/ | ||
make editable | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
To report bugs, please set the DEBUG=1 environment variable to collect logs: | ||
|
||
```sh | ||
DEBUG=1 aiscot | ||
``` | ||
|
||
Or: | ||
|
||
```sh linenums="1" | ||
export DEBUG=1 | ||
aiscot | ||
``` | ||
|
||
Or: | ||
|
||
```sh linenums="1" | ||
echo 'DEBUG=1' >> aiscot.ini | ||
aiscot -c aiscot.ini | ||
``` | ||
|
||
You can view systemd/systemctl/service logs via: | ||
|
||
```journalctl -fu aiscot``` | ||
|
||
Please use GitHub issues for support requests. Please note that AISCOT is free open source software and comes with no warranty. See LICENSE. | ||
|
||
## Database Update | ||
|
||
Occasional updates to the YADD Ship Name database can be found at: http://www.yaddnet.org/pages/php/test/tmp/ | ||
|
||
Updates to the MID database can be found at: TK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
AISCOT can be configured with a INI-style configuration file, or using | ||
environmental variables. | ||
|
||
Command-line options:: | ||
|
||
usage: aiscot [-h] [-c CONFIG_FILE] [-p PREF_PACKAGE] | ||
|
||
optional arguments: | ||
-h, --help show this help message and exit | ||
-c CONFIG_FILE, --CONFIG_FILE CONFIG_FILE | ||
Optional configuration file. Default: config.ini | ||
-p PREF_PACKAGE, --PREF_PACKAGE PREF_PACKAGE | ||
Optional connection preferences package zip file (aka Data Package). | ||
|
||
## AISHUB | ||
|
||
AISHUB.com requires registration. Once registered the site will provide you with a | ||
Username that you'll use with their feed. You'll also need to specify a Bounding Box | ||
when accessing the feed. | ||
|
||
The AISHUB_URL must be specified as follows: | ||
|
||
``https://data.aishub.net/ws.php?format=1&output=json&compress=0&username=AISHUB_USERNAME&latmin=BBOX_LAT_MIN&latmax=BBOX_LAT_MAX&lonmin=BBOX_LON_MON&lonmax=BBOX_LON_MAX`` | ||
|
||
Replacing ``AISHUB_USERNAME`` with your AISHUB.com username, and specifying the | ||
Bounding Box is specified as follows: | ||
|
||
* **`latmin`** | ||
* signed float | ||
|
||
The minimum latitude of the Bounding Box (degrees from Equator) as a signed float (use negative sign for East: ``-``). | ||
|
||
* **`latmax`** | ||
* signed float | ||
|
||
The maximum latitude of the Bounding Box (degrees from Equator) as a signed float (use negative sign for East: ``-``). | ||
|
||
* **`lonmin`** | ||
* signed float | ||
|
||
The minimum longitude of the Bound Box (degrees from Prime Meridian) as a signed float (use negative sign for North: ``-``). | ||
|
||
* **`lonmax`** | ||
* signed float | ||
|
||
The maximum longitude of the Bound Box (degrees from Prime Meridian) as a signed float (use negative sign for North: ``-``). | ||
|
||
For example, the following Bound Box paints a large swath around Northern California: | ||
``latmin=35&latmax=38&lonmin=-124&lonmax=-121``. This can be read as: | ||
"Between 35° and 38° latitude & -121° and -124° longitude". | ||
|
||
## Run as a service / Run forever | ||
|
||
1. Add the text contents below a file named `/lib/systemd/system/aiscot.service` | ||
You can use `nano` or `vi` editors: `sudo nano /lib/systemd/system/aiscot.service` | ||
2. Reload systemctl: `sudo systemctl daemon-reload` | ||
3. Enable AISCOT: `sudo systemctl enable aiscot` | ||
4. Start AISCOT: `sudo systemctl start aiscot` | ||
|
||
```ini | ||
{!debian/aiscot.service} | ||
``` | ||
|
||
|
||
> Pay special attention to the `ExecStart` line above. You'll need to provide the full local filesystem path to both your `aiscot` executable & AISCOT configuration files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters