I'm visualising the motion of a rigidbody in 3D space with MATLAB and Simulink using this library which implements 6DOF equations of motion based on applied forces and moments.
Here is my model so far on Simulink. I have the outputs of the block being saved into the MATLAB workspace to run in a visualization software i've written.
I am confused though on the difference between the Euler angles and the angular position. In the picture above, I've integrated the angular rates to get the angular positions. Comparing the display to the Euler angle display I get different sets of angles. Below is what my visualization looks like:
Should I be visualizing the orientation of the block with the Euler angles or the angular position (integrated angular rates) i.e. which values are the true angles of the rigidbody in the body frame?
I think the answer I'm looking for is in the docs I linked above (pic below) however I'm still not understanding the difference between [phidot thetadot psidot]
and [p q r]
.
1/s
block does). You have to transform $(p,q,r) \rightarrow (\dot{\theta}, \dot{\psi}, \dot{\phi})$ using the matrix formula (which you have put in the question) and integrate those to arrive at $(\theta, \psi, \phi)$. $\endgroup$