This document provides an overview of the core architecture of Mission Planner, explaining the main components, their interactions, and the overall system design. It covers the fundamental building blocks of the application and how they work together to provide a ground control station for ArduPilot-based vehicles.
Mission Planner follows a modular architecture with several key subsystems that work together to provide a comprehensive ground control station solution. The application is built on the .NET Framework (net472) MissionPlanner.csproj1-3 and utilizes a mix of WinForms for the legacy desktop interface and SkiaSharp for cross-platform rendering MainV2.cs16 HUD.cs25-26
The following diagram maps high-level system responsibilities to the specific classes and files that implement them.
Sources: MainV2.cs52-55 Program.cs93-126 MAVLinkInterface.cs27-32 CurrentState.cs135-144 FlightData.cs40-42 FlightPlanner.cs60-62
MainV2 serves as the central control point of the application, managing all major subsystems and coordinating their interactions. It inherits from System.Windows.Forms.Form MainV2.cs52 and acts as the host for the MainSwitcher control, which swaps between the primary functional areas of the GCS.
For details on the startup sequence and plugin loading, see Main Application (MainV2).
Program.cs, which handles high-level environment setup, logging via log4net, and directory configuration Program.cs38-163MainSwitcher to navigate between FlightData, FlightPlanner, and various configuration screens.MAVLinkInterface used for vehicle communication, often managed via the ConnectionControl UI ConnectionControl.cs1-20ThemeManager to apply visual styles and L10N for multi-language support L10N.cs1-10Sources: MainV2.cs52-55 Program.cs93-150 MainV2.Designer.cs1-50
The communication system handles all interaction with connected vehicles using the MAVLink protocol. It abstracts the underlying transport (Serial, UDP, TCP) through the ICommsSerial interface MAVLinkInterface.cs30-32
For details on transport layers and the telemetry server, see Communication System.
The MAVLinkInterface class is the primary engine for:
MAVLinkMessage objects MAVLinkInterface.cs69-86BaseStream (the physical or network connection) MAVLinkInterface.cs32-67Mirror objects for redundant data output or logging MAVLinkInterface.cs168-174Sources: MAVLinkInterface.cs27-105 MAVLinkSerialPort.cs1-50
Mission Planner tracks the status of connected vehicles through two primary classes: MAVState and CurrentState.
For details on multi-vehicle support and telemetry processing, see Vehicle State Management.
| Class | Role |
|---|---|
MAVState | Represents a unique vehicle instance identified by System ID and Component ID. It manages the long-term state like parameter lists and mission waypoints MAVState.cs1-50 |
CurrentState | Holds volatile, high-frequency telemetry data (Attitude, GPS, Battery) used for UI binding and real-time display CurrentState.cs17-100 |
CurrentState includes static multipliers for unit conversions (Distance, Speed, Altitude) to support different localization requirements CurrentState.cs27-38
Sources: MAVState.cs1-50 CurrentState.cs17-100
The UI is divided into major functional "Views," each implemented as a UserControl that is activated or deactivated by the MainSwitcher.
The FlightData class FlightData.cs40 provides real-time telemetry. It hosts the HUD (Heads-Up Display) FlightData.cs44 and myGMAP FlightData.cs46 It uses BindingSource objects to link CurrentState telemetry directly to UI controls like QuickView FlightData.Designer.cs32-48
The FlightPlanner class FlightPlanner.cs60 handles mission editing. It manages GMapOverlay objects for waypoints, geofences, and rally points FlightPlanner.cs83-110 It uses a WPOverlay to manage the visual representation of the mission on the map FlightPlanner.cs130
Sources: FlightData.cs40-150 FlightPlanner.cs60-140 FlightData.Designer.cs9-100
Mission Planner includes an integrated update mechanism to synchronize software versions and vehicle parameter metadata.
For details on the update process and the Updater.exe bootstrapper, see Update System.
Updater.exe MissionPlanner.csproj113-116ParameterMetaDataParser to fetch the latest definitions for ArduPilot parameters from remote repositories temp.cs180-193Sources: temp.cs180-193 MissionPlanner.csproj113-116
The following diagram illustrates how a MAVLink packet moves from the physical hardware to the user interface.
Sources: MAVLinkInterface.cs27-67 CurrentState.cs135-153 FlightData.Designer.cs32-48 HUD.cs124-150
Refresh this wiki