Transform Matrix in Transform Sensor Block. SimMechanics
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Maxim Sluchak
le 19 Août 2015
Réponse apportée : Sebastian Castro
le 19 Août 2015
Transform Matrix describes rotation concerning axes oX, oY, oZ, and using this matrix I can count this 3 angles. But if my model at first rotate conserning oX on an angle A, than again conserning oX on an angle B, and at the end rotate conserning oZ on an angle C. Is there some methods to calcutale angles A and B separately using only Transform Matrix?
(Now I can calculate total rotational angle conserning oX like (A+B), but to control my model I need to calculate them separately.)
0 commentaires
Réponse acceptée
Sebastian Castro
le 19 Août 2015
I'd recommend extracting the rotation angle as a quaternion instead of the transform matrix. With the extra information in the quaternion representation, you actually can decompose this into individual axes rotations.
If you happen to have the Aerospace Blockset, there is a "Quaternions to Rotation Angles" block... but that's not a likely thing.
You could look through the File Exchange to find other users who have implemented these conversions -- for example, this link. Or, you could implement your own conversion using the Wikipedia page as reference, for instance.
- Sebastian
0 commentaires
Plus de réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!