Motion and Environmental sensor reader application connected via BLE to ST BlueMS iOS/Android application.

Dependencies:   HTS221 LIS3MDL LPS22HB LSM303AGR LSM6DSL

Fork of MOTENV_Mbed by ST Expansion SW Team

Embed: (wiki syntax)

« Back to documentation index

MOTION_FX_Exported_Functions

MOTION_FX_Exported_Functions
[MOTION_FX]

Functions

void MotionFX_initialize (void)
 Initialize the MotionFX engine.
void MotionFX_setKnobs (MFX_knobs_t *knobs)
 Set the internal knobs.
void MotionFX_getKnobs (MFX_knobs_t *knobs)
 Get the current internal knobs.
MFX_engine_state_t MotionFX_getStatus_6X (void)
 Get the status of the 6 axes library.
MFX_engine_state_t MotionFX_getStatus_9X (void)
 Get the status of the 9 axes library.
void MotionFX_enable_6X (MFX_engine_state_t enable)
 Enable or disable the 6 axes function (ACC + GYRO)
void MotionFX_enable_9X (MFX_engine_state_t enable)
 Enable or disable the 9 axes function (ACC + GYRO + MAG)
void MotionFX_setGbias (float *gbias)
 Set the initial gbias.
void MotionFX_getGbias (float *gbias)
 Get the initial gbias.
void MotionFX_update (MFX_output_t *data_out, MFX_input_t *data_in, float eml_deltatime, float *eml_q_update)
 Run the Kalman filter update.
void MotionFX_propagate (MFX_output_t *data_out, MFX_input_t *data_in, float eml_deltatime)
 Run the Kalman filter propagate.
void MotionFX_MagCal_init (int sampletime, unsigned short int enable)
 Initialize the compass calibration library.
void MotionFX_MagCal_run (MFX_MagCal_input_t *data_in)
 Run magnetic calibration algorithm.
void MotionFX_MagCal_getParams (MFX_MagCal_output_t *data_out)
 Get magnetic calibration parameters.
uint8_t MotionFX_GetLibVersion (char *version)
 Get the library version.

Function Documentation

void MotionFX_enable_6X ( MFX_engine_state_t  enable )

Enable or disable the 6 axes function (ACC + GYRO)

Parameters:
enable1 to enable, 0 to disable
Return values:
none
void MotionFX_enable_9X ( MFX_engine_state_t  enable )

Enable or disable the 9 axes function (ACC + GYRO + MAG)

Parameters:
enable1 to enable, 0 to disable
Return values:
none
void MotionFX_getGbias ( float *  gbias )

Get the initial gbias.

Parameters:
pointerto a float array containing the 3 gbias values
Return values:
none
void MotionFX_getKnobs ( MFX_knobs_t *  knobs )

Get the current internal knobs.

Parameters:
knobsknobs structure
Return values:
None
uint8_t MotionFX_GetLibVersion ( char *  version )

Get the library version.

Parameters:
versionpointer to an array of 35 char
Return values:
Numberof characters in the version string
MFX_engine_state_t MotionFX_getStatus_6X ( void   )

Get the status of the 6 axes library.

Return values:
1if enabled, 0 if disabled
MFX_engine_state_t MotionFX_getStatus_9X ( void   )

Get the status of the 9 axes library.

Return values:
1if enabled, 0 if disabled
void MotionFX_initialize ( void   )

Initialize the MotionFX engine.

Parameters:
none
Return values:
none
void MotionFX_MagCal_getParams ( MFX_MagCal_output_t *  data_out )

Get magnetic calibration parameters.

Parameters:
data_outstructure containing output data
Return values:
none
void MotionFX_MagCal_init ( int  sampletime,
unsigned short int  enable 
)

Initialize the compass calibration library.

Parameters:
sampletimeperiod in milliseconds [ms] between the update function call
enableenable (1) or disable (0) library
Return values:
none
void MotionFX_MagCal_run ( MFX_MagCal_input_t *  data_in )

Run magnetic calibration algorithm.

Parameters:
data_instructure containing input data
Return values:
none
void MotionFX_propagate ( MFX_output_t *  data_out,
MFX_input_t *  data_in,
float  eml_deltatime 
)

Run the Kalman filter propagate.

Parameters:
data_outpointer to the MFX_output_t structure
data_inpointer to the MFX_input_t structure
eml_deltatimedelta time between two propagate calls [sec]
Return values:
none
void MotionFX_setGbias ( float *  gbias )

Set the initial gbias.

Parameters:
gbiaspointer to a float array containing the 3 gbias values
Return values:
none
void MotionFX_setKnobs ( MFX_knobs_t *  knobs )

Set the internal knobs.

Parameters:
knobsknobs structure
Return values:
None
void MotionFX_update ( MFX_output_t *  data_out,
MFX_input_t *  data_in,
float  eml_deltatime,
float *  eml_q_update 
)

Run the Kalman filter update.

Parameters:
data_outpointer to the MFX_output_t structure
data_inpointer to the MFX_input_t structure
eml_deltatimedelta time between two propagate calls [sec]
eml_q_updateset to NULL
Return values:
none