ArduPlane did not follow mission waypoints

I've been mapping an area and have used the same flight plan on my last three missions. This past weekend, I changed the plan to cover a larger area, as I felt very comfortable with the Arduplane v3.0.3. 

1. I created a mission and wrote the file to the APM and read it back to Mission Planner. 

2. Put it into Auto Takeoff and put it in the air. 

3. [This is the point I noticed something wrong] As soon as it hit its Altitude, it said heading to waypoint 4, did a complete 360 and headed north (which was in the opposite direction of waypoint 4).

4. The plane was just outside my line of sight, so I switched to RTL, but it continued on its heading north.

5. I have NO FPV gear, but still had my 2.4 Ghz control, using the HUD and instruments on Mission Planner, I piloted the plane back to with in line of sight (LOS). 

6. Once in LOS and still in RTL, I let off the sticks and the plane turned back around and wanted to head north again. 

I tried to download my Dataflash logs, but even though it has the flight's date, the data in the log is from a previous flight. I do have my Tlogs (attached), but I cant seem to find anything helpful in those. 

If anyone can help I would greatly appreciate it. 

droneshare link:


2014-11-09 08-02-02.tlog

2014-11-09 08-02-02.rlog

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • 100KM

    In my experience, when the plane heads north, it's either because I'm resuming a mission after it's completed or when GPS lock is lost. However rather follow Tridge's suggestion :)

  • Developer

    The problem is the attitude controller tuning. The plane is trying to turn hard, but not managing to turn. You can tell that by graphing the NAV_CONTROLLER_OUTPUT.nav_roll (which is the roll it is trying to achieve) versus ATTITUDE.roll (which is the roll it is achieving). The same problem is happening with pitch.

    3701871058?profile=originalAs you have zero I gain in both roll and pitch controllers it doesn't try any harder to turn.

    The first thing you need to do is run autotune.

    You probably also have a trim problem - I suspect the trim is way off. The tune will help with that, but you should really fix it properly. Read about the TRIM_AUTO parameter for a quick way to do that.

    Cheers, Tridge

    • 100KM

      Hi Tridge, can you perhaps explain - we're just talking about the green and red lines here? Seems like the plane IS rolling according to the IMU (ATTITUDE.roll, red) according to the NAV controller output (green).

      What am I missing? Many thanks.

    • Developer

      sure, happy to explain.

      The plane has the I term of the roll controller (RLL2SRV_I) set to zero. That means it was just using a P term. That means that for a given error in the attitude it used a fixed aileron deflection to try to fix it (it is a little more complex than that, as its a rate controller, but to first order that is a reasonable description).

      In the first part of the graph you can see the plane wanted to bank at an angle of 20 degrees (to turn right), but actually was flat. It later wanted to bank at -30 and actually banked at -50.

      That is a severe attitude error that the controller should have corrected. The plane put in some aileron deflection to try to correct it, but that aileron deflection didn't correct the attitude error. If the plane had been properly tuned it would have then put in more aileron deflection from the I term, and it would have managed to turn to the desired bank angle.

      It is quite possible, and even likely, that there is something else wrong as well. For example, there could have been wind causing it to need more bank angle, or incorrect trim causing the elevons not to be correctly centered, or a physical problem preventing the elevons from functioning correctly (eg. a slipped clevis). If tuning doesn't fit the problem then those will be the sorts of things to look into. The first thing to do though is to fix the tuning. Having a zero I term means it will always be prone to these sorts of errors.

      Cheers, Tridge

    • Great information, thank you!

    • 100KM

      Great, thanks Tridge. I did not realise the I term is that important. I'll re-examine mine to be sure.

    • Thank you! Strange, I've been flying this same set up for 3 missions now and this is the first time it's happened.

  • Any chance you had old waypoints and home still set in there? That's all I got.I will, however, throw my plane into RTL from now on as soon as it gets airborne just to double check. This past weekend I had a 900mhz failure and the ground station became worthless (I think I have a loose cable on the ground station 900mhz) if RTL hadn't worked I would probably be out one bird. Hopefully you find a reason here. 

    • After I create my missions and write them to the APM, I read them back to the ground station. The home on the ground station should have been the same on the apm, which you can see on the screen shot above. Thank you for the suggestion.

    • Yeah, my guess is this, or a bad compass lock that set the home / RTL to the north.  Either way, good HUD flying on the recovery!

      *EDIT Looking at the TLOGs, the ber_error is jumping about a bit...not conversant enough in MP to know what that means, but maybe...something?

This reply was deleted.