Trying to calibrate the HMC5883L to use as a magnetometer and I don't understand much of anything. Is it something that needs to be done every time it is used? Or just a one time thing to set the offset to North? I just need the x, y, and z values to stay the same. Every time I use it, I get widely differing values even when the sensor is in the exact same place. I see on the data sheet there is some temperature compensation that can be used. Is this where i need to concentrate my efforts?
Also if anyone could recommend an easy to use calibration process.
Magnetometers are strongly affected by magnets and magnetic materials in their environment, so they need to be calibrated to use as a compass and recalibrated if the surroundings are changed.
Most people use a simple min/max procedure that calculates a scale and offset value for each axis, but sometimes a more sophisticated approach is required.