Hi there, myself and a few care entering a competition where we need to track data on a rocket, and instead of using a gps, we thought of using an accelerometer to find the displacement of this rocket, x and z, in real time, and are going to plot it using excel
The accelerometer in question is the mpu6050, which will provide an x, y and z acceleration, which we should be able to use to more accurately and reliably plot the displacement of the rocket.
The rocket will not go very far, hardly 200m upwards, and the only horizontal force should be wind.
Of course, since this is non constant acceleration, we cannot use suvat, so doing a double integral would be the best option here. Question is, how do we go about doing that? What would the equation of the curve here be?
This tutorial describes the difficulties with integrating accelerometer data.
In your case the accelerations may be so high that you can ignore the gravity correction. However if the acceleration is higher than 16 g, (quite likely for a model rocket) then the MPU-6050 won't be useful.
Assuming update() is called every delta_t seconds.
Drift is rapidly growing in such a calculation, so you always need a way to
zero it out, perhaps for a rocket you continuously zero it out until the moment of launch.
Since we don’t use SUVAT in this country, I had to google the formulas. This is what I gathered when I saw it. I googled it again and you are right, it says constant acceleration.
However, what difference does this make? In every iteration you can assume a constant acceleration. The constant u and p is just being updated after each iteration. That is exactly what MarkT posted.
Therefore, please prove mathematically why it doesn’t work.
jremington: This tutorial describes the difficulties with integrating accelerometer data.
In your case the accelerations may be so high that you can ignore the gravity correction. However if the acceleration is higher than 16 g, (quite likely for a model rocket) then the MPU-6050 won't be useful.
I highly doubt our rocket will accelerate faster than 16g at any moment, and i am struggling to think of any other way to calculate the displacement, so we will likely use the accelerometer, unless you would be so kind as to suggest something different.
Simple numerical integration, such as MarkT's first order Euler method, works well only if the time interval delta_t is short enough that the acceleration can safely be assumed constant during the interval.