cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating velocity using Acceleration data read in mg from LSM6DSOX

Nikhil D&K
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
Federica Bossi
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.

 

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

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.  

Federica Bossi
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.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Andrew Neil
Evangelist 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.

This is standard maths - google should help you ...