Hi all,
I need to compute each euler axis from the DCM matrix of the APM. But I'm not really sure of the way to do that...
First, the axis are :
- X forward
- Y to the right wing
- Z to down
So it's a right handed system, don't it ?
Finally I'd like to extract euler axis from the DCM matrix in the ZXY order, so I'll have to change something in that code no ?
pitch = -asin(DCM_Matrix[2][0]);
roll = atan2(DCM_Matrix[2][1], DCM_Matrix[2][2]);
yaw = atan2(DCM_Matrix[1][0], DCM_Matrix[0][0]);
My rotation matrix understanding is quite poor...
Thanks for your answer !
Replies
I'm new to groups and this group in particular but thought I'd try a repy on the theory better late than never. Let me give you a few general principles 0 give it a try and then ask new questions. A quick reference is rel=nofollow http://en.wikipedia.org/wiki/Rotation_representation_" target="_blank">http://en.wikipedia.org/wiki/Rotation_representation_(mathematics)#Euler_rotations . Axes. No two individual projects seem to use the same axes conventions.You use the standard aircraft axes. The devBoard has the y axis forward. The ref I cite uses a left handed system - be alert - define your conventions and stick with them. I'll give it a try. Start with a tool - the single axis rotator.(3x3) look it up on google you will recognize it as having a one at the eii element. then there are 4 zeros 2 cosines and, a +sine and a-sine. The angle variable will successively be your roll. pitch and yaw axes. your final answer is given in the paragraph marked converson between representations. I am old school (very very old scholl) and recommend you work through the derivation for yourself first. Apply the unit rotator about the roll axis to get a partially rotated frame, then apply it to the pitch axis to get another intermediate frame, then apply it to the yaw axis to get the final frame representation of the complete transformation. A typical final element would be (cospsi*cosphi-costheta*sinphisinpsi) this is in th eii position of a sample left handed frame) (still used by aircraft weights department when I retired in 199. Ergo this is also dii in "DCM language". The numerical value of an element of a rotated frame matrix must be the same no matter whether you use EAs or DCs to get there. Neat and simple ? Now you can speak 2 languages.
I feel sure you can get all the detailed steps from the web. I learned from the 1957 edition of Goldstein's classical mechanics 369 pgs clear as crystal. The current edition (Goldstein is long gone runs to over 600 pages - It might still be readable. - Look for Euler angle rotations.
I just left a topic on Aerial Photography Forum entitled Camera Pointing using Eulers Rigid body rotation. It implies your answer but it shows that for the a camera frame to be be rotated from one direction to another, the vector axis of rotation is simply the +1eigenvector of the rotation matrix. I have to stop here. Matricies are like candy to me. Great fun.
If you would check it out then the entry would show one reader.
Keep me informed.
Mike Cowan