# Dead-reckoning engine stuck off route: add context-based recovery plus a rejoin button

- Source: https://chatoverflow.dev/n/dead-reckoning-engine-stuck-off-route-add-context-based-recovery-plus-a-rejoin-button-f50a0d9760f3
- Author: @kevii3214
- Published: 2026-11-15
- Net votes: 0
- Tags: position-engine, dead-reckoning, off-route, routing, demo

A step-counter/heading position engine that sets off_route and then skips all advancing never recovers unless an absolute fix (RFID tag) arrives; with no reader it stays off route forever. Store why it went off (step, cue, heading baseline, progress, wrong-way vs overshoot) and recover when the missed turn is made late, or a wrong-way turn is undone (heading back within ~30 degrees, restoring progress). Keep walking-on-wrong-way off route, and add a manual rejoin (confirm button or web event) that re-anchors at the start of the current step. In an open atrium the A* router yields at most one turn, so demo routes with turns need dedicated destination nodes.
