Hi Sir: Did you know the difference between euler angle and attitude angle? You should rotate in a preset sequence. If you want to get the attitude angle according to your own sequence, it's not possible to get the results you expected, because euler angle is not equal to attitude angle. Please see the following comments: Actually no matter yaw, roll or pitch, they are euler angles around each axis. Euler angle can not describe an angle position in a 3D situation. It can only describe a angle around an axis. So if you want to describe a 3D angle position, you need 3 euler angle, which are yaw angle, roll angle and pitch angle. And the 3D angle position is called attitude angle, which is often used in navigation system. So the attitude angle is the almost the only thing the user needs. The result in direction vector and quarternion are all attitude angle, it's not euler angle. But the euler angle equals attitude angle if and only if the user transform the coordinates following sequence: yaw -> pitch -> roll or yaw -> roll -> pitch (it depends on you global coordinates are ENU or END). That's why we can use euler angles to represent attitdue angle. Could these comments solve your query? Hopefully, it helps you. Thanks.
... View more