Mission Planning is a core functionality of Mission Planner that allows users to create, edit, and manage autonomous flight missions for ArduPilot-based vehicles. This system provides a visual interface for placing waypoints on a map, configuring complex command parameters, and synchronizing these instructions with the vehicle's flight controller.
This page focuses on the high-level technical implementation of the mission planning system. For detailed information on specific subsystems, refer to the child pages linked below.
The mission planning system is primarily hosted within the FlightPlanner view GCSViews/FlightPlanner.cs60-61 It integrates geographic data via GMapControl ExtLibs/GMap.NET.WindowsForms/GMap.NET.WindowsForms/GMapControl.cs36-40 with mission logic encapsulated in the locationwp structure ExtLibs/Utilities/locationwp.cs11-15
Title: Mission Planning Flow
Sources: GCSViews/FlightPlanner.cs60-150 ExtLibs/Maps/WPOverlay.cs15-28 ExtLibs/Utilities/locationwp.cs11-33
The system relies on several specialized classes to bridge the gap between UI interactions and MAVLink protocol requirements.
Title: Mission Planning Class Relationships
Sources: GCSViews/FlightPlanner.cs130-146 ExtLibs/Maps/WPOverlay.cs15-40 ExtLibs/Utilities/locationwp.cs11-209 ExtLibs/ArduPilot/mav_mission.cs10-15
The locationwp struct is the primary data container for mission items, mirroring the MAVLink mission item structure ExtLibs/Utilities/locationwp.cs11-209 Visual representation on the map is handled by WPOverlay, which converts these logic items into GMapMarker and GMapRoute objects for the GMapControl ExtLibs/Maps/WPOverlay.cs28-110
For details, see Waypoint Management.
Automated mission generation for photogrammetry and mapping is handled through specialized grid tools. These tools calculate camera footprints and overlap to generate optimal flight paths GCSViews/FlightPlanner.cs13-15
For details, see Grid/Survey Planning.
Missions are structured as a sequence of MAV_CMD definitions. Mission Planner uses mavcmd.xml to define the human-readable parameters (P1-P4, Lat, Lng, Alt) for each command type, ensuring the UI displays relevant fields for commands like WAYPOINT, LOITER_TIME, or DO_SET_SERVO mavcmd.xml4-150
| Command | Purpose | Key Parameters |
|---|---|---|
WAYPOINT | Standard navigation | Delay mavcmd.xml7 Alt mavcmd.xml13 |
LOITER_TURNS | Circle a point | Turns mavcmd.xml88 Radius mavcmd.xml90 |
DO_JUMP | Mission looping | WP Index mavcmd.xml277 Repeat Count mavcmd.xml278 |
For details, see MAVLink Commands.
Missions are synchronized via the mav_mission class ExtLibs/ArduPilot/mav_mission.cs10-15
locationwp items, handling retries and sequence validation ExtLibs/ArduPilot/mav_mission.cs65-111Safety is enforced through multiple layers:
Fence class, supporting polygonal inclusion and exclusion zones ExtLibs/ArduPilot/Fence.cs9-15Sources: ExtLibs/ArduPilot/mav_mission.cs10-150 ExtLibs/ArduPilot/Fence.cs9-88 GCSViews/FlightPlanner.cs102-110
Mission Planner supports standard ArduPilot mission formats: