Underwater Navigator: Dead Reckoning & Acoustic Trilateration (2D)
2D AUV dead-reckoning lab: a submersible integrates noisy heading and speed to estimate its own position with no GPS, drifting off its true track under a current until an acoustic-beacon trilateration fix snaps its estimate back.
About this dead-reckoning AUV navigator
The 3D companion trains a reinforcement-learning policy to steer a submerged agent toward a goal, with position handled implicitly by the physics engine. This 2D companion instead makes underwater navigation itself the subject: an autonomous underwater vehicle (AUV) has no GPS signal once submerged, so it must track its own position by dead reckoning — integrating a compass heading and a Doppler velocity log (DVL) speed-through-water reading, step by step, into a running estimate of where it is. Every measurement carries sensor noise, and the vehicle also drifts steadily off its true track because an ocean current pushes its real position sideways in a way that neither the compass nor the DVL can detect — dead reckoning only ever integrates the vehicle's motion relative to the water, never the water's own motion.
The autopilot only ever sees the estimate, not the truth: it steers toward each leg of a lawnmower survey pattern using the dead-reckoning position, so when the current is strong or the sensors are noisy, the vehicle's real track visibly bows away from the intended straight lines while its believed track stays perfectly on the plan. That gap between the cyan true-position trail and the amber dashed estimate trail is dead-reckoning error made visible, and it grows for as long as the vehicle goes without a fix.
Four fixed acoustic beacons of known position ring the survey area. When at least three of them are within acoustic range of the vehicle's true position, the simulation solves a real linearized least-squares trilateration problem from noisy slant-range measurements to recover the vehicle's position independent of dead reckoning, and snaps the estimate back onto (or close to) the truth. The position-error chart on the right shows this as a repeating sawtooth: the gap grows during dead-reckoning-only stretches and drops sharply at every acoustic fix — exactly the drift-and-correct cycle real AUV missions are built around.
Frequently Asked Questions
Why does the estimated track never leave the planned survey lines, but the true track does?
The autopilot only has access to its own dead-reckoning estimate — it has no way to see its true position underwater. It always steers to keep the estimate on the planned lawnmower pattern. Since the estimate is blind to the ocean current, the vehicle's actual (true) position gets pushed off that plan by however much current has accumulated since the last acoustic fix.
How does the acoustic beacon fix actually compute a position?
Each beacon the vehicle can hear returns a noisy distance (slant range) between itself and the vehicle. With three or more simultaneous ranges, the simulation subtracts one beacon's circle equation from each of the others to linearize the problem, then solves the resulting 2×2 normal-equations system by least squares — the same linearized-trilateration approach used by real long-baseline (LBL) acoustic positioning systems.
Why does raising sensor noise or current strength increase the drift?
Dead reckoning has two independent error sources modeled here: sensor noise (heading and speed measurement errors) accumulates as a random walk step by step, while an un-sensed current adds a steady directional bias every step. Turning either slider up increases how fast the estimate and the truth pull apart between fixes — you can watch the error chart's sawtooth grow taller and the gap between the two trails widen accordingly.
AUV dead-reckoning navigation: heading and speed-through-water are integrated into a running position estimate with real sensor noise and an un-sensed ocean-current bias, corrected periodically by linearized least-squares acoustic-beacon trilateration, with a live true-vs-estimate drift readout.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install