Two Wrong Answers
You have two ways to know where the car is, and both are wrong in different ways. GPS is noisy and slow (one jittery fix per second), but its errors don't add up. The accelerometer is fast and smooth, but you have to integrate it twice to get a position, so every tiny bias turns into error that grows with time squared.
A Kalman filter keeps a running guess and a running estimate of how wrong that guess is. The accelerometer moves the guess forward and inflates the uncertainty (the ellipse). Each GPS fix pulls the guess toward it, weighted by which of the two it currently trusts more.
Try this
- Watch the ellipse for a few seconds. It swells between GPS fixes and snaps smaller at each one, so you're watching the filter's confidence in real time.
- Hold the tunnel button for ten seconds. The filter coasts on the accelerometer, the ellipse balloons, and when GPS returns it snaps back without a jump.
- Push filter trusts GPS to 10× too much. The estimate twitches after every fix. Push it to 10× too little and it goes lazy and starts to drift. A badly tuned filter is overconfident about something.
- Watch the learned bias. The filter was never told the accelerometer is biased. It works that out from how its predictions keep missing the GPS fixes, and then corrects for it.
The deep cut
The last point is why this filter flew to the Moon. Its state isn't just position and velocity. It also includes the sensor's own error as something to estimate. Every phone, drone, and airliner running GPS-aided inertial navigation does the same thing: while GPS is available it calibrates the inertial sensors, so when GPS drops out the dead reckoning drifts far less.
Kalman's paper was met with skepticism. Stanley Schmidt at NASA Ames made it work with a linearized version for Apollo midcourse navigation, and it ran on a computer with about 4 KB of writable memory.