Skip to content

Python tool for aircraft Doppler audio geolocation using historical ADS-B flight data (Source-available)

Enable explicit online data setup [skip ci]

Cinna Davis6a357bf8e659
diff --git a/docs/PRODUCT.md b/docs/PRODUCT.md
index dcdb09f..cc58d73 100644
--- a/docs/PRODUCT.md
+++ b/docs/PRODUCT.md
@@ -10,7 +10,7 @@ bands, flight IDs and ground-truth coordinates are not upload inputs.
Launch the local interface after installing the project:
```bash
-dopplergeist serve --jobs jobs --config operator.json --port 8765
+dopplergeist serve --jobs jobs --online --max-runtime 14400 --port 8765
```
Open `http://127.0.0.1:8765`. The same persistent directory must be supplied after
@@ -24,16 +24,18 @@ to four pending jobs, limits uploads to 100 MiB by default, and limits analysis
to one hour by default. Set `--max-upload-mb` and `--max-runtime` to change these
operator limits. Cancellation terminates the analysis process group, including
decoders. No API credentials or paid service are required by the local service.
-Flight/terrain provider configuration and scientific integration are described
-below; an unconfigured backend must report
-missing data rather than invent a location.
+`--online` enables public flight and terrain downloads into `~/.cache/dopplergeist`
+when a job has a defensible recording time. Archives and indexes can take tens of gigabytes or more and hours; no automatic
+disk-space limit is currently enforced. The example gives each job four hours; adjust `--max-runtime`
+for your system. Omit `--online` and supply `--config operator.json` to use
+preconfigured offline data. An unconfigured backend reports missing data.
CLI equivalents:
```bash
-dopplergeist analyze recording.mp3 --jobs jobs --config operator.json \
- --start-utc 2026-09-08T20:00:00Z --end-utc 2026-09-08T20:05:00Z \
- --time-source 'Recorder clock and recording log'
+dopplergeist analyze recording.mp3 --jobs jobs --online --max-runtime 14400 \
+ --start-utc "$RECORDING_START_UTC_MIN" --end-utc "$RECORDING_START_UTC_MAX" \
+ --time-source 'Your evidence for this recording time'
dopplergeist job JOB_ID --jobs jobs
```
@@ -44,7 +46,7 @@ An inconclusive result may retain candidate hypotheses for inspection.
## HTTP surface
-- `GET /api/capabilities`: declared coverage and upload/work limits.
+- `GET /api/capabilities`: declared coverage, upload/work limits, and whether a flight provider and online acquisition are configured.
- `POST /api/jobs`: raw audio bytes with `Content-Type: application/octet-stream`,
`Content-Length`, optional `X-Filename`, and `X-Dopplergeist-Request` containing
the shared request JSON **without** `audio_path`. The server saves the upload
@@ -69,8 +71,12 @@ These transport tests do not establish scientific localization accuracy.
## Provider and search configuration
-An operator configures data once; users upload audio without choosing trajectory
-files. The normal acquisition path delegates to `data_access.acquire_inputs`:
+`--online` requires no JSON configuration: it uses the per-user cache and public
+providers automatically. For a different cache location, existing indexes, or
+custom budgets, provide an operator config with `--config`; `--online` enables
+network acquisition while retaining the configured cache path. Users upload
+audio without choosing trajectory files. The acquisition path delegates to
+`data_access.acquire_inputs`:
```json
{
diff --git a/src/dopplergeist/cli.py b/src/dopplergeist/cli.py
index a28c8bb..f63baef 100644
--- a/src/dopplergeist/cli.py
+++ b/src/dopplergeist/cli.py
@@ -1,5 +1,16 @@
import argparse
import json
+from pathlib import Path
+
+
+def operator_config(path, online):
+ config = json.loads(Path(path).read_text()) if path else {}
+ if online:
+ if not isinstance(config, dict):
+ raise ValueError("Operator configuration must be a JSON object")
+ config.setdefault("cache_root", str(Path.home() / ".cache" / "dopplergeist"))
+ config["offline"] = False
+ return config
def main():
@@ -21,10 +32,12 @@ def main():
analyze.add_argument("--time-source",help="How the recording start window was established")
analyze.add_argument("--jobs",default="jobs",help="Persistent job directory")
analyze.add_argument("--config",help="Operator provider/cache/search configuration JSON")
+ analyze.add_argument("--online",action="store_true",help="Download public data to the local cache; this can require tens of gigabytes and hours")
analyze.add_argument("--max-runtime",type=float,default=3600,help="Wall-time limit in seconds")
serve=sub.add_parser("serve",help="Launch the local MP3 upload interface and job API")
serve.add_argument("--jobs",default="jobs")
serve.add_argument("--config",help="Operator provider/cache/search configuration JSON")
+ serve.add_argument("--online",action="store_true",help="Download public data to the local cache; this can require tens of gigabytes and hours")
serve.add_argument("--port",type=int,default=8765)
serve.add_argument("--max-runtime",type=float,default=3600)
serve.add_argument("--max-upload-mb",type=int,default=100)
@@ -40,12 +53,10 @@ def main():
result=measure(args.audio,{"start_s":args.start,"end_s":args.end,"band_hz":args.band},args.output)
print(json.dumps(result[-1],indent=2))
elif args.command=="serve":
- from pathlib import Path
from .service import serve
- config=json.loads(Path(args.config).read_text()) if args.config else {}
+ config=operator_config(args.config,args.online)
serve(args.jobs,config,port=args.port,max_runtime_s=args.max_runtime,max_upload_bytes=args.max_upload_mb*1024*1024)
elif args.command=="analyze":
- from pathlib import Path
from .jobs import JobManager
if args.end_utc and not args.start_utc:
parser.error("--end-utc requires --start-utc")
@@ -54,7 +65,7 @@ def main():
request["time_window"]={"start_utc":args.start_utc,"end_utc":args.end_utc or args.start_utc,"source":"user"}
if args.time_source:
request["time_window"]["source_detail"]=args.time_source
- config=json.loads(Path(args.config).read_text()) if args.config else {}
+ config=operator_config(args.config,args.online)
manager=JobManager(args.jobs,config,max_runtime_s=args.max_runtime)
try:
audio=Path(args.audio)
diff --git a/src/dopplergeist/service.py b/src/dopplergeist/service.py
index ba6258a..13824e7 100644
--- a/src/dopplergeist/service.py
+++ b/src/dopplergeist/service.py
@@ -47,7 +47,9 @@ class Handler(BaseHTTPRequestHandler):
manager = self.server.manager
if self.command == "GET" and parts == ["api", "capabilities"]:
return self._reply({"schema_version": 1, "coverage": "conus", "max_upload_bytes": manager.max_upload_bytes,
- "max_runtime_s": manager.max_runtime_s, "max_pending": manager.max_pending})
+ "max_runtime_s": manager.max_runtime_s, "max_pending": manager.max_pending,
+ "provider_configured": bool(manager.config.get("cache_root") or manager.config.get("flight_indexes")),
+ "online_enabled": not bool(manager.config.get("offline", True))})
if self.command == "POST" and parts == ["api", "jobs"]:
if self.headers.get("Transfer-Encoding"):
raise ValueError("Use a Content-Length upload")
diff --git a/src/dopplergeist/web/app.js b/src/dopplergeist/web/app.js
index 4a74786..66acc25 100644
--- a/src/dopplergeist/web/app.js
+++ b/src/dopplergeist/web/app.js
@@ -141,7 +141,17 @@ $('cancel').addEventListener('click', async () => {
try { const value = await api(`/api/jobs/${activeJob}/cancel`, {method: 'POST'}); render(value); await artifacts(activeJob); }
catch (error) { $('connection').textContent = error.message; }
});
-api('/api/capabilities').then(value => { maxBytes = value.max_upload_bytes; $('limits').textContent = `Up to ${(maxBytes / 1024 / 1024).toFixed(0)} MB per file. Analysis budget: ${(value.max_runtime_s / 60).toFixed(0)} minutes per job.`; }).catch(error => { $('upload-error').textContent = error.message; });
+api('/api/capabilities').then(value => {
+ maxBytes = value.max_upload_bytes;
+ $('limits').textContent = `Up to ${(maxBytes / 1024 / 1024).toFixed(0)} MB per file. Analysis budget: ${(value.max_runtime_s / 60).toFixed(0)} minutes per job.`;
+ if (value.provider_configured === false) {
+ $('data-setup').textContent = 'Historical flight data is not configured. Restart the service with --online to download public data, or provide an offline configuration. Downloads and indexes can require tens of gigabytes or more and hours.';
+ $('data-setup').hidden = false;
+ } else if (value.online_enabled) {
+ $('data-setup').textContent = 'Public flight and terrain data may be downloaded to the local cache. Archives and indexes can require tens of gigabytes or more and hours.';
+ $('data-setup').hidden = false;
+ }
+}).catch(error => { $('upload-error').textContent = error.message; });
renderRecent();
const savedJob = new URLSearchParams(location.search).get('job');
if (savedJob && /^[0-9a-f]{32}$/.test(savedJob)) selectJob(savedJob);
diff --git a/src/dopplergeist/web/index.html b/src/dopplergeist/web/index.html
index a65147d..da6a5e7 100644
--- a/src/dopplergeist/web/index.html
+++ b/src/dopplergeist/web/index.html
@@ -7,6 +7,7 @@
<section class="intro"><p class="eyebrow">ACOUSTIC GEOLOCATION</p><h1>Find the flights.<br>Test the location.</h1><p>Upload a recording to discover aircraft Doppler curves, search historical flight tracks, and inspect the evidence. When the evidence cannot support a location, the result is inconclusive.</p><p class="scope">Search coverage: <strong>contiguous United States (CONUS)</strong>. Location goal: 100–500 m or better preferred; up to 1,000 m acceptable. Nationwide accuracy remains under evaluation.</p></section>
<div class="layout">
<section class="panel" aria-labelledby="upload-heading"><h2 id="upload-heading">New analysis</h2><form id="upload-form">
+<p id="data-setup" class="notice" hidden></p>
<label class="drop" for="audio"><span class="upload-symbol" aria-hidden="true">↑</span><strong>Choose an MP3 recording</strong><span id="file-label">Your original file is preserved with the job.</span><input id="audio" name="audio" type="file" accept=".mp3,audio/mpeg,.wav,.flac,.m4a,.ogg" required></label>
<fieldset><legend>When did the recording start?</legend><p class="help">Enter UTC, including the date. A window is allowed. File creation and upload times do not establish recording time. Leave blank if unknown; analysis will request this evidence before searching.</p><label for="start">Earliest start (UTC)</label><input id="start" type="datetime-local" step="1"><label for="end">Latest start (UTC)</label><input id="end" type="datetime-local" step="1"><label for="time-source">How is this time known? <span class="muted">Optional</span></label><input id="time-source" type="text" maxlength="500" placeholder="For example, recorder clock synchronized before recording"></fieldset>
<p id="limits" class="help"></p><button id="submit" type="submit">Upload &amp; analyze <span aria-hidden="true">→</span></button><p id="upload-error" role="alert"></p>