EKF position failure when flip from loiter

I modified the code (AC 3.3.2) to support switch to FLIP from LOITER.

Most time, it did pretty well. The copter switch to FLIP from LOITER and back to LOITER.

However, this time, when the copter switches back to LOITER, the copter flied to the south more and more fast. Finally, I disarm the motors, the copter fell down. 

Afterwards, I checked the log file(as attach file below), found that this was caused by the EKF position error.

The EKF calculated result thought the copter was moving to the north(not south), so the LOITER controller should update the output to maintain the loiter point, in other words, the controller made the copter flied to the south. But actually, the copter moving to the south, the EKF position result was opposite! Under PID control, the copter flied to the south more and more fast(the error became more and more large).

3691288459?profile=original

Besides, I checked the GPS positions log, they are correct with the actual position.

3691288392?profile=original

This confused me, what cause the EKF position failure?

2016-03-15 15-20-55.bin

2016-03-15 15-20-55.log

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

Join diydrones

Email me when people reply –

Activity