Hi. I am building an RC aircraft and for its operation, I need its yaw pitch and roll angles. I calculate them using the library MPU6050_6Axis_MotionApps20 Link For pitch and roll, everything calculates correctly. However, for yaw, instead of returning the rate, the function returns the euler angle ψ. I don't know for what reason this could be happening, maybe something is working incorrectly in esp-32. I have also tried to calculate the yaw from the euler angles myself, but have not been able to derive the formula. It is calculated from quaternions I think, however I am not familiar with them. In fact, if one does not know for what reason there is this problem, one could calculate the yaw in the main program loop, from the aforementioned euler angles or quaternions, which can also be obtained from the MPU6050.
.
Code: C / C++