← WRITING
Estimation 2026-09 · 7 min read

Scoring an estimator against a truth that didn't exist yet

Twenty-one tests and every one of them a unit test — because until a physics plant existed to drive against, there was no ground truth to measure drift against. Building the truth was the actual work.

The localization filter had 21 tests, and every single one checked a property, not a trajectory: the exp/log round-trip, covariance symmetry, positive-definiteness, the sign of one update. None of them drove the filter along a path and asked how far it had drifted from where it actually was — because until a Fossen-model plant existed, there was no "actually" to compare against. Comparing two estimators only measures whether they agree with each other. It can't rank them. You need a case where the true position is known by construction.

The plant is that case: it produces exact position, attitude and velocity every tick, so the test harness can synthesise IMU readings, optical-flow velocity, depth and heading at their real measured rates and score the filter's drift against ground truth instead of against its own prior output.

The frame seam that cost −1988 degrees

One convention had to be pinned rather than assumed, and getting it wrong once already produced a spectacular failure: the filter's world is NED-z-down with an FRD body frame, and the Fossen plant is x-forward/y-starboard/z-down. Same convention, nothing needs remapping between them — which matters, because a frame seam is exactly what produced a −1,988-degree yaw runaway the first time the allocator met the plant with an unpinned assumption about which frame it was reading.

Baseline, 60 seconds of a yawing trajectory with full aiding:

0.013 m position RMS · 0.31° yaw RMS · 0.002 m depth RMS. Those three numbers are the actual finding — not because they're impressive in isolation, but because they're the first numbers in the project's history that mean what they appear to mean: an estimate compared to a truth, on a path complex enough that agreement wasn't guaranteed by construction.