Why does quatrotate() produce negative rotations?
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Quaternion Math finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!