Loiter don't engage

Hi

I have an issue with loiter . It is very difficult to engage. And it may engage after some flight time.
AltHold works perfectly.
GPS fix is good . And vibrations are OK.

I have attached a log of a flight where it finally decided to work (quite at the end).

Thanks in advance for your help.

https://drive.google.com/open?id=1duSM1pLMZjTqk0ygTVGQPFGtdacGZ-5c

The difference between Alt-Hold and Loiter is that Loiter requires a high quality GPS fix, not just a 3D lock. Alt-Hold does not require GPS. Look in your logs for GPS and see if you are getting GPS glitches.

Thanks Mike. That was my first thought.
HDOP is below 1 and I had 11 sats acquired all the flight. Lat long curves have no glitch.

Sebastien,

You can still get moments during flight that pass behind trees or tall buildings etc where the GPS lock degrades. If you look at the dataflash logs it will plot the GPS status during the whole flight and tell you if you are expereincing GPS lock instability. GPS reception quality can vary with sun spots etc also.

I looked at the logs and no glith during the all flight on the GPS.
What could be another cause ?

Interesting.I’ve had this only very rarely and never discovered what it was.Normally a reboot sorted it out.But I just saw this in the log.The EKF2 reports “IMU0 aligned to GPS velocity”.Shortly after that it allows Loiter to engage.I have no idea what that all means.

You know when my flight controller gets acting inexplicably I assume now it is corrupted parameter memory and something is set that I did not expect. I then erase all the paramters on the Mission Planner Config Advanced Parameters list page and start from scratch with the calibrations etc.

EKF has a lot of settings which if screwed up could create situations.

Just to clarify a behaviour that is new in the last couple of releases:

When sitting on the ground waiting for a fix, and the LED turns green indicating an adequate 3D Fix for GPS.
Wrong.
Adequate for what, I still can’t get a straight answer.
You have to switch to a GPS mode before arming to check that the LED stays green, and doesn’t go back to blue.
This has had to become a SOP before takeoff now, because if you are armed with a solid green LED and you switch to a GPS mode (and the EKF rejects it, ie: would turn back to blue on the ground) the LED will stay solid green and the only indication the GPS mode was rejected will be a 2tone from the buzzer.
And of course the copter just drifts (stays in the previous mode).