Why does quatrotate() produce negative rotations?
Show older comments
Code
% YPR angles to rotate
yaw = pi/4;
pitch = 0;
roll = 0;
% Point to rotate
A = [ 1 0 0]
% Rotate (Negative)
Q = angle2quat(yaw, pitch, roll);
B = quatrotate(Q, A)
% Rotate (Expected result)
Q = angle2quat(-yaw, -pitch, -roll);
C = quatrotate(Q, A)
Results:
A =
1 0 0
B =
0.7071 -0.7071 0
C =
0.7071 0.7071 0
Accepted Answer
More Answers (0)
Categories
Find more on Quaternion Math in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!