Calculate the rotational angles of a transformed coordinate system
3 views (last 30 days)
Show older comments
Hello,
I'm struggeling with a coordinate system transformation. The original coordinate system (in black colour) is give by three vectors (XV, YV, ZV), each for every axis and the location of the origin (NP). The System of three Vectors is transformed (translation and rotation) so that the new system (in red colour) is formed (Picture below).

I need to calculate the rotational angle of the system regarding rotation aroound x, y, and z axis. I know I need the rotaional matrix but I don't have a clue to solve this problem. Maybe anyone of the community knows how get rid of the problem?
With best regards
Steffen B.
2 Comments
Yazan
on 1 Jul 2021
Do you need to calculate the required rotation and translation? or do we need just the rotational matrices?
Accepted Answer
Matt J
on 1 Jul 2021
Edited: Matt J
on 1 Jul 2021
You can use the attached file to get the rotation angles (in degrees).
Rblack=normalize( [Xb(:),Yb(:),Zb(:)]-NPb(:) ,1,'norm'); %The black XV,YV,ZV, and NP
Rred=normalize( [Xr(:),Yr(:),Zr(:)]-NPr(:) ,1,'norm'); %The red XV,YV,ZV, and NP
angles = flip(rot2taitbryan(Rred*Rblack.' ,'ZYX'));
8 Comments
More Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!