Skip to content

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

Use all proposed groups in automatic association and preserve Unicode metadata (#10)

Cinna Davisa0dd8403f304
diff --git a/evidence/product-20261102/automatic-conus/thresholds-20261103.json b/evidence/product-20261102/automatic-conus/thresholds-20261103.json
new file mode 100644
index 0000000..0ffba3f
--- /dev/null
+++ b/evidence/product-20261102/automatic-conus/thresholds-20261103.json
@@ -0,0 +1,48 @@
+{
+ "current_acceptance_m": 1000,
+ "preferred_m": [
+ 100,
+ 500
+ ],
+ "scope": "Additional threshold accounting only; original frozen evaluations and inconclusive decisions are unchanged. A close non-winning candidate is not pipeline success.",
+ "cases": [
+ {
+ "source_evaluation": "evaluation-v2.json",
+ "status": "inconclusive",
+ "reason_code": "search_incomplete",
+ "rank1_error_m": 1790.8556684886773,
+ "rank1_correct_flight_pair": true,
+ "rank1_pass_at_m": {
+ "100": false,
+ "500": false,
+ "1000": false
+ },
+ "candidate_counts_at_m": {
+ "100": 0,
+ "500": 0,
+ "1000": 0
+ },
+ "accepted_location": false,
+ "all_candidate_error_count": 5
+ },
+ {
+ "source_evaluation": "evaluation-default-grid-v2.json",
+ "status": "inconclusive",
+ "reason_code": "partial_flight_coverage",
+ "rank1_error_m": 1046023.1493328345,
+ "rank1_correct_flight_pair": false,
+ "rank1_pass_at_m": {
+ "100": false,
+ "500": false,
+ "1000": false
+ },
+ "candidate_counts_at_m": {
+ "100": 4,
+ "500": 25,
+ "1000": 25
+ },
+ "accepted_location": false,
+ "all_candidate_error_count": 106
+ }
+ ]
+}
diff --git a/src/aircraft_geoloc/automatic.py b/src/aircraft_geoloc/automatic.py
index 51a7ba3..a4c600a 100644
--- a/src/aircraft_geoloc/automatic.py
+++ b/src/aircraft_geoloc/automatic.py
@@ -132,9 +132,11 @@ def _search(request, recording, events, output, config, search_progress):
scoring = {"mode": "robust_ridge", "c": c, "time_origin": lo if lo == hi else None,
"time_sweep_s": 0 if lo == hi else 5, "time_step_s": 0.5,
"recording_start_window_s": [lo, hi]}
+ filters = {"association": "subsets", **config.get("filters", {})}
+ filters.setdefault("max_events", len(prepared))
report = search_national(indexes, terrain, prepared, measurements, time_range_s=time_range, output_dir=output / "search",
bounds=bounds, budget=SearchBudget(**config.get("search_budget", {})),
- scoring=scoring, filters=config.get("filters", {}), input_hashes=hashes)
+ scoring=scoring, filters=filters, input_hashes=hashes)
write_json(output / "data-provenance.json", {"flight_indexes": [index.report for index in indexes],
"terrain": terrain.provenance() if hasattr(terrain, "provenance") else hashes})
return report, prepared, measurements, indexes, terrain
diff --git a/src/aircraft_geoloc/web/app.js b/src/aircraft_geoloc/web/app.js
index 2c73c90..62c144f 100644
--- a/src/aircraft_geoloc/web/app.js
+++ b/src/aircraft_geoloc/web/app.js
@@ -127,9 +127,11 @@ $('upload-form').addEventListener('submit', async event => {
request.time_window = {start_utc: start + 'Z', end_utc: (end || start) + 'Z', source: 'user'};
if ($('time-source').value.trim()) request.time_window.source_detail = $('time-source').value.trim();
}
+ // JSON escapes preserve Unicode notes in the ASCII-only HTTP metadata header.
+ const requestMetadata = JSON.stringify(request).replace(/[^\x20-\x7e]/g, character => '\\u' + character.charCodeAt(0).toString(16).padStart(4, '0'));
$('submit').disabled = true;
try {
- const value = await api('/api/jobs', {method: 'POST', headers: {'Content-Type': 'application/octet-stream', 'X-Dopplergeist-Request': JSON.stringify(request), 'X-Filename': 'input.' + (file.name.split('.').pop() || 'mp3').replace(/[^a-z0-9]/gi, '')}, body: file});
+ const value = await api('/api/jobs', {method: 'POST', headers: {'Content-Type': 'application/octet-stream', 'X-Dopplergeist-Request': requestMetadata, 'X-Filename': 'input.' + (file.name.split('.').pop() || 'mp3').replace(/[^a-z0-9]/gi, '')}, body: file});
render(value); selectJob(value.job_id);
} catch (error) { $('upload-error').textContent = error.message; }
finally { $('submit').disabled = false; }