MAVLink

We’ll be using ArduPlane with MAVLink.

QuadPlane Auto-Flight Flow:

  1. The plane is disarmed on the ground. Set configurations such as

    1. Q_GUIDED_MODE=1 (tells the plane to switch to VTOL flight mode and hover over the waypoint when it's reached)

  2. Arm the plane by sending MAV_CMD_COMPONENT_ARM_DISARM.

  3. Transition to AUTO mode by sending MAV_CMD_DO_SET_MODE.

  4. Take off by sending MAV_CMD_NAV_VTOL_TAKEOFF.

  5. Transition to GUIDED mode by sending MAV_CMD_DO_SET_MODE.

  6. Fly to waypoints using MAV_CMD_NAV_WAYPOINT. The plane will automatically fly to the waypoint in fixed wing mode and hover in place in VTOL mode when the waypoint is reached.

  7. Transition to QLOITER mode by sending MAV_CMD_DO_SET_MODE.

  8. Let CV control the plane until it's about 5 meters above the landing pad.

  9. Transition to QLAND mode by sending MAV_CMD_DO_SET_MODE. The plane will land itself.

  10. Once the plane has landed, disarm the plane by sending MAV_CMD_COMPONENT_ARM_DISARM.

Switching to User Control:

  1. Transition to QSTABILIZE mode by sending MAV_CMD_DO_SET_MODE.

  2. Cancel all missions by sending MISSION_CLEAR_ALL.

Resources: