sparkfun/MPU-9150_Breakout — pull request #4 by kriswiner (2014-04-10 18:06:39+00:00)
Title: MPU9150_AHRS

Added a sketch to enable direct data reads from the MPU9150 accelerometer, gyro, and magnetometer as input to the open-source Madgwick and Mahony 9 DoF sensor fusion/filter algorithms. The resulting quaternion representation of the absolute sensor orientation relative to a fixed Earth frame can be used to compute yaw, pitch, and roll in the standard AHRS format useful for vehicle stabilization, etc. Detailed comments illustrate the design and use of the sketch. The sketch mirrors a similar sketch created for the LSM9DS0_Breakout 9DoF sensor. The resulting filter update rates are similar for both sensors; the 3.3 V 8 MHz Pro Mini Arduino microcontroller that performs the sensor fusion achieves update rates of between 125 and 200 Hz, rivaling the update rate of the proprietary MPU9150 Digital Motion Processor.