You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Position overwritten by lower-precision data in _onPositionReceive() #910
_onPositionReceive() in meshtastic/__init__.py (line 183) blindly overwrites a node's position in the node database whenever a POSITION_APP packet is received, regardless of precision:
This specifically affects the local node's position. When other nodes relay our position via map reports at low precision (e.g., precisionBits: 13), it overwrites the locally-stored high-precision GPS position (precisionBits: 32). Since the local device has the GPS internally, any lower-precision update is always an echo from the mesh, never fresh data.
Remote nodes are not affected in practice — any position they broadcast is their own current state at whatever precision their GPS provides.
Steps to Reproduce
Connect to a Meshtastic device with GPS via the Python library
Read iface.nodes[my_node]["position"] immediately after connection — correct high-precision position
Wait 10-15 seconds for mesh traffic
Read position again — it has been overwritten with a lower-precision value from a relayed map report
Observed Behavior
Local node position changes from correct value (e.g., 32.9315311) to incorrect truncated value (e.g., 32.9515008)
Multiple unrelated nodes may show the exact same latitude because they all received the same low-precision map report
Both latitudeI and latitude fields are overwritten
The corruption happens every time, typically within 10-15 seconds of connecting
Expected Behavior
_onPositionReceive() should not overwrite the local node's position with a lower-precision echo from the mesh. The local GPS is authoritative.
Proposed Fix
Check if the position update is for the local node, and if so, only accept updates with equal or better precisionBits:
Activity
Fix position overwrite by lower-precision data
Fix local node position overwrite by low-precision echoes
Add Docker multi-arch, nanopb tool, examples, and routing (#196)