PDF report with source code:
Intro to report:
This report presents a novel orientation filter applicable to IMUsconsisting of tri-axis gyroscopes and accelerometers, and MARG sensor
arrays that also include tri-axis magnetometers. The MARG implementation
incorporates magnetic distortion and gyroscope bias drift compensation.
The filter uses a quaternion representation, allowing accelerometer and
magnetometer data to be used in an analytically derived and optimised
gradient-descent algorithm to compute the direction of the gyroscope
measurement error as a quaternion derivative. The benefits of the filter
(1) computationally inexpensive; requiring 109 (IMU) or277 (MARG) scalar arithmetic operations each filter update,
(2)effective at low sampling rates;e.g.10Hz,and
(3) contains 1(IMU) or 2 (MARG) adjustable parameters defined by observable system
Description from YouTube video:
A real-time demonstration of an efficient orientation filtercapable of providing an estimate of the sensor arrays orientationrelative to the earth through the fusion of tri-axis gyroscope, tri-axisaccelerometer and tri-axis magnetometer data. Unlike an IMU, theinclusion of the magnetometer mean that the filter is not subject to anyaccumulating errors. The filter also incorporates magnetic distortioncompensation to overcome soft-iron disturbances and gyroscope bias driftcompensation. The algorithm is an alternative to more computationallyexpensive Kalman based solutions that are commonly used in thisapplication. The total computation requirement of this filter is 278scalar arithmetic operations per sample.
Hardware used in video: Sparkfun6DOF IMU Razor (ADXL335, LPR530 and LPY530) with gyroscope RC HP filtersremoved, Sparkfun HMC5843 breakout board (low ESR cap replacement),x-io Board with .NET interface library