Skip to content

Commit

Permalink
Base: [skip ci] handle gimbal lock when computing Euler angles
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Oct 27, 2021
1 parent cd91c73 commit b159144
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Base/Rotation.cpp
Expand Up @@ -683,7 +683,7 @@ void Rotation::getYawPitchRoll(double& y, double& p, double& r) const
// south pole
y = 0.0;
p = -D_PI/2.0;
r = -2.0 * atan2(quat[0],quat[3]);
r = 2.0 * atan2(quat[0],quat[3]);
}
else {
y = atan2(2.0*(q01+q23),(q00+q33)-(q11+q22));
Expand Down

0 comments on commit b159144

Please sign in to comment.