by echarry » Wed Aug 04, 2010 10:41 am
Hi Tom,
I'm also new to this forum, and although I'm not using IMU's for UAV or airplanes, my application also involves 3D orientation.
My hardware is a simple 3-axis accelerometer and 1-axis gyro sitting parallel to the z-axis (parallel to gravity either) and perpendicular to the xy plane. The Euler angles with respect to the global frame are computed using the accelerometers/gyro integration, however I'm thinking in using the Quaternions (due to the singularities of the R. Matrices).
With your great experience maybe you can shed some light on my project:
1) To compute pitch and roll, do I ALWAYS need to use atan2 or asin and subsequently transform to Quaternions to "unrotate" the accelerations? At the moment I am doing something like:
a. gamma= integ(w(t).dt)
b. RZ(t) = [cos(gamma) -sin(gamma) 0
sin(gamma) cos(gamma) 0
0 0 1]
c. Acc_Untwisted = RZ(t)*Acc_Raw
d. beta = atan2(Acc_Untwisted_x,Acc_Untwisted_z)
e.RY = [cos(beta ) 0 sin(beta )
0 1 0
-sin(beta ) 0 cos(beta )]
e. Acc_Unlateral = RZ(t)*Acc_Untwisted
f. alfa = atan2(Acc_UnLateral_y,Acc_Unlateral_z)
So my angles are alfa,beta,gamma, as you can see are wrt body frame of reference. Any suggestions on how to do this but with Quaternions? Don't know if you noticed, but it doesn't make sense to me, that I didn't use RX, and therefore I'm having inaccuracies. Any ideas?
2) Knowing that the gyro integration drifts (and that I don't have any redundancy such as a magnetometer), a Kalman Filter is still worthwhile to implement?
My message is very big already, so any ideas are welcomed.
Many thanks,
Edgar