07-22-2008 07:52 AM
07-26-2008 04:54 AM
07-28-2008 01:25 AM
Hello,
Thank's for your question...
Unfortunately, I can send you the code, because it is a LVOOP project with more than 1000 VIs...
My need is very "simple" : just to get an algorithm to "view" orientation in an opengl scene. I construct wrl object. I have a file in input with X;Y;Z;rX,rY;rZ;t.
The TSA toolkit have VIs to transform oritentation to Euler but with the Z-X-Z order... and I need X-Y-Z order.
Any suggestion ?
09-30-2008 03:01 PM
The XYZ transform is just a series of matrix multiplication that can be multiplied out. Then the function can be written in the express function block. I know there's a matrix multiply block, but am not familiar myself for how you set up the matrices in LabVIEW.
The X transform is x_global = [1, 0, 0; 0, cos(x_angle), -sin(x_angle); 0, sin(x_angle), cos(x_angle)] x_body.
The Y transform is x_global = [cos(y_angle), 0, sin(y_angle); 0, 1, 0; -sin(y_angle), 0, cos(y_angle)] x_body.
The Z transform is x_global = [cos(z_angle), -sin(z_angle), 0; sin(z_angle), cos(z_angle), 0; 0, 0, 1] x_body.
Before relying on the system, I would check that you have the matrices in the right order and sign.
Hope this helps, Alan