Crash after switching from Stabilize to ALT and LTR

I ve recently built a quad, and today at my first flight I had a crash. :smiling_imp:

The pre arm check worked like a charm and when I saw (or just thought I saw right) that all readings and settings were fine, I took off in STB mode. The take off was very smooth and the quad was very stable in the air. Nothing seemd to go wrong.

After I gained some height I decided to check the flight modes. When I switched from STB to LTR things went crazy and the quad pitched down and crashed while I had no time to switch to STB again and maybe gain control. I downloaded the log file and realized that there was an error on geofence but I cant really understand what caused the erratic behavior and crash. I had set fail safe parameters to geofence in the fear of a flyaway.

Would anybody be so kind to have a look at the log file I m attaching and help me understand?

[attachment=0]2014-07-20 19-32-46.bin[/attachment]

Using:
-Pixhawk with the latest firmware update
-Ublox GPS with compass
-915 MHz telemetry
-Standard PID’s for quad
-6S Battery (Attopilot 90 sensor) as described here

I hope I m providing all the necessary information :smiley:

Thanks in advance for any kind reply!

Hi Dms,

I had a look at your logfile, and found the following…

After taking off in Stabilize you switch to loiter at line 13136…

Everything looks still fine at that point as your Altitude stays around 18 meter, but the quad is desperately trying to maintain its GPS location, which is causing Roll en heavy Pitch movements…
See line 13131 (roll & pitch value’s) and compare them with 13150 (after loiter is activated)

Pitch is moving between -21 and +23 which means it is tilting front to back and the other way around, while Yaw stays more or less the same (so it remains facing the same direction)

If you were flying in a lot of wind that could be the explanation, as it will try to counteract the wind influence…

After that you switch to ALT Hold at line 13211, which in a windy environment is causing drift away, as it only maintains the Altitude (in the log it stays around 19 meter, so still no drop in altitude.)

Then it hit the Geofence at line 13731 and RTL get’s triggerd.

Only now it is necessary that the GPS will know where your takeoff was located…
So it will need to know where it is pointing to…

In the graph (GPS filter on) and show map active, it’s moving away from your launc location…

So either it didn’t store the correct home (RTL) location and is trying to fly in the direction of a previous mission home location (I have seen this once before myself), and only by switching back to STB will get you back in control

Or it is the compass / GPS not mounted in the correct orientation, so pointing north is really pointing south…
See COMPASS_ORIENT = 8 ?

The GPS travel line (at the end) seems to be pointing 180degrees away from your launce point…

Did you verify in Mission Planner that the direction the drone is pointing on the MAP is identical to where you are pointing with the physical drone…?

However this is all not explaining the drop in altitude while the RTL was active…
Now I am looking at the map again, I guess it was flying into a hill…(correct) ?

I didn’t see any obvious drop on the CURR (Vcc, Cur, en Power) as well, except that the current consumption went skyhigh at the end (full power on motors), see line 14271 (58 Amp)

Your speed was around 22,14 m/s at that time.

Hope this helps…

Erik

Erik,

I really appeciate your reply, and I want to thank you so much for the attention you gave.

[quote]After taking off in Stabilize you switch to loiter at line 13136…

Everything looks still fine at that point as your Altitude stays around 18 meter, but the quad is desperately trying to maintain its GPS location, which is causing Roll en heavy Pitch movements…
See line 13131 (roll & pitch value’s) and compare them with 13150 (after loiter is activated)

Pitch is moving between -21 and +23 which means it is tilting front to back and the other way around, while Yaw stays more or less the same (so it remains facing the same direction)[/quote]

While it was in stabilize mode, the quad was very stable - and pretty easy to control. Everything began when I switched to ALT Hold and LTR.

[quote]If you were flying in a lot of wind that could be the explanation, as it will try to counteract the wind influence…

After that you switch to ALT Hold at line 13211, which in a windy environment is causing drift away, as it only maintains the Altitude (in the log it stays around 19 meter, so still no drop in altitude.)

Then it hit the Geofence at line 13731 and RTL get’s triggerd.

Only now it is necessary that the GPS will know where your takeoff was located…
So it will need to know where it is pointing to…

In the graph (GPS filter on) and show map active, it’s moving away from your launc location…

So either it didn’t store the correct home (RTL) location and is trying to fly in the direction of a previous mission home location (I have seen this once before myself), and only by switching back to STB will get you back in control[/quote]

There was almost no wind at that time. I took off after I made sure I had a GPS lock (so apparently pixhawk should have locked this position as launch). There s no possibility for a previous home location to exist since this was its first flight. Everything happened at a glintch of an eye, as you describe it. I had no time though to switch back to STB again.

[quote]Or it is the compass / GPS not mounted in the correct orientation, so pointing north is really pointing south…
See COMPASS_ORIENT = 8 ?

The GPS travel line (at the end) seems to be pointing 180degrees away from your launce point…

Did you verify in Mission Planner that the direction the drone is pointing on the MAP is identical to where you are pointing with the physical drone…?[/quote]

Pixhawk and Ublox are both facing at the front. Ublox is placed on 3dr’s mast. But I m having some thoughts as you mention that…Is there by any chance that this could have happened because of a possible mast folding??? It was secured in place at the preflight check.

[quote]However this is all not explaining the drop in altitude while the RTL was active…
Now I am looking at the map again, I guess it was flying into a hill…(correct) ?

I didn’t see any obvious drop on the CURR (Vcc, Cur, en Power) as well, except that the current consumption went skyhigh at the end (full power on motors), see line 14271 (58 Amp)

Your speed was around 22,14 m/s at that time.[/quote]

I was flying it at a flat agricultural field area. The nearest hill is almost 2km from the crash site. Untill the time it reached the max altitude of 19 meters it was all fine. As soon as I switched to ALT Hold - LTR it went crazy and dived in less than 2 sec (or it looked so fast) by increasing the throttle at the same time.

From what you describe here Erik I have the impression that something went wrong with the GPS. I calibrated everything before the flight and everything seemed normal. I dont know whatelse to think…

Do you have any ideas what might actually happened?

Again, thank you very much for your time,

Dimitris.

Hi Dimitris,

If there was no wind at all, I can’t see why the drone would tilt that fast front to back in Loiter…

Maybe your loiter settings are way different from the standard PID settings, I believe there is a separate set…

That’s still not explaining the fly away at the end…

Did you tune the drone in flight with channel 7 ?, as it might also be related to some slow response due to PID settings not being optimal ?

But on the other hand that should have been visible in Stabilize as well…

Also the drop in altitude at the end is for me a complete unknown, so maybe one of the DEvs have an better idea ?

Possible mast folding may have some effect, but during flight pitching down to move forward, en pitching up to move backward, is also moving the GPS and compass back and fort, so only if the mast has moved over the 45 degrees I.e felt flat on top of the drone may create a situation which the PIXHAWK can not correct.
But I am guessing here…

I use a carbon mast so both GPS and compass are always up

Just checked my compass orientation = 0 ! which is what I remembered that’s why I specified it earlier

So pointing the hardware in the right direction like you did, is no garantee that your parameters are correctly set…, I guess that you should see this difference in the MP…

Have a look ?

If you send me a PM if that works, I’ll send you my settings so you can compare line by line

You can also safe your settings (from the full settings list) and compare setting by loading a standard 3D platform which is matching your copter…

Then you can compare a more or less standard platform with your settings, and anything obvious will then be shown…

Don’t accept at that time, otherwise your settings are overwritten…

If that’s happening you can then reload the settings you have saved before…

Erik