EULER_TO_MATRIX (190)
EULER_TO_MATRIX (190)
ID 190
Application: |
PLC |
SIM |
Group: DATA CONVERSION
Short description:
Function that calculates the elements of a transformation matrix based on Euler's angles.
Inputs (3):
no. |
type |
impulse |
mark |
notes |
1 |
R |
no |
rot_x |
First Euler angle - orientation according to the axis X |
2 | R | no | rot_y | Second Euler angle - orientation according to the axis Y |
3 | R | no | rot_z | Third Euler angle - orientation according to the axis Z |
Outputs (9):
no. |
type |
impulse |
mark |
notes |
1 |
R |
no |
PR11 |
[1,1] element of the transformation matrix |
2 | R | no | PR12 | [1,2] element of the transformation matrix |
3 | R | no | PR13 | [1,3] element of the transformation matrix |
4 | R | no | PR21 | [2,1] element of the transformation matrix |
5 | R | no | PR22 | [2,2] element of the transformation matrix |
6 | R | no | PR23 | [2,3] element of the transformation matrix |
7 | R | no | PR31 | [3,1] element of the transformation matrix |
8 | R | no | PR32 | [3,2] element of the transformation matrix |
9 | R | no | PR33 | [3,3] element of the transformation matrix |
Settings: none
Function operation:
EULER_TO_MATRIX function calculates the elements of a transformation matrix based on Euler's angles.
Transformation matrix:
[ PR11 PR12 PR13 ]
Wyj = [ PR21 PR22 PR23 ]
[ PR31 PR32 PR33 ]
Calculating the transformation matrix elements:
[ c(Ry)*c(Rz) -c(Rx)*s(Rz)+s(Ry)*s(Rx)*c(Rz) c(Rx)*c(Rz)*s(Ry)+s(Rz)*s(Rx) ]
Wyj = [ s(Rz)*c(Ry) c(Rz)*c(Rx)+s(Rx)*s(Ry)*s(Rz) -c(Rz)*s(Rx)+c(Rx)*s(Rz)*s(Ry) ]
[ -s(Ry) c(Ry)*s(Rx) c(Ry)*c(Rx) ]
R registers and M markers used: none