cancel
Showing results for 
Search instead for 
Did you mean: 

ST IMU LSM6DSL- software or algorithm to implement in to our firmware to determine the speed/acceleration & distance from IMU data.

IKhan.1
Associate

We are using ST IMU LSM6DSL in to our chipset/PCB.

We are looking for ready to use software or algorithm to implement in to our firmware to determine the speed/acceleration & distance from IMU data.

Is there any example code available for share?

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @IKhan.1​ ,

I believe that the problem can be divided into two step.

The first step is data acquisition process. For this purpose, especially if you are using a custom application processor, you can refer to the C drivers (lsm6dsl_reg.c) and the C example on Github (lsm6dsl_read_data_polling.c). If you instead are using an STM32, there a re a lot of project /examples

The second step is the algorithm implementation. If you want to calculate the speed and the distance from the raw data, you should use more complex libraries, and take care of the periodic calibration of the sensors. There are some examples available for STM32 in the X-CUBE-MEMS1 firmware function pack (such as the MotionPE real-time pose estimation or the MotionFX sensor fusion library). You could start from these examples (although the source code of these libraries is not open source) and build up your own code.

-Eleon

View solution in original post

4 REPLIES 4
Eleon BORLINI
ST Employee

Hi @IKhan.1​ ,

I believe that the problem can be divided into two step.

The first step is data acquisition process. For this purpose, especially if you are using a custom application processor, you can refer to the C drivers (lsm6dsl_reg.c) and the C example on Github (lsm6dsl_read_data_polling.c). If you instead are using an STM32, there a re a lot of project /examples

The second step is the algorithm implementation. If you want to calculate the speed and the distance from the raw data, you should use more complex libraries, and take care of the periodic calibration of the sensors. There are some examples available for STM32 in the X-CUBE-MEMS1 firmware function pack (such as the MotionPE real-time pose estimation or the MotionFX sensor fusion library). You could start from these examples (although the source code of these libraries is not open source) and build up your own code.

-Eleon

Hi Eleon,
Thanks much for the excellent suggestions.
Have a great day.

Thank you @IKhan.1​  :smiling_face_with_smiling_eyes:

Have a nice day you too,

-Eleon

Can i use this Motion librarys for nxp controller ?