Loiter mode issue

Hi,
Have for a while been fighting GPS glitch in Loiter mode with my 10" prop quad, Arducopter 4.1dev on Matek CTR fc. Vibration reduction has been in focus and have managed to some degree. Upgraded the GPS recently to a Drotek DP0801 and it looked very promising the first flights I had.
This weekend I was flying again but after 5 minutes I was increasing the speed and suddenly felt how it started heavily drift in both yaw and roll. I switched to Stabilized mode and it calmed down at the same time as GPS glitch/ Vibration composition turned on.
I could without issue fly home in Stabilize mode.
There was some wind during the flight that it had to compensate for.
My question is if Loiter mode has any control parameter to tweak? It looks like it get into some kind of oscillation just before I switched to Stabilize mode.
Or do I just push the aircraft too hard in loiter mode?

Attached is a link to my log, any one have an idea what to do?

https://ardupilot.org/copter/docs/loiter-mode.html

Read the bullet points below Controls.

Personally, I never “fly” in Loiter.

Thanks for you answer, I have read through it but couldn’t find a clue to my problem there.

Extracted a section from my log where it becomes visible how roll and pitch get into increasing oscillation and when switching to stabilized it get in control.
Could this be related to bad compass calibration?

1 Like

Hello! I see in your logs that the value of the compass is too high (above 530) and it seems you lost your compass while flying (at time 17:07:23). The roll and pitch seems ok because the drone wanted to do those oscillations. I would recommend you to put another compass or enable them to have redundancy.

Thanks for the advice, have now looked through some old logs too and there is something going on with the Compass. This is a new GPS but behaves similar too the old.
I wonder if a bad supply could be a factor or too wobbly mount of the GPS?
Havn’t realized earlier that looking at the total sum of the compass is a good way to see if it’s healthy.

That is not exactly the sum of the compass, that image is a comparison between the throttle and the compass magfield. Here you have a good explanation: How to know if external compass/magnetometer is getting interference from motor, esc's, wiring ,etc. during flight?

I was thinking of the sqrt() part also referred to in your link.
I guess in my case it’s fluctuating too much to be good, will read through the link you send more carefully to see if I can figure out my root issue.
Could it be an issue that this compass has a high output value? I see it has a swing of > 1000 on the bench. Much more than anything else I had.
I guess the extreme values in this plot could also indicate bad calibration?

Thanks for your help!

Yes it could be for a bad calibration and/or because there are wires too close to your compass and it is interfered by EMI.

Hi again,
Tested some more and have calibrated compass multiple times, have also changed to 4.0.5. In stabilized mode it works very well but in loiter I get slow oscillations during part of the flight.
There was no wind during this flight.
I get this kind of issue in part of most flights but not the whole flight. In the end of this flight I tested full speed in Stabilized and even though I got more vibrations it had no problems handling it.
Quad with 10" props, 920kv, 6Ah liIon battery, Arducopter 4.0.5, Matek 405 CTR

Anyone having an idea what I could try next?

There’s lots of logging missing, change LOG_BITMASK,196607

I would try INS_GYRO_FILTER,20 to see if those oscillations are smoothed out, propbably run Autotune again.

With Lion batteries I would definitely run the Compass/Motor calibration - CAREFULLY!
https://ardupilot.org/copter/docs/common-compass-setup-advanced.html#common-compass-setup-advanced-compassmot-compensation-for-interference-from-the-power-wires-escs-and-motors

Thanks for the advice,
I will give that a try.
Have tested motor comp but the result was 0 in compensation.

Hi, updated as suggested and I had a long nice flight. I though see now in the log that a PID tuning is necessary, right?
Thanks again!

Hi,
Have now tested auto tune with ins_gyro_filter 20, but it became pretty sloppy or what do you say from the log?