Loading...
 Pages: [1]   Go Down
 Author Topic: ITG3200 orientation with respect to other angles  (Read 225 times) 0 Members and 1 Guest are viewing this topic.
Offline
Newbie
Karma: 0
Posts: 16
 « on: December 09, 2012, 04:06:10 pm » Bigger Smaller Reset

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?
 Logged

0
Offline
Tesla Member
Karma: 71
Posts: 6622
Arduino rocks
 « Reply #1 on: December 10, 2012, 09:38:45 am » Bigger Smaller Reset

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
 Logged

 Pages: [1]   Go Up
Jump to:

© 2011 Arduino Forum: