Python tool for aircraft Doppler audio geolocation using historical ADS-B flight data (Source-available)
Python acoustic-geolocationads-baircraft-trackingairplaneaudio-forensicsdoppler-effectdoppler-shiftgeolocationosintsignal-processing
Connect actual motion-support diagnostics and failed-tile oracle (#64)
Cinna Davisc69ac1233938
diff --git a/docs/MODEL_SUPPORT_COVERAGE.md b/docs/MODEL_SUPPORT_COVERAGE.mdindex 4afe3f2..473a5ed 100644--- a/docs/MODEL_SUPPORT_COVERAGE.md+++ b/docs/MODEL_SUPPORT_COVERAGE.md@@ -29,7 +29,9 @@ Only `geometry.AcousticSupportError` is isolated. A CPA error conservativelyexcludes that entire track's work for the receiver stage, including partial rowsfrom earlier chunks, and keeps valid other-track rows. The diagnostic labels thewhole track time span and receiver extent as a conservative loss envelope: this-narrow exception does not identify the exact unsupported interval. Original index+narrow exception need not identify the exact unsupported interval. Optional+emission/receive intervals reported by the physical validator are preserved in+`reported_intervals`; they do not narrow the conservative coverage envelope. Original indexpayloads are retained. Robust scoring classifies typed failures per clock trial;the outer handler also preserves other candidates if a legacy scorer raises thesame typed error. An interrupted scorer's unreported trial count stays unknown.@@ -40,3 +42,12 @@ This handling does not certify continuous total speed or Newton convergence,repair historical missing derivatives or altitude clipping, identify the cause ofbad observations, or establish complete real-flight coverage. Issue #64 retainsthose open gates and the historical 855/858 result. No old outcome is promoted.++The integrated W3 physical guard validates whole-source continuous motion at both+actual CPA call sites and time-local motion/convergence in direct acoustic+scoring. A real constructed indexed source with zero knot speeds and a >700 m/s+interior peak now reaches this outer typed boundary without a monkeypatch.+The mixed-source regression preserves the clean candidate identities/scores,+retains the original malformed source, and reports partial model coverage. This+verified connection does not repair source observations or establish real-data+acceptance; W3 documents the numerical support assumptions in MOTION_SUPPORT.md.diff --git a/scripts/check_unsupported_tiles.py b/scripts/check_unsupported_tiles.pyindex 08bc386..04bd5de 100644--- a/scripts/check_unsupported_tiles.py+++ b/scripts/check_unsupported_tiles.py@@ -55,10 +55,16 @@ def main():_record_support(output, f"coarse:{name}", counts, summary)# Independently enumerate/score each track. A failure cannot interrupt# unrelated tracks in this oracle; retain every finite result before k.- reference, failures, nonfinite = [], [], 0+ reference, failures, source_failures, nonfinite = [], [], [], 0lookup = {p.point_id: p for p in points.itertuples()}for track in tracks:- table = cpa_table([track], points, radius, config["scoring"].get("c", 343.), budget.cpa_step_s)+ try:+ table = cpa_table([track], points, radius, config["scoring"].get("c", 343.), budget.cpa_step_s)+ except AcousticSupportError as error:+ source_failures.append({"flight_id": track.id, "reason": error.reason,+ "emission_intervals_s": error.emission_intervals_s,+ "receive_intervals_s": error.receive_intervals_s})+ continuecandidates, _ = pair_candidates(table, [event], time_origin=config["scoring"]["time_origin"], time_tolerance_s=5.)for candidate in candidates:try:@@ -75,14 +81,16 @@ def main():kept = merge_candidates(reference, budget.top_k)assert signature(ranked) == signature(kept), f"Clean candidate change at {name}"assert counts["unclassified_score_candidates"] == len(failures) + nonfinite- assert failures and ranked, "Each historical failure tile must preserve valid diagnostics"+ assert len(counts["unsupported_cpa_tracks"]) == len(source_failures)+ assert (failures or source_failures) and ranked, "Each historical failure tile must preserve valid diagnostics"report = {"tile": name, "tracks": len(tracks), "points": len(points), "finite_oracle_rows": len(reference),"retained_rows": len(ranked), "typed_candidate_failures": failures, "nonfinite_oracle_rows": nonfinite,+ "unsupported_cpa_sources": source_failures,"model_support_complete": False, "model_support": summary, "clean_scores_equal_oracle": True,"ranked": ranked}write_json(output / f"tile-{name}.json", report)reports.append({k: v for k, v in report.items() if k != "ranked"})- print(json.dumps({k: v for k, v in report.items() if k not in ("ranked", "typed_candidate_failures")}), flush=True)+ print(json.dumps({k: v for k, v in report.items() if k not in ("ranked", "typed_candidate_failures", "unsupported_cpa_sources")}), flush=True)assert {r["tile"] for r in reports} == selectedroot = Path(__file__).resolve().parents[1]write_json(output / "report.json", {"scope": "Historical three failed analytic-ridge scale tiles; no localization truth",diff --git a/src/aircraft_geoloc/tiled_search.py b/src/aircraft_geoloc/tiled_search.pyindex cbad0ef..de24cab 100644--- a/src/aircraft_geoloc/tiled_search.py+++ b/src/aircraft_geoloc/tiled_search.py@@ -23,6 +23,15 @@ from .geometry import AcousticSupportErrorfrom .search import cpa_table, filter_event, pair_candidates, score_candidate+def _support_error(error):+ result = {"track_id": error.track_id, "reason": error.reason}+ for name in ("emission_intervals_s", "receive_intervals_s"):+ intervals = getattr(error, name, None)+ if intervals is not None:+ result[name] = intervals+ return result++@dataclass(frozen=True)class SearchBudget:spacing_m: float = 2000.0@@ -157,6 +166,7 @@ def _score(points, tracks, events, measurements, budget, parameters, filters, st# the entire track/stage as explicitly unassessed, and retain rows# from other tracks. Never repair or clip the source payload here.unsupported.append({"track_id": track.id, "reported_track_id": error.track_id, "reason": error.reason,+ "reported_intervals": _support_error(error),"emission_time_range_s": [float(track.time[0]), float(track.time[-1])],"receiver_bounds_wsen": [float(points.lon.min()), float(points.lat.min()),float(points.lon.max()), float(points.lat.max())],@@ -221,7 +231,7 @@ def _score(points, tracks, events, measurements, budget, parameters, filters, strow = dict(score=-np.inf, **{k: float(getattr(point, k)) for k in ("x", "y", "lat", "lon", "elev_m")},flight_ids=[p["flight_id"] for p in candidate["passes"]],event_indices=candidate.get("event_indices", list(range(len(events)))),- support_failure={"track_id": error.track_id, "reason": error.reason})+ support_failure=_support_error(error))row["pass_emission_times_s"] = [float(p["emission_time"]) for p in candidate["passes"]]known = (classified_assessment(row) if settings.get("mode") == "robust_ridge" elsesettings.get("time_origin") is not None and settings.get("time_sweep_s", 5) == 0 and math.isfinite(row["score"]))diff --git a/tests/test_tiled_support.py b/tests/test_tiled_support.pyindex 4b85572..52d0cf9 100644--- a/tests/test_tiled_support.py+++ b/tests/test_tiled_support.py@@ -151,6 +151,8 @@ def test_real_interior_supersonic_track_is_partial_before_cpa_filters_and_preserfor f in json.loads(p.read_text())["unsupported_cpa_tracks"]]assert failures and all(f["track_id"] == raw.id and f["reason"] == "non_subsonic_motion" for f in failures)assert all(f["emission_time_range_s"] == [raw.time[0], raw.time[-1]] for f in failures)+ assert all(f["reported_intervals"]["emission_intervals_s"] for f in failures)+ assert all("receive_intervals_s" not in f["reported_intervals"] for f in failures)def test_cpa_programming_error_is_not_relabelled_as_source_support(tmp_path, monkeypatch):