Loiter holding good but initiating Land for unknown reason

Hello.
My 680mm quad is working very well in stabalised mode. I can take of in loiter, or select loiter in flight, and position will hold good for a short time. Quad will then land itself.
If I put more throttle input it doesn’t make a difference.
From the log it shows it’s going into land mode. That’s as far as I can tell.

The hardware is what hobbyking call an apm 2.7.
Firmware I think is 3.1… whatever the latest was that apm planner updated.

[attachment=0]15-05-02_08-33-21.bin[/attachment]

Your file is crammed full of ekf errors and it says ekf failsafe.

Your logging is set very low so cant check vibrations in case its that.

What is an ekf failsafe?..
This:
copter.ardupilot.com/wiki/config … -failsafe/

says it only runs on pixhawk?

I’ll work out how to increase logs before next test.

I’ve just been watching LOS video of flight and thinking about what happened.
I can see I’m loitering fine for maybe 30 seconds. then quad yaws slowly about 40 deg.
then it moves SE and tries to land.

If it is compass related, It is mounted on a mast well away from things.
Maybe I’m running off internal compass. How can I check that?

Browsing settings I find EKF_CHECK_THRESH is disabled.

I enabled external compass and compass learn and log default+imu and flew again today.

I took of in stabilized, hit loiter, held position for 20 seconds or so then proceeded to autoland.

I will upload logs tonight.

Thanks.

Yesterday I did 2 flights but it seems only one was logged.
I tried to look at accx/y/z but something is wrong with my logs and only shows accz.
log is over 2mb so can’t upload. I’ll have to do another shorter flight.

I have done another flight with the same log settings and I believe all the needed information has been logged.

Can anyone help me out with this.

at least, log RCin too ,

So there are no problems here?
Must be tx switching to land mode randomly?

right now I don’t see a reason , nor did I look too hard for one, gathering more “evidence” is better.

rc in.
anything else I should be logging?

Thanks.

Looking at my logfile I can see I get plenty of the following errors:

ERROR_SUBSYSTEM_EKFCHECK 16
ERROR_CODE_EKFCHECK_BAD_VARIANCE 2
ERROR_CODE_EKFCHECK_VARIANCE_CLEARED 0

ERROR_SUBSYSTEM_FAILSAFE_EKFINAV 17
??? 1

If I am in stabalise I will get 16-2 and 16-0.
If I am in Loiter or RTL I will get 16-2 immediately followed by 17-1 immediately followed by Land. I believe this error is causing land.

Any thoughts welcome.
Thanks.

It seems that ATT.ErrYaw corresponds to my EKF error 16 - 2.

Is this normal compass behavior in mission planner when quad is pitched and rolled.
youtu.be/LFF6gY7zP4o