To create a QGC (QGroundControl) mission file for a square pattern with sides of 5 meters, a height of 10 meters, and a flight speed of 1 m/s, you can use the following QGC mission file format:
<?xml version="1.0" encoding="UTF-8"?>
<missions>
<mission>
<item>
<command>22</command>
<doJumpId>1</doJumpId>
<frame>3</frame>
<params>
<param index="1">0.0</param>
<param index="2">0.0</param>
<param index="3">10.0</param>
<param index="4">0.0</param>
</params>
<type>SimpleItem</type>
</item>
<item>
<command>16</command>
<doJumpId>2</doJumpId>
<frame>3</frame>
<params>
<param index="1">0.0</param>
<param index="2">0.0</param>
<param index="3">10.0</param>
<param index="4">0.0</param>
</params>
<type>SimpleItem</type>
</item>
<item>
<command>16</command>
<doJumpId>3</doJumpId>
<frame>3</frame>
<params>
<param index="1">5.0</param>
<param index="2">0.0</param>
<param index="3">10.0</param>
<param index="4">0.0</param>
</params>
<type>SimpleItem</type>
</item>
<item>
<command>16</command>
<doJumpId>4</doJumpId>
<frame>3</frame>
<params>
<param index="1">5.0</param>
<param index="2">5.0</param>
<param index="3">10.0</param>
<param index="4">0.0</param>
</params>
<type>SimpleItem</type>
</item>
<item>
<command>16</command>
<doJumpId>5</doJumpId>
<frame>3</frame>
<params>
<param index="1">0.0</param>
<param index="2">5.0</param>
<param index="3">10.0</param>
<param index="4">0.0</param>
</params>
<type>SimpleItem</type>
</item>
<item>
<command>16</command>
<doJumpId>6</doJumpId>
<frame>3</frame>
<params>
<param index="1">0.0</param>
<param index="2">0.0</param>
<param index="3">10.0</param>
<param index="4">0.0</param>
</params>
<type>SimpleItem</type>
</item>
</mission>
</missions>
In this mission file:
- The first item (command 22) sets the takeoff altitude to 10 meters.
- The subsequent items (command 16) define waypoints for the square pattern, with each side being 5 meters long.
- The
frame parameter is set to 3, indicating that the coordinates are relative to the home position.
- The
param elements specify the x, y, and z coordinates for each waypoint, as well as the yaw angle (set to 0 in this case).
- The flight speed is not explicitly set in the mission file, but you can set it to 1 m/s in the QGroundControl application before uploading the mission to the drone.
Save this content to a file with a .plan extension (e.g., square_mission.plan) and load it into QGroundControl to use the mission.