Developer

Arducopter Alt hold

3689422262?profile=original

This is a simulation I'm working on to improve the Altitude hold and change control laws. I have identical code from Arducopter running in Flash as OO Javascript so I can ensure the behavior is the same as the real thing. I sampled data from the barometer to introduce identical noise into each copter's solution. This allows me to test PID and other tricks side by side and see how the copter will behave. The copter itself is a simple physics equation and should be fairly accurate.

 

The Hover value is in your logs when you switch to Alt Hold. You should see it with the mode switch name. Mine was 495 which is the equivalent of 49.5% throttle. A lower value has a profound effect on the flight so play around with that.

 

The A copter is the current control solution. The B and C copters are Pi->Pi rate based solutions and are identical. You can adjust PID setting to pit the two against each other.

 

The scale on the left is meters. The Sonar is active and the mix is identical to the current AC2 solution.

 

This new code is in testing and will be available next week in 2.0.40b

Jason

 

 

 

 

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Just updated mission planner and quad code to 39b. Everything sets up ok but all my params are gone in alt hold in config. This includes trying to load old params, nothing gets into the box. Is this normal for this upgrade?

  • Jason, LOITER with THROTTLE_HOLD is the same as ALT_HOLD with ROLL_PITCH_AUTO?

    Nice feature!

    Will try to give it a shot tomorrow and get back to you!

  • Seems that the combinations are endless.

    Jason, could you please give some more information in defining the parameters of the flight modesPerhaps with somemore examples.

    THX

  • Oh, so you can have loiter with or without altitude hold etc? That is nice. How about altitude hold with or without compass ("simple mode")?

  • Developer
    The flight modes are now configurable to any combination you want. Check out the APM-config file and config.h. We will move that to the mission planner in next rev.
  • Developer
    I never had rate based loiter before, actually. That was the problem I tried to solve with 40. The trunk is updated and flying sooo good for me on a stock AC frame. Rtl is a joy.
  • Is that version in the trunk? I've been putting off new test flights for a couple of weeks now, but this seems exciting enough to get flying very soon! Hopefully the new rate-based loiter works - I shortly tested it a few weeks ago already but saw similar oscillation as always. Beats me - but if the whole system has now been overhauled, I'm very curious about its performance. :)

  • That very nice. Nice work Jason!!

    Can't wait to test the latest code. Have to miss the quad for a couple of days :-(

    Will "alt hold control" be left alone like the current version or will this change again.

    And what about AH in Loiter?? Maybe an extra mode = Loiter + AH??

  • Developer

    Just got back from the best flights ever. RTL working perfectly with crosstrack correction in mild wind. 

    Here is that video from my Backyard test:

     

  • Oh the suspense..:)

This reply was deleted.