From 805aa92a58abe9cdaeed27d7a36878226ac322b1 Mon Sep 17 00:00:00 2001 From: yo Date: Sun, 20 Sep 2026 17:43:35 +0200 Subject: [PATCH] feat(report): send peer latitude, longitude and height A peer already tells the server where it is in its RPTC login, but the report never passed those fields on, so a monitor could only show the free-text LOCATION. Add latitude, longitude and height to the peer rows of the report payloads (topology and dashboard_state), next to the other RPTC display fields. This is what a dashboard needs to place repeaters and hotspots on a map; the legacy adn-dmr-server already had them in CONFIG. Peers that do not send coordinates are unaffected: the fields are simply absent. Co-Authored-By: Claude Opus 5 --- schemas/report-v2.json | 3 +++ src/adn_server/application/report/payloads.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/schemas/report-v2.json b/schemas/report-v2.json index ec85403..6effd74 100644 --- a/schemas/report-v2.json +++ b/schemas/report-v2.json @@ -243,6 +243,9 @@ "software_id": { "type": "string" }, "colorcode": { "type": "string" }, "tx_power": { "type": "string" }, + "latitude": { "type": "string", "description": "Latitude as sent by the peer in RPTC (decimal degrees)." }, + "longitude": { "type": "string", "description": "Longitude as sent by the peer in RPTC (decimal degrees)." }, + "height": { "type": "string", "description": "Antenna height above ground as sent by the peer in RPTC (metres)." }, "ts1_static": { "type": "array", "items": { "type": "string" }, diff --git a/src/adn_server/application/report/payloads.py b/src/adn_server/application/report/payloads.py index ace28ef..8486210 100644 --- a/src/adn_server/application/report/payloads.py +++ b/src/adn_server/application/report/payloads.py @@ -283,6 +283,11 @@ _TOPOLOGY_PEER_FIELDS: tuple[tuple[str, str], ...] = ( ("SOFTWARE_ID", "software_id"), ("COLORCODE", "colorcode"), ("TX_POWER", "tx_power"), + # Site data the peer sends in RPTC. The monitor needs it to place the peer + # on its map; it is the same information the Linked Systems page shows. + ("LATITUDE", "latitude"), + ("LONGITUDE", "longitude"), + ("HEIGHT", "height"), )