No I have yet to try the comp filter, but am going to drop the EKF for now and give it a try.
From what I have learned so far, the EKF is best used as an all inclusive formula (gyro, accel, gps, altimeter, compass, pitot, servos, engine, flaps, drag, user input, preset destinations...)
With redundant sensors, the EKF implemented in that way would likely be suitable for actual aircraft

I'm positive the theta equation is correct. But I encourage you to try your own algorithms as well and see what you get. That's how you learn what works and what doesn't and most importantly why. Let us know what you come up with.

I'm not sure but doesn't the Atan2 function return a result in radians? If so the ACC angle needs to be converted to degrees. I don't have access to the PC that I use with the propeller, sadly my garage is tore up and my pc has been put away for safe keeping.

## Comments

74From what I have learned so far, the EKF is best used as an all inclusive formula (gyro, accel, gps, altimeter, compass, pitot, servos, engine, flaps, drag, user input, preset destinations...)

With redundant sensors, the EKF implemented in that way would likely be suitable for actual aircraft

74Are we sure this is correct?

theta = 0.98*(theta+gy*Ts)+.02*accelAngle;

At first glance it appears to me it should be:

AccelX = atan2(ax,az)

GyroX = gx*ts

ThetaX = ThetaX + ((0.98*GyroX) + (.02*AccelX))

Roll = ThetaX

130I'm positive the theta equation is correct. But I encourage you to try your own algorithms as well and see what you get. That's how you learn what works and what doesn't and most importantly why. Let us know what you come up with.

David

463The equation for finding the current amount of rotation using just the gyro is something like this.

So knowing that equation you can combine it with your comp filter like this.

I'm not sure but doesn't the Atan2 function return a result in radians? If so the ACC angle needs to be converted to degrees. I don't have access to the PC that I use with the propeller, sadly my garage is tore up and my pc has been put away for safe keeping.