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 0B = 0.7071 -0.7071 0C = 0.7071 0.7071 0
Best Answer