From 791ec971d91de994b15781199ddf05607b802e69 Mon Sep 17 00:00:00 2001 From: anoracleofra-code Date: Mon, 9 Mar 2026 21:41:57 -0600 Subject: [PATCH] fix: filter out TWR (tower/platform) ADS-B transponders from flight data Co-Authored-By: Claude Opus 4.6 --- backend/services/data_fetcher.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/services/data_fetcher.py b/backend/services/data_fetcher.py index 0497f19..1871683 100644 --- a/backend/services/data_fetcher.py +++ b/backend/services/data_fetcher.py @@ -759,6 +759,11 @@ def fetch_flights(): speed_knots = round(gs_knots, 1) if isinstance(gs_knots, (int, float)) else None model_upper = f.get("t", "").upper() + + # Skip fixed structures (towers, oil platforms) that broadcast ADS-B + if model_upper == "TWR": + continue + ac_category = "heli" if model_upper in _HELI_TYPES_BACKEND else "plane" flights.append({ @@ -1129,6 +1134,11 @@ def fetch_military_flights(): continue model = str(f.get("t", "UNKNOWN")).upper() + + # Skip fixed structures (towers, oil platforms) that broadcast ADS-B + if model == "TWR": + continue + mil_cat = "default" if "H" in model and any(c.isdigit() for c in model): mil_cat = "heli"