Dear all, I am using the motion fit SDK 5.1 to take data from magnetometers, gyros and accelerometers.
I noted that, the magnetometers readings have their norms varying with the movements of the device, instead of a constant value.
I did 2 different attempts to correct this issue.
First I tried to move the sensor in the work space, I fit the magnetometers data with an ellipsoid and I found that the readings belongs to a sphere. I correct the data with the offset obtained to have them centered in (0,0,0).
This did not solved the issues.
I tried to have a capture in the open air, without magnetic interference and the data norm changes with the movements.
This is the plot of the norm of the open air acquisition.
In the first part (sample 1:100) we were both rotating and translating thr device, then the sensor was translated along one of its axes at a time.
It is to be noted that I have activated in the SDK
inv_enable_vector_compass_cal();
inv_enable_magnetic_disturbance();
inv_enable_dip_tracking();
In this conditions the magnetometers is useless, is there a way to correct data to have a constant magnetometers norm?
- Log in to post comments
phpbb Topic ID
15102
Re: Re: Magnetometer Clarification
In red is the norm of the magnetometer vector (yellow:x, magenta:y, and cyan:z) after the hard iron offset while I rotate the sensor.


It does fluctuate a bit, but not nearly as much as you show. On my PCB, I also don't need to do soft iron correction (ellipsoid fit) either, as the data nicely fits a sphere:
I'm not using the SDK so I can't comment on those functions. I'm just taking the raw magnetometer values, converting them to real-world units, and adding the hard iron offset obtained from the sphere fit.
Re: Re: Magnetometer Clarification
Magnetometer data is filtered through the DMP module (where calibration is applied), which causes your norm values to change. You can evaluate the raw magnetometer data if you are interested in norm tracking.
Re: Re: Magnetometer Clarification
In SDK 5.1, the magnetometer values are read directly from the External Sensor Registers starting at register 0x49, so how are they filtered by the DMP?
Calibration for the magnetometer as far as I understand is all done on the MSP430 not within the DMP
Re: Re: Magnetometer Clarification
Apologies for the confusion, that is correct, though it varies by the project. The MotionDriver and eMPL 5.1 projects apply compass calibration on the host platform. DMP has the ability to apply bias offsets to external sensors while outputting data to the FIFO. The external sensor data registers will always reflect the "raw" value, while the data read through fifo may have been affected by DMP.