Possible EKF issue when RTK mode changes between FLOAT and FIXED

This issue was brought up in my post yesterday under a different topic.

I believe it deserves it’s own post.

It was pointed out to me by @xfacta that when there are frequent RTK mode changes between FLOAT and FIXED that the logged GPS position and the IMU calculate position disagree.

I’m wondering if this is an EKF issue.

For example - hovering in steady RTK FIXED mode generates this graph and map:

And with changes between RTK FLOAT and FIXED generates this graph and map:

When operating close to the ground where GPS reception is more variable, this issue can be dangerous. When it happens in LOITER, the copter wanders - and must be corrected manually to avoid obstacles.

I don’t know if this is an EKF issue or something else. But I thought it was worth documenting here for those involved in this aspect of the code base.