Hex Crash, Weird Arducopter 3.1.3 behavior on GPS, Help plz

Hi, first post here, not a newbie but always plenty to learn :slight_smile:

Had a miserable crash today with my Hex:

Arduflyer 2.5.0
Arducopter 3.1.3 (probably had this problem before)
External compass+GPS (neo-6m)
Managed to load 3DR config to GPS even though its old style GPS connector (all red wires…)

Copter took of great in stabilized, almost looks like loiter or alt hold.
Moved to AltHold
Moved to Loiter
Started going a little
Then copter starts rolling to the right (maybe pitch backwards) agressivly
Move to AltHold while it zooms towards a tree, can’t get control, lower motors… not sure what stopped it before it hit the ground - i.e. did i gain control or did it just crash…

I must admit, the same happened flight before that, it moved very aggressively backwards, I moved to althold, regained control and continued a great ~10 minutes more flight, the second time hasn’t ended well…

This was about the 10th flight of the hex and i’m pretty sure I had these events on some other flights but very very brief (like half a second) so I dismissed them, might even had them when this APM wasn’t an hex…

My diagnostics seen this: there was a gps error 1 on the logs (lost gps lock for more than 5 seconds) follow by gps error 2 (got gps lock back)
everything configuration wise is almost default so
GPS Failsafe is on 1 - Land.

My guess is that once lock came back it tried to fix the position,
But I never seen loiter move this fast, it was really aggressive.
If it lost GPS for 5 second and failsafe was on 1, why didn’t it try to land? now I will change the default to switch to AltHold, seems more reasonable (unless the GPS is lost after a radio loss…)

Attached are the logs -
Small log is the crash :frowning:
Big log is the save at the start and then a long flight.

Please help me to understand, i’m suspecting there is something wrong in the way arducopter handled this situation although I would love to know if there is a physical problem that caused the gps loss.

Did i loose signal or lock (bad gps connection)? does arducopter just keep the last position? so if i move in those 5+ seconds it tries to go to the original position before the loss? maybe the gps glitch patch gets confused?

Some views, no help…

After digging through the logs and actual salvaged footage I found out what happened:

the short story: I crashed it…

Here is why:

LOG state GPS lock lost
LOG state GPS lock restored
I think its probably at this point of GSP restore that the copter made a very agressive twich.
I moved mode to ALT Hold.
While I wasn’t noticing Copter does a 90 degree yaw right, and still moving agressivly
This is all in in 1.5-3 seconds…
I notice it moving still and correcting unaware of the 90 degree Yaw.
Copter moved in the direction I didn’t intend so I correct harder in to the actual movement direction and crashing it…

LOGS show the yaw without yawin stick input
LOGS show tilt and roll with the same tiltin and rollin stick movement from me unaware of the direction change.

The question is still, why would it move aggressively when GPS lock restored?
GPS glitch patch didn’t catch that as it probably was less than 10 meters, but its not a glitch, the lock was lost!
Why not take the new gps lock as current? was it trying to move to the before lock loss point?
Why did it yaw? there was no wind?
Why didn’t I just leave the sticks when I moved to alt-h? (note to self :slight_smile: )
If I was taking off in FPV this wouldn’t have happened (another note to self :slight_smile: )


I looked at your log files, and find out, that probably (and unfortunately) the problems starts when using LOITER mode. Both logs shows, that after few seconds of flight in LOITER mode, the “NSats” drops down until “Err:GPS-2” appears. After few seconds, of course, it being restored but copter already felled in to “aggressive” mode after “Err:GPS-0” status. There also first log shows, that “ThrIn” was about 650, but “ThrOut” was 1000 !- I am not expert, but it looks abnormally, and may be some one can explane.

And I don’t know, but I believe, that lot of APM2 owners had the same situations even they don’t know yet. I also, until it happened… chmm- the flight was in the same 2014.04.19 day :
(APM 2.5, AC 3.1.2)
Started as usually in Stabilize mode, then rise up to 15m and stopped,
Switched to LOITER mode,
Then I rotate the copter by Yaw to capture panorama,
Doing Yaw rotation the APM lost GPS (Status=1) even the sky was absolutely clear !
The copter began moving into “strange” direction
and after 2-3s. when GPS being restored the copter began to fly aggressively and etc.

So, for “aggressive speed” in my case, I think, happened because WPNAV_LOIT_SPEED was set to default 1000 cm/s, that it is to match for me. Now I decreased it to 100cm/s. but not tested yet.
But in your case, the WPNAV_LOIT_SPEED parameter is set to 550 cm/s, so, I don’t know is it comfortable for you or not. Actually now, I am not sure it helps for “stopping aggression” in this situation or not. Maybe some who knows exactly will comment.

So, there are still no answers for questions, but let it will be the first step in research :slight_smile: :

<The question is still, why would it move aggressively when GPS lock restored?>
<Why not take the new gps lock as current? was it trying to move to the before lock loss point?>

as i said, i anderstand gps glitches, the gps glitch patch is set to detect bogger than 10 metrrs glitches, but what happens on gps losses and restores? im not completely sure if the aggresive started on the loss or restore, my bet is on the restore.

The flow in the logic (and im might be wrong here) is that if we loose the gps lock, when it is restored it should be considered the current location and not try to fix the location to the before gps loss location

thinking back i had this problem alot but always while moving + fpv + gimbal, so there was was a motor glitch sound and i continued, this time i was los and standing. i think i have a bad gps, but that doesnt change the issue that there might be a flaw in arducter

in the both logs, the GPS error shows only “GPS glitch”: error=2, but “GPS Lock” never had lost: GPS Status is always 3, so it is little bit different things.

About GPS Glicth from wiki:
copter.ardupilot.com/wiki/common … S_glitches

“APM:Copter to think that it’s suddenly in the wrong position and lead to aggressive flying to correct the perceived error”

So, in this case the situation looks normal.