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

  • 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.
  • 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:

     

  • Developer

    I'm heading out in 10 min. I will film it for you.

  • Developer
    I spent sat night on the baro and reworked it. It's really good now! Like sonar in the sky.
  • Developer

     

    Perhaps that a solution would be to use 2 baros devices ? or 4 baros and average them ? This would filter the random walk.

     

    "Also, I believe the baro is not really noisy. It has a random walk that takes a few seconds. That's incredibly hard to filter and a faster filter won't help that."

     

This reply was deleted.