mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-10-22 23:41:41 +00:00
Fix: pass sender lat/lon as origin anchor for hop disambiguation
ADVERT packets have GPS coordinates — use them as the forward pass anchor so the first hop resolves to the nearest candidate to the sender, not random pick order.
This commit is contained in:
1 parent
3a7fb77552
commit
6fa5249656
2 files changed
+6
-4
No files matched your search
+1
-1
@@ -86,7 +86,7 @@
|
||||
<script src="hop-display.js?v=1774221932"></script>
|
||||
<script src="app.js?v=1774126708"></script>
|
||||
<script src="home.js?v=1774042199"></script>
|
||||
<script src="packets.js?v=1774222186"></script>
|
||||
<script src="packets.js?v=1774222510"></script>
|
||||
<script src="map.js?v=1774220756" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="channels.js?v=1774331200" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="nodes.js?v=1774221131" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
|
||||
+5
-3
@@ -1100,10 +1100,12 @@
|
||||
let pathHops;
|
||||
try { pathHops = JSON.parse(pkt.path_json || '[]'); } catch { pathHops = []; }
|
||||
|
||||
// Re-resolve hops with observer context for regional filtering
|
||||
if (pathHops.length && pkt.observer_id) {
|
||||
// Re-resolve hops with observer + sender location for regional filtering & disambiguation
|
||||
if (pathHops.length) {
|
||||
await ensureHopResolver();
|
||||
const resolved = HopResolver.resolve(pathHops, null, null, null, null, pkt.observer_id);
|
||||
const senderLat = decoded.lat || decoded.latitude || null;
|
||||
const senderLon = decoded.lon || decoded.longitude || null;
|
||||
const resolved = HopResolver.resolve(pathHops, senderLat, senderLon, null, null, pkt.observer_id);
|
||||
Object.assign(hopNameCache, resolved || {});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user