I am trying to create a custom ground station that could take off the Quadcopter when a camera detects a predefined target. Basically, there are a camera, a computer and a Quadcopter. The computer sends MAVLink commands to the APM3.1 and no remote control shall be used.

I am running a C++ program that arms the Quadcopter with MAVLink but I can't manage to make it fly.

I first tried to override remote control with RC_CHANNELS_OVERRIDE MAVLink command but the Quadcopter does not answered to my request. I then tried with MAVLink missions. I succeed in sending mission to the Quadcopter (I can see them with Mission Planner) but when I switch to AUTO mode, nothing happened.

I'm probably missing something but I've been looking around for a while and I didn't manage to find anything. If you've done that kind of things and if you've got some time to spend for a newbie, any help would be warmly welcomed.


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

Join diydrones

Email me when people reply –


      • Hello Alexander,

        You first have to arm the Quad. For that, use the arm mavlink command COMMAND_LONG (#76). Then, simply use the RC_CHANNELS_OVERRIDE (#70).

        The thing is to use the correct GCS_ID so that the Quad will recognize you ;-)

        Thanks for the tip on AUTO mode, i'll try that.


        • Hi Valentin,

          What's the correct GCS_ID you used?


        • Hi Valentin, can i get more information on how you were able to arm the quad using #76? Also i am trying to use SET_ROLL_PITCH_YAW_THRUST ( #56 ). Currently I am able to request for IMU data but I am still trying to send commands to the quad. Any help/input is highly appreciated. Thank you!

          • Suresh,

            The trick is to use the #76 mavlink command with the MAV_CMD field set to the arm/disarm command (400).

            Then send the MAVLink command to your QUAD, using the correct target system / target component.

            Good luck !

            • Valentin,

              Thanks for the reply. Based on your post, I was able to find out that command and the 400 with parameter 1 to arm and 0 to disarm. 

              However, I am still unsure what is the line in code to invoke. With the given library files, mavlink_msg_command_long is not recognized. Can I get some guidance here?

              I just started coding in mavlink several weeks ago. Your help is highly appreciated. Thanks!

        • Hello,

          Thanks for your answer. I will try to use those commands to control APM.


This reply was deleted.