mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-09-27 01:07:53 +00:00
nearestPositionedNeighbor picked exactly one neighbor (the strongest by edge count) and used its exact coordinates -- so the approximate marker always landed precisely on top of that neighbor's own dot. Since each neighbor's own position is a real, precise fix, and only the unpositioned node's position relative to them is unknown, more positioned neighbors should narrow the estimate rather than being ignored in favor of just the top one. Now sums every positioned neighbor's coordinates weighted by neighbor_edges.count and returns the centroid. With exactly one positioned neighbor this is unchanged (reduces to that neighbor's exact position); with several, the marker settles somewhere among them instead of overlapping a single specific node. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>