APM applied full pitch back and full throttle after engaging loiter

Hi all,

This is my first post here, I've only been using APM for a few weeks on a DJI F450 Quad and so far it has been going well, until today.  I'm using an rctimer APM 2.5.2 board with the latest firmware v3.0.1

I'd been out flying earlier in the day and was getting some "toilet bowling" when using loiter, when previously my copter had been nice and steady in loiter.  After reading around a bit I decided to recalibrate the compass.  So I went through the live calibration and compassmot - which came out about 58% I think - not great, but not bad, and no worse than the last time I did it.

Went out to test fly in the garden.  Started off in stabilize, all ok, switched to Alt hold, still good, holding altitude well, all behaving very nicely.  I then switched to Loiter and whoosh, the APM applied full throttle and (what I assume was) full pitch back shot over my shoulder and smacked into the back of the house :-(  By some miracle, the copter seems to be ok (and still flies in stabilize), though it did put two nice scratches in the glass in my back door :-O

So, I need a little help triyng to work out what went wrong?  I've attached the logs (my switch to loiter is at line 2246) and a couple of plots I've done.  You can see where it goes totally bonkers immediately after I switch into loiter.  I initially thought that the "problem" was that WPDst=2.5, but after a bit more reading, I see that means that it thought it was 2.5cm from where it should be (have I got that right?).  So that shouldn't have caused any major movements right?

GPS hdop and nsats both look good, so I don't think it was a GPS issue.

The numbers that look odd to me from NTUN rows are PErX and PErY - distance to intermediate target(what do these mean, what are they exaclty?) - and VelX and VelY - velocity estimates, which are huge, and DPit = 45 - is that 45degree pitch back?  Which is what it appeared to do.

Any more ideas why did it did what it did?  

How can I gain some confidence that it's not going to do this again next time I switch to loiter?  

Should I recalibrate everything? gyros, compass, etc.  (I don't see how any of this could be that out given it was flying well in stabilize and alt hold)

Any ideas welcome.



PS: hope I've picked a sensible category.

Views: 3644


Reply to This

Replies to This Discussion

Here are the logs.  Thanks so much.


Hi Bill,

Sorry it took me a few days. Apologies to Rob for the thread hijack too. I took a look and I'm pretty certain that this will have been a compass issue. The compassmot hasn't been done (obviously) and if you graph the magnetic field against throttle in the tlog you can see a big change when the throttle is first raised. This will affect the direction the copter thinks it's pointing and as Randy has now pointed out to me, if the total error is more than 90 degrees this can then lead to the fly away. 

Now that you've found the compassmot information, make sure you do that in addition to the live calibration before flying again, after you've got everything rebuilt. Look for a value of not much more than about 30%. Then do some test flights in stabilise and alt-hold, flying around well with plenty of throttle, and look through the magnetic field and vibration info in the logs before trusting it to Loiter or RTL again. 

Good luck! I've got mine rebuilt and flying again now and it is an absolute marvel to see it doing its thing with hands off the sticks in a gusty wind.


Thanks Harry...

Yeah...I will do a compassmot tomorrow...I think I will wind up having to buy the new GPS with integrated compass and then mount that far from the battery.

It IS the battery, that creates the mag interference, right?



A number of things can cause mag interference including the power distribution board and associated wiring out to the ESC's. Yes the battery can, as do the motors themselves. Also, ferrous metals are problematic. Gets pretty interesting trying to track down all the little problem areas.

Thanks Butch,

It's a wonder the compass can operate effectively at all.

This happened to me today. I put it in loiter mode to switch to fpv goggles but the quad aggressively went to the right. I switched back to stabilize and took control.

if i had put the goggles on it would have been a bad crash :(

logs attached, arducopter version 3.1.1  


Hi Rob, hi Kishore,


@ Kishore: watch for supply voltage: you have 5,4Volts, that is quite high......


first, looking at Errors, time stamp 16000, i see subsytem 6 error code 1:

6: Battery failsafe

ECode 1: battery voltage dropped below LOW_VOLT or total battery capacity used exceeded BATT_CAPACITY

So, did you activate any supply sensing: low batt or low capacity?

Volt signal shows near 10V, that should be inspected:

*)' is your battery weak, or

*) is the voltage sensor not calibrated?

Current sensing: is the current sensor calibrated?


next, Performance Monitor: at 13000 and 16000 NLON and MAXT show activity: program loops exceed processor capacity, due to  ??? whatever.


remark at CTUN DCrate: at 17000, you do not add throttle, but your desired climb rate raises to 56cm/s, when your waypoint height changes to 8 meters. I think this will not makt your copter instable.

Logging the motors would help.....



@ Rob:

AUTO MODE, my quad raised with full throttle (100% !!!) after some loss in SatCount, induced by heavy roll/nick shaking.  

Missing GPS position caused GLAT and ILNY distance errors.

So PERRY started integrating, and when the Sat signals switched back to the "old" values (i suppose), the control reaction ACORRX, ACORRY exeeded normal values.

On an free area, i landed safe in Stablity mode.


Why dont i see all the logging values when i select "nearly all" in the MP?


Greetings, Hans-Jochen

Reply to Discussion



Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service