A Kalman filter for Altitude via Pressure, Temp and Acceleration

Hi,

I would like to have an accurate estimate of altitude and i'm not sure how to go about it. I would love some guidance please!

Sensors: GY63 Pressure (and temp), GY521 6-axis Accel ( but also use 9axis MPU9250/ )

I know a Kalman filter is required, and there are press/temp kalman libraries out there :

, But are there any to include acceleration? Or, how do i go about adding the third state? I need the third state for accuracy, and if im going to learn this, i may as well go the whole hog! :slight_smile:

Altitude of what? What does acceleration have to do with altitude?

Please take a moment to describe your project.

Model rocket. So i need a good estimation of peak altitude. Everything i have read says use three states to improve accuracy. Ideally id like to get to sub 0.5m, with 0.1-0.3 being awesome.

I’ve attached David Schultz’s and one other work on that topic. Fortunately I made a copy of Schultz’s web page before it disappeared.

Ideally id like to get to sub 0.5m

Very unlikely, but let us know how it goes.

KalmanApogeeII.pdf (615 KB)

digital-detection-of-rocket-apogee-1.1.pdf (545 KB)

Thanks- Id seen the first article but not the second. Ill read it later. I have my own main program for doing other things on this rocket ( thrust vectoring etc.) so i'm really hoping to build a stand alone function that does the altitude stuff. The Shultz program is written for C or something non Arduino/teensy. Id really like something arduino based.

The Shultz program is written for C

The programming language for Arduino is C/C++, so no problem. You will need to split main() into setup() and loop() and change the file/print statements.