Skip to content

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

Retain low-speed and near-sonic CPA proposals

Cinna Davisa9f91ee01380
diff --git a/docs/DATA_AND_SCALE.md b/docs/DATA_AND_SCALE.md
index 95c355e..3341a17 100644
--- a/docs/DATA_AND_SCALE.md
+++ b/docs/DATA_AND_SCALE.md
@@ -204,6 +204,13 @@ association to the matching worker and preserves unmatched proposals.
`alternative_modes_exhaustively_assessed` remains false because coarse-grid and
top-k retention do not establish exhaustive alternative-mode recall.
+Automatic CPA proposals retain speeds from zero through the sound speed and
+distances from zero through the configured maximum; unsupported motion is still
+reported rather than silently treated as valid. In one real full-day cell, five
+passes below the former 1 m/s minimum added 1,166 associations, retaining all
+23,136 previous associations. These are proposals, not confirmed aircraft sounds.
+The separately defined finite emitted-frequency range remains a modeling prior.
+
The normal `robust_ridge` path defaults to subset association over **all prepared
independent groups**. There is no default maximum of two or three matched events.
Harmonics/fragments are grouped by the audio/matching producers before this
diff --git a/src/dopplergeist/matching.py b/src/dopplergeist/matching.py
index ddf8ed5..42ec288 100644
--- a/src/dopplergeist/matching.py
+++ b/src/dopplergeist/matching.py
@@ -394,8 +394,10 @@ def prepare_events(detected_events, c=343.0, max_distance_m=20000.0):
quality["cpa_tolerance_s"] = max(center - start, end - center)
# A subsonic source gives f_source = f_received * (1 + v_radial/c).
# These broad bounds are independent of an unreliable straight-pass fit.
+ # Do not impose a minimum speed or near-sonic maximum on CPA proposals;
+ # motion support and the physical fit determine whether they can score.
event = dict(reference, start_s=start, end_s=end, cpa_receive_s=center,
- speed_range_mps=[1.0, 0.9 * c], slant_range_m=[1.0, max_distance_m],
+ speed_range_mps=[0.0, c], slant_range_m=[0.0, max_distance_m],
f0_range_hz=[float(f.min() * 0.1), float(f.max() * 1.9)], quality=quality)
event["event_ids"] = [e["event_id"] for e in members]
settings.append(event)
diff --git a/tests/test_real_clock_partitions.py b/tests/test_real_clock_partitions.py
index 903f972..b985c14 100644
--- a/tests/test_real_clock_partitions.py
+++ b/tests/test_real_clock_partitions.py
@@ -2,6 +2,7 @@
import json
import os
from pathlib import Path
+from copy import deepcopy
import pandas as pd
import pytest
@@ -54,6 +55,13 @@ def test_full_day_cell_clock_partitions_preserve_associations():
with pytest.raises(ValueError, match="Association candidate budget exceeded"):
association_candidates(table, events, max_candidates=budget.max_candidates_per_tile, **kwargs)
baseline, _ = association_candidates(table, events, max_candidates=100000, **kwargs)
+ earlier_events = deepcopy(events)
+ for event in earlier_events:
+ event["speed_range_mps"] = [1., .9 * parameters.get("c", 343.)]
+ event["slant_range_m"][0] = 1.
+ earlier, _ = association_candidates(table, earlier_events, max_candidates=100000, **kwargs)
+ assert (table.speed_mps < 1).any()
+ assert {content_hash(item) for item in earlier} < {content_hash(item) for item in baseline}
pieces = []
for i in range(8):
tile = "-33_51~1~2~0~1~1" + "".join(f"~t{(i >> shift) & 1}" for shift in (2, 1, 0))
@@ -63,7 +71,7 @@ def test_full_day_cell_clock_partitions_preserve_associations():
pieces.extend(result)
assert sorted(content_hash(item) for item in pieces) == sorted(content_hash(item) for item in baseline)
assert unsupported > 0
- print(f"real cell: {len(baseline)} associations preserved; {unsupported} unsupported tracks")
+ print(f"real cell: {len(earlier)} to {len(baseline)} associations; {unsupported} unsupported tracks")
def test_real_clock_partition_restart_and_scores(tmp_path, monkeypatch):