diff --git a/README.md b/README.md index 787d5c1..c05dc49 100644 --- a/README.md +++ b/README.md @@ -63,18 +63,59 @@ cd intercept docker compose up -d ``` -> **Note:** Docker requires privileged mode for USB SDR access. See `docker-compose.yml` for configuration options. - -### ADS-B History (Optional) - -The ADS-B history feature persists aircraft messages to Postgres for long-term analysis. - -```bash -# Start with ADS-B history and Postgres -docker compose --profile history up -d -``` - -Then open **/adsb/history** for the reporting dashboard. +> **Note:** Docker requires privileged mode for USB SDR access. See `docker-compose.yml` for configuration options. + +### ADS-B History (Optional) + +The ADS-B history feature persists aircraft messages to Postgres for long-term analysis. + +```bash +# Start with ADS-B history and Postgres +docker compose --profile history up -d +``` + +Set the following environment variables (for example in a `.env` file): + +```bash +INTERCEPT_ADSB_HISTORY_ENABLED=true +INTERCEPT_ADSB_DB_HOST=adsb_db +INTERCEPT_ADSB_DB_PORT=5432 +INTERCEPT_ADSB_DB_NAME=intercept_adsb +INTERCEPT_ADSB_DB_USER=intercept +INTERCEPT_ADSB_DB_PASSWORD=intercept +``` + +### Other ADS-B Settings + +Set these as environment variables for either local installs or Docker: + +| Variable | Default | Description | +|----------|---------|-------------| +| `INTERCEPT_ADSB_AUTO_START` | `false` | Auto-start ADS-B tracking when the dashboard loads | +| `INTERCEPT_SHARED_OBSERVER_LOCATION` | `true` | Share observer location across ADS-B/AIS/SSTV/Satellite modules | + +**Local install example** + +```bash +INTERCEPT_ADSB_AUTO_START=true \ +INTERCEPT_SHARED_OBSERVER_LOCATION=false \ +python app.py +``` + +**Docker example (.env)** + +```bash +INTERCEPT_ADSB_AUTO_START=true +INTERCEPT_SHARED_OBSERVER_LOCATION=false +``` + +To store Postgres data on external storage, set `PGDATA_PATH` (defaults to `./pgdata`): + +```bash +PGDATA_PATH=/mnt/usbpi1/intercept/pgdata +``` + +Then open **/adsb/history** for the reporting dashboard. ### Open the Interface diff --git a/docs/USAGE.md b/docs/USAGE.md index c2a455f..9c7aa11 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -79,42 +79,70 @@ INTERCEPT automatically detects known trackers: ### Emergency Squawks -The system highlights aircraft transmitting emergency squawks: -- **7500** - Hijack -- **7600** - Radio failure -- **7700** - General emergency - -## ADS-B History (Optional) - -The history dashboard persists aircraft messages and per-aircraft snapshots to Postgres for long-running tracking and reporting. - -### Enable History - -Set the following environment variables (Docker recommended): - -| Variable | Default | Description | -|----------|---------|-------------| -| `INTERCEPT_ADSB_HISTORY_ENABLED` | `false` | Enables history storage and reporting | -| `INTERCEPT_ADSB_DB_HOST` | `localhost` | Postgres host (use `adsb_db` in Docker) | -| `INTERCEPT_ADSB_DB_PORT` | `5432` | Postgres port | -| `INTERCEPT_ADSB_DB_NAME` | `intercept_adsb` | Database name | -| `INTERCEPT_ADSB_DB_USER` | `intercept` | Database user | -| `INTERCEPT_ADSB_DB_PASSWORD` | `intercept` | Database password | - -### Docker Setup - -`docker-compose.yml` includes an `adsb_db` service and a persistent volume for history storage: - -```bash -docker compose up -d -``` - -### Using the History Dashboard - -1. Open **/adsb/history** -2. Use **Start Tracking** to run ADS-B in headless mode -3. View aircraft history and timelines -4. Stop tracking when desired (session history is recorded) +The system highlights aircraft transmitting emergency squawks: +- **7500** - Hijack +- **7600** - Radio failure +- **7700** - General emergency + +## ADS-B History (Optional) + +The history dashboard persists aircraft messages and per-aircraft snapshots to Postgres for long-running tracking and reporting. + +### Enable History + +Set the following environment variables (Docker recommended): + +| Variable | Default | Description | +|----------|---------|-------------| +| `INTERCEPT_ADSB_HISTORY_ENABLED` | `false` | Enables history storage and reporting | +| `INTERCEPT_ADSB_DB_HOST` | `localhost` | Postgres host (use `adsb_db` in Docker) | +| `INTERCEPT_ADSB_DB_PORT` | `5432` | Postgres port | +| `INTERCEPT_ADSB_DB_NAME` | `intercept_adsb` | Database name | +| `INTERCEPT_ADSB_DB_USER` | `intercept` | Database user | +| `INTERCEPT_ADSB_DB_PASSWORD` | `intercept` | Database password | + +### Other ADS-B Settings + +| Variable | Default | Description | +|----------|---------|-------------| +| `INTERCEPT_ADSB_AUTO_START` | `false` | Auto-start ADS-B tracking when the dashboard loads | +| `INTERCEPT_SHARED_OBSERVER_LOCATION` | `true` | Share observer location across ADS-B/AIS/SSTV/Satellite modules | + +**Local install example** + +```bash +INTERCEPT_ADSB_AUTO_START=true \ +INTERCEPT_SHARED_OBSERVER_LOCATION=false \ +python app.py +``` + +**Docker example (.env)** + +```bash +INTERCEPT_ADSB_AUTO_START=true +INTERCEPT_SHARED_OBSERVER_LOCATION=false +``` + +### Docker Setup + +`docker-compose.yml` includes an `adsb_db` service and a persistent volume for history storage: + +```bash +docker compose --profile history up -d +``` + +To store Postgres data on external storage, set `PGDATA_PATH` (defaults to `./pgdata`): + +```bash +PGDATA_PATH=/mnt/usbpi1/intercept/pgdata +``` + +### Using the History Dashboard + +1. Open **/adsb/history** +2. Use **Start Tracking** to run ADS-B in headless mode +3. View aircraft history and timelines +4. Stop tracking when desired (session history is recorded) ## Satellite Mode