Skip to main content
Associate
October 17, 2024
Question

One axis Magnetometer calibration

  • October 17, 2024
  • 1 reply
  • 698 views

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 

 

1 reply

Federica Bossi
Technical Moderator
October 23, 2024

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.
VDVLAuthor
Associate
October 23, 2024

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