Ok great. Yeah, I definitely see the model drifting when there is less excitation, although once I decreased the drift variance for the biases it seems to work pretty well.
Watch this video:
Then this is the resulting fit:
What's nice is it is a much more subtle and smaller amount of disturbance than we require for relay tuning. It also learns in about 20 seconds. I ran another test that also systematically perturbed yaw and it did well too.
If we can have it more stable when it is unexcited it might be possible to keep it running all the time. I'm not convinced that would be beneficial though, and it would increase computation costs.
There are definitely reasons to keep the subset of the filter running without updating the beta and tau terms though - that allows you to estimate rotor speed. When you have that, you can actually provide something analogous to the derivative term but much better. If that were running we could also track significant model deviations and when they occur trigger a learning mode (and know that probably a motor failed