Debugging autopilot flight

Hi —

I programmed a waypoint flight into my plane running ArduPilot and equipped with standard sensors plus an airspeed sensor. I was able to successfully hand-launch into autonomous mode. Then, instead of climbing or flying the programmed mission, the aircraft executed what seem to be two 180º circling turns at low altitude before crashing into the ground.

Can anyone help me figure out what went wrong & what might have happened here?

Flight track screenshot PNG

BIN file

I’m not familiar with 3.1, but the basics should apply so I’ll see what I can find. I would suggest you upgrade your firmware to the latest stable version.

How have the previous tuning flights gone? Was the plane in trim and flying properly?
Have you been using the trims on your radio? It doesn’t look like the input sticks have moved, but they are defaulting at odd values. The RC input for roll RC3 is steady at 1540, however the trim value is 1492. This means there is a continuous roll input. STICK_MIXING = 1, so any input even in auto mode will cause the plane to roll. (same story for pitch)

Thanks Allister.

I’ve stayed with 3.1 because I didn’t want to lose the ability to use stick arming (the RC_OPTION parameters). Has that been fixed with the latest stable versions?

The aircraft is generally trimmed and flies well — I’ve proved this in manual/stabilized/loiter/FBWA and FBWB, plus Auto mode — this aircraft flew the waypoint mission perfectly the first time I tried it, before I installed the airspeed sensor. Unfortunately, it hasn’t done so again since. Is that about what you mean by tuning?

As for the airspeed sensor, my calibration flights went well, where I left the plane in Loiter mode with ARSPD_AUTOCAL on, and the plane converged to flying in a nice circle.

I hadn’t realized it was potentially mixing stick inputs, although to my recollection I wasn’t giving any (other than the trim as you point out.) I will disable that, since, if I want to regain control I generally plan to throw it back into Manual mode anyway. I was too slow this time.

Stick arming is still the default on the latest versions. (I know because I prefer switch arming so I have to re-configure all the time)

I don’t think you were physically applying any inputs. I think there is trim active on your radio. You should not be using trim on the radio, that should all be in the flight controller.

By tuning I was asking about PID tuning, but of course trim is an important part of that. I don’t know the tuning process for 3.1, but on 4.x you would run autotune to at least set the initial PID values.

Thank you. Maybe you can share how to set switch arming in 4.1? Then I will happily upgrade.

Autotuning, I am looking into this now — thanks.

Hm — “With the default PID settings, Plane will fly the majority of lightweight RC airframes” given how standard the plane I am flying is, I wonder if this is where I am going to find the issue. Tuning doesn’t seem like it would explain the extreme deviation from the programmed flight track versus the flown flight track.

RCx_OPTION = 41 (x is for what ever channel you want it to be from your radio)

Have you been using trims on your radio?