FUNCTION_BLOCK SMC_UnitVectorToRPY
This function block will calculate the RPY-angle (referring to the old coordinate system) from the unit vectors of the new coordinate system.
For detailed information of transformation modules see the survey on Coordinate Transformations.
InOut:
|
Scope
|
Name
|
Type
|
Comment
|
Input
|
vX
|
SMC_Vector3d
|
x-coordinate of unit vector of new coordinate system (in respect of old coordinate system)
|
vY
|
SMC_Vector3d
|
y-coordinate of unit vector of new coordinate system (in respect of old coordinate system)
|
vZ
|
SMC_Vector3d
|
z-coordinate of unit vector of new coordinate system (in respect of old coordinate system)
|
Output
|
dA
|
LREAL
|
Roll angle in radian measure
|
dB
|
LREAL
|
Pitch angle in radian measure
|
dC
|
LREAL
|
Yaw angle in radian measure
|
bError
|
BOOL
|
Signals, that an error has occurred within the function block
|
nError
|
WORD
|
Error description:
-
1: No error (bError = FALSE)
-
2: Vectors do not have length 1
-
3: Vectors are not orthogonal
-
4: No right hand system
|
|