The problem is, that you have 3 rotation angles (yaw, pitch, roll) about different rotation axes and that the VR model requires one rotation parameter, a 4-vector. As explained by Jan, this 4-vector consists of the rotation axis (first 3 elements) and the rotation angle (4th element). So the questions is, how to convert the 3 – they are basically Euler – angles into one rotation axis and one rotation angle.
One way would be to compute the overall rotation matrix R(psi, theta, phi) and then use Euler’s theorem to compute rotation axis and angle.
So, say you have a typical yaw-pitch-roll (3-2-1) rotation sequence about psi, theta, phi. The overall rotation matrix from inertial to body reference frame is given by
R(psi, theta, phi) = R1(phi)R2(theta)R3(psi),
where
R3(psi) = [ cos(psi) sin(psi) 0;
-sin(psi) cos(psi) 0;
0 0 1]
R2(theta) = [cos(theta) 0 -sin(theta);
0 1 0;
sin(theta) 0 cos(theta)]
R1(phi) = [1 0 0;
0 cos(phi) sin(phi);
0 -sin(phi) cos(phi)]
Careful with the particular notation (minus signs) of your rotation sequence, which might be different from the one shown above.
The last step, backing out rotation axis and angle from the overall rotation matrix, I’ll leave up to you. Once you have those, you can use a Mux block to form the 4-vector and feed the signal into the VR.
Best Answer