Originally Posted by Erknie
Say the accelerometer is detecting forces on more than one axis at the same time, how is it supposed to know which one is gravity?
Just a few paper where to start from :
An improved method for accounting for acceleration in gyro roll-pitch drift computations
Measuring Tilt Dynamics of Multicopters
Or you could have at the UavDevBoard code repository
and site project
P.s. : this is Bill Premerlani's work, with some other developers