Here's a QGC (QGroundControl) mission file that creates a square mission pattern with sides of 5 meters, a height of 10 meters, and a flight speed of 1 m/s:
<?xml version="1.0" encoding="UTF-8"?>
<Mission>
<MissionItem>
<Command>22</Command>
<Param1>0</Param1>
<Param2>0</Param2>
<Param3>0</Param3>
<Param4>0</Param4>
<Param5>0</Param5>
<Param6>0</Param6>
<Param7>10</Param7>
</MissionItem>
<MissionItem>
<Command>16</Command>
<Param1>0</Param1>
<Param2>0</Param2>
<Param3>0</Param3>
<Param4>0</Param4>
<Param5>0</Param5>
<Param6>0</Param6>
<Param7>1</Param7>
</MissionItem>
<MissionItem>
<Command>16</Command>
<Param1>0</Param1>
<Param2>0</Param2>
<Param3>0</Param3>
<Param4>0</Param4>
<Param5>5</Param5>
<Param6>0</Param6>
<Param7>1</Param7>
</MissionItem>
<MissionItem>
<Command>16</Command>
<Param1>0</Param1>
<Param2>0</Param2>
<Param3>0</Param3>
<Param4>0</Param4>
<Param5>5</Param5>
<Param6>5</Param6>
<Param7>1</Param7>
</MissionItem>
<MissionItem>
<Command>16</Command>
<Param1>0</Param1>
<Param2>0</Param2>
<Param3>0</Param3>
<Param4>0</Param4>
<Param5>0</Param5>
<Param6>5</Param6>
<Param7>1</Param7>
</MissionItem>
<MissionItem>
<Command>16</Command>
<Param1>0</Param1>
<Param2>0</Param2>
<Param3>0</Param3>
<Param4>0</Param4>
<Param5>0</Param5>
<Param6>0</Param6>
<Param7>1</Param7>
</MissionItem>
</Mission>
Explanation of the mission items:
-
The first mission item sets the takeoff altitude to 10 meters using the MAV_CMD_NAV_TAKEOFF command (Command 22).
-
The second mission item sets the flight speed to 1 m/s using the MAV_CMD_DO_CHANGE_SPEED command (Command 16) with Param7 set to 1.
-
The third mission item moves the vehicle to the first corner of the square (5 meters in the x-direction) using the MAV_CMD_NAV_WAYPOINT command (Command 16).
-
The fourth mission item moves the vehicle to the second corner of the square (5 meters in the y-direction) using the MAV_CMD_NAV_WAYPOINT command.
-
The fifth mission item moves the vehicle to the third corner of the square (-5 meters in the x-direction) using the MAV_CMD_NAV_WAYPOINT command.
-
The sixth mission item moves the vehicle back to the starting position (0, 0) using the MAV_CMD_NAV_WAYPOINT command.
To use this mission file, save it with a .mission extension and load it into QGroundControl. Make sure to review the mission and ensure it is safe to execute before uploading it to your vehicle.