diff --git a/meshview/templates/packet.html b/meshview/templates/packet.html index 9b9a3b7..578e266 100644 --- a/meshview/templates/packet.html +++ b/meshview/templates/packet.html @@ -439,6 +439,10 @@ seenTableBody.innerHTML = Object.keys(hopGroups) const rlat = node.last_lat/1e7; const rlon = node.last_long/1e7; allBounds.push([rlat, rlon]); + let distanceKm = null; + if (srcLat && srcLon) { + distanceKm = haversine(srcLat, srcLon, rlat, rlon); + } const color = hopColor(hopKey); @@ -465,20 +469,27 @@ seenTableBody.innerHTML = Object.keys(hopGroups) }).addTo(map); marker.bindPopup(` -