I am using hmc5883L on an autonomus robot. It shall remain in a 1 meter squared area. I have recently discovered that its reading changes up to 20 degrees on different positions even when it is facing the same direction (values are consistent within a given point though).
I believe there should be a magnetic field distribution in my room (a slight tilt might also exist for that matter). I am about to take this as a huge error percentage, however I really prefer not to. So I thought I may check if my phones (iphone) "compass" application will diverge 20 degrees as well. It didn't even diverge 1 degree.
So my question is, how is this even possible if such a magnetic distribution exists? Does phones use a different method to tell the position of north? Is there anything I could do to make my readings more consistent with changing positions?