What does complementary filter mean?
A way of fusing two sensors that fail in opposite ways: trust the one that is smooth but drifts (an integrated gyro) over short times, and let the one that is noisy but does not drift pull the estimate back slowly over long times.
In a lesson
Turn the robot about, running a complementary filter on the heading, plotting
gyro,fusedandmine, and printmy heading:at the end.heading()is the truth and is not allowed, so plot the three headings themselves. They will lie almost on top of each other, which is expected: they differ by a few degrees on a chart that runs to 360.
Learn it
- Taught in U6.1 Two sources, one state State estimation, University