cancel
Showing results for
Did you mean:

# Calculating velocity using Acceleration data read in mg from LSM6DSOX

Associate II

Hello Developers,

In my product we are using ST Mems senor LSM6DSOX with Noridc chipset. Currently only acceleration data is read from sensor every minute which gives 1 sample of x,y.z axis accleration in mg/minute.

Configuration of LSM6DSOX sensor:

ODR :  6667Hz

Scale:  16g

Now in my solution i want to calculate the velocity (m/s) of the object in x,y,z, direction using this acceleration data points.

Currently i am using this python script to calculate velocity, but i want to verify is this the right approach. I have taken two values as sample when node is steady in ideal condition. Python script attached for reference.

Can anyone let me know how we can convert acceleration data to veloctity ?

4 REPLIES 4
ST Employee

Hi @Nikhil D&K ,

Having the acceleration, it is possible to integrate it to get the velocity, but in reality, there are many factors to keep into consideration, that makes it impossible to have a great accuracy.

Associate II

Hello @Federica Bossi , we know that the velocity might not be that accurate, but can you please help me in calculating the velocity when the acc. data measured at t=0 second and t=60 second.

ST Employee

Hi @Nikhil D&K ,

We don't have a library to do that but you could use the MotionFX to get the quarternions and once you get the position you can calculate the velocity.

Chief III

@Nikhil D&K wrote:

Currently only acceleration data is read from sensor every minute which gives 1 sample of x,y.z axis accleration ?

So you're assuming that the acceleration in all 3 axes is entirely steady throughout the minute?

@Nikhil D&K wrote:

how we can convert acceleration data to veloctity ?

Physics & Maths:

Velocity is the integral of acceleration over time.

But the accelerometer gives you three mutually-perpendicular components of the acceleration (x, y, and z) - so you are first going to have to convert that to a single, combined acceleration vector.