I am using Three-Axis Digital Magnetometer (MAG3110) and 3-Axis Digital Accelerometer (MMA8451Q) for my COMPASS ,
As per freescale provided algorithm, compass calibration data ( hard and soft iron) is not stored anywhere and hence requires recalibration for each power on .
Is their in way to store the calibrated values and apply these values on successive power ON? If it is possible, what values should be stored ?
Great question! I queried the engineer who wrote the code, and the following is his reply:
The decision not to (by default) save the calibration parameters in the reference software was made for two reasons:
The safest approach is therefore to recompute the calibration whenever the electronic compass is powered up.
If this is inconvenient, then the following approach should be used:
I hope that helps.
I want to ask you about two magnetometers in one device. As I know some developers use two or even three magnetometers located in two or three different axises to avoid the need of calibration magnetometers after power on. I had one mag and implemented soft and iron calibration. But now I have two mags and I don't understand how to implement it in my algorithms.
What can you say about using several mags in one device? Does it make sense?
Technically, a 3-axis magnetometer (which is what Freescale sells) is 3 separate sensors oriented 1 each in X, Y and Z sensing directions. You need at least three axes to do magnetic calibration in three dimensions. If you are asking about devices with more than 3 axes in one device - I'm not aware of anything like that.
You should understand that even if you have a perfect sensor, ferrous materials in the immediate vicinity can distort the magnetic field being measured. The field itself becomes non-ideal. Magnetic calibration effectively implements the inverse transfer function to that distortion.