EasyManua.ls Logo

ST X-CUBE-MEMS1 - Page 11

ST X-CUBE-MEMS1
24 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
void MotionFX_CM0P_update(MFX_CM0P_output_t *data_out, MFX_CM0P_input_t
*data_in, float deltatime)
runs the sensor fusion algorithm
*data_out parameter is a pointer to output data structure
*data_in parameter is a pointer to input data structure
deltatime parameter is a delta time between two propagate calls [sec]
void MotionFX_CM0P_MagCal_init(int sampletime, unsigned short int enable)
initializes the magnetometer calibration library
sampletime parameter is a period in milliseconds [ms] between the update function calls
enable parameter is to enable (1) or disable (0) library
void MotionFX_CM0P_MagCal_run(MFX_MagCal_CM0P_input_t *data_in)
runs the magnetometer calibration algorithm
*data_in parameter is a pointer to input data structure
the parameters for the structure type MFX_MagCal_CM0P_input_t are:
mag is uncalibrated magnetometer data [µT]/50
void MotionFX_CM0P_MagCal_getParams(MFX_CM0P_MagCal_output_t *data_out)
gets magnetometer calibration parameters
*data_out parameter is a pointer to output data structure
the parameters for the structure type MFX__CM0P_MagCal_output_t are:
hi_bias is the hard iron offset array [µT]/50
cal_quality is the calibration quality factor:
MFX_CM0P_MAGCALUNKNOWN = 0; accuracy of the calibration parameters is unknown
MFX_CM0P_MAGCALPOOR = 1; accuracy of the calibration parameters is poor, cannot
be trusted
MFX_CM0P_MAGCALOK = 2; accuracy of the calibration parameters is OK
MFX_CM0P_MAGCALGOOD = 3; accuracy of the calibration parameters is good
UM2220
MotionFX library
UM2220 - Rev 7
page 11/24

Other manuals for ST X-CUBE-MEMS1

Related product manuals