Describe the bug
It seems like the board rotation parameters are set to zero prior to performing the attitude calibration. In some cases this can cause attitude transients which impact the average measured attitude.
I'll follow up with a plot if not already with a fix.
@sanderux FYI
@RomanBapst is this still an issue?
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
@RomanBapst it would be good if you can follow up on these things, thanks.
@julianoes This problem was reported by @sanderux and I created this issue so that we don't forget about it. I have just tried to do a level calibration with a 30 degrees offset on both roll and pitch and the level horizon calibration worked just fine. The algorithm was waiting long enough for the transient of the attitude solution to decay.
Given that this is the only issue I've ever seen about this and I cannot reproduce the problem I'm going to close this.
@sanderux If you have a log of a failure case please share it here and we can have a look at it.
@julianoes @sanderux This should now be fixed for good since @bkueng did changes to the calibration routine such that the calibration is performed relative to the current board offset.
https://github.com/PX4/Firmware/pull/13666#pullrequestreview-326119932
Most helpful comment
@julianoes @sanderux This should now be fixed for good since @bkueng did changes to the calibration routine such that the calibration is performed relative to the current board offset.
https://github.com/PX4/Firmware/pull/13666#pullrequestreview-326119932