Telemetry dashboard for APRS packets from TNC, https://aprs.fi, and PostGIS
Project description
PacketRaven
PacketRaven is a dashboard built to track high-altitude balloon flights from their location telemetry.
pip install packetraven
Examples:
listen to a TNC sending raw APRS strings over USB port COM4:
packetraven --tnc COM4
listen to APRS.fi, watching specific callsigns:
you need an API key to connect to APRS.fi; you can get one from https://aprs.fi/page/api
packetraven --apikey <api_key> --callsigns W3EAX-8,W3EAX-14
listen to a PostGIS database table:
packetraven --database <username>@<hostname>:5432/<database_name>/<table_name>
watch a text file for new lines containing raw APRS strings:
packetraven --tnc http://bpp.umd.edu/archives/Launches/NS-95_2020-11-07/APRS/W3EAX-11/W3EAX-11_raw_NS95.txt
listen to a TNC on COM3, watching specific callsigns, and synchronize new packets with a database table via SSH tunnel:
packetraven --tnc COM3 --callsigns W3EAX-8,W3EAX-14 --database <username>@<hostname>:5432/<database_name>/<table_name> --tunnel <ssh_username>@<hostname>:22
Graphical User Interface
to start the GUI, add --gui
to any packetraven
command
packetraven --gui
packetraven --callsigns W3EAX-8,W3EAX-14 --apikey <api_key> --gui
Usage:
usage: packetraven [-h] [--callsigns CALLSIGNS] [--aprsfi-key APRSFI_KEY] [--tnc TNC] [--database DATABASE] [--tunnel TUNNEL] [--igate]
[--start START] [--end END] [--log LOG] [--output OUTPUT] [--prediction-output PREDICTION_OUTPUT]
[--prediction-ascent-rate PREDICTION_ASCENT_RATE] [--prediction-burst-altitude PREDICTION_BURST_ALTITUDE]
[--prediction-descent-rate PREDICTION_DESCENT_RATE] [--prediction-float-altitude PREDICTION_FLOAT_ALTITUDE]
[--prediction-float-end-time PREDICTION_FLOAT_END_TIME] [--prediction-api PREDICTION_API] [--interval INTERVAL] [--gui]
optional arguments:
-h, --help show this help message and exit
--callsigns CALLSIGNS
comma-separated list of callsigns to track
--aprsfi-key APRSFI_KEY
APRS.fi API key (from https://aprs.fi/page/api)
--tnc TNC comma-separated list of serial ports / text files of a TNC parsing APRS packets from analog audio to ASCII (set to
`auto` to use the first open serial port)
--database DATABASE PostGres database table `user@hostname:port/database/table`
--tunnel TUNNEL SSH tunnel `user@hostname:port`
--igate send new packets to APRS-IS
--start START start date / time, in any common date format
--end END end date / time, in any common date format
--log LOG path to log file to save log messages
--output OUTPUT path to output file to save packets
--prediction-output PREDICTION_OUTPUT
path to output file to save most up-to-date predicted trajectory
--prediction-ascent-rate PREDICTION_ASCENT_RATE
ascent rate to use for prediction (m/s)
--prediction-burst-altitude PREDICTION_BURST_ALTITUDE
burst altitude to use for prediction (m)
--prediction-descent-rate PREDICTION_DESCENT_RATE
descent rate to use for prediction (m/s)
--prediction-float-altitude PREDICTION_FLOAT_ALTITUDE
float altitude to use for prediction (m)
--prediction-float-end-time PREDICTION_FLOAT_END_TIME
float end time to use for prediction
--prediction-api PREDICTION_API
API URL to use for prediction (one of ['https://predict.cusf.co.uk/api/v1/',
'https://predict.lukerenegar.com/api/v1.1/'])
--interval INTERVAL seconds between each main loop (default: 20)
--gui start the graphical interface
Python API:
to retrieve packets directly from https://aprs.fi:
from packetraven import APRSfi
callsigns = ['W3EAX-8', 'W3EAX-12', 'KC3FXX', 'KC3ZRB']
api_key = '<api_key>' # enter your APRS.fi API key here - you can get one from https://aprs.fi/page/api
aprs_fi = APRSfi(callsigns, api_key)
aprs_fi_packets = aprs_fi.packets
print(aprs_fi_packets)
or parse packets from a TNC sending parsed APRS over a USB connection:
from packetraven import SerialTNC
serial_port = 'COM5' # set to `'auto'` to connect to the first open serial port
tnc = SerialTNC(serial_port)
tnc_packets = tnc.packets
print(tnc_packets)
or connect to a PostGreSQL database running PostGIS:
from packetraven import APRSDatabaseTable
callsigns = ['W3EAX-8', 'W3EAX-12', 'KC3FXX', 'KC3ZRB']
hostname = '<hostname>:5432'
database = '<database_name>'
table = 'packets'
username = '<username>'
password = '<password>'
# parameters for an SSH tunnel
ssh_hostname = None
ssh_username = None
ssh_password = None
table = APRSDatabaseTable(hostname, database, table, callsigns,
username=username, password=password,
ssh_hostname=ssh_hostname, ssh_username=ssh_hostname, ssh_password=ssh_password)
table_packets = table.packets
print(table_packets)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
packetraven-1.7.7.tar.gz
(37.7 kB
view details)
Built Distribution
File details
Details for the file packetraven-1.7.7.tar.gz
.
File metadata
- Download URL: packetraven-1.7.7.tar.gz
- Upload date:
- Size: 37.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a93a71c0a45ee19bac6cd9beb88b338f9e20405cc0a8a95d52918c4b6b9f124 |
|
MD5 | 24e184c510979c8f6260b2260283154e |
|
BLAKE2b-256 | c12c58b50f2f4e9c0740605a9a2170468c01c8d40006b5bf7c7a8e650c876de4 |
Provenance
File details
Details for the file packetraven-1.7.7-py3-none-any.whl
.
File metadata
- Download URL: packetraven-1.7.7-py3-none-any.whl
- Upload date:
- Size: 39.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 426bd1db6075269abc801e32ebad5246ae6c550bc98ae3b64cb4d2c7e18c5d7d |
|
MD5 | ad1b2b6284b8c0cee390dcb520bde562 |
|
BLAKE2b-256 | 1e0ec25e4d22ae2f219e7c6f79f811f28e7ad94b60e78aa828593485af733f41 |