Sensors report to a central gateway. Drag a device to relocate it, click a device to knock it out (dead battery) and watch the mesh reroute, click a flying packet to inspect its path.
d ≤ range. Each send picks the lowest-cost route to the gateway with Dijkstra's
algorithm, where the edge cost adds a penalty for line-of-sight obstacles crossed:
cost = d + obstacles·3. Turn a device off and the graph loses that node —
Dijkstra finds a fresh multi-hop path through the survivors on the very next send, which is the
re-routing you see happen live.
P_loss = clamp(0.01 + (d/range)² · 0.25 + obstacles · 0.15 + interference · 0.3, 0, 0.9)
t = 150ms + d · 50ms · (1 + interference · 0.6), summed across every hop of the
route — so a two-hop mesh detour genuinely costs more latency than a lucky direct shot, exactly
like a real low-power wireless network.