The AUV has no GPS underwater. Every step it measures its own heading (compass, with gyro noise) and speed through the water (Doppler velocity log, with noise) and integrates them — dead reckoning:
x̂(t+dt) = x̂(t) + v̂·cos(ψ̂)·dt
ŷ(t+dt) = ŷ(t) + v̂·sin(ψ̂)·dt
ψ̂ = measured heading = true heading + gyro noise
v̂ = measured speed = commanded speed + DVL noise
Dead reckoning never sees the ocean current — the vehicle's true position also carries the current vector, which the estimate cannot subtract out:
true velocity = (v·cosψ, v·sinψ) + (current·cosθc, current·sinθc)
So the estimated and true tracks diverge for two independent reasons: accumulating sensor noise (random walk) and the un-sensed current push (a steady bias). When at least 3 beacons of known position are within acoustic range, the vehicle measures noisy slant ranges to each and solves a linearized least-squares trilateration for its true position, snapping the dead-reckoning estimate back to that fix:
2(xi−xn)x + 2(yi−yn)y = (xi²−xn²)+(yi²−yn²) − (ri²−rn²)
The autopilot itself only ever knows the estimate — it steers toward each survey waypoint using the (possibly wrong) dead-reckoning position, so the current drags the true track visibly off the intended lawnmower pattern between fixes.
Gyro bias. Besides white noise the compass/gyro carries a slowly wandering bias b (a random walk, db = σb ·dW, σb = 0.00012 + 0.0006·noise rad/√s). A heading bias is integrated into a cross-track error of ≈ v·∫b dt, so unaided drift grows faster than linearly: Var = v²σb ²T³/3. The un-sensed current adds c·T on top.
Simplifications. 2-D plane (no depth), constant current, no vehicle dynamics (heading is set instantly), straight-line acoustic ranges (no sound-speed profile or multipath), beacons always answer, trilateration is the linearised least-squares form rather than a Kalman filter, and one fix replaces the estimate outright instead of being weighted against it. Time runs 22× faster than real time.
Cyan track — true position (what actually happens to the vehicle).
Amber dashed track — dead-reckoning estimate (what the vehicle believes).
Drift chart — the gap between them, sawing back toward zero at every acoustic fix.
Independent numerical self-check (runs a few seconds of simulated surveys headlessly, then restarts the survey):
Run self-check
Not run yet. Instant check at load: …