cancel
Showing results for 
Search instead for 
Did you mean: 

One axis Magnetometer calibration

VDVL
Associate

Hi,

I am currently using a STM32L476 with a LIS2MDL, I need to apply a calibration along only 1 axis for the magnetometer, as the system can not be rotated along the others axis.

I was wondering if there is ready made solution/library to do it?

Thank you in advance for the help or any ints 

 

2 REPLIES 2
Federica Bossi
ST Employee

Hi @VDVL ,

Have you already looked at MotionFX library?

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

HI @Federica Bossi 

Yes, I use this library to fuse the datas from an IMU and the magnetometer (LIS2MDL). 

The library propose "MotionFX_MagCal_run" function to calibrate the magnetometer, but (tell me if I'm wrong), it require to move the magnetometer around the 3 axis completely, if I rotate the magnetometer around only one axis (the only degree of freedom i have) it doesn't give any value.

in addition it perform only hard iron calibration, and I would also need to perform a soft iron calibration (still around one axis). 

Thanks for the hints