Difference between revisions of "Translating Euler Angles"
(→PROTO.PRO) |
(added frames.lib link) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 14: | Line 14: | ||
First of all you need to add the following lines into proto.pro file: | First of all you need to add the following lines into proto.pro file: | ||
− | import_c RBT_XYZ2ZYZ(byval | + | import_c RBT_XYZ2ZYZ(byval as generic location, as generic location) as long<br> |
− | import_c RBT_ZYZ2XYZ(byval | + | import_c RBT_ZYZ2XYZ(byval as generic location, as generic location) as long<br> |
==Usage== | ==Usage== | ||
Line 22: | Line 22: | ||
<pre> | <pre> | ||
+ | -->loadGlobal Frames.lib | ||
-->Common shared pXYZ as location of XYZABC = #{0,0,0,10,20,30} | -->Common shared pXYZ as location of XYZABC = #{0,0,0,10,20,30} | ||
-->Common shared pZYZ as location of XYZYPR | -->Common shared pZYZ as location of XYZYPR | ||
Line 28: | Line 29: | ||
-->?pZYZ | -->?pZYZ | ||
</pre> | </pre> | ||
+ | = See Also = | ||
+ | |||
+ | Source code example: [[File:FRAMES.ZIP | FRAMES.LIB]] |
Latest revision as of 08:08, 7 June 2016
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:
import_c RBT_XYZ2ZYZ(byval as generic location, as generic location) as long
import_c RBT_ZYZ2XYZ(byval as generic location, as generic location) as long
Usage
after issuing reset all you should be able to convert the angels:
-->loadGlobal Frames.lib -->Common shared pXYZ as location of XYZABC = #{0,0,0,10,20,30} -->Common shared pZYZ as location of XYZYPR -->?XYZ2ZYZ(pXYZ,pZYZ) -->?pZYZ
See Also
Source code example: File:FRAMES.ZIP