After getting roll and pitch working through the Kalman filter, this week I wanted to move on to yaw. Too bad the magnetic sensors in the SparkFun IMU don’t actually work:
While I was recording those values the IMU rotated a full 360 degrees and was even turned upside down. MagZ should have inverted when it turned upside down, at least. I guess there is enough stuff going on inside the IMU that it mostly detects itself.
I tried using just the gyros to track yaw by dead reckoning, but they drift enough that the fish are turned 90 degrees after about ten seconds. I’ll have to wait to track yaw until I can get a magnetic compas that works or have vision-based tracking working well enough to use it to compensate for the drift.