feat: implement mqtt ingestion, parsing, and archive pipeline

This commit is contained in:
魏风
2026-03-17 13:27:39 +08:00
parent 27101e9bff
commit f02d324335
16 changed files with 896 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
from __future__ import annotations
from typing import Any
from app.mqtt.parsers.nmea import parse_nmea_sentences
from app.mqtt.parsers.rtcm import summarize_rtcm_types
def parse_mixed_payload(payload: bytes) -> list[dict[str, Any]]:
events = parse_nmea_sentences(payload)
rtcm_types = summarize_rtcm_types(payload)
if rtcm_types:
events.append(
{
"event_type": "rtcm_summary",
"payload": {
"rtcm_message_count": sum(rtcm_types.values()),
"rtcm_types": rtcm_types,
},
}
)
return events