Transform Matrix in Transform Sensor Block. SimMechanics
2 views (last 30 days)
Show older comments
Maxim Sluchak
on 19 Aug 2015
Answered: Sebastian Castro
on 19 Aug 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 Comments
Accepted Answer
Sebastian Castro
on 19 Aug 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 Comments
More Answers (0)
See Also
Categories
Find more on Axes Transformations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!