MPU 6050 DMP linear accelleration

Hi everyone, I hope you can help me.
I know there are many posts, but I have not found a solution understandable to me in simple terms.
I am trying to use an mpu6050.
I use the "jeff rowberg" library
I would simply like to understand how I know in which direction the acceleration moves and when it reverses.
At first it gives me a positive value on the x axis, of course then in the deceleration phase he goes negative, but how can I tell if he has reached the end of the forward travel and is now starting to go backwards?
I need it for a measurement of steps, approximate. I don't want a precise distance traveled or an exact speed, just to know when I'm moving my foot forward or when it starts to go backward.
I don't know if I've been clear, but since I don't speak English well, and despite trying for months, I still haven't been able to find a clear guide as we often talk about solutions assuming that you know the basics.
I would like to understand what bases I have to look for and then how to apply them to the accelerometer data.
Thank you all

but how can I tell if he has reached the end of the forward travel and is now starting to go backwards?

Acceleration measurements alone can't tell you that. You need to measure the position or the velocity (speed with direction).

Imagine throwing a ball upward. After it leaves your hand, the acceleration due to gravity is constant. You need additional information to know when the ball is at its highest point.

the problem is this, I don't understand where to take direction and speed.
I would like to understand in what real direction it accelerates on its x axis (forward or backward, with respect to the mpu, not the actual direction with respect to north. Its local direction, let's say) and from there then understand what formulas I have to use to calculate a speed.
I have often read about integrals but I don't understand what types of integrals are needed and if they are the ones I actually need.

Acceleration is the change in velocity with respect to time. Acceleration does not tell you the initial or final values of velocity, or the direction of the velocity.

You can numerically integrate acceleration to get velocity, but to get the correct answer requires knowing the initial velocity (speed and direction).

Similar considerations hold for position.

I understand, it is much more complicated than it seems.
Thanks anyway

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.