nakujaproject / N4-Recovery

RND for N4 recovery team
2 stars 1 forks source link

implement velocity calculation from mpu acceleration #17

Closed bytecod3 closed 5 months ago

bytecod3 commented 5 months ago

The initial idea is to use integration. Since velocity is the first integral of acceleration. From the equation: v = u + at

So what we do to calculate the velocity is keep track of time, acceleration in the requires axis and then update the initial velocity. Consider the X axis:

Vx = Ux + ACCx*Sample_time
Ux = Vx

(Let the sample tme be 1ms (0.001 s))

Known issue is velocity drift: where the velocity does not get to zero even when the sensor is stationary. small errors in the measurement of acceleration and angular velocity are integrated into progressively larger errors in velocity, which are compounded into still greater errors in position

Article: IMU Velocity drift

However, after extensive research online, it was concluded that getting velocity from accelerometer is very innacurate and unreliable. Check out this reddit thread: Acceleration & velocity with MPU6050

Following this, we decide to keep the accelerometer for measuring the acceleration and the rocket orientation.