4

I'm working on an AHRS system and I have 3 axis gyros and they are not in alignment with the frame of the vehicle. This means that integrating the raw output from the gyros produces an orientation that does not reflect the true orientation of the vehicle. Changing heading for example will result in movement around the pitch and roll axes.

The difference in orientation between gyros and frame of the vehicle is known and is in the form of a unit quaternion.

How can I rotate the angular velocity from the gyros so it is aligned with the vehicle?

1 Answers1

1

You can use the procedure used in Android devices: http://developer.android.com/guide/topics/sensors/sensors_motion.html#sensors-motion-gyro

CAGT
  • 831
  • 1
  • 7
  • 17
  • I had a look through it and it's basically what I'm already doing. The problem is the axis of the sensors don't line up with the phone/vehicle. Holding the phone level and pointing north should result in no rotation. In my situation it doesn't, because the sensors inside the phone/vehicle are in a different orientation. – user2627202 Jan 21 '14 at 12:12
  • Here is a procedure to align accelerometer axis vs gyro axis. Part 3 will show you what you need. I would suggest reading it all though. http://www.starlino.com/imu_guide.html – CAGT Jan 21 '14 at 12:29
  • Thanks. That's an interesting page. However my accelerometers and gyros are aligned together on a 9dof IMU breakout board. The problem is the breakout board isn't aligned with the axis of the vehicle. – user2627202 Jan 21 '14 at 13:11
  • I know the orientation of the board vs vehicle (I'll call it the offset), and I can correct accelerometer / magnetometer vectors by making them pure quaternions and rotating by the conjugate of the offset. This technique doesn't appear to work for angular velocity. I'd like to know why and how I can correct it. Cheers – user2627202 Jan 21 '14 at 13:19
  • Angular velocity needs to be integrated to obtain a difference in angular position. The integration needs to be done in a fixed time sample. In this way, you will get a delta-position. Now you have a delta in angular position for each axis (on the gyro coordinate reference), so then you can rotate it to your orientation and add the delta angle to your actual (angular) position. – CAGT Jan 21 '14 at 13:35