Good choice changing firmware, I had some problems with compasses in 4.0.3 as so jumped straight back to 3.6.12.
Some other options that may help with the leans and/or yaw discrepancy:
- calibrate accelerometers again
- set COMPASS_TYPEMASK to 256 which will disable detection of the internal ICM-20948 compass on the MRO Zero on startup and then calibrate compasses again (after this is done, you should notice just the MAG message and not MAG2 in the logs)
- calibrate compass again with “strict” enabled
- sometimes a poor gyro calibration can cause a yaw measurement error. This can be a real problem in cold climates, where the calibration of gyros done on startup (ie. cold) is no good once the board warms up. So rebooting the controller after it’s had time to warm up but before flight can be a good idea.
I must admit I haven’t used EKF3 ever really, but I do believe there are some differences in the heading calculation so EKF2 so that may also explain some of the behaviour you’re seeing as well.
I think you’re on the right track with the firmware change though. Good luck!