Skip to main content
Visitor II
October 17, 2024
Question

One axis Magnetometer calibration

  • October 17, 2024
  • 1 reply
  • 697 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 

 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    October 23, 2024

    Hi @VDVL ,

    Have you already looked at MotionFX library?

    VDVLAuthor
    Visitor II
    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