diff --git a/tasks/flightradar24/ingest/capture/main.py b/tasks/flightradar24/ingest/capture/main.py index 2203a72..d2de8a5 100644 --- a/tasks/flightradar24/ingest/capture/main.py +++ b/tasks/flightradar24/ingest/capture/main.py @@ -294,6 +294,12 @@ def main(): "message_type": f"MSG{parsed['msg_type']}", } + # only store useful message types: MSG1 (callsign), MSG3 (position), + # MSG4 (speed/heading), MSG5 (altitude) — drop MSG6/7/8 + KEEP_TYPES = {"1", "3", "4", "5"} + if parsed["msg_type"] not in KEEP_TYPES: + continue + try: insert_packet(conn, row) packet_count += 1