Go Down

Topic: An Arduino Library for compass tilt compensation and hard iron offset (Read 2300 times) previous topic - next topic

aleph8nought

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!  XD Please give us feedback, so we can improve it.

robtillaart

Rob Tillaart

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

I think the link is not active anymore. Can you post an active link ?.

robtillaart

possibly - http://krazatchu.ca/2012/02/27/6dof-arduino-compass-accelerometer/ - ???
Rob Tillaart

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

Thanks rob. http://krazatchu.ca/2012/02/27/6dof-arduino-compass-accelerometer/ does work. The library is hidden behind the hyperlink :D

robtillaart

Cana you post a copy of the lib as attachment in this thread for future reference?
Rob Tillaart

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

Docedison

The link worked for me, and a most interesting one at that...
Thank You Rob for a most interesting 30 minutes...

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Go Up