Hi All,

I am required to calculate the instantaneous linear velocity, acceleration and attitude for the controller I'm working on. I'm using the EKF implemented by Hamer and I noticed that the attitude values are slowly converging to zero when even the drone is idle at a given pose. But when I use the default estimator the attitude values seem to be pretty solid. Is there a way to omit this convergence of EKF?

Thank in advance for your time!

## Attitude values slowly converging to zero in EKF

### Re: Attitude values slowly converging to zero in EKF

I think I figured it out. When I switch quadIsFlying=true, attitude values become stable. Apparently, we assume the drone's initial position is flat (R=I) and hence reverse the attitude to 0 with at a given rate when the accelerometer and gyroscope values are idle. Hence the attitude values should be stable when the drone is on the fly.

https://github.com/bitcraze/crazyflie-f ... cd2c8258e1

https://github.com/bitcraze/crazyflie-f ... cd2c8258e1

### Re: Attitude values slowly converging to zero in EKF

If you set "ROLLPITCH_ZERO_REVERSION" to 0 the convergence should not happen anymore.

Forcing isflying to true might not be good if you are not flying: when isflying is true the EKF will assume that the platform can only accelerate in the Z direction (like a quad flying in a vacuum ).

Forcing isflying to true might not be good if you are not flying: when isflying is true the EKF will assume that the platform can only accelerate in the Z direction (like a quad flying in a vacuum ).