From e48e9464d74d5769f59a695177b0e81a90608cb9 Mon Sep 17 00:00:00 2001 From: Pablo Revilla Date: Sat, 3 Jan 2026 21:48:19 -0800 Subject: [PATCH] Modify packet.html to add distance --- meshview/templates/packet.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meshview/templates/packet.html b/meshview/templates/packet.html index 578e266..acea412 100644 --- a/meshview/templates/packet.html +++ b/meshview/templates/packet.html @@ -443,7 +443,7 @@ seenTableBody.innerHTML = Object.keys(hopGroups) if (srcLat && srcLon) { distanceKm = haversine(srcLat, srcLon, rlat, rlon); } - + const distanceMi = distanceKm !== null ? distanceKm * 0.621371 : null; const color = hopColor(hopKey); const marker = L.marker([rlat,rlon],{ @@ -477,9 +477,11 @@ seenTableBody.innerHTML = Object.keys(hopGroups) Channel: ${s.channel ?? "—"}
${ distanceKm !== null - ? `Distance: ${distanceKm.toFixed(1)} km
` + ? `Distance: + ${distanceKm.toFixed(1)} km / ${distanceMi.toFixed(1)} mi
` : "" } +
Signal