This document provides a technical overview of the Mission Planner user interface architecture, its component structure, and the key systems that enable user interaction. It explains how the UI is organized, the main views available to users, and how these components interact with each other.
Mission Planner's user interface is built using Windows Forms and is organized around several main views that provide different functionalities to users. The UI system follows a module-based structure with a main application container that hosts different specialized views.
The core UI logic resides in MainV2.cs, which acts as the primary shell. It utilizes a switching mechanism to swap between different functional areas like Flight Data, Flight Planner, and Configuration.
Sources: MainV2.cs52-74 MainV2.cs77-100 Utilities/ThemeManager.cs44-57
Mission Planner uses a "View Controller" pattern where the main application window (MainV2) manages multiple specialized views. Each view is implemented as a UserControl (often inheriting from MyUserControl), allowing for modular development and organization.
The following diagram maps high-level UI concepts to their respective classes in the codebase.
Sources: MainV2.cs52-74 GCSViews/FlightData.cs40-46 GCSViews/FlightPlanner.cs60-107 ExtLibs/Controls/HUD.cs123-178
The Flight Data view is the primary interface for monitoring real-time vehicle telemetry. It integrates the HUD, map, and status panels. It utilizes BindingSource objects to update UI elements like QuickView controls and AGauge instruments from the CurrentState of the vehicle GCSViews/FlightData.Designer.cs32-87
For details, see Flight Data View.
The Flight Planner view provides the interface for mission creation, waypoint editing, and map-based planning tools. It manages various GMapOverlay layers for missions, geofences, and rally points GCSViews/FlightPlanner.cs83-110
For details, see Flight Planner View.
These views handle vehicle setup, including hardware calibration, firmware loading, and parameter tuning. This includes specialized screens like ConfigFrameType and ConfigFirmwareDisabled GCSViews/ConfigurationView/ConfigFrameType.Designer.cs1-10 GCSViews/ConfigurationView/ConfigFirmwareDisabled.cs1-10
For details, see Configuration Views.
The HUD provides a visual representation of the vehicle's attitude and critical flight data. It is a custom control that supports multiple rendering backends, including GDI+ via SkiaSharp in the HUD2 class and OpenGL via OpenTK in the base HUD class ExtLibs/Controls/HUD.cs34-75 ExtLibs/Controls/HUD.cs123-130
Mission Planner uses a heavily customized version of GMap.NET. The Common.getMAVMarker function dynamically generates map markers (Plane, Quad, Rover, Boat, Sub) based on the vehicle's MAV_TYPE and updates their position, heading, and status in real-time Common.cs24-147
Sources: Common.cs77-138 GCSViews/FlightData.cs46-55
The UI is themed via the ThemeManager, which applies styling to controls, including child classes of MyButton Utilities/ThemeManager.cs68-95 ChangeLog.txt75 Standardized interaction is handled through custom controls like CustomMessageBox, InputBox, and ProgressReporterDialogue ExtLibs/Controls/CustomMessageBox.cs1-10 ExtLibs/Controls/ProgressReporterDialogue.cs19-35
For details, see UI Theming System.
Program.Main calls Application.EnableVisualStyles() and starts the MainV2 form Program.cs93-162MainV2 sets up the menuicons (e.g., burntkermitmenuicons) and initializes the connection control MainV2.cs57-189FlightData and FlightPlanner are instantiated. FlightPlanner.Init() configures the map providers and cache locations GCSViews/FlightPlanner.cs144-183BUT_ARM in Flight Data), commands are sent via the MAVLinkInterface GCSViews/FlightData.Designer.cs61-73CurrentState, which triggers UI refreshes through BindingSource updates in the active view GCSViews/FlightData.cs176-180Sources: Program.cs93-162 MainV2.cs52-100 GCSViews/FlightData.Designer.cs32-61 GCSViews/FlightPlanner.cs144-160