Main Site Documentation

Compass Calibration


#1

Does anyone have a good calibration routine for the compass module they can share with me? Looking to get meaningful readings for heading.

Thanks


#2

@ Duke Nukem - have you seen this: https://www.ghielectronics.com/community/forum/topic?id=11880


#3

@ RobvanSchelven - I saw that but I didn’t see any code for calibration. I’m just looking for simple heading so when something turns a bit in place I can get a rough idea how much it turned.


#4

@ Duke Nukem - Not quite what you were asking for, but I just remembered that one of my only codeshare contributions was about tilt compensation of the compass using an accelerometer. I found that helped a hell of a lot as these things are very sensitive to tilt otherwise. That codeshare is here https://www.ghielectronics.com/community/codeshare/entry/741

Regarding the calibration itself… can you use a GPS and calibrate against that while’st moving?


#5

@ KiwiSaner - Thanks but for the first round I think I’ll just remove the compass as while this can be expected to turn a bit in place, if it takes off at high speed such that I could use a GPS to calibrate the compass, I’ve got a way bigger problem then what direction it is pointing :slight_smile: