cancel
Showing results for 
Search instead for 
Did you mean: 

AppMEMS#9b: The X-CUBE-MEMS1 libraries in detail - MotionMC functions

Eleon BORLINI
ST Employee

--- More details on MotionMC library ---

As described in the previous post, the MotionMC library acquires data from the magnetometer and features the hard iron compensation, theoretically unlimited (within sensor range) and a wide scale factor compensation range from 0.65 to 1.35 in every direction.

The two central functions for the MotionMC manage the magnetometer parameters calibration and are the following ones:

>> void MotionMC_Update (MMC_Input_t *data_in)

>> void MotionMC_GetCalParams (MMC_Output_t *data_out)

where the input data *data_in is a structure composed from:

  • Mag[3] is an array of magnetometer sensor value in µT
  • TimeStamp parameter is the timestamp value in ms for current magnetometer sensor data 

and the output data *data_out is also a structured of:

  • HI_Bias[3] is an array of magnetometer hard iron (HI) coefficients in µT
  • SF_Matrix[3][3] is a 3x3 matrix of magnetometer scale factor (SF) coefficients
  • CalQuality is the calibration quality factor

See below the typical flowchart of the MotionMC calibration procedure �?�

1 REPLY 1
Eleon BORLINI
ST Employee

0690X000009ZbtQQAS.png