Attitude error causes crash help please

Hello, my plane is having this issue that calculated attitude begins to drift from real attitude, so if flying in an stabilized mode it can crash the plane.
My flight controller is a Matek F405 Wing

Video of the crash
I didn’t have time to switch to manual mode, had to switch but with the sticks all deflected I just crashed. :cold_sweat:

In this log you can see in the moment of the crash I am commanding the control system a 20 degree pitch, and the plane thinks it is already in that position so it can’t pull up more.

This has been a problem in my flights because it appears randomly, other times I had more luck and did not crash. I also have noticed that sometimes attitude will drift when sitting on the ground. I also think that this might have something to do with the EKF because when there is no gps I have never seen this behaviour appear but might be also due to vibrations or something I don’t know.
:face_with_monocle:

Logs here! :slight_smile:

Thanks for sharing your thoughts any advice is apprediated :grin:.

:woozy_face: