This document describes Mission Planner's cross-platform implementation, which allows the ground control station application to run on multiple operating systems and devices beyond its original Windows desktop environment.
Mission Planner was originally developed as a Windows-only application using WinForms. The cross-platform implementation leverages Xamarin.Forms and SkiaSharp to adapt the existing codebase to run on Android, iOS, macOS, and Universal Windows Platform (UWP). This is achieved by using a specialized rendering bridge that draws WinForms controls onto a SkiaSharp canvas, combined with platform-specific hardware abstraction layers for USB, Bluetooth, and GPS. Additionally, a Blazor WebAssembly project provides a path for running core Mission Planner components in modern web browsers.
Sources: ExtLibs/Xamarin/Xamarin/GCSViews/WinForms.xaml.cs39-85 ExtLibs/Xamarin/Xamarin.Android/MainActivity.cs93-105 ExtLibs/Xamarin/Xamarin/Xamarin.csproj72-82 ExtLibs/wasm/wasm.csproj1-15
The architecture maintains MissionPlannerLib as a netstandard2.0 library containing the core MAVLink and vehicle logic. Platform-specific projects (Android, iOS, MacOS) act as hosts that initialize the Xamarin environment and provide concrete implementations for hardware interfaces defined in ITest.cs. The WebAssembly implementation targets net8.0 and links against the same core libraries.
Sources: MissionPlannerLib.csproj4-21 ExtLibs/Xamarin/Xamarin/Xamarin.csproj1-10 ExtLibs/Xamarin/Xamarin/ITest.cs9-64 ExtLibs/wasm/wasm.csproj4-5 MissionPlannerLib.sln5-15
The UI rendering system is a "bridge" that hosts the original WinForms controls within a Xamarin ContentPage. It uses SkiaSharp to paint the WinForms control hierarchy into a mobile-compatible view.
Sources: ExtLibs/Xamarin/Xamarin/GCSViews/WinForms.xaml.cs584-635 ExtLibs/Xamarin/SkiaTest/Program.cs188-210
Mission Planner uses a Service Locator pattern (via the Test static class) to access hardware. Each platform must implement the interfaces defined in ITest.cs.
IUSBDevices: Handles discovery and connection to USB-to-Serial adapters (e.g., SiK Radios). On Android, this utilizes UsbSerialForAndroid.IBlueToothDevice: Manages Bluetooth Classic and BLE scanning and socket creation.IGPS: Bridges the mobile device's onboard GPS to Mission Planner's internal position tracking.Sources: ExtLibs/Xamarin/Xamarin/ITest.cs9-64 ExtLibs/Xamarin/Xamarin.Android/MainActivity.cs99-103 ExtLibs/Xamarin/Xamarin/GCSViews/WinForms.xaml.cs97-180
UsbDeviceReceiver and AndroidSerial implementations to handle OTG cables and telemetry radios. Built using SDK 33+.Xamarin.iOS. Due to Apple restrictions, it primarily focuses on Bluetooth LE for vehicle connections.Xamarin.MacOS and includes native system info gathering and GPS bridging.net8.0 runtime.Sources: ExtLibs/Xamarin/Xamarin.Android/MainActivity.cs82-94 ExtLibs/Xamarin/Xamarin.MacOS/AppDelegate.cs1-20 .github/workflows/android.yml22-32 ExtLibs/wasm/wasm.csproj1-15
For in-depth technical details on specific cross-platform subsystems, refer to the following child pages:
Details the mobile-specific stack, including:
WinForms rendering bridge implementation in WinForms.xaml.cs.Hoho.Android.UsbSerial.Explains the browser-based initiatives, including:
ExtLibs/wasm).initWebSocket.HUD.cs and DataFlash log visualization.Sources: ExtLibs/Xamarin/Xamarin/GCSViews/WinForms.xaml.cs97-180 ExtLibs/wasm/wwwroot/index.html166-170 ExtLibs/wasm/Controls/HUD.cs1-10 ExtLibs/wasm/wasm.csproj39-45
Refresh this wiki