Ardupilot 1.0: Successful testing with Easy Star

After working out a few kinks (bad CPD4 sensor) I successfully tested Ardupilot 1.0 with my modified Easy Star with ailerons. I have been testing with the NE code loaded and the PID heading gain set initially at -40,40, and most recently at -25,25. I also have the rudder servo set to 'Normal'. At first I left it set to reverse but realized the mistake after the first flight test. One thing I am still trying to work out is the plane's tendency to oscillate when flying towards the NE, that is, the plane tends to turn past the heading by 10 - 15 degrees or so only to turn back the other way to correct, and then repeats this over and over. When I had the PID gain set to 40 the problem was much more pronounced, so I am thinking of scaling back from the current setting of 25 to 20. All in all I am very excited to have come this far!
E-mail me when people leave their comments –

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

Join diydrones

Comments

  • T3
    Yep... It's the Kp and Kd...
  • Sami,

    Thanks for the tip; I will give it a try. Just to be clear, do you know where in the code I can adjust the P and/or D?

    I thought maybe it might be this:

    #define Kp_heading 10
    #define Ki_heading .01
    #define Kd_heading 0.001
  • T3
    Sounds like you'd need greater D coefficient, not smaller gains.. You should set the gains as big as possible: i.e. as big as your stabilization can handle so that your autopilot can maneuver in high winds. The oscillation has nothing to do with the gain and you should be able to get rid of the oscillation by changing the P and D terms of the PID. (greater D or/and smaller P)
  • Keep it up well done!
  • Nice work!
This reply was deleted.