Takeoff and Arm from GCS arducopter 2.9.1

Firstly I would like to apologize for sending takeoff message to all people in "Learning to program the Ardupilot Mega" group. 

I have been reading code of Arducopter 2.9.1 and I can not find the code part that allows arducopter to be started from GCS. It slowly starts to seem like a bug or at least not intentional capability. I would like to know how it works on the code side to know that random update will not remove this option which for me is a feature.  

Also I have noticed very large difference int automatic takeoff preformance when blades are spinning vs not spinning. I tried to find out how the liftoff sequence handles the part where motors are started ad predefined speed is hidden for now.


Better wording of my question. 

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

Join diydrones

Email me when people reply –


    1. Which is exactly the command send by Mission Planner for take off?
    2. Does it arm the copter too?
    3. Does it work with no RC ?
    • 1. There isn't a command sent from mission planner to takeoff. It is an option when mission scripting (the script followed when in AUTO mode). Essentially, a takeoff is just a loiter command with the altitude slowly increased. If you want to take off outside of AUTO mode go to loiter then change the commanded altitude. That should do it for you.

      2. No, takeoff does not arm the copter. This is intentional as a safety feature. There is no way the autopilot can arm on its own, without a direct command from you.

      3. You need to have an RC transmitter connected to the copter at all times so you can act as safety pilot. While you could in theory configure it to operate with no RC connected but I would not recommend it (In the US it violates the FAA rules on autonomous vehicles).

  • I also did a enchantment request to arducopter wiki. Issue 559 
    So if it happens to be too much for my small programming skills, it still would get done. 

  • Another thing I noticed. 

    Wiki specifies that autonomous landing will not turn off the motors after landing has been initiated, it can only be done with RC. When doing autonomous landing, the motors will have calm spinning speed and after about 5-10 sec or so it stops the motors. My RC remote is switched off mostly (Since it starts fast and I am flying in )

    When reading code, function "get_throttle_land()" seems to be responsible of landing detection and it waits until ap.failsafe goes 1 or g.rc_3.control_in goes 0 to init_disarm_motors().

    So because my RC is not connected the ap.failsafe will be set to 1 by throttle fail-safe check. 

    The continuous motor rotating should be tied to THR_MIN value and delay of the disarm is the time it takes for failsafe to kick in.

    Am i correct?

  • Hey Markus,

    Don't worry, arm / disarm from the ground station is not a bug - it's very intentionally built in and I doubt it'll be removed in future releases. In your code, do a find search for 'init_arm_motors()' in the file GCS_Mavlink.pde. That will take you exactly where it happens. 

    The way it works is this. The ground station sends a command_long mavlink packet (defined in common.xml, message 76) with the command set to MAV_CMD_COMPONENT_ARM_DISARM. If the first parameter in the packet is 1 the mav arms and 0 it disarms.

    Here's how the takeoff works. do_takeoff  puts the helicopter in loiter mode, and tells the autopilot to raise the helicopter some altitude above the ground (you set this in mission planner). The autopilot is going to slowly increase the throttle until this altitude is reached. When your motors are not spinning to begin with this can take quite some time (and will really mess up the altitude hold trim point - g.throttle_cruise). Moral of the story is takeoff will work best if you give your copter nearly enough throttle to take off before you switch into that mode.

This reply was deleted.