Get altitude form accelerometer and barometer

Hi,

I want to use accelerometer and baro for computing altitude on my own DIY flight controller.
So my question is: How can I get distance (altitude) from accelerometer (probably double integration of acceleration.)... SO what are the steps to get it?
1) Probably I have to get linear acceleration of all axes(without gravity), than make some deadband (for cancel noise) and there use some LPF.  But (how get linear acceleration?)
2) Than use double integration of acc_Z 
3) I should have a altitude (distance) in Z...
4) Use complementary filter with baro_alt to reduce drift form accelerometer.

But it could works only if my quadro will be align to the earth, is not it?
So what is the best process to make a functional solution?

Or are there any others solution? quaternion, roation matrix...?

Thank you very much for your help.
 
 

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…