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 <noreply@anthropic.com>
pull/84/head
yo 1 week ago
parent 66d0602c23
commit 805aa92a58

@ -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" },

@ -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"),
)

Loading…
Cancel
Save

Powered by TurnKey Linux.