Home › Forums › GP9 Product Support › Euler angle questions
This topic contains 3 replies, has 2 voices, and was last updated by Georgeea 2 months, 4 weeks ago.
-
AuthorPosts
-
Steve GravesAs stated in my other post, I am writing software to generate MISB KLV data. I believe that the Euler data is the right format for the Platform Heading, Pitch and Roll angles, but not the Sensor Relative Azimuth, Elevation and Roll angles. I believe that they are based on encoders in the original UAV configuration. We are using a second GP9 on the camera. To generate the proper format for the Sensor Relative angles I believe I will need to subtract the sensor Euler angles from the platform Euler angles and then cast the resulting values onto the appropriate plane for Azimuth (X-Y plane) , etc. Does this sound right to you?
Thanks,
Steve -
Hi Steve,
You are probably right. In my experience, the “gimbal frame” used to represent the attitude of a gimbal is obtained by rotating from the aircraft’s body-frame through azimuth, then elevation, then gimbal roll (if present). The attitude reported by the GP9, however, will be reported in yaw, pitch, and roll from the inertial frame.
Converting the yaw, pitch, roll representation to azimuth-elevation-roll with respect to the moving aircraft body-frame will be a little more complicated than simply subtracting the aircraft’s attitude and projecting to a plane: nonlinearities in the Euler solution prevent using a simple subtraction to obtain a correct attitude difference. What you want is a rotation solution that moves from the body-frame of the aircraft to the gimbal frame.
To do this, it is actually a little easier to work in quaternion world, at least temporarily (see http://www.chrobotics.com/library/understanding-quaternions for q quick crash-course).
Suppose that q_ib is the quaternion representing rotation from the inertial frame to the aircraft body-frame (as reported by the GP9 on the aircraft), and that q_ig is the gimbal’s attitude (as reported by the GP9 on the gimbal). We want to find a quaternion q_bg to represent the rotation between the body-frame and the gimbal-frame:
q_bg*q_ib = q_ig
In this notation convention, the subscript indicates the beginning and ending frames encoded by the rotation (i.e. q_bg means move from the body frame ‘b’ to the gimbal frame ‘g’). Also note that this is quaternion multiplication
Solving for q_bg, we get
q_bg = q_ig*q_ib^*
Where q_ib^* is the quaternion conjugate of q_ib.
OK, now that we have the quaternion representing rotation from the body-frame to the gimbal frame, we just need to convert to your azimuth, elevation, roll solution. There is a StackExchange thread where that specific task is discussed:
That should get you where you want to be, presuming that I understood your question correctly.
-
Steve GravesCaleb,
For some reason my earlier post didn’t show here. This is exactly what I need. Thank you!Steve
-
GeorgeeaShop Online
auto cvv shop
Valid Cvv Buy -
AuthorPosts