The yaw pitch and roll values returned by computeAngles is incorrect.
for example, using q = [0.5000 0 0.7071 -0.5000], the compute angles would return yaw: -90, pitch: 45, roll: -90 when the correct values are yaw: 90, pitch: 45, roll: -90. This problem only arises in certain quadrants.
It is a little hard to visualize these rotations, but I trust the implementation here: https://quaternions.online/
it is my go-to comparison for testing.
A correct implementation can be found on the wikipedia page for this conversion (https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles)
The yaw pitch and roll values returned by computeAngles is incorrect. for example, using q = [0.5000 0 0.7071 -0.5000], the compute angles would return yaw: -90, pitch: 45, roll: -90 when the correct values are yaw: 90, pitch: 45, roll: -90. This problem only arises in certain quadrants. It is a little hard to visualize these rotations, but I trust the implementation here: https://quaternions.online/ it is my go-to comparison for testing. A correct implementation can be found on the wikipedia page for this conversion (https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles)