Helper Tools for PPG FlySight Flight Log Management
🚨 This is an alpha project. User-facing functionality is still under development 🚨
Install from PyPi with your favorite pip
invocation:
$ pip install ppg-log
You can confirm proper installation via the ppglog
CLI:
$ ppglog --help
Usage: ppglog [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
batch Batch flight log processing pipeline.
db Interact with a PPG Log database instance.
single Single flight log processing pipeline.
The following environment variables are provided to help customize pipeline behaviors.
Variable Name | Description | Default |
---|---|---|
DB_URL |
Flight log database URL | './tmp.db' |
PROMPT_START_DIR |
Start path for UI file/dir prompt | '.' |
Process a single FlySight log file.
Parameter | Description | Type | Default |
---|---|---|---|
--log-filepath |
Path to FlySight log to parse. | Path|None |
GUI Prompt |
--start-trim |
Seconds to discard from the beginning of the flight log. | int|float |
45 |
--airborne-threshold |
Minimum groundspeed, as m/s, required to be considered airborne. | int|float |
2.235 |
--time-threshold |
Duration, as seconds, used to characterize flight segments. | int|float |
15 |
--midair-start |
Consider the start of the file as the start of a flight segment.1 | bool |
False |
--show-plot |
Show parsed flight log summary plot. | bool |
True |
--plot_save_dir |
Path to save parsed flight log summary plot.2 | Path|None |
None |
--db-insert |
Insert flight logs into the currently configured database. | bool |
False |
- If
True
, any specificed--start-trim
will be discarded - If
None
, the summary plot will not be saved
Batch process a directory of FlySight log files.
Parameter | Description | Type | Default |
---|---|---|---|
--log-dir |
Path to FlySight log directory to parse. | Path|None |
GUI Prompt |
--log-pattern |
FlySight log file glob pattern.1,2 | str |
"*.CSV" |
--start-trim |
Seconds to discard from the beginning of the flight log. | int|float |
45 |
--airborne-threshold |
Minimum groundspeed, as m/s, required to be considered airborne. | int|float |
2.235 |
--time-threshold |
Duration, as seconds, used to characterize flight segments. | int|float |
15 |
--plot-save-dir |
Path to save parsed flight log summary plot.3 | Path|None |
None |
--db-insert |
Insert flight logs into the currently configured database. | bool |
False |
--verbose |
Display in-console information on the running parsing operation. | bool |
True |
- Case sensitivity is deferred to the host OS
- Recursive globbing requires manual specification (e.g.
**/*.CSV
) - If
None
, the summary plot will not be saved
Subcommands for interacting with the PPG Log database.
Save the db address to a local .env
file.
NOTE: If a .env
file does not exist in the current directory, one will be created for you.
Parameter | Description | Type | Default |
---|---|---|---|
--value |
db address string. | str |
Required |
This project uses Poetry to manage dependencies. With your fork cloned to your local machine, you can install the project and its dependencies to create a development environment using:
$ poetry install
A pre-commit configuration is also provided to create a pre-commit hook so linting errors aren't committed:
$ pre-commit install
A pytest suite is provided, with coverage reporting from pytest-cov. A tox configuration is provided to test across all supported versions of Python. Testing will be skipped for Python versions that cannot be found.
$ tox
Details on missing coverage, including in the test suite, is provided in the report to allow the user to generate additional tests for full coverage.