Go Down

Topic: ITG3200 orientation with respect to other angles (Read 1 time)previous topic - next topic

desh

Dec 09, 2012, 10:06 pm
I have an ITG3200 gyroscope working well. Each time through the loop, I am reading the deg/sec measurements from each of the 3 axis (x, y and z) separately. I multiply by the time between readings to get a total angle turned (in any of these axis). These measurements appear to be correct when I rotate the itg3200 on one of its axes at a time.

When I rotate the gyro about its Y axis, then rotate it about the axis parallel to the direction of the force due to gravity (where the Z axis would have been if I had not rotated it about its Y axis first), I no longer get the value of the rotation about the axis parallel to the direction of the force due to gravity.

I want to be able to determine my orientation with respect to the axis parallel to the direction of the force due to gravity, i.e. straight down regardless of my orientation about the X and Y axis.

I have been googling this for a couple hours, and am seeing lots of discussion about using quaternions and/or Eulers angles to calculate this, but my college physics is rusty (and I don't believe I've ever dealt with either of those things).

Is there a simple trig solution to this (like, take the cosine of the angle about the y axis and multiply that with the net reading of my 'Z' orientation), or is this more complicated?

MarkT

#1
Dec 10, 2012, 03:38 pm
Yes, that's how a 3-axis gyroscope works - the gyros' reference frame is not static so you need to maintain a representation of the
orientation of the gyroscope frame w.r.t. the static frame in order to interpret the rotations relative to the static frame.

The two common ways to represent the relative orientation of the gyro are with a quarternion, or a DCM (direction cosine matrix).
You need to find code that does one of these (or polish up your vector maths

Good keywords to search for are IMU and DCM
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up