In my project I have used a complimentary filter to generate yaw, roll, and pitch angles. I used the rotateX, rotateY, and rotateZ functions to rotate a box in 3d. I ran into problems like gimbal lock when using this method.
Now I’m using a quaternion based complimentary filter to generate quaternions that represent the orientation of the box. My question is, now that I have the quaternion representing my estimated orientation, how can I implement it to generate rotations? Are there any functions that I can use to do this?