Hi,
I got an Arduino for Christmas with the 10DOF GY-88 (the HMC5883L is part of it) and problems are coming ! So, this is my first big problem and my first post ! I hope you'll have the time to help me.
I'm re-coding a library to be able to use the magnetometer, in order to be sure to understand perfectly what I'm doing. Everything is fine with the code, but there is something I cannot explain : I'm assuming that the quantities I'm measuring in x, y and z are the magnetic intensity in those directions, so I would like to check that x²+y²+z² is constant when I move the sensor (if there are no disturbances of the earth's magnetic field), but it's not the case at all !!! this norm is varying a lot when the sensor moves. And it's not simply noise due to the movement : the norm stabilizes at another value. I get a norm varying between 500 and 1500 (computed with the raw value I get) which is quite a lot...
I've got two hypothesis :
- The answer of the sensor is not linear, maybe affine ?
- The basis (x,y,z) of the sensor is not orthogonal
I tried to measure the maximum and minimum value for each axis, and I supposed the answer linear between those values. It's a bit better: the norm is varying between 90% and 110% but I'm not satisfied.. and this is not robust at all.. and why such an answer ?
Well, I don't get it. Then what am I actually measuring in x y z ?
I tried with another library, same result.
Thank you guys (and girls !) for your help !
PS: I'm French, so please excuse me for the potential mistakes.