First Flight with Ardupilot 2.6

I had a couple of very brief flights with my slightly modified ArduPilot 2.6 code this evening.

I only had the chance to do a couple of passes in fly by wire mode, but the initial results are promising.

Still some gain tuning to do, but this isn't bad for a first attempt.

In the plot below:

Blue line is bank angle

Red line is pitch

Green is heading.

Blue DOTS indicate times when the Ardupilot was in Fly By Wire mode.

As you can see I'm getting oscillations of ~5 degrees around zero. Time for some gain tuning.

More importantly, I do think I am having range issues with the Ardupilot. The antenna down range test before the flight was not quite as good as I'm used to, however I decided it was safe to try. During the flight I did have a few glitches while in Manual mode, so I'd like to improve my range test results to try to clear those up.

Time to clean up my wiring a little. As you can see it's a bit of a rats nest right now.


E-mail me when people leave their comments –

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

Join diydrones


  • it back in the air today.

    I switched reverse_roll and reverse_pitch back to 1, and she flew inverted.

    -1 worked for stabilizing the aircraft, but the control inputs were reversed.

    In older versions of the code, there used to be separate variables for AP servo control and Tx servo control. That hosed me in the early days.

    Then the code was collapsed to use the same variable for both AP flight and Tx input.

    Seems like I still need the -1 on the above variables, but my Tx inputs also need to be -1.

    Am I missing something obvious?


  • Great info guys....thank you!

    @tom - I appreciate it...I've tweaked the print file before...but I agree...there's a lot of one-off solutions for logging. Glad to see I wasn't missing something obvious.

    @Doug - While I noticed the gains definitely needed some tuning, it did appear that the navigation and airspeed hold worked much better when going upwind and downwind.

    It seems like these are the primary gains to change based on the comments.

    #define SERVO_ROLL_P .006
    #define SERVO_PITCH_P .006

    Should I start by moving these both to .06?

    Thanks!!...going to try and get it in the air again today.

  • Developer
    @JC - 2.6 uses substantially different control laws from 2.5. You are welcome to continue to use 2.5 if you want, but 2.6 has substantially the same handling of the thermopiles (meaning its not just for use with the IMU), and the new control laws will give you much better performance with respect to airspeed hold, altitude hold, and navigation in wind, but due to the changed control laws you will have to retune. Servo directions may have changed - sorry. Also, you will need to change a lot of the gain values. Of particular importance pay attention to the header file - there are some gain values that will be two orders of magnitude smaller than the equivalent gains in 2.5.

    I have not kept the output to a standard format during the alpha testing phase. I change it often to suit my own needs. Soon I will standardize it for use with the new ground station (which should be released soon as well).
  • Hey John,

    My logs are somewhat different than the stock setup. I'm doing my unpacking and data analysis in MATLAB. MATLAB is simple and fast when given comma delimited data with no letters embedded in the data, so I've adjusted my print_attitude() function to output the parameters I want with a comma separating each one.

    the function I'm using is "print_attitude()" in the attached PDE. Unfortunately you probably won't have too muhc use for it, since I wrote this function myself and then wrote my MATLAB unpack scripts to match the data coming out of my ardupilot.


    Regarding your servo reversed statement in Auto and Stabilize mode, I think I've noticed the same thing on my setup. I was going to post something about it in the Ardupilot 2.6 forum this evening to get the opinions of others.

  • Mind if I ask you how you pulled that data out of the logs?

    The format of the 2.6 logging has changed from 2.5. Doesn't run through my parser anymore, and excel delimiting doesn't quite work either.

    Here's the file of my 2.6 test flight today.


    Unfortunately, it also seems that the servo controls are a little different as well in 2.6

    In 2.5 I always had to reverse the servos with -1 in the .h file.

    Let me tell you it was a surprise today when they were reversed while in AUTO mode.

    I turned on nudging, and the nudging was reversed. If I turned it to Manual, I was good to go.

    I think the AP overall had the servos reversed (for me), as the altitude hold still didn't either. She got way up there.

    I'm thinking I'll go back to 2.5.4 with thermopiles, as it seems 2.6 is better for IMUs out of the box? Is this a correct assumption?


  • Doesn't look like a rats nest to me. There are many necessary wires, that's all.
This reply was deleted.