I recently purchased a 6-axis-accelerometer-and-compass for my GrovePi+ and have been facing major issues with the accuracy of the compass. I have noticed that it is extremely sensitive to interference and produces erroneous heading values when near electrical components. When moved away from these components the accuracy of the heading increases, but is still not +/- 2 degrees like the datasheet says, its more like +/- 50. Occasional it’ll read the correct heading, but when I rotate the robot (lets say from facing north to east) it will be dramatically wrong. Not sure what to do about these inaccuracies as they make using the compass for reliable location tracking impossible.
I’ve tried calibrating to no avail (not sure if that’s even the true issue). Can someone offer any advice on how to get more accurate headings?