feat: add realtime GNSS monitor with telemetry websocket
All checks were successful
Deploy to Production / deploy (push) Successful in 1m10s
All checks were successful
Deploy to Production / deploy (push) Successful in 1m10s
This commit is contained in:
@@ -25,3 +25,24 @@ def test_parse_mixed_payload_returns_rtcm_summary() -> None:
|
||||
|
||||
event_types = {event["event_type"] for event in events}
|
||||
assert "rtcm_summary" in event_types
|
||||
|
||||
|
||||
def test_parse_nmea_sentences_extracts_satellite_details_and_used_ids() -> None:
|
||||
payload = (
|
||||
b"$GPGSA,A,3,02,05,12,,,,,,,,,,1.50,0.90,1.20*00\r\n"
|
||||
b"$GPGSV,1,1,04,02,17,213,40,05,29,121,37,12,66,314,44,25,14,048,39*71\r\n"
|
||||
)
|
||||
|
||||
events = parse_nmea_sentences(payload)
|
||||
gsa_event = next(event for event in events if event["event_type"] == "nmea_gsa")
|
||||
gsv_event = next(event for event in events if event["event_type"] == "nmea_gsv")
|
||||
|
||||
assert gsa_event["payload"]["used_satellite_ids"] == ["02", "05", "12"]
|
||||
assert gsv_event["payload"]["constellation"] == "GPS"
|
||||
assert len(gsv_event["payload"]["satellites"]) == 4
|
||||
assert gsv_event["payload"]["satellites"][0] == {
|
||||
"satellite_id": "02",
|
||||
"elevation_deg": 17,
|
||||
"azimuth_deg": 213,
|
||||
"snr_dbhz": 40,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user