Skip to content

Commit 740c7e9

Browse files
author
zacharyburnett
committed
update configuration documentation
1 parent 76258ef commit 740c7e9

5 files changed

Lines changed: 224 additions & 80 deletions

File tree

README.md

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,44 @@
55
[![license](https://img.shields.io/github/license/umdbpp/packetraven)](https://opensource.org/licenses/MIT)
66

77
PacketRaven is a command-line dashboard that retrieves location telemetry sent by high-altitude balloon payloads.
8-
8+
The program is designed to be run during a flight and display information in a terminal user interface (TUI):
99
![demo](https://media.githubusercontent.com/media/UMDBPP/PacketRaven/main/docs/images/demo.gif)
1010

11-
To install PacketRaven, download an executable from the [latest release](https://github.com/UMDBPP/PacketRaven/releases)
12-
and run it from the terminal with a
13-
[configuration file](https://packetraven.readthedocs.io/en/latest/configuration.html):
11+
## Features
12+
13+
- retrieve location telemetry from a variety of sources, including
14+
- https://amateur.sondehub.org
15+
- https://aprs.fi
16+
- a TNC-equipped radio connected via USB
17+
- a text file containing raw APRS frames
18+
- a GeoJSON file with telemetry attached to coordinates
19+
- retrieve balloon flight predictions from https://predict.sondehub.org
20+
- plot variables such as altitude and ascent rate over time
21+
- estimate landing time and location
22+
23+
## Installation
24+
25+
[Download an executable file from the latest release.](https://github.com/UMDBPP/PacketRaven/releases)
26+
27+
> **Note**
28+
> Alternatively, you may compile the program yourself:
29+
> ```shell
30+
> git clone https://github.com/UMDBPP/PacketRaven.git
31+
> cd packetraven
32+
> cargo build --release
33+
> ls target/release
34+
> ```
35+
36+
## Usage
37+
38+
First, you need a configuration file. You may use one from the `examples/` directory in this repository, or [write one yourself](https://packetraven.readthedocs.io/en/latest/configuration.html).
39+
40+
Then, run your executable from the terminal with the path to your configuration as the first argument:
1441
```shell
1542
./packetraven_Windows.exe examples/example_1.yaml
1643
```
44+
45+
You should then see the following in your terminal window:
1746
![starting screen](https://media.githubusercontent.com/media/UMDBPP/PacketRaven/main/docs/images/example1_log.png)
1847

1948
The left and right arrow keys (or `Tab` and `Shift+Tab`) cycle through active tabs,
@@ -22,11 +51,3 @@ and the up and down arrow keys change the current plot (or scroll through log me
2251

2352
To quit, press `q` or `Esc`.
2453

25-
> **Note**
26-
> Alternatively, you may build the executable from source with Cargo:
27-
> ```shell
28-
> git clone https://github.com/UMDBPP/PacketRaven.git
29-
> cd packetraven
30-
> cargo build --release
31-
> ls target/release
32-
> ```

docs/rtd_environment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ dependencies:
55
- python
66
- sphinx
77
- sphinx-mdinclude
8+
- sphinx_rtd_theme

docs/source/configuration.rst

Lines changed: 184 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,45 @@
1-
configuration
2-
=============
1+
Configuration File
2+
##################
33

4-
The configuration file is in YAML format. All units are metric (``m``, ``m/s``, ``C``, etc.).
4+
The configuration file is in YAML format. All units are metric (meters, seconds, meters per second).
55

6-
``callsigns``
7-
-------------
6+
.. literalinclude:: ../../examples/example_3.yaml
7+
:language: yaml
88

9-
a list of callsigns as strings, including SSIDs if present
9+
More examples can be found at the :doc:`examples` page.
10+
11+
.. _callsigns:
12+
13+
Callsigns (``callsigns``, optional)
14+
===================================
15+
16+
a list of callsigns as strings, including SSIDs
1017

1118
.. code-block:: yaml
1219
1320
callsigns:
14-
- KC3SKW-8
1521
- KC3SKW-9
22+
- KC3ZRB
23+
24+
if present, only telemetry with callsigns in this list will be displayed
25+
26+
Time (``time``, optional)
27+
=========================
28+
29+
``start`` and ``end`` (optional)
30+
--------------------------------
1631

17-
``connections``
18-
---------------
32+
start and end times by which to filter received telemetry, as either ``yyyy-mm-dd`` or ``yyyy-mm-dd HH:MM:SS``
1933

20-
connections from which to retrieve packets
34+
``interval`` (default ``60``)
35+
-----------------------------
36+
37+
frequency in seconds that PacketRaven will fetch new telemetry
38+
39+
Connections (``connections``)
40+
=============================
41+
42+
connections from which to retrieve telemetry
2143

2244
.. code-block:: yaml
2345
@@ -34,8 +56,8 @@ connections from which to retrieve packets
3456
To define a connection with no options (i.e. the ``sondehub`` entry, above), use YAML's empty flow mapping syntax ``sondehub: {}``.
3557
The empty block mapping syntax (``sondehub: ``) is equivalent to ``sondehub: null`` and will not initiate the connection.
3658

37-
``text``
38-
^^^^^^^^
59+
Text connection (``text``)
60+
--------------------------
3961

4062
text entries can be
4163

@@ -56,32 +78,70 @@ text entries can be
5678
- port: COM3
5779
baud_rate: 9600
5880
59-
.. note::
60-
File connections use the ``path:`` entry, while
61-
serial port connections use the ``port:`` and ``baud_rate:`` entries instead.
81+
File
82+
^^^^
6283

63-
``sondehub``
64-
^^^^^^^^^^^^
84+
``path``
85+
""""""""
6586

66-
.. code-block:: yaml
87+
path to a file (can be a URL)
88+
89+
``callsigns`` (optional)
90+
""""""""""""""""""""""""
91+
92+
see the :ref:`Callsigns <callsigns>` section
93+
94+
Serial
95+
^^^^^^
96+
97+
``port``
98+
""""""""
99+
100+
serial port to connect to, i.e. `COM4` or `/dev/ttyUSB1`
101+
102+
``baud_rate``
103+
"""""""""""""
104+
105+
baud rate with which to connect to serial port
106+
107+
``callsigns`` (optional)
108+
""""""""""""""""""""""""
109+
110+
see the :ref:`Callsigns <callsigns>` section
67111

68-
sondehub:
69-
callsigns:
70-
- KC3SKW-8
112+
SondeHub connection (``sondehub``)
113+
----------------------------------
71114

72-
``aprs_fi``
115+
if present, query the database at https://amateur.sondehub.org for telemetry from the given callsigns
116+
117+
``callsigns`` (optional if already defined globally)
118+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119+
120+
see the :ref:`Callsigns <callsigns>` section
121+
122+
APRSfi Connection (``aprs_fi``)
123+
-------------------------------
124+
125+
if present, query the database at https://aprs.fi for telemetry from the given callsigns
126+
127+
``api_key``
73128
^^^^^^^^^^^
74129

75-
.. code-block:: yaml
130+
get an API key from https://aprs.fi/page/api
76131

77-
aprs_fi:
78-
api_key: 123456.abcdefhijklmnop
132+
``callsigns`` (optional if already defined globally)
133+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79134

80-
``postgres``
81-
^^^^^^^^^^^^
135+
see the :ref:`Callsigns <callsigns>` section
136+
137+
PostGres Database connection (``postgres``, requires the ``postgres`` feature)
138+
------------------------------------------------------------------------------
82139

83140
.. warning::
84-
requires the ``postgres`` feature
141+
requires compiling with the ``postgres`` feature:
142+
..code-block:: shell
143+
144+
cargo build --release --features postgres
85145

86146
.. code-block:: yaml
87147
@@ -98,39 +158,10 @@ text entries can be
98158
username: "ssh_user1"
99159
password: "ssh_password1"
100160
101-
``time``
102-
--------
103-
104-
.. code-block:: yaml
105-
106-
time:
107-
start: 2022-03-05 00:00:00
108-
end: 2022-03-06 00:00:00
109-
interval: 120
110-
111-
``start`` and ``end``
112-
^^^^^^^^^^^^^^^^^^^^^
113-
114-
start and end times by which to filter received telemetry
115-
116-
``interval``
117-
^^^^^^^^^^^^
118-
119-
interval in seconds after which to fetch new telemetry
120-
121-
``output_file``
122-
---------------
123-
124-
GeoJSON file to output telemetry to
125-
126-
.. code-block:: yaml
127-
128-
output_file: example_3.geojson
161+
Flight Prediction (``prediction``, optional)
162+
============================================
129163

130-
``prediction``
131-
--------------
132-
133-
default prediction profile that will be applied to all callsigns
164+
query parameters for https://predict.sondehub.org
134165

135166
.. code-block:: yaml
136167
@@ -144,14 +175,103 @@ default prediction profile that will be applied to all callsigns
144175
ascent_rate: 6.5
145176
burst_altitude: 25000
146177
sea_level_descent_rate: 9
147-
float:
148-
duration: 3600
149-
float_altitude: 25000
150-
uncertainty: 500
151178
output_file: example_3_prediction.geojson
152179
180+
Launch / starting location and time (``start``)
181+
-----------------------------------------------
182+
183+
.. code-block:: yaml
184+
185+
start:
186+
coord:
187+
x: -78.4987
188+
y: 40.0157
189+
time: 2022-03-05 10:36:00
190+
191+
``coord``
192+
^^^^^^^^^
193+
194+
``x`` and ``y`` in WGS84 coordinates
195+
196+
``altitude`` (optional)
197+
^^^^^^^^^^^^^^^^^^^^^^^
198+
199+
altitude in meters
200+
201+
``time``
202+
^^^^^^^^
203+
204+
time of prediction start, as ``yyyy-mm-dd`` or ``yyyy-mm-dd HH:MM:SS``
205+
206+
Standard Profile (``profile``)
207+
------------------------------
208+
209+
.. code-block:: yaml
210+
211+
profile:
212+
ascent_rate: 6.5
213+
burst_altitude: 25000
214+
sea_level_descent_rate: 9
215+
153216
.. note::
154217
During a flight, the prediction profile for each track will differ from this default configuration;
155218
for instance, on ascent the profile will use the actual ascent rate from telemetry,
156219
and during descent the prediction will only include the descent stage.
157220

221+
``ascent_rate``
222+
^^^^^^^^^^^^^^^
223+
224+
expected average ascent rate of the balloon
225+
226+
``burst_altitude``
227+
^^^^^^^^^^^^^^^^^^
228+
229+
expected burst altitude
230+
231+
``sea_level_descent_rate``
232+
^^^^^^^^^^^^^^^^^^^^^^^^^^
233+
234+
expected descent rate of the balloon at sea level
235+
236+
Float Profile (``float``, optional)
237+
-----------------------------------
238+
239+
.. code-block:: yaml
240+
241+
float:
242+
duration: 3600
243+
altitude: 25000
244+
uncertainty: 500
245+
246+
``duration``
247+
^^^^^^^^^^^^
248+
249+
expected duration of the float
250+
251+
``altitude``
252+
^^^^^^^^^^^^
253+
254+
expected altitude of the float
255+
256+
``uncertainty`` (default ``500``)
257+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
258+
259+
leeway that the balloon can be considered "at float altitude"
260+
261+
Prediction Output File (``output_file``, optional)
262+
--------------------------------------------------
263+
264+
path to a GeoJSON file to which to output a predicted flight path
265+
266+
.. code-block:: yaml
267+
268+
output_file: example_3_prediction.geojson
269+
270+
Telemetry Output File (``output_file``, optional)
271+
=================================================
272+
273+
path to a GeoJSON file to which to output received telemetry
274+
275+
.. code-block:: yaml
276+
277+
output_file: example_3.geojson

docs/source/examples.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
examples
2-
========
1+
Configuration Examples
2+
======================
3+
4+
To run these examples, see `the Usage section <https://packetraven.readthedocs.io/en/latest/index.html#usage>`_.
35

46
``examples/example_1.yaml``
57
---------------------------

examples/example_3.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ time:
88
end: 2022-03-06 00:00:00
99
interval: 120
1010

11-
output_file: example_3.geojson
12-
1311
connections:
1412
sondehub: {}
1513
text:
@@ -28,3 +26,5 @@ prediction:
2826
burst_altitude: 25000
2927
sea_level_descent_rate: 9
3028
output_file: example_3_prediction.geojson
29+
30+
output_file: example_3.geojson

0 commit comments

Comments
 (0)