I am able to get YPR from the following equations, implemented in stm32.
P = asin(2 * q1 * q3 - 2 * q0* q2)* 57.3;
R= atan2(2 * q2 * q3 + 2 * q0 * q1, -2 * q1 * q1 - 2 * q2* q2 + 1)* 57.3;
Y = atan2(2*(q1*q2 + q0*q3),q0*q0+q1*q1-q2*q2-q3*q3) * 57.3;
The problem I have is that when the pitch get closer to 90 degree, roll and yaw will become unstable. Anyone know how to solve this??
- Log in to post comments
phpbb Topic ID
16644