I am reading the magnetometer on I2C directly and can easily read and write registers. The problem is that the magnetometer readings are not consistent. I do not need to know where true north is as I use its initial position as a zero heading. All other positions are relative to the initial position. So Initially I read the Xmag and Ymag and then do atan2(x,y). OK that is my initial heading. Read again to take atan2(x,y) again to get a new heading. The change in Yaw angle (which is all I care about) should be Initial heading - new heading. Unfortunately my Magnetometer readings are not consistent. In fact they are so inconsistent that they are unusable. Not only are the inconsistent but the are also not repeatable. What am I doing wrong.