Developer

Arducopter 2.0.40 preview

3689422502?profile=originalI've been away on vacation for the last week and a half, but I was able to port Arducopter to Flash and do some simulations. This has helped me rewrite the navigation control laws, simple mode, and Loiter to all use a streamlined set of control loops. This not only has saved code space, but the end result is a quad that flies like it's on rails. 

 

Loiter and WP navigation are now the same code and use a rate based solution from the GPS. The heading and ground speed values are parsed into X(long) and Y(lat) components. This gives me a far more accurate estimation of position than just using the Mediatek's lat and long outputs. The controller takes the position error, desired speed, and minimum speed and outputs pitch and roll commands. I've noticed a marked improvement in Loiter hold. Basically it's glued to one spot. I'll need to do more testing in windy conditions, so stay tuned.

 

Altitude hold uses the same controller design and manages the speed of altitude change. Landing and altitude changes are much more controlled and I've not seen the quad loose altitude on RTL like it did in the past.

 

The  Throttle, Roll/Pitch, and Yaw control loops have all be separated to give you the option of redefining any of the modes. In the zip file below, Alt hold has been redefined (in APM_Config,h) to use SIMPLE mode for Roll/Pitch. Loiter has been redefined to use Manual throttle. 

 

The Flash based simulator uses nearly identical code to Arducopter. Here's the work in progress of the sim:

 

 

The code itself is available for download here and is considered alpha to me. WP's are being tested tomorrow. Only RTL, SIMPLE, ALT HOLD have been tested so far. Crosstrack correction is currently disabled. Everything should work, but be careful. Anything could happen. I've only crashed 4 times today ;)

Jason

 

Updated:

latest code

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Distributor

    Looks like it will be a busy long weekend! :) 

    nice timing. 

    Thanks again Jason, good work... I hope you really had some time off and that you are fully recharged because you have a bunch of "testers" ready to open defects! :) 

     

     

  • Do the new control laws port over to the traditional heli or is it only for the quad?

  • Thanks Jason !!!! will try this very soon !!! with new video at the key

  • Thanks for all of the hard work Jason. Cant wait to try it.

  • hey guys
    thx jason you have fixed camera stablization it looks great
    thanks again

  • Using also MB1200 and tested it with 2560 and 1280 and same problem.

  • Still on V2.0.39b, I´ve verified that sonar works right on both boards: 2560 and 1280. I´m always using the sonar MB1200. (with MB1240 type it doesn´t work)

     

    Hope this solve doubdts about board type.

     

    Angel

  • Just loaded the v40a and I'm still having 137m as altitude.

    This has been mentioned for the previous versions.

    Could this please be adressed so I can fly the latest version.

    I'mcertain I'mnot the only one with this issue.

  • Am using .38 with the U4eaks blink light for low batteries.

    A custom build with the Arducopter/pilot board does wonders.

    https://www.youtube.com/user/skywave12?feature=mhee

     

  • Developer

    Copter B is using the rate controlled navigation. It bounces 2000m back and forth when you click the light grey vertical strip. I know, not intuitive, but when your writing the code as the interface, you take some shortcuts...

    Jason

This reply was deleted.