Difference between revisions of "Translating Euler Angles"
(Created page with "= Translating Euler Angles = Default system representation of Yaw-Pitch-Roll as a sequence of ZYZ can be transformed into XYZ sequence back and forth using the following bui...") |
(→PROTO.PRO) |
||
Line 17: | Line 17: | ||
function RBT_ZYZ2XYZ(byval zyz as location of xyzypr,byval xyz as location of xyzypr) as long<br> | function RBT_ZYZ2XYZ(byval zyz as location of xyzypr,byval xyz as location of xyzypr) as long<br> | ||
+ | |||
+ | ==Usage== | ||
after issuing reset all you should be able to convert the angels: | after issuing reset all you should be able to convert the angels: | ||
+ | |||
+ | |||
+ | <pre> | ||
+ | -->Common shared pXYZ as location of XYZABC = #{0,0,0,10,20,30} | ||
+ | -->Common shared pZYZ as location of XYZYPR | ||
+ | |||
+ | -->?XYZ2ZYZ(pXYZ,pZYZ) | ||
+ | -->?pZYZ | ||
+ | </pre> |
Revision as of 12:39, 23 December 2015
Translating Euler Angles
Default system representation of Yaw-Pitch-Roll as a sequence of ZYZ can be transformed into XYZ sequence back and forth using the following built-in functions:
function RBT_XYZ2ZYZ(byval xyz as location of xyzypr, byval zyz as location of xyzypr) as long function RBT_ZYZ2XYZ(byval zyz as location of xyzypr,byval xyz as location of xyzypr) as long
PROTO.PRO
First of all you need to add the following lines into proto.pro file:
function RBT_XYZ2ZYZ(byval xyz as location of xyzypr, byval zyz as location of xyzypr) as long
function RBT_ZYZ2XYZ(byval zyz as location of xyzypr,byval xyz as location of xyzypr) as long
Usage
after issuing reset all you should be able to convert the angels:
-->Common shared pXYZ as location of XYZABC = #{0,0,0,10,20,30} -->Common shared pZYZ as location of XYZYPR -->?XYZ2ZYZ(pXYZ,pZYZ) -->?pZYZ