Pages: [1]   Go Down
Author Topic: An Arduino Library for compass tilt compensation and hard iron offset  (Read 1992 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
I love YaBB 1G - SP1!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

We have been working on a new arduino library for compass tilt compensation and hard iron offset. Its finally complete today, so I thought I would share it with the arduino community.

The three main parts are:

1) Compass Hard Iron Offset Auto-Solver
2) Accelerometer Yaw Pitch & Roll Calculator
3) 360° Compass Tilt Compensation

The auto solver is a Gaussian elimination solver requiring at least 6 datasets, the code included will filter and capture 8 datasets around the sphere and compute the best solution possible. Tilt compensation is not angle limited, it will compensate in any orientation. All the calculations that need to be done in the loop() are using fixed point integer math. The library has 3 examples that use the Honeywell HMC5883L 3 axis compass and the Freescale MMA8453Q 3 axis accelerometer. However any 3 axis compass & accelerometer pair will do.

The library and a more descriptive blog entry can be found here:
http://n0m1.com/2012/02/27/6dof-arduino-compass-accelerometer/

Enjoy!  smiley-lol Please give us feedback, so we can improve it.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13705
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Impressive work, well done!
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: