# Welcome to Asv.Drones

Open source user-friendly software solution designed to provide remote control and monitoring of drones, payloads and RTK base stations.

## Overview

Our team create open source user-friendly software for drones:

* [Asv.Drones.Gui](https://github.com/asv-soft/asv-drones) - GUI application for contoring drones, payload, ground base stations with plugin support
* [Asv.Drones.Gbs](https://github.com/asv-soft/asv-drones-gbs) - Ground base station service with mavlink routing and RTK mode support
* [Asv.Drones.Sdr](https://github.com/asv-soft/asv-drones-sdr) - Drone payload equipped with Software-Defined Radio (SDR) support

We use our own open source libraries for development. If you don't want to use high-level application, look at libraries:

* [Asv.Gnss](https://github.com/asv-soft/asv-gnss) - GNSS library for parsing RTCMv2, RTCMv3, NMEA and control recievers througt SBF, ComNav, UBX protocols
* [Asv.Mavlink](https://github.com/asv-soft/asv-mavlink) - Mavlink library and code generator
* Asv.Sdr - SDR library with fluent interface

## Quick links

{% content-ref url="/pages/3EVF1m5qFfF70znQELEo" %}
[About the drone management software](/overview/introduction/about-the-drone-management-software)
{% endcontent-ref %}

{% content-ref url="/pages/tYF6xiItAcxrCVhIms0m" %}
[Description of the software's features and capabilities](/overview/introduction/description-of-the-software-features-and-capabilities)
{% endcontent-ref %}

## Get Started

We've put together some helpful guides for you to get setup with our product quickly and easily.

{% content-ref url="/pages/G0OZIHCzo3uoGHLzkuyo" %}
[Downloading and installing the software](/overview/installation-and-setup/downloading-and-installing-the-software)
{% endcontent-ref %}

{% content-ref url="/pages/SI2vrutIlmiaXGrLyFiO" %}
[Connecting a drone to the software](/overview/installation-and-setup/connecting-a-drone-to-the-software)
{% endcontent-ref %}

{% content-ref url="/pages/Q1TAKqGmVIJSEBNLpzGf" %}
[Safe drone operation guidelines](/overview/safety-and-limitations/safe-drone-operation-guidelines)
{% endcontent-ref %}


# Introduction


# Purpose and overview of the documentation

## Purpose

The documentation for Asv.Drones serves as a comprehensive guide to empower users in maximizing the capabilities of our drone management software. Whether you're a novice exploring the world of drones or a seasoned professional seeking advanced features, this documentation is crafted to provide clarity, guidance, and insights into every facet of our software.

## Key Objectives

1. **Facilitate Smooth Onboarding:** The documentation is structured to assist users in the seamless installation and setup of Asv.Drones. Follow our step-by-step guides to get your software up and running quickly.
2. **Optimize User Understanding:** Gain a deep understanding of Asv.Drones's features and functionalities. Detailed explanations, examples, and use cases are provided to ensure users can harness the full potential of the software.
3. **Enable Effective Mission Planning:** Dive into the intricacies of mission planning with our clear and concise guides. Learn how to create, customize, and execute missions tailored to your specific requirements.
4. **Ensure Proper Configuration:** Explore the various configuration options available in Asv.Drones. Our documentation guides you through the process of fine-tuning settings to meet the unique needs of your drones and payloads.

## Document Structure

To enhance accessibility, the documentation is organized into the following key sections:

* **Introduction:** A high-level overview of Asv.Drones, its features, and the target audience.
* **Installation & Setup:** Step-by-step instructions to install and set up the software on your system.
* **Software Interface:** In-depth information on the UI of Asv.Drones.
* **Mission Planning:** Guides on creating, customizing, and executing drone missions using our software.
* **Drone Control:** Guides on calibrating drones, flight modes and routes.
* **Troubleshooting:** Common issues and solutions to assist users in overcoming challenges.
* **Contribution Guidelines (if applicable):** Information for those interested in contributing to the development of the software.

## Feedback and Improvement

We value your feedback! If you have suggestions, encounter ambiguities, or wish to contribute to the enhancement of this documentation, please reach out through our community channels or submit a pull request on our GitHub repository.


# About the drone management software

### Introduction

#### Overview

Welcome to Asv.Drones, a powerful and intuitive open source drone management software designed to streamline the deployment, configuration, and mission planning of drones and their payloads. Whether you are a drone enthusiast, a professional in the field, or a business integrating drones into your operations, our software provides a comprehensive solution to enhance your drone management experience.

#### Key Features

* **Effortless Drone Setup:** Asv.Drones simplifies the process of configuring and setting up drones, allowing users to get their unmanned aerial vehicles (UAVs) airborne quickly and efficiently.
* **Intuitive Mission Planning:** Create, customize, and execute drone missions effortlessly. Our software offers a user-friendly interface for defining flight paths, waypoints, and mission parameters, empowering users to achieve their specific objectives with ease.
* **Payload Management:** Seamlessly integrate and manage payloads for your drones. Asv.Drones supports a variety of payloads, allowing users to optimize their drones for specific tasks, such as photography, mapping, surveillance, and more.
* **Real-time Monitoring:** Stay informed with live telemetry data, ensuring a real-time view of your drone's status and performance during missions. This feature enhances situational awareness and enables users to make informed decisions on the fly.

#### Target Audience

Asv.Drones caters to a diverse audience, including:

* **Drone Enthusiasts:** Hobbyists and individuals passionate about exploring the capabilities of drones.
* **Professionals:** Industry professionals and researchers utilizing drones for various applications, such as agriculture, mapping, surveillance, and more.
* **Businesses:** Organizations incorporating drones into their operations for improved efficiency, data collection, and decision-making.

#### Why Asv.Drones?

* **User-Friendly Interface:** Our software is designed with simplicity in mind, ensuring that both beginners and experienced users can navigate and utilize its features effortlessly.
* **Versatility:** Asv.Drones adapts to a wide range of drone models and payloads, providing flexibility for users with different equipment and requirements.
* **Scalability:** Whether you're managing a single drone or a fleet, Asv.Drones scales to meet your needs, offering a reliable solution for drone management at any scale.

### Applications of Asv.Drones

#### Agriculture and Farming

* Monitoring crop conditions.
* Optimization of fertilizer distribution.
* Measurement of soil moisture levels and conditions.

#### Mapping and Geodesy

* Creation of high-precision terrain maps.
* Topographic and bathymetric research.

#### Observation and Security

* Patrolling borders and critical facilities.
* Monitoring high-risk areas.

#### Research and Science

* Ecological research.
* Monitoring endangered species.
* Geological and geophysical research.

#### Delivery and Logistics

* Unmanned cargo delivery.
* Optimization of logistic routes.

#### Medical Aid and Rescue

* Delivery of medical supplies to remote areas.
* Search and rescue during emergencies.

#### Filming and Multimedia

* Professional photo and video shooting.
* Creation of virtual tours and panoramas.

#### Construction and Real Estate

* Inspection of construction sites.
* Monitoring the condition of buildings and structures.

#### Sports and Entertainment

* Drone racing organization.
* Aerial photography of sports events.

#### Transport and Infrastructure

* Monitoring transport routes and infrastructure.
* Evaluation of road surface conditions.

### Getting Started

Ready to explore the capabilities of Asv.Drones? Begin your journey with our installation guide to set up the software on your system. If you encounter any issues or have questions along the way, refer to our comprehensive documentation for detailed assistance.


# Description of the software's features and capabilities

## 1. **Drone Flight Mode**

**Description:** Experience seamless control over drone flight with Asv.Drones's intuitive Flight Mode. Whether you're a beginner or an experienced pilot, our software provides a user-friendly interface for managing and executing various flight modes, ensuring a smooth and controlled drone operation.

## 2. **Mission Planning**

**Description:** Unlock the full potential of your drones with Asv.Drones's Mission Planning feature. Plan and execute missions effortlessly, defining waypoints, flight paths, and mission parameters with precision. Customize missions to meet specific objectives, from aerial surveys to surveillance operations.

## 3. **SDR (Payload) Store**

**Description:** Elevate your drone's capabilities by seamlessly integrating and managing Software-Defined Radio (SDR) payloads. The Payload Store feature in Asv.Drones allows users to effortlessly add, configure, and switch between different payloads, enabling a versatile range of applications such as signal processing, communication, and data collection.

## 4. **Packet Viewer**

**Description:** Gain real-time insights into data transmissions with Asv.Drones's Packet Viewer. This feature provides a detailed view of communication packets, allowing users to monitor and analyze data exchanges between the drone and connected devices. Improve situational awareness and make informed decisions based on the information captured during flights.

## 5. **General Setup**

**Description:** Simplify the initial setup process with Asv.Drones's General Setup feature. This feature ensures a smooth onboarding experience for users, guiding them through essential settings to tailor the software to their needs.

## 6. **Connections Setup**

**Description:** Effortlessly establish and manage connections with Asv.Drones's Connections Setup. This feature enables users to connect their software to drones, devices, and external systems seamlessly. With clear and concise instructions, users can configure connections to ensure optimal communication and data exchange.

## 7. **Logger**

**Description:** Enhance traceability and performance analysis with Asv.Drones's Logger. This feature provides comprehensive logging capabilities, recording key events and data during drone operations. Analyze logs to troubleshoot issues, track mission progress, and gain valuable insights into the performance of your drone system.

These features collectively make Asv.Drones a robust and versatile drone management solution, catering to the diverse needs of drone enthusiasts, professionals, and businesses. Explore each feature in detail within the respective sections of this documentation to harness the full potential of your drone management experience.


# Installation & Setup


# System requirements

## Supported Platforms:

* **Windows:**
  * Version: Windows 10 and above
  * Architecture: 64-bit,32-bit
  * Additional Requirements: DirectX 11 or later
* **Linux:**
  * Distribution: Ubuntu 22.04 LTS and equivalent
  * Architecture: 64-bit,32-bit
  * Additional Requirements: OpenGL 3.3 or later
* **Mac:**
  * Version: macOS 13 (Ventura) and above
  * Architecture: 64-bit
  * Additional Requirements: Metal 3 capable graphics card
* **Android:**
  * Version: Android 12 and above
  * Architecture: ARMv7 or later
  * Additional Requirements: OpenGL ES 3.0 support
* **iOS:**
  * Version: iOS 15 and above
  * Architecture: 64-bit
  * Additional Requirements: Metal-capable iOS device

## Minimum Hardware Requirements:

* **Processor (CPU):** Dual-core processor, 1.5 GHz or equivalent
* **Memory (RAM):** 4 GB
* **Storage:** 20 GB of available space
* **Graphics:** Integrated graphics with OpenGL 3.3 support
* **Network:** Broadband internet connection for software updates and communication with drones

## Recommended Hardware Requirements:

* **Processor (CPU):** Quad-core processor, 2.5 GHz or equivalent
* **Memory (RAM):** 8 GB
* **Storage:** 50 GB of available space (SSD recommended for improved performance)
* **Graphics:** Dedicated graphics card with OpenGL 4.5 support
* **Network:** Broadband internet connection for real-time telemetry data and optimal performance

## Additional Notes:

* For Android and iOS versions, ensure that devices have sufficient processing power and memory for smooth operation.
* It is recommended to use devices with a minimum screen resolution of 1280x720 pixels for an optimal user interface experience.


# Downloading and installing the software

## Downloading the Installation Package

1. **Visit the GitHub Releases Page:**
   * Open your web browser and navigate to the [GitHub Releases page](https://github.com/asv-soft/asv-drones/releases) for Asv.Drones.
2. **Select the Latest Release:**
   * Locate the latest release of Asv.Drones on the GitHub page. Releases are typically tagged with version numbers.
3. **Choose the Correct Platform:**
   * Under the assets section of the release, find the installation package for your operating system (Windows, Linux, or macOS).
   * Click on the relevant download link to initiate the download.
4. **Wait for the Download to Complete:**
   * Depending on your internet connection, the download may take a few moments. Ensure that the download is complete before proceeding.

![](/files/ZepS1SnVXIa9n5o12ASA)

## Installing Asv.Drones

**Windows:**

1. **Run the Installer:**
   * Locate the downloaded installation package (.exe file) on your computer.
   * Double-click the installer to run it.
2. **Follow the Installation Wizard:**
   * The installation wizard will guide you through the installation process.
   * Accept the terms and conditions, choose the installation directory, and click "Install."
3. **Wait for Installation to Complete:**
   * The installer will copy the necessary files and configure the application.
   * Once completed, click "Finish" to exit the installer.

**Linux:**

**For Debian systems**:

* Open terminal and navigate to downloaded .deb package.
* Execute following command (replace packet\_name with real packet name):

  ```
  sudo dpkg -i packet_name.deb
  ```

**For RedHat systems**:

* Open terminal and navigate to downloaded .deb package.
* If you using rpm - execute following command (replace packet\_name with real packet name):

  ```
  sudo rpm -ivh packet_name.rpm
  ```
* If you using dnf - execute following command (replace packet\_name with real packet name):

  ```
  sudo dnf install packet_name.rpm
  ```

**macOS:**

1. **Open the Disk Image:**
   * Locate the downloaded disk image (.dmg file) and double-click it to open.
2. **Drag Asv.Drones to Applications:**
   * In the opened window, drag the Asv.Drones icon to the "Applications" folder.
3. **Wait for Copying to Complete:**
   * The application will be copied to the "Applications" folder.
   * Once completed, you can eject the disk image.

## Verifying the Installation

1. **Launch Asv.Drones:**
   * Find Asv.Drones in your applications or start menu.
   * Launch the application.
2. **Check for Updates:**
   * After installation, it's recommended to check for updates on the GitHub releases page periodically.

Now, you have successfully downloaded and installed Asv.Drones on your computer. Start exploring the features and capabilities outlined in this documentation to make the most of your drone management experience.


# Building from source code

To ensure a smooth development experience, follow the steps below to set up your development environment:

## 3.1 Prerequisites:

* **Operating System:** This project is compatible with Windows, macOS, and Linux.
* **IDE (Integrated Development Environment):** We recommend using [Visual Studio](https://visualstudio.microsoft.com/) or [JetBrains Rider](https://www.jetbrains.com/rider/) as your IDE for C# development. Make sure to install the necessary extensions and plugins for a better development experience.

  If you are using [JetBrains Rider](https://www.jetbrains.com/rider/) you should install [AvaloniaRider](https://docs.avaloniaui.net/docs/reference/jetbrains-rider-ide/jetbrains-rider-setup#install-the-avalonia-plugin) plugin to be able working with axaml files using a preview.

  If you are using [Visual Studio](https://visualstudio.microsoft.com/) you should install [Avalonia for Visual Studio](https://docs.avaloniaui.net/docs/get-started/set-up-an-editor#visual-studio) plugin to be able working with axaml files using a preview.

## 3.2 .NET Installation:

* This project is built using [.NET 8.0](https://dotnet.microsoft.com/download/dotnet/8.0), the latests version of the .NET platform. We recommend installing .NET 8.0 by following the instructions provided on the official [.NET website](https://dotnet.microsoft.com/download/dotnet/8.0).

  ```bash
  # Check your current .NET version
  dotnet --version
  ```

## 3.3 Version Control:

* If you haven't already, install a version control system such as [Git](https://git-scm.com/) to track changes and collaborate with other developers.

## 3.4 Clone the Repository:

* Clone the project repository to your local machine using the following command:

  ```bash
  git clone https://github.com/asv-soft/asv-drones.git
  ```

## 3.5 Restore Dependencies:

* Navigate to the platform project directory and restore the required dependencies. There is 3 possible platform directories to build and debug our app: **Asv.Drones.Gui.Desktop**, **Asv.Drones.Gui.Android**, **Asv.Drones.Gui.iOS**. For example we will use **Asv.Drones.Gui.Desktop** platform, so you have to execute the following command:

  ```bash
  cd asv-drones/src/Asv.Drones.Gui.Desktop
  dotnet workload restore
  dotnet workload repair
  ```

## 3.6 Build and Run:

* After restore you have to build the project to ensure that everything is set up correctly, and if it's not - try to restore workloads again:

  ```bash
  dotnet build
  ```
* Run the project:

  ```bash
  dotnet run
  ```

Congratulations! Your development environment is now set up, and you are ready to start contributing to the project. If you encounter any issues during the setup process, refer to the project's documentation or reach out to the development team for assistance.

## Building for Android

To build applications for Android, additional setup is required for JDK and Android SDK installation. Follow the instructions below based on your operating system.

* Navigate to the platform project directory and restore the required dependencies:

  ```bash
  cd asv-drones/src/Asv.Drones.Gui.Android
  dotnet workload restore
  dotnet workload repair
  ```

### Windows

1. Install the .NET MAUI Check tool to verify your environment is ready for .NET MAUI development:

   ```
   dotnet tool install -g Redth.Net.Maui.Check
   maui-check
   ```
2. For Android SDK managing we recommend to install Android Studio.
3. Using Android Studio's SDK Manager, download Android 13.0 (Tiramisu) and API level 33. It's highly recommended to create an Android Virtual Device (AVD) with these settings, preferably with tablet configurations for better testing experience.
4. Build the project for Android:

   ```
   dotnet build -t:Run -f net7.0-android /p:AndroidSdkDirectory=${AndroidSdkPath}
   ```

* The `${AndroidSdkPath}` should be replaced with the actual path to your Android SDK installation.

### Linux

1. Install Android Studio to manage Android SDKs:

   ```
   sudo snap install android-studio --classic
   ```
2. Install OpenJDK 11:

   ```
   sudo apt install openjdk-11-jdk
   ```
3. Using Android Studio's SDK Manager, download Android 13.0 (Tiramisu) and API level 33. It's highly recommended to create an Android Virtual Device (AVD) with these settings, preferably with tablet configurations for better testing experience.
4. Build the project for Android:

   ```
   dotnet build -f net7.0-android /p:AndroidSdkDirectory=${AndroidSdkPath}
   ```

* The `${AndroidSdkPath}` should be replaced with the actual path to your Android SDK installation.

### macOS

1. Install Android Studio:

   ```
   brew install --cask android-studio
   ```
2. Install JDK through Homebrew or any preferred method:

   ```
   brew install openjdk
   ```
3. Using Android Studio's SDK Manager, download Android 13.0 (Tiramisu) and API level 33. It's highly recommended to create an Android Virtual Device (AVD) with these settings, preferably with tablet configurations for better testing experience.
4. Build the project for Android, specifying the Android SDK directory:

   ```
   dotnet build -f net7.0-android /p:AndroidSdkDirectory=${AndroidSdkPath}
   ```

* The `${AndroidSdkPath}` should be replaced with the actual path to your Android SDK installation.

## Additional Notes

* If you want to run application after build you should start your previously created AVD and wait until it's startup processes are complete. Then you have to execute following command:

  ```
  dotnet run -f net7.0-android /p:AndroidSdkDirectory=${AndroidSdkPath}
  ```
* The `${AndroidSdkPath}` should be replaced with the actual path to your Android SDK installation.

### Windows environment setup example

![](/files/Au2AkqJ4qyN04Q3FHe6F) ![](/files/55343qrGTpriusvYhNoa) ![](/files/KD2aALCj7EmMlTP7vZbo) ![](/files/bv9jsGDuMsukYOjERTwF) ![](/files/P9orcafTk2jU5AkH3khI) ![](/files/a5sgovkdMbZ6rNPWV7pg) ![](/files/J77FQJ3pHuu7wVM6ceD4) ![](/files/vp6pxj25vqpDyesVBg38) ![](/files/GwIXDbmoyYWsgyrsTAOL) ![](/files/OM3KXzHPmJegCr2kVg1l) ![](/files/434GvUIF1mzqtD2TrNM6)

### Ubuntu environment setup example

![](/files/Pqir9J1UkKwGVmxfPr1n) ![](/files/vXBqH0zJcve5HTd1Xlhm) ![](/files/In45PZF2BPYMMGIb7exf) ![](/files/BzIvWn2jeUQTzPCNTqMb) ![](/files/hbLiJkva6rCnUGGGs00V) ![](/files/bfoCSihf8Sud5eYfgeBA) ![](/files/3oIbZUu6QyBCoi4FdhW7) ![](/files/0hDM4QK5Vbi1tsIW3tyM)

### macOS environment setup example

![](/files/8i6w0jIZo2b7HLEWvLtn) ![](/files/fdcEtCVxu1KgNgbPxf3S) ![](/files/XYtUyBnaf4RCQA00ObQ6) ![](/files/5HPo4b9niCm9zDtRhS13) ![](/files/QkprfQfu1NuvUy8Jg32G) ![](/files/GqIk4eCLF66pHSodc6aw) ![](/files/iyk90L3gSlXokYVyMfMc) ![](/files/2u8a9lYY2aeVa5Z46WGf) ![](/files/8L8pZs1f4wtuIGK7Q17e) ![](/files/rOvZK15AtfETAeL6TaBz)


# Connecting a drone to the software

#### Connecting a Drone

**Overview**

Connecting your drone to Asv.Drones is a straightforward process that involves creating a TCP client port through the "Connections" tab. This establishes a communication link between the software and your drone, enabling seamless control and data exchange during missions.

**Steps to Connect a Drone**

1. **Open Asv.Drones:**
   * Launch Asv.Drones on your device.
2. **Navigate to the "Connections" menu in Settings:**
   * Locate and click on the "Ports" sub-menu.

![](/files/mbwPqVOUAFAw2REfqOek)

3. **Create a New TCP Client Port:**
   * Within the "Connections" tab, find the option to create a new TCP port.
   * Choose "TCP Client" as the connection type.

![](/files/0kImDTdKlbvBJ2idxNXO)

4. **Configure Connection Settings:**
   * Enter the necessary details, including port name, the drone's IP address and port number.
   * Ensure that the specified port is open and accessible for communication.
5. **Save and Activate Connection:**
   * Save the configuration settings.
   * Activate the connection to establish a link between Asv.Drones and the drone.

![](/files/jCcBUnotNwVwgGjyE26p)

6. **Verify Connection Status:**
   * Check the connection status at "Device list" sub-menu to confirm a successful link.
   * If the connection is established, you are ready to control and monitor your drone using Asv.Drones.

![](/files/0nmhF0HgxXpzlDugTXtg)

**Additional Considerations**

* **Firewall Settings:**
  * Ensure that any firewall or security software on your device allows communication through the specified port.
* **Drone Compatibility:**
  * Confirm that your drone is compatible with Asv.Drones. Check for specific compatibility requirements in the drone's documentation.
* **Telemetry Data:**
  * Once connected, the software will start receiving real-time telemetry data from the drone, providing insights into its status and performance.

**Troubleshooting**

If you encounter issues during the connection process, ensure that the drone is powered on, within range, and the specified connection details are accurate.

#### Example Configuration:

* **Port title:** My new port
* **IP Address:** 127.0.0.1
* **Port Number:** 5762
* **Connection Type:** TCP Client

By following these steps, you can establish a reliable connection between Asv.Drones and your drone, unlocking the full potential of the software for mission planning, control, and data analysis.


# Software Interface


# Application User Interface Overview

![](/files/hbsc4j37YjVuz73U8JzD)

## General Layout

Asv.Drones features an intuitive and organized user interface designed to enhance user experience and streamline access to key functionalities. The interface consists of several key components:

1. **Navigation Menu (Left Sidebar):**
   * Located on the left side of the application, the navigation menu provides quick access to different sections and pages. It includes options such as Flight Mode, Settings, Connections, Packet Viewer, Log Messages, SDR Store, and more.
2. **Toolbar (Top):**
   * The toolbar is positioned at the top of the application, offering a set of tools and shortcuts for common actions. This includes tools like the Coordinates Calculator and Templater.
3. **Main Content Area:**
   * Situated in the center of the application, the main content area dynamically displays the content of the currently selected page. Whether you are planning a mission or configuring settings, this area adapts to provide relevant information and controls.
4. **Status Bar (Bottom):**
   * The status bar is located at the bottom of the application, providing essential information about the current state of the software, connection status with drones, and other relevant details.

## Navigation Menu

The Navigation Menu serves as the primary hub for accessing different sections of the application. Clicking on a menu item opens the corresponding page in the main content area. Common menu items include:

* **Flight Mode:** Access controls and features related to drone flight.
* **Settings:** Configure general application settings.
* **Connections:** Manage and establish connections with drones.
* **Mission Planning:** Create, edit, and execute drone missions.
* **Packet Viewer:** Explore and analyze communication packets between the software and connected devices.
* **Log Messages:** View and analyze system log messages.
* **SDR Store:** Manage and configure Software-Defined Radio (SDR) payloads.

## Toolbar

The Toolbar offers quick access to essential tools and features. Icons and buttons on the toolbar correspond to specific actions, providing an efficient way to interact with the software. Common tools include:

* **Coordinates Calculator:** Calculate geographical coordinates based on user input.
* **Templater:** Access and utilize templates for mission planning and configuration.

## Main Content Area

The Main Content Area is dynamic and adapts to the selected page or section. Depending on the user's choice from the Navigation Menu, this area displays relevant information, controls, and visualizations. For example:

* **Flight Mode Page:** Displays a real-time view of drone telemetry data and flight controls.
* **Settings Page:** Provides options for configuring application settings.
* **Connections:** Configure connections with drones.
* **Mission Planning:** Create, edit, and execute drone missions.
* **Packet Viewer Page:** Allows users to analyze communication packets.
* **Log Messages Page:** Displays system log messages.
* **SDR Store Page:** Manages and configures Software-Defined Radio (SDR) payloads.

## Status Bar

The Status Bar at the bottom of the application provides crucial information about the current state. This includes:

* **Connection Status:** Indicates whether the software is connected to a drone.
* **Data Usage:** Displays the size of map and SDR storage.

## Customization and Themes

Asv.Drones offers customization options, including theme selection and layout preferences. Users can tailor the appearance and organization of the interface to suit their preferences.

By leveraging this organized and intuitive interface, users can navigate seamlessly through Asv.Drones, accessing powerful features for drone management and mission planning.


# Flight Page Overview

![](/files/U7j6f93uDQ2o6sBOo3Az)

## Overview

The Flight Mode page in Asv.Drones provides a dynamic and interactive environment for monitoring and controlling drones in real-time. Central to this page is a world map that serves as a visual representation of drone locations and connected devices.

## World Map

* **Anchors and Devices:**
  * The world map displays anchors representing drones and other connected devices.
* **Interactive Anchors:**
  * Users can interact with anchors by clicking on them, revealing additional information and options related to the corresponding drone or device.
  * Many anchors in close area? Right click there to open context menu and select the anchor you need.

## Widget Layout

The Flight Mode page is designed with dedicated spaces for different types of widgets, providing a comprehensive view of telemetry data, SDR information, and logs.

* **Left Sidebar Widgets:**
  * **Telemetry Widgets:** Display real-time telemetry data for drones and [ground base stations](https://github.com/asv-soft/asv-drones-gui-plugin-gbs). Information includes altitude, speed, battery level, and other relevant metrics.
* **Bottom Widgets:**
  * **Log Widget:** Displays system logs and messages, allowing users to monitor important events and notifications during drone operations.
  * **Anchors Editor Widget:** Empty until any anchor on the map is selected. It allows editing of anchor's location and altitude if the selected anchor is editable and the Move Anchors toggle is active. Use this widget to control your UAV - all available actions are displayed here.

## Additional Functionalities

* **Zoom Controls:**
  * Users can adjust the map zoom level to focus on specific areas of interest.
* **Anchor Movement Toggle:**
  * The Flight Mode page allows users to toggle anchor movement, enabling or disabling the automatic adjustment of anchor positions based on real-time data.
* **Ruler Tool:**
  * The ruler tool provides a convenient way to measure ground distances on the map. Users can place two markers on the map, and the tool will display the distance between them, aiding in mission planning and navigation.

By leveraging the Flight Mode page, users can actively monitor and control drones, access real-time telemetry data, and make informed decisions during missions.


# Mission Planning Overview

![](/files/oNL0sm1o3cUWiXoKm6vq)

## Overview

The Mission Planning page in Asv.Drones empowers users to create, edit, and manage drone missions with ease. This page facilitates the seamless design of mission paths, incorporating various mission points and optimizing flight plans.

## Workflow

1. **File Operations:**
   * Users initiate mission planning by opening an existing mission file or creating a new one through the File menu in the Toolbar.
2. **Mission Planning Widget:**
   * Once a mission is initiated, the Mission Planning widget appears on the left side of the page. This widget serves as the central workspace for creating and manipulating mission points.
3. **Adding Mission Points:**
   * Users can add different mission points to the planning widget, including Take Off, Do Land, Waypoint, and Region of Interest (ROI). These points define key actions and locations within the mission.
4. **Move Anchors Toggle:**
   * Enabling the Move Anchors toggle allows users to dynamically adjust the positions of mission points on the map, providing flexibility in refining the mission path.
5. **Selecting and Modifying Points:**
   * Users can select mission points within the planning widget to change their order or delete them. This enables fine-tuning and customization of the mission sequence.
6. **Saving and Uploading:**
   * Once the mission is finalized, users can save it locally or upload it to connected drones using the File menu. If at least one drone is connected, the mission can be uploaded directly for execution.
7. **Downloading Existing Missions:**
   * If there are already missions uploaded on the connected drone, users can download them to review, modify, or execute.

## Widgets and Tools

* **Mission Planning Widget:**
  * The central workspace for mission creation, displaying a visual representation of the mission path with editable mission points.
* **Anchors Editor Widget:**
  * Appears when the user selects any anchor on the map. It allows the user to edit the anchor's location and altitude if the selected anchor is editable, and the Move Anchors toggle is active.
* **Move Anchors Toggle:**
  * Enables or disables the ability to move mission points within the planning widget.

## User Interactions

* **Adding Mission Points:**
  * Users can add mission points by selecting the desired point type (Take Off, Do Land, Waypoint, ROI) and clicking on the mission planning widget.
* **Adjusting Mission Points:**
  * Enabling the Move Anchors toggle allows users to click and drag mission points to refine their positions.
* **Order Modification:**
  * Users can select mission points in the planning widget to change their order, optimizing the mission sequence.
* **Saving and Uploading:**
  * Through the File menu, users can save the mission locally or upload it to connected drones for execution.
* **Downloading Existing Missions:**
  * If connected to a drone with existing missions, users can download them for review or modification.

## Example Scenario

1. **Creating a New Mission:**
   * The user opens a new mission file and starts adding waypoints and actions using the Mission Planning widget.
2. **Refining the Mission Path:**
   * The user enables the Move Anchors toggle to fine-tune the positions of waypoints and optimize the mission path.
3. **Saving and Uploading:**
   * Once satisfied with the mission plan, the user saves the mission locally or uploads it to the connected drone for execution.
4. **Downloading Existing Missions:**
   * The user explores and downloads existing missions from the connected drone for further analysis or modification.

By leveraging the Mission Planning page, users can efficiently design drone missions, incorporating key actions and waypoints to achieve specific objectives.


# Packet Viewer Overview

![](/files/7L8jcttkFQpQa9BGhPMT)

## Overview

The Packet Viewer page in Asv.Drones serves as a powerful tool for monitoring and analyzing communication packets exchanged between the software and connected drones and devices. This page provides real-time visibility into data transmissions, aiding users in understanding and troubleshooting communication processes.

## Components and Controls

1. **Packet Display Area:**
   * The central area of the page displays all incoming packets from connected drones and devices in real-time.
2. **Filtering Controls:**
   * Located on the right side, these controls allow users to filter displayed packets based on connected devices or packet type. This helps users focus on specific types of data transmissions.
3. **Pause Updates Control:**
   * Users can pause updates, temporarily halting the display of new packets in the Packet Viewer while allowing existing packets to continue flowing. This is useful for detailed examination of specific packets.
4. **Clear Page Control:**
   * This control enables users to clear the entire page, removing all displayed packets from the Packet Viewer. It provides a clean slate for monitoring new incoming packets.
5. **Search Field:**
   * The search field allows users to enter specific values or keywords to search for within the packets. This facilitates quick identification of relevant information.

## Example Scenario

1. **Real-Time Packet Monitoring:**
   * Users open the Packet Viewer page to monitor real-time communication packets from connected drones and devices.
2. **Filtering by Packet Type:**
   * Users utilize the filtering controls to focus on specific types of packets, such as telemetry, commands, or sensor data.
3. **Pause for Inspection:**
   * Observing an interesting packet, users click the Pause Updates control to halt new packet displays, allowing detailed examination of the selected packet.
4. **Clearing the Page:**
   * After analyzing a set of packets, users click the Clear Page control to remove existing packets and prepare for monitoring new data.
5. **Searching for Specific Values:**
   * Users enter a specific value or keyword into the search field to quickly locate packets containing the desired information.

The Packet Viewer page enhances the user's ability to monitor and understand communication between Asv.Drones and connected drones and devices, providing valuable insights for troubleshooting and optimization.


# Connections Overview

![](/files/aJMGkXz6zZOEjVmFEnXD)

## Overview

The Connections page in Asv.Drones serves as a central hub for managing and configuring connections with drones and devices. This page allows users to specify essential settings for addressing and routing in the MAVLink network, add new connection ports, and monitor the status of connected devices.

## Mavlink Settings

![](/files/dHIZZbXWBoKDXxMkVZXA)

1. **System ID and Component ID:**
   * These settings are required for addressing and routing in the MAVLink network. Users must specify a unique System ID and Component ID to ensure proper communication between Asv.Drones and connected devices.
2. **Heartbeat Rate:**
   * Users can set the rate at which the HEARTBEAT message is transmitted to announce the existence of the system on the MAVLink network. This helps establish and maintain connections with other devices.
3. **Heartbeat Timeout:**
   * After the specified timeout period, devices that have not sent a heartbeat message will be removed from the device list, helping to manage and update the list of connected devices.

## Connection Ports

![](/files/r7NkqJBqxuQHVMf86AWP)

* **Add New Connection Ports:**
  * Users can add new connection ports to establish communication with devices. Supported connection types include serial ports, TCP ports, and UDP ports.

## Connected Devices List

![](/files/9hZF3GYDinc3VYR0m6Pz)

* **Device Status and Description:**
  * At the bottom of the Connections page, users can view a list of all connected devices. Each device is accompanied by its status and a basic description, providing insights into the current state of the connections.

## Example Scenario

1. **Configuring System and Component IDs:**
   * Users access the Connections page and configure unique System ID and Component ID settings for Asv.Drones.
2. **Setting Heartbeat Rate and Timeout:**
   * Users specify the heartbeat rate and timeout settings to optimize communication and device management.
3. **Adding Serial Connection Port:**
   * Users add a new TCP connection port to establish communication with a connected drone.
4. **Viewing Connected Devices:**
   * The list of connected devices displays the status and description of each connected device, providing a comprehensive overview of the current connections.

The Connections page is a central hub for managing communication settings, adding connection ports, and monitoring the status of connected devices, ensuring a robust and efficient network for drone management.


# Settings Overview

![](/files/JLAUrk8IT9EWrBWt2Ua6)

## Overview

The Settings page in Asv.Drones offers users the flexibility to personalize their experience by adjusting various parameters and preferences. From visual themes to measurement units and SDR settings, users can tailor the application to suit their preferences.

## Theme and Language

* **Theme:**
  * Users can choose between Dark and Light themes, customizing the visual appearance of the application to their preference.
* **Language:**
  * Currently supporting English and Russian, users can select their preferred language for the application's interface.

## Map Settings

![](/files/GlW6diSYIULqAg5hQuxU)

* **Map Provider:**
  * Users can choose their preferred map provider from a list of supported providers, allowing them to customize the map view according to their preferences.
* **Clear Local Map Storage:**
  * In this section, users have the option to clear local map storage if needed, providing control over cached map data.

## Measurement Units

![](/files/fI36YHb54l1UVN114nAh)

* **Distance, Altitude, Latitude, Longitude, Velocity, Temperature, etc.:**
  * Users can customize measurement units for various parameters, tailoring the display of distances, velocities, temperatures, and other measurements to their preferred units.

## SDR Settings

![](/files/VVBrXsdgai7bgUJAGd5o)

* **Frequency of Writing to File:**
  * Users can adjust the frequency at which data from Software-Defined Radio (SDR) is written to file, providing control over data storage.
* **Data Thinning Frequency:**
  * This setting allows users to control the frequency of data thinning in SDR, managing the amount of data processed.
* **GP, LLZ, and VOR Frequency:**
  * Users can customize the default frequencies for GP (Glide Path), LLZ (Localizer), and VOR (VHF Omni-directional Range) in the SDR settings.
* **Default Channel Numbers for LLZ and VOR:**
  * This setting allows users to specify default channel numbers for LLZ and VOR in the SDR configuration.

## Saved Coordinates

![](/files/3hYnnOYHLRlCDqkK5nMb)

* **Adding Coordinates:**
  * In this section, users can add and manage saved coordinates for later use. This can be particularly useful for quick access to frequently used locations.

The Settings page provides users with the ability to tailor Asv.Drones to their preferences, enhancing the overall user experience.

## Plugins

![](/files/Vjs5vShbkywJj5SKkEAN)

The Plugins menu allows users to control plugins for ASV Drones. It has three sections:

* Market
* Installed
* Servers

## Market

Allows you to view plugins available for installation

![](/files/aleEvJb2CkBiMVgBUVvi)

## Installed

This section displays plugins installed from the Market or assemblies added during compilation. Plugins are installed in asv-data-folder/plugins folder.

![](/files/sxetq3CluInqvrS9dGeD)

## Installed Plugins Troubleshooting

In case of plugin errors, an error message will display the problem

![](/files/YoXyG1aGMLtxXNCLRe5N)

## Servers

This section allows you to add a new plugin source or change an existing one (nuget by default) ![](/files/4SbBJuXFr02L1y2EzChB)

Click "Add" button at top-right corner to add a new source. To change an existing one click "Pen" button, and to delete - click "Cross" button.

![](/files/HEgEg5Aq4WHZkjmph6j0)

Example of usage:

* Name - any text;
* URL Address - link to a nuget server;
* Username - username used to access your custom nuget source;
* Password - password used to access your custom nuget source.


# Log Messages Overview

![](/files/n1GaoLEbhjJFZlI6YHQu)

## Overview

The Log Messages page in Asv.Drones serves as a comprehensive log viewer, displaying all logs generated within the application. This page provides users with insights into system activities, errors, and important notifications.

## Components and Controls

* **Log Display Area:**
  * The central area of the page displays all logs generated by the application in chronological order. Each log entry includes relevant information about the event or message.
* **Search Field:**
  * Located in the top right corner, the search field allows users to enter specific keywords or values to search for within the log messages, facilitating quick identification of relevant information.
* **Number of Displayed Log Messages Dropdown:**
  * Users can choose the number of log messages displayed on the page at a time by selecting an option from the dropdown menu. This provides flexibility in managing the amount of information visible at once.
* **Clear Button:**
  * The clear button allows users to clear all displayed log messages from the Log Messages page, providing a clean slate for new log entries.
* **Scroll Buttons (Forwards and Backwards):**
  * Users can navigate through sets of log messages using scroll buttons, allowing them to review previous or subsequent entries easily.
* **Refresh Button:**
  * The refresh button allows users to manually refresh the log display, ensuring they have the latest log entries available for review.

## Example Scenario

1. **Real-Time Log Monitoring:**
   * Users open the Log Messages page to monitor real-time log entries generated by Asv.Drones.
2. **Searching for Specific Information:**
   * Utilizing the search field, users enter keywords related to a specific event or error, narrowing down the displayed log messages for quick identification.
3. **Adjusting Display Settings:**
   * Users customize the number of displayed log messages, tailoring the log display to their preferred level of detail.
4. **Navigating Through Log Entries:**
   * Using scroll buttons, users navigate through sets of log messages to review previous or subsequent entries.
5. **Refreshing Log Display:**
   * Users click the refresh button to manually update the log display, ensuring they have the latest log entries available for review.

The Log Messages page provides users with a comprehensive view of application activities, errors, and notifications, facilitating effective monitoring and troubleshooting.


# Example Of Usage With GBS

**Ground Base Station Integration:** Asv.Drones offers seamless integration with ground base stations through our proprietary implementation called Asv.Drones.Gbs, available on GitHub [here](https://github.com/asv-soft/asv-drones-gbs). Built to operate via the MAVLink protocol, Asv.Drones.Gbs allows users to remotely manage and monitor drone operations from a centralized platform. Moreover, any other ground base station software compatible with MAVLink can seamlessly interface with our application, ensuring flexibility and interoperability across different systems (development of additional UI controls may be required). With Asv.Drones.Gbs, users can plan missions, monitor telemetry data, and adjust flight parameters with ease.

<figure><img src="/files/SUBExJrRTsbUcwyXZ9Z9" alt=""><figcaption><p>Connecting to GBS</p></figcaption></figure>

<figure><img src="/files/lYuHArC8S2NX815dTLKr" alt=""><figcaption><p>GBS parameters</p></figcaption></figure>

<figure><img src="/files/dLht5fqEqP4iJMW47yC7" alt=""><figcaption><p>GBS widget</p></figcaption></figure>

<figure><img src="/files/0an7jYAy0dgXaVpZN56w" alt=""><figcaption><p>GBS data in Packet Viewer</p></figcaption></figure>


# Example Of Usage With SDR

**SDR Integration:** Enhance your drone operations with Asv.Drones.Sdr, our custom-built SDR software available on GitHub [here](https://github.com/asv-soft/asv-drones-sdr). Designed to communicate via the MAVLink protocol, Asv.Drones.Sdr expands the capabilities of your drones beyond traditional control. Additionally, our software allows integration with any other SDR software that utilizes MAVLink, enabling a wide range of applications such as spectrum monitoring, signal intelligence, and radio relay (development of additional UI controls may be required). With Asv.Drones.Sdr, users can leverage SDR technology to scan and analyze radio frequency signals, intercept communication signals, and extend communication networks, empowering them to tackle diverse missions effectively.

<figure><img src="/files/4vEqIVCoHEYGnLZvIXhi" alt=""><figcaption><p>Connecting to SDR</p></figcaption></figure>

<figure><img src="/files/pjKu0aKYd3kSKSgMDhbT" alt=""><figcaption><p>SDR parameters</p></figcaption></figure>

<figure><img src="/files/Wxwc8sGbUc9IpKQwwP1v" alt=""><figcaption><p>SDR widget</p></figcaption></figure>

<figure><img src="/files/ZcdDdmWEO8bcoGuKwEWF" alt=""><figcaption><p>SDR data in Packet Viewer</p></figcaption></figure>


# Drone Control


# Manual control

## Overview

Asv.Drones offers users the capability to take direct control of drones through manual control mode. This feature provides users with hands-on control over drone movement, allowing for precise maneuvers and real-time adjustments.

## Activating Manual Control Mode

To engage manual control mode, follow these steps:

1. **Navigate to the Flight Mode Page:**
   * Access the Flight Mode page from the Navigation Menu.
2. **Select Manual Control:**
   * Within the Flight Mode page, click on the drone anchor and then locate the manual control option in the mode selection menu.
3. **Initiate Manual Control:**
   * Click or select the manual control option to activate manual mode for the connected drone.

## Safety Considerations

1. **Start in an Open Area:**
   * When initiating manual control, ensure you are in an open and obstacle-free area to allow for safe drone movements.
2. **Maintain Line of Sight:**
   * Keep the drone within your line of sight to ensure you can react quickly to any unexpected situations.
3. **Check Battery Levels:**
   * Monitor battery levels closely and land the drone safely before the battery is critically low.
4. **Avoid Interference:**
   * Fly in areas with minimal interference to ensure stable communication between the software and the drone.

## Example Scenario

1. **Activating Manual Control:**
   * Users access the Flight Mode page and select manual control mode from the mode selection menu.
2. **Using Control Sticks:**
   * With manual control activated, users use the control sticks to navigate the drone, adjusting pitch, roll, yaw, and throttle.
3. **Monitoring Visual Feedback:**
   * Real-time visual feedback on the Flight Mode page provides information on the drone's orientation, altitude, and other critical parameters.
4. **Ensuring Safety:**
   * Users follow safety considerations, starting in an open area, maintaining line of sight, and checking battery levels for a safe and controlled drone flight.

Manual drone control provides users with a hands-on experience, offering a balance between automation and user-driven precision. Ensure users are familiar with the manual control interface and adhere to safety guidelines for a seamless and secure piloting experience.


# Autonomous flight modes

## Overview

Asv.Drones empowers users with autonomous flight modes, enabling automated and pre-planned missions for drones. These modes provide users with the ability to define waypoints, actions, and specific flight paths, enhancing the efficiency and precision of drone operations.

## Planning Autonomous Missions

1. **Accessing Mission Planning Page:**
   * Navigate to the Mission Planning page from the Navigation Menu.
2. **Creating or Loading a Mission:**
   * Users can create a new mission or load an existing mission file. A mission typically includes waypoints, actions, and specific instructions for the drone.
3. **Adding Waypoints:**
   * Define waypoints on the map to create the desired path for the drone. Waypoints represent specific locations that the drone will visit during the mission.
4. **Adjusting Altitudes and Parameters:**
   * Fine-tune mission parameters, including altitudes and other relevant settings to meet the mission requirements.
5. **Saving and Uploading the Mission:**
   * Once the mission is finalized, users can save it locally and upload it to connected drones for autonomous execution.

## Autonomous Flight Modes

Asv.Drones may offer various autonomous flight modes, each serving specific purposes. Some common autonomous flight modes include:

1. **Start mission:**
   * The drone navigates through predefined waypoints, following the specified path.
2. **Return to launch (RTL):**
   * The drone autonomously returns to its takeoff location or a designated home point.
3. **Set region of interest (ROI):**
   * The drone will always point its nose to this point
4. **Immediately land:**
   * The drone will stop any other activity and land on the spot
5. **Go to:**
   * The drone will go to the specified location

## Safety Considerations

1. **Check Environmental Conditions:**
   * Before initiating an autonomous mission, ensure weather conditions and environmental factors are suitable for safe drone operations.
2. **Verify GPS Signal Strength:**
   * Strong GPS signal is crucial for accurate autonomous navigation. Verify signal strength before initiating autonomous flights.
3. **Monitor Battery Levels:**
   * Autonomous missions can consume varying amounts of battery. Monitor battery levels closely to ensure the drone can complete the entire mission.
4. **Emergency Override:**
   * Users should be aware of and ready to activate emergency override options to regain manual control if necessary.

Autonomous flight modes in Asv.Drones provide users with powerful tools for efficient data collection and dynamic tracking. Users can leverage these modes to automate complex tasks, enhancing productivity and precision in drone operations.


# Safety & Limitations


# Safe drone operation guidelines

## Introduction

Safety is paramount in drone operations. Whether you are a novice or experienced drone operator, adhering to safe practices is essential to prevent accidents, ensure regulatory compliance, and protect both people and property. Asv.Drones emphasizes the following guidelines for safe drone operation:

## 1. **Know and Follow Local Regulations:**

* Familiarize yourself with and adhere to local drone regulations. Stay informed about airspace restrictions, flight altitudes, and any specific rules imposed by aviation authorities.

## 2. **Pre-Flight Check:**

* Before each flight, conduct a thorough pre-flight check. Ensure that the drone, remote controller, and any connected devices are in good working condition. Verify that GPS signal strength is adequate.

## 3. **Weather Conditions:**

* Avoid flying in adverse weather conditions such as strong winds, rain, or fog. Check the weather forecast before each flight and plan accordingly.

## 4. **Maintain Visual Line of Sight (VLOS):**

* Keep the drone within your visual line of sight at all times. Maintaining direct visual contact ensures you can monitor the drone's surroundings and react to potential hazards.

## 5. **Respect Privacy:**

* Avoid flying over private property without permission, and respect individuals' privacy. Be aware of your surroundings and the impact of drone operations on others.

## 6. **Battery Management:**

* Monitor the drone's battery levels regularly during flight. Plan your missions to ensure the drone returns safely before the battery is critically low.

## 7. **Emergency Procedures:**

* Be familiar with emergency procedures and have a plan in place for unexpected situations. This includes activating Return to Home (RTH) functions or manual control override.

## 8. **Avoid No-Fly Zones:**

* Stay clear of no-fly zones, such as airports, government facilities, and other restricted areas. Utilize geofencing features if available in your drone and software.

## 9. **Responsible Flying:**

* Fly your drone responsibly and considerately. Avoid flying over crowds, wildlife, or sensitive environments. Be mindful of the impact of drone noise on the surrounding area.

## 10. **Education and Training:**

* Stay informed about advancements in drone technology and continuously educate yourself on safe flying practices. Consider taking training courses to enhance your skills and knowledge.

## 11. **Insurance Coverage:**

* If applicable, ensure that you have appropriate insurance coverage for your drone operations. Some regions may require drone operators to have liability insurance.

## 12. **Secure Software Updates:**

* Keep your drone's firmware and Asv.Drones updated. Software updates often include safety improvements and bug fixes.

## 13. **Emergency Landing Sites:**

* Identify and be aware of suitable emergency landing sites in the vicinity. Having a plan for emergency landings can mitigate potential risks.

## 14. **Secure Storage and Transport:**

* When not in use, store your drone in a secure and dry location. During transport, use protective cases to prevent damage.

## Conclusion

By following these safe drone operation guidelines, you contribute to the responsible and sustainable integration of drones into the airspace. Prioritize safety in every aspect of your drone operations to enjoy the benefits of this technology while minimizing risks.


# Possible Emergencies During Drone Operations

## 1. **Weather-Related Emergencies:**

* **High Winds:**
  * *Description:* Sudden increases in wind speed can impact the stability and control of the drone. It may lead to difficulty maintaining a desired flight path.
  * *Response:* Land the drone in a safe location and wait for improved weather conditions.
* **Thunderstorms:**
  * *Description:* Thunderstorms pose significant risks, including lightning, heavy rain, and turbulence.
  * *Response:* Avoid flying in or near thunderstorms. If already airborne, initiate a safe and immediate landing.

## 2. **Airspace Restrictions:**

* **Temporary Flight Restrictions (TFRs):**
  * *Description:* Temporary restrictions may be imposed due to events, emergencies, or security concerns, limiting drone operations in specific areas.
  * *Response:* Stay informed about TFRs in your area, and avoid flying in restricted zones.
* **No-Fly Zones:**
  * *Description:* Certain areas, such as airports or government facilities, may have permanent no-fly zones for drones.
  * *Response:* Comply with no-fly zone regulations and avoid entering restricted airspace.

## 3. **Technical Issues:**

* **Low Battery Levels:**
  * *Description:* Low battery levels can lead to loss of power and potential uncontrolled descent.
  * *Response:* Initiate a Return to Home (RTH) procedure or safely land the drone before the battery becomes critically low.
* **System Malfunctions:**
  * *Description:* Malfunctions in drone systems, sensors, or communication may compromise safe operation.
  * *Response:* Follow emergency override procedures if available, or land the drone immediately.

## 4. **Environmental Hazards:**

* **Wildlife Interactions:**
  * *Description:* Encounters with birds or other wildlife pose a risk to drone operations.
  * *Response:* Land the drone if wildlife is present, and avoid areas with known wildlife activity.
* **Obstacles and Collisions:**
  * *Description:* Flying into physical obstacles or structures can result in collisions.
  * *Response:* Fly with caution, maintain visual line of sight, and avoid obstacles. Land the drone if necessary.

## 5. **Operational Issues:**

* **Loss of GPS Signal:**
  * *Description:* Loss of GPS signal may affect the accuracy and stability of the drone's navigation.
  * *Response:* Fly with caution, use manual control if necessary, and consider landing in an open area.
* **Communication Failures:**
  * *Description:* Loss of communication between the drone and remote controller.
  * *Response:* Attempt to regain control using manual override functions. If unsuccessful, initiate a safe landing.

## 6. **Safety Precautions:**

* **Emergency Landing Procedures:**
  * *Description:* Preparedness for emergency landings in case of critical issues.
  * *Response:* Know and follow emergency landing procedures to minimize potential risks.
* **Rapid Changes in Environmental Conditions:**
  * *Description:* Unforeseen changes in weather or environmental conditions.
  * *Response:* Monitor weather forecasts before flight, and be prepared to adjust or cancel operations based on changing conditions.

## Conclusion

While Asv.Drones may not yet have a dedicated emergency alerts system, understanding and preparing for potential emergencies is crucial for safe drone operations. Users should familiarize themselves with these scenarios, follow best practices, and prioritize safety in every flight.


# Recommendations for preventing damages

## Introduction

Asv.Drones prioritizes the safe and responsible operation of drones. To minimize the risk of damages to the drone, property, and the surrounding environment, consider the following recommendations when planning and executing drone operations.

## 1. **Thorough Pre-Flight Check:**

* **Inspect the Drone:**
  * *Recommendation:* Before each flight, conduct a comprehensive pre-flight check. Inspect the drone for any visible damage, loose components, or signs of wear.
* **Check Propellers:**
  * *Recommendation:* Examine propellers for damage, deformation, or obstructions. Ensure they are securely attached and rotate freely.

## 2. **Environmental Awareness:**

* **Avoid Obstacles:**
  * *Recommendation:* Be mindful of obstacles and structures in the flight path. Plan flight paths that avoid trees, buildings, and other potential hazards.
* **Check Weather Conditions:**
  * *Recommendation:* Check weather conditions before each flight. Avoid flying in adverse weather, such as strong winds, rain, or low visibility.

## 3. **Safe Takeoff and Landing:**

* **Level Ground for Takeoff:**
  * *Recommendation:* Select a flat and level surface for takeoff to prevent the drone from tilting during launch.
* **Land in Safe Areas:**
  * *Recommendation:* Choose safe landing areas away from potential hazards. Avoid uneven terrain or areas with tall grass that may obstruct the landing.

## 4. **Maintain Visual Line of Sight (VLOS):**

* **Keep the Drone in Sight:**
  * *Recommendation:* Always maintain visual line of sight with the drone. This helps prevent collisions and allows for better control and awareness of the surroundings.
* **Utilize Visual Aids:**
  * *Recommendation:* Use visual aids, such as bright propeller colors or LED lights, to enhance visibility, especially during low-light conditions.

## 5. **Battery Management:**

* **Monitor Battery Levels:**
  * *Recommendation:* Keep a close eye on battery levels during flight. Plan missions to ensure the drone can return home or land safely before the battery becomes critically low.
* **Avoid Deep Discharges:**
  * *Recommendation:* Avoid deep discharges of the battery. Land the drone when battery levels reach a safe threshold to prolong battery life.

## 6. **Emergency Preparedness:**

* **Know Emergency Procedures:**
  * *Recommendation:* Familiarize yourself with emergency procedures, including Return to Home (RTH) functions and manual control overrides.
* **Practice Emergency Drills:**
  * *Recommendation:* Conduct simulated emergency drills to practice responding to critical situations. This enhances operator readiness.

## 7. **Operational Boundaries:**

* **Respect Altitude Limits:**
  * *Recommendation:* Adhere to altitude limits specified by regulations and drone capabilities. This prevents potential collisions with obstacles or other aircraft.
* **Avoid Flyaways:**
  * *Recommendation:* Be cautious of flyaway situations. Ensure proper GPS signal and take preventive measures, such as setting a safe home point.

## 8. **Post-Flight Maintenance:**

* **Inspect After Each Flight:**
  * *Recommendation:* After each flight, inspect the drone for any damages, loose parts, or abnormal wear. Address issues promptly.
* **Clean and Protect:**
  * *Recommendation:* Clean the drone and components after flying in dusty or dirty environments. Consider using protective cases during transport.

## Conclusion

By following these recommendations, drone operators can significantly reduce the risk of damages and enhance the overall safety of their operations. Prioritize pre-flight checks, environmental awareness, and emergency preparedness to ensure a positive and incident-free drone flying experience.


# Troubleshouting & Issue Resolution


# Reporting errors and debugging

## Introduction

Asv.Drones values the input and feedback from its user community. If you encounter any errors, glitches, or unexpected behavior while using the software, we encourage you to report the issues through our GitHub repository. Your reports play a crucial role in helping us enhance the software and provide a better experience for all users.

## 1. **GitHub Issues for Bug Reports:**

* **Create a GitHub Account:**
  * *Guidance:* To report issues, you'll need a GitHub account. If you don't have one, you can easily create an account on the [GitHub website](https://github.com/).
* **Navigate to the Repository:**
  * *Guidance:* Visit our [GitHub repository](https://github.com/asv-soft/asv-drones) to access the issue tracker.
* **Check Existing Issues:**
  * *Guidance:* Before creating a new issue, check the existing ones to see if the problem you've encountered has already been reported.

## 2. **Creating a New Issue:**

* **Title and Description:**
  * *Guidance:* Provide a clear and concise title for the issue. In the description, detail the problem you're facing, steps to reproduce the issue, and any relevant information about your system configuration.
* **Include Screenshots or Logs:**
  * *Guidance:* If applicable, include screenshots or error logs to help us better understand the issue.
* **Labeling:**
  * *Guidance:* Add relevant labels to the issue, such as "bug" or "error," to categorize and prioritize it appropriately.

## 3. **Feedback and Suggestions:**

* **Feature Requests:**
  * *Guidance:* If you have feature requests or suggestions, feel free to create an issue labeled as "enhancement" and describe the proposed improvement.
* **Discussion:**
  * *Guidance:* Engage in discussions within existing issues. Your insights and experiences can provide valuable context for debugging and resolving reported problems.

## 4. **Community Collaboration:**

* **Helping with Debugging:**
  * *Guidance:* If you have programming skills and want to contribute to debugging, review existing issues, and check if you can provide additional information or insights.
* **Testing Fixes:**
  * *Guidance:* Once a fix is proposed or implemented, users can test the provided solutions and provide feedback on whether the issue is resolved.

## 5. **Stay Updated:**

* **Notifications:**
  * *Guidance:* Enable notifications for the repository to stay informed about updates, comments, or resolutions related to reported issues.
* **Release Notes:**
  * *Guidance:* Check release notes for new versions of Asv.Drones. Many issues may be addressed in software updates.

## Conclusion

Reporting errors and participating in debugging processes contribute to the continuous improvement of Asv.Drones. Your feedback is highly valued, and together, we can enhance the software's reliability and functionality.

Thank you for being an active member of our community and helping us make Asv.Drones even better.


# Community and support resources

## Introduction

Asv.Drones is committed to fostering a vibrant and supportive community where users can connect, share experiences, and seek assistance. Whether you have questions, want to share insights, or need help troubleshooting, our community and support resources are here to assist you.

## 1. **Documentation:**

* **Explore Documentation:**
  * *Guidance:* Our comprehensive documentation provides in-depth information about Asv.Drones. Check the documentation for guides, tutorials, and troubleshooting tips.

## 2. **Support Channels:**

* **Official Support Email:**
  * *Guidance:* If you have specific inquiries or encounter issues that require personalized assistance, you can reach out to our official support email at \[<asv@me.com>].

## 3. **Contribute to Open Source:**

* **GitHub Repository:**
  * *Guidance:* If you're a developer or enthusiast, consider contributing to the open-source development of Asv.Drones. Visit our GitHub repository to explore opportunities for collaboration.
* **Report Issues:**
  * *Guidance:* Help improve the software by reporting bugs, suggesting enhancements, or participating in discussions on our GitHub repository's issue tracker.

## Conclusion

Asv.Drones thrives on the strength of its community, and we appreciate your active participation. There are resources available to help you make the most of your experience with Asv.Drones.

Thank you for being a valuable part of our community. We look forward to hearing from you, learning together, and making Asv.Drones even better.


# Updates & Additional Resources


# Checking for software updates

## Introduction

To ensure you have the best possible experience with Asv.Drones, it's important to keep the software up-to-date. We regularly release updates that include new features, enhancements, bug fixes, and security patches. Follow the steps below to check for and install the latest software updates.

## 1. **Visit the GitHub Releases Page:**

* **GitHub Repository:**
  * *Guidance:* Navigate to our GitHub repository at [GitHub Repository Link](https://github.com/asv-soft/asv-drones).
* **Releases Page:**
  * *Guidance:* On the GitHub repository, go to the "Releases" page to find the latest versions and release notes.

## 2. **Check for the Latest Release:**

* **Release Versions:**
  * *Guidance:* Look for the latest release version on the Releases page. Each release typically includes a list of changes, improvements, and new features.
* **Release Notes:**
  * *Guidance:* Read the release notes to understand what has been updated or fixed in the new version.

## 3. **Download the Latest Release:**

* **Download Package:**
  * *Guidance:* Find the downloadable installation package associated with the latest release. This is usually provided in formats such as .zip, .exe, .dmg, etc.
* **Download Link:**
  * *Guidance:* Click on the download link associated with the latest release to begin downloading the installation package.

## 4. **Installation Instructions:**

* **Read Documentation:**
  * *Guidance:* Before installing the update, it's recommended to check any accompanying documentation or installation instructions provided in the release notes or on the repository.
* **Follow Installation Steps:**
  * *Guidance:* Follow the specified steps in the documentation or release notes to install the latest version of Asv.Drones.

## 5. **Stay Informed:**

* **Subscribe to Notifications:**
  * *Guidance:* Subscribe to notifications on our GitHub repository to receive updates about new releases. You can customize your notification preferences to stay informed.
* **Follow on Social Media:**
  * *Guidance:* Follow us on social media platforms for announcements about major updates, new features, and important information related to Asv.Drones.

## Conclusion

Keeping Asv.Drones up-to-date ensures that you benefit from the latest improvements and features. Regularly check for updates on our GitHub repository and follow the provided instructions to stay current with the latest releases.

Thank you for choosing Asv.Drones. We appreciate your commitment to using the latest and most advanced version of our software.


# Recommendations for further learning

## 1. **Regulatory Knowledge:**

* **Local Aviation Regulations:**
  * *Understanding:* Familiarize yourself with the aviation regulations and laws in your region that govern drone operations. This includes airspace regulations, altitude restrictions, and any required permits.
* **Remote Pilot Certification:**
  * *Understanding:* If applicable, obtain the necessary remote pilot certification or license as required by your country's aviation authority.

## 2. **Basic Aeronautical Knowledge:**

* **Aerodynamics and Flight Principles:**
  * *Understanding:* Learn the basic principles of aerodynamics and how they apply to drone flight. Understand lift, drag, thrust, and weight.
* **Weather Conditions:**
  * *Understanding:* Acquire knowledge about how different weather conditions, such as wind, precipitation, and temperature, can impact drone flight.

## 3. **Drone Operation and Maintenance:**

* **Understanding Your Drone:**
  * *Understanding:* Gain in-depth knowledge of your specific drone model, including its features, capabilities, and limitations.
* **Pre-flight Checks:**
  * *Skills:* Develop the habit of conducting thorough pre-flight checks to ensure the drone is in good working condition before each flight.
* **Basic Maintenance:**
  * *Skills:* Learn basic maintenance tasks such as propeller replacement, battery care, and firmware updates.

## 4. **Navigation and Flight Planning:**

* **Map Reading Skills:**
  * *Skills:* Develop map reading skills to plan flight routes and understand the geographic features of the operating area.
* **Flight Planning Software:**
  * *Understanding:* Familiarize yourself with flight planning software that assists in route planning, checking airspace restrictions, and ensuring safe flights.

## 5. **Communication and Protocols:**

* **Radio Communication:**
  * *Understanding:* Learn the basics of radio communication, including the use of radio frequencies and proper communication protocols.
* **MAVLink Protocol:**
  * *Understanding:* Understand the MAVLink protocol, a lightweight communication protocol widely used in the drone industry. Learn how it facilitates communication between ground control stations and drones.

## 6. **Emergency Procedures:**

* **Emergency Landing Procedures:**
  * *Skills:* Practice emergency landing procedures and understand how to respond in critical situations.
* **Lost Link Procedures:**
  * *Skills:* Know how to handle situations where the communication link between the drone and ground control station is lost.

## 7. **Privacy and Ethical Considerations:**

* **Respecting Privacy:**
  * *Understanding:* Understand and respect privacy laws and ethical considerations related to drone use, especially in populated areas.
* **Data Security:**
  * *Understanding:* Be aware of data security concerns, especially if your drone is equipped with cameras or sensors that capture sensitive information.

## Conclusion

Becoming a competent drone pilot involves a combination of regulatory compliance, aeronautical knowledge, technical understanding of the drone, and responsible operational practices. Staying updated on industry developments and continuously improving your skills will contribute to safe and successful drone operations.


# Conclusion

That's all folks!!!


# Summary and wrap-up

Thank you for exploring the comprehensive documentation for Asv.Drones. This documentation aims to provide users with a clear understanding of the software's capabilities, features, and operational guidelines. Let's summarize the key aspects covered:

1. **Introduction:**
   * Gain insights into the purpose and overview of Asv.Drones, a powerful drone management software designed to streamline drone setup, mission planning, and payload management.
2. **Features and Capabilities:**
   * Discover a range of features, including drone flight modes, mission planning, SDR payload management, packet viewing, general setup, connections setup, and a versatile logger.
3. **System Requirements:**
   * Ensure seamless performance across multiple platforms, including Windows, Linux, macOS, Android 12 and above, and iOS 15 and above.
4. **Connecting Drones:**
   * Learn how to establish connections by creating TCP client ports through the intuitive "Connections" tab in the menu.
5. **Installation and Releases:**
   * Access downloadable install packages for Windows, Linux, and macOS from our GitHub page, ensuring users have the latest updates.
6. **User Interface (UI):**
   * Experience a user-friendly layout with a navigation menu, toolbar, status bar, and centralized content, optimizing user interactions.
7. **Application Pages:**
   * Navigate through key application pages, such as Flight Mode, Mission Planning, Packet Viewer, Connections, Settings, and Log Messages, each serving a unique purpose.
8. **Emergency Situations:**
   * While lacking a dedicated emergency alerts system, understand potential emergency scenarios and the importance of user awareness.
9. **Safety Guidelines:**
   * Prioritize safe drone operation with guidelines for preventing damages, respecting regulations, and following ethical considerations.
10. **Reporting Errors and Debugging:**
    * Encourage users to contribute to software improvement by reporting errors and participating in debugging processes through GitHub issues.
11. **Checking for Updates:**
    * Stay current with the latest features and improvements by checking for software updates on our GitHub page, ensuring users benefit from ongoing enhancements.

This documentation serves as your go-to resource for mastering Asv.Drones. Whether you're a novice or an experienced user, we are committed to providing the information you need to make the most of our software. If you have any further questions or feedback, please don't hesitate to reach out.

Thank you for choosing Asv.Drones. Happy droning! 🚀🤖✨


# Licensing information

Asv.Drones is released under the terms of the MIT License.

## MIT License

```
MIT License

Copyright (c) 2023 Asv.Drones Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

### What does this mean?

By choosing to use Asv.Drones, you agree to the terms of the MIT License. This license grants you the freedom to use, modify, and distribute the software, even for commercial purposes. It comes with minimal restrictions, making Asv.Drones an open and accessible tool for a wide range of applications.

For detailed information about the MIT License, please refer to the [official MIT License page](https://opensource.org/licenses/MIT).

If you have any questions or need further clarification about the licensing of Asv.Drones, please contact us at [asv@me.com](https://github.com/asv-soft/asv-drones-docs/blob/main/overview/conclusion/asv@me.com).

Thank you for choosing Asv.Drones.

***


# Contact information for feedback

We value your feedback and welcome your thoughts, suggestions, and contributions to make Asv.Drones even better. There are two primary ways to get in touch with us:

## GitHub Issues

If you encounter a bug, have a feature request, or want to participate in discussions about Asv.Drones, our GitHub Issues page is the place to go. You can create a new issue or contribute to existing discussions.

👉 [GitHub Issues](https://github.com/asv-soft/asv-drones/issues)

## Official Email

For more direct and private communication, you can reach out to us via our official email. Feel free to share your thoughts, report issues, or inquire about any aspect of Asv.Drones.

📧 [Our Official Email Address](https://github.com/asv-soft/asv-drones-docs/blob/main/overview/conclusion/asv@me.com)

### How to Provide Effective Feedback

When providing feedback, consider the following to help us better understand and address your needs:

* **Clearly Describe the Issue or Suggestion:**
  * Provide detailed information about the problem or suggestion. Include steps to reproduce issues if applicable.
* **Include Relevant Information:**
  * Mention the version of Asv.Drones you are using, your operating system, and any other relevant details.
* **Be Constructive:**
  * Constructive feedback helps us identify areas for improvement. Share your insights and thoughts in a positive and constructive manner.

We appreciate your time and effort in helping us enhance Asv.Drones. Thank you for being a part of our community!


# Plugins development

## Plugin Development Guide

### Introduction

This guide will walk you through the process of developing plugins for the `Asv.Drones.Gui` project. We'll use `Asv.Drones.Gui.Plugin.Weather` as an example as it's a simple project mainly geared towards educational purposes.

All the source code of the project being analyzed is available in the repository on GitHub. Take a closer look - [Asv.Drones.Gui.Plugin.Weather](https://github.com/asv-soft/asv-drones-gui-weather).

Also check out [Asv.Drones.Gui.Plugin.Example](https://github.com/asv-soft/asv-drones-gui-plugin-example) - you can use this as an example or template for plugin development.

### Project Naming

Once you've decided on a project name, follow the plugin naming rule. The main application (`Asv.Drones.Gui`) uses a composition container to load external libraries, which implies that your plugins should be implemented as libraries. Moreover, your library files should follow the naming format `Asv.Drones.Gui.Plugin.**YourPluginName**`. In our case, it will be `Asv.Drones.Gui.Plugin.Weather`. This naming convention is crucial for the composition container to recognize and incorporate your plugin during the program start.

![](/files/zfhkE32FNOxxulc5S3fD)

### Project Structure and Dependencies

Make sure your plugin project is located in a directory alongside the main `ASV.Drones` project. ![](/files/e57ewVjsOJSlsjxSJ2nX)

Ensure the addition of crucial dependencies such as:

* Resource files (RS.resx) - necessary for text localization.
* App.axaml file - helps in importing and exporting styles and custom controls.
* Directory.Build.props file - used for managing the versions of required NuGet packages.

Below is the structure of `Directory.Build.props` file. This describes all dependencies of the main project. Specify an `<ApiVersion>` for your plugin project in the same way

```xml
        <ApiVersion>1.0.1</ApiVersion>
```

After `Directory.Build.props` of your plugin is set up, it should look something like this:

```xml
<Project>
    <PropertyGroup>
        <Nullable>enable</Nullable>
        <ProductVersion>1.0.0</ProductVersion>
        <AvaloniaVersion>11.1.0</AvaloniaVersion>
        <AsvCommonVersion>3.0.0-dev.4</AsvCommonVersion>
        <ApiVersion>2.0.0-dev.7</ApiVersion>
        <FluentAvaloniaUIVersion>2.0.0</FluentAvaloniaUIVersion>
        <ReactiveUIVersion>19.5.41</ReactiveUIVersion>
        <MaterialIconsAvaloniaVersion>2.0.1</MaterialIconsAvaloniaVersion>
        <ReactiveUIValidationVersion>3.1.7</ReactiveUIValidationVersion>
        <CompositionVersion>8.0.0</CompositionVersion>
    </PropertyGroup>
</Project>
```

Finally, set up the `.csproj` file with `PackageReference` that will reference `ApiVersion` from `Directory.Build.props` file. If you want to debug your plugin using the main `Asv.Drones` app - set up `<OutputPath>` attribute. It must point to the plugins folder of the main `Asv.Drones` project. You can also set this up by adding a .NET Executable Run/Debug configuration in your IDE.

Specify `<Title>`, `<Authors>`, `<Description>`, `<PackageLicenseFile>`, `<PackageIconUrl>`.

```xml
<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFramework>net8.0</TargetFramework>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
        <EnableDynamicLoading>true</EnableDynamicLoading>
        <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
        <!--        Following tags defines information about plugin displays at Settings/Plugins/Installed page in GUI -->
        <AssemblyVersion>$(ProductVersion)</AssemblyVersion>
        <FileVersion>$(ProductVersion)</FileVersion>
        <Version>$(ProductVersion)</Version>
        <Title>Example</Title>
        <Authors>https://example-source.com</Authors>
        <Description>This is an Example application plugin</Description>
        <PackageIconUrl>icon.ico</PackageIconUrl>
        <PackageLicenseFile>LICENSE.md</PackageLicenseFile>
        <PackageTags>Windows;Linux;.net;drone;</PackageTags>
    </PropertyGroup>
    <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
        <OutputPath>..\..\..\asv-drones\src\Asv.Drones.Gui.Desktop\bin\Debug\net8.0\asv-data-folder\plugins\Asv.Drones.Gui.Plugin.Example</OutputPath>
    </PropertyGroup>
    <ItemGroup>
        <PackageReference Include="Asv.Cfg" Version="$(AsvCommonVersion)"/>
        <PackageReference Include="System.Composition" Version="$(CompositionVersion)"/>
        <PackageReference Include="ReactiveUI" Version="$(ReactiveUIVersion)"/>
        <PackageReference Include="ReactiveUI.Fody" Version="$(ReactiveUIVersion)"/>
        <PackageReference Include="Material.Icons.Avalonia" Version="$(MaterialIconsAvaloniaVersion)"/>
        <PackageReference Include="Asv.Drones.Gui.Api" Version="$(ApiVersion)"/>
        <PackageReference Include="LiveChartsCore.SkiaSharpView.Avalonia" Version="2.0.0-rc1"/>
        <None Include="content\icon.ico" PackagePath="content\icon.ico" Pack="true">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Include="content\LICENSE.md" PackagePath="LICENSE.md" Pack="true">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
    </ItemGroup>

</Project>
```

Now you can build your plugin, and check if it is displayed in installed plugins list

![](/files/6ULgzXparTUAySNCATbf)

Once we've completed the initial steps, we can proceed further.

Our next task involves creating a class that will act as the entry point for our plugin. If we refer to the code provided earlier, we can see that this class is named "WeatherPlugin.cs".

Let's delve into the details of this class!

```csharp
using System.ComponentModel.Composition;
using Asv.Drones.Gui.Core;
using Avalonia;
using Avalonia.Markup.Xaml.Styling;
using Avalonia.Styling;

namespace Asv.Drones.Gui.Plugin.Weather;

[PluginEntryPoint("Weather", CorePlugin.Name)]
[PartCreationPolicy(CreationPolicy.Shared)]
public class WeatherPlugin : IPluginEntryPoint
{
    [ImportingConstructor]
    public WeatherPlugin()
    {
        
    }
    public void Initialize()
    {
        
    }

    public void OnFrameworkInitializationCompleted()
    {
        Application.Current.Styles.Add(new StyleInclude(new Uri("resm:Styles?assembly=Asv.Drones.Gui.Plugin.Weather"))
        {
            Source = new Uri("avares://Asv.Drones.Gui.Plugin.Weather/App.axaml")
        });
    }

    public void OnShutdownRequested()
    {
        
    }
}
```

The WeatherPlugin class implements the IPluginEntryPoint interface and the PluginEntryPoint attribute. This designates the WeatherPlugin class as a plugin entry point. The creation policy for the entry point is always shared.

The plugin project is organized into several folders:

* **Controls:** Contains all custom controls.
* **Service:** Provides all services.
* **Shell:** Includes all shell pages, view-models, and views.

This organization mirrors the structure of the Asv.Drones.Gui solution files. Let's explore the contents of these folders:

1. **Controls:**

   ![Control Folder Files](/files/vOXi4qC3nlzJJ3X8cJ7i)

   The only file here is **WindIndicator**. This simple custom control adjusts to the given wind angle.
2. **Service:**

   ![Service Folder Files](/files/lMU8XKjgWeccm8tHETb3)

   This folder implements the weather service class and interface. The Providers folder currently houses two weather providers: Windy and OpenWeatherMap. The service is implemented here for the following reasons: to save and load the last weather data when the weather button is displayed, to download weather data from the selected provider, to save the last selected provider and its API key, and to control the visibility of the action button.
3. **Shell:**

   ![Shell Folder Files](/files/jVP1UNS4jorQ52oWReQn)

   There are two views and view-models for the weather. The first is used to add an **action button** to our flight page.

   ![Weather Action Button](/files/dB2TRIHQTskD5K9zxhxI)

   The second is used to display the weather settings in the program settings list.

   ![Weather Settings](/files/4dBae77JSjVbA4TFXUww)

### Code Explanation

#### Weather Action Button

To better understand the action button's functionality, let's examine its view, code-behind, and view-model!

We'll start with the view:

```xaml
<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
             xmlns:weather="clr-namespace:Asv.Drones.Gui.Plugin.Weather"
             mc:Ignorable="d" d:DesignWidth="160" d:DesignHeight="40"
             x:Class="Asv.Drones.Gui.Plugin.Weather.WeatherActionView"
             x:DataType="weather:WeatherActionViewModel"
             IsVisible="{CompiledBinding Visibility}">
    <Design.DataContext>
        <weather:WeatherActionViewModel/>
    </Design.DataContext>
    <Button Command="{CompiledBinding UpdateWeather}" HorizontalAlignment="Center">
        <StackPanel Orientation="Horizontal" Spacing="5">
            <avalonia:MaterialIcon Kind="Temperature"/>
            <TextBlock VerticalAlignment="Center" Text="{CompiledBinding Temperature}"/>
            <weather:WindIndicator Width="20" Height="20" 
                                   Angle="{CompiledBinding WindDirection}" 
                                   Value="{CompiledBinding WindSpeed}"/>
            <TextBlock VerticalAlignment="Center" Text="{CompiledBinding WindSpeedString}"/>
        </StackPanel>
    </Button>
</UserControl>
```

* **Namespaces:** The script starts by defining namespaces. These help the XAML parser understand the meaning of the elements and attributes in your markup. Apart from the standard XAML namespaces, additional namespaces for AvaloniaUI, Material Icons for Avalonia, and the specific Weather plugin are also included.
* **UserControl:** This primary object represented by the top-level UserControl element is the primary object that this XAML defines. UserControl serves as a base class for creating custom, reusable controls.
  * The `x:Class` attribute specifies the code-behind class for this XAML file. Here, the value is `Asv.Drones.Gui.Plugin.Weather.WeatherActionView`.
  * The `x:DataType` attribute indicates the ViewModel that this View binds to, which in this case is `Asv.Drones.Gui.Plugin.Weather.WeatherActionViewModel`.
  * The `IsVisible` attribute binds to the `Visibility` property of `WeatherActionViewModel` and determines the visibility of the UserControl.
* **Design DataContext:** This attribute sets the design-time data context to an instance of `WeatherActionViewModel`. It's primarily used for design-time data binding in visual design tools.
* **Button:** This element establishes a button that triggers the `UpdateWeather` command from the ViewModel upon clicking. The button includes a StackPanel, which aligns several child elements horizontally.
* **StackPanel:** The `StackPanel` has its `Orientation` set to `Horizontal`, aligning its child elements horizontally. It contains an Icon, two TextBlock elements presenting the `Temperature` and `WindSpeed` strings, and a custom `WindIndicator` control.
* **Elements in StackPanel:** The `MaterialIcon`, `TextBlock`, and `WindIndicator` elements inside the `StackPanel` are databound to properties in `WeatherActionViewModel` such as Temperature, WindDirection, and WindSpeed.

Next, let's examine the code-behind of the view:

```csharp
using System.ComponentModel.Composition;
using Asv.Drones.Gui.Core;
using Avalonia.Markup.Xaml;
using Avalonia.ReactiveUI;

namespace Asv.Drones.Gui.Plugin.Weather;

[ExportView(typeof(WeatherActionViewModel))]
[PartCreationPolicy(CreationPolicy.NonShared)]
public partial class WeatherActionView : ReactiveUserControl<WeatherActionViewModel>
{
    public WeatherActionView()
    {
        InitializeComponent();
    }

    private void InitializeComponent()
    {
        AvaloniaXamlLoader.Load(this);
    }
}
```

* **Namespaces:**
  * `System.ComponentModel.Composition` is a namespace that comprises types used for creating extensible applications in the Managed Extensibility Framework (MEF).
  * `Asv.Drones.Gui.Core`, `Avalonia.Markup.Xaml`, and `Avalonia.ReactiveUI` are specific to the libraries utilized the application.
* **Annotations:**
  * The `[ExportView(typeof(WeatherActionViewModel))]` attribute signifies that this class offers an exported view for the WeatherActionViewModel, which is used for dependency injection. It's a specific attribute of the `Asv.Drones.Gui.Core` library.
  * `[PartCreationPolicy(CreationPolicy.NonShared)]` attribute, part of MEF, denotes that a new instance of `WeatherActionView` is initiated each time it's required.
* **Class Declaration:**
  * The `WeatherActionView` class inherits from `ReactiveUserControl<WeatherActionViewModel>`, a class from the ReactiveUI library that supports a reactive programming model. `WeatherActionViewModel` is the view model that this view binds to.
* **Methods:**
  * In the constructor (`public WeatherActionView()`), the `InitializeComponent()` method is called. This method uses `AvaloniaXamlLoader.Load(this)` to load the relevant Avalonia XAML for the current control.

Next, let's dive into the view-model:

```csharp
using System.ComponentModel.Composition;
using System.Windows.Input;
using Asv.Common;
using Asv.Drones.Gui.Core;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml.Styling;
using DynamicData.Binding;
using ReactiveUI;
using ReactiveUI.Fody.Helpers;

namespace Asv.Drones.Gui.Plugin.Weather;

[Export(FlightPageViewModel.UriString,typeof(IMapAction))]
[PartCreationPolicy(CreationPolicy.NonShared)]
public class WeatherActionViewModel : MapActionBase
{
    private readonly IWeatherService _weatherService;
    private readonly ILocalizationService _localizationService;

    public WeatherActionViewModel() : base("asv:shell.page.map.action.weather")
    {
        if (Design.IsDesignMode)
        {
            Application.Current.Styles.Add(new StyleInclude(new Uri("resm:Styles?assembly=Asv.Drones.Gui.Plugin.Weather"))
            {
                Source = new Uri("avares://Asv.Drones.Gui.Plugin.Weather/App.axaml")
            });
            
            Visibility = true;
            
            CurrentWeatherData = new WeatherData
            {
                WindSpeed = 8,
                WindDirection = 123,
                Temperature = 22.25
            };

            WindDirection = CurrentWeatherData.WindDirection;
            WindSpeedString = $"{CurrentWeatherData.WindSpeed} m/s";
            Temperature = $"{CurrentWeatherData.Temperature} K";
        }
    }
    
    [ImportingConstructor]
    public WeatherActionViewModel(IWeatherService weatherService, ILocalizationService localizationService) : this()
    {
        _weatherService = weatherService;
        _localizationService = localizationService;

        _weatherService.LastWeatherData
            .Subscribe(_ => CurrentWeatherData = _)
            .DisposeItWith(Disposable);
        
        _weatherService.Visibility
            .Subscribe(_ => Visibility = _)
            .DisposeItWith(Disposable);
    }
    
    public ICommand UpdateWeather { get; set; }
    
    [Reactive]
    public WeatherData CurrentWeatherData { get; set; }
    
    [Reactive]
    public string WindSpeedString { get; set; }
    
    [Reactive]
    public double WindSpeed { get; set; }

    [Reactive]
    public double WindDirection { get; set; }
    
    [Reactive]
    public string Temperature { get; set; }

    [Reactive]
    public bool Visibility { get; set; }
    
    public async Task UpdateWeatherImpl(GeoPoint location)
    {
        CurrentWeatherData = await _weatherService.GetWeatherData(location);
    }

    
    public override IMapAction Init(IMap context)
    {
        base.Init(context);
        UpdateWeather = ReactiveCommand.CreateFromTask(
            () => UpdateWeatherImpl(context.Center)).DisposeItWith(Disposable);
        
        this.WhenPropertyChanged(_ => _.CurrentWeatherData)
            .Subscribe(_ =>
            {
                if (CurrentWeatherData != null)
                {
                    WindDirection = CurrentWeatherData.WindDirection;
                    WindSpeed = CurrentWeatherData.WindSpeed;
                    WindSpeedString = _localizationService.Velocity.FromSiToStringWithUnits(CurrentWeatherData.WindSpeed);
                    Temperature = _localizationService.Temperature.FromSiToStringWithUnits(CurrentWeatherData.Temperature);

                    _weatherService.LastWeatherData.OnNext(CurrentWeatherData);
                }
            })
            .DisposeItWith(Disposable);
        
        return this;
    }
}
```

* **Dependencies:**
  * The class employs MEF (Managed Extensibility Framework) as a form of dependency injection, as indicated by the Export and ImportingConstructor attributes. The dependencies in this class include `IWeatherService` and `ILocalizationService`.
* **Design Mode Behavior:**
  * The default constructor features a block of code that executes conditionally when the application operates in Design Mode, which is usually when it is being edited in a UI designer of an IDE. This block applies specific styling to the application and sets some default values.
* **ViewModel Properties:**
  * The ViewModel exposes several properties:
    * `UpdateWeather` is a command bound to a UI action (likely a button click event) that invokes the `UpdateWeatherImpl` method.
    * `CurrentWeatherData`, `WindSpeedString`, `WindSpeed`, `WindDirection`, `Temperature`, and `Visibility` are all Reactively bound properties. The ReactiveUI framework is used here for declarative UI updates. The `[Reactive]` attribute instructs ReactiveUI to raise PropertyChanged events whenever the value of these properties changes.
* **Initialization:**
  * The `Init` method establishes the command, the map center, and subscribes to the `CurrentWeatherData` property's changes. Accordingly, it updates the UI (Wind direction, Wind speed, Temperature, and triggers the `LastWeatherData` event) whenever `CurrentWeatherData` changes. Upon initializing it, the method returns an instance of the class.

#### Weather Settings

Here's the view:

```xaml
<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:weather="clr-namespace:Asv.Drones.Gui.Plugin.Weather"
             xmlns:core="clr-namespace:Asv.Drones.Gui.Core;assembly=Asv.Drones.Gui.Core"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Asv.Drones.Gui.Plugin.Weather.WeatherSettingsView"
             x:CompileBindings="True"
             x:DataType="weather:WeatherSettingsViewModel">
    <Design.DataContext>
        <weather:WeatherSettingsViewModel/>
    </Design.DataContext>
    <core:OptionsDisplayItem Header="{x:Static weather:RS.WeatherSettingsView_Header}"
                             Icon="{Binding WeatherIcon}"
                             Description="{x:Static weather:RS.WeatherSettingsView_Description}"
                             Expands="True"
                             IsExpanded="False">
        <core:OptionsDisplayItem.Content>
            <StackPanel Spacing="8">
                <core:OptionsDisplayItem Header="{x:Static weather:RS.WeatherSettingsView_WeatherSwitch_Header}" 
                                         Icon="{Binding WeatherSwitchIcon}"
                                         Description="{x:Static weather:RS.WeatherSettingsView_WeatherSwitch_Description}">
                    <core:OptionsDisplayItem.ActionButton>
                        <ToggleButton Content="{CompiledBinding VisibilityButton}" IsChecked="{CompiledBinding Visibility}"/>
                    </core:OptionsDisplayItem.ActionButton>
                </core:OptionsDisplayItem>
                <core:OptionsDisplayItem Header="{x:Static weather:RS.WeatherSettingsView_WeatherProvider_Header}"
                                         Icon="{Binding WeatherIcon}"
                                         Description="{x:Static weather:RS.WeatherSettingsView_WeatherProvider_Description}">
                    <core:OptionsDisplayItem.ActionButton>
                        <ComboBox Width="180" ItemsSource="{CompiledBinding WeatherProviders}" 
                                  SelectedItem="{CompiledBinding CurrentWeatherProvider}">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{CompiledBinding Name}"/>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>   
                    </core:OptionsDisplayItem.ActionButton>
                </core:OptionsDisplayItem>
                <core:OptionsDisplayItem Header="{x:Static weather:RS.WeatherSettingsView_WeatherApiKey_Header}"
                                         Icon="{Binding WeatherApiKeyIcon}"
                                         Description="{x:Static weather:RS.WeatherSettingsView_WeatherApiKey_Description}">
                    <core:OptionsDisplayItem.ActionButton>
                        <TextBox Watermark="Enter your api key" Width="180" Text="{CompiledBinding CurrentWeatherProviderApiKey}"/>
                    </core:OptionsDisplayItem.ActionButton>
                </core:OptionsDisplayItem>
            </StackPanel>
        </core:OptionsDisplayItem.Content>
    </core:OptionsDisplayItem>
</UserControl>
```

1. The highest level describes a `UserControl`, which is a custom, reusable control composed of other controls.
2. The namespaces declared at the top map XML namespaces to CLR (Common Language Runtime) namespaces. This mapping allows the XML markup to use types in the corresponding CLR namespaces.
3. The `x:Class` attribute specifies the CLR namespace and class name for the code-behind class of the XAML file.
4. `x:DataType` represents the type of object to be used for data binding in this view. Here, it represents a ViewModel type from the weather CLR namespace.
5. The `Design.DataContext` element assigns a design-time DataContext, which is the ViewModel instance the IDE's designer uses to render the XAML at design-time.
6. `core:OptionsDisplayItem` is a custom control used in the application. Various properties, such as `Header`, `Icon`, `Description`, `Expands`, and `IsExpanded`, are set.
7. Within the `OptionsDisplayItem`, a `StackPanel` allows for the arrangement of multiple `core:OptionsDisplayItem` elements in a stack, either horizontally or vertically. A vertical arrangement is utilized here (which is the default).
8. Inside each `core:OptionsDisplayItem`, there are `ToggleButton`, `ComboBox`, and `TextBox` controls used for different functionalities such as toggling visibility, selecting from multiple options, and entering text, respectively.
9. `{CompiledBinding}` is a markup extension that recommends a binding to be compiled for improved performance.
10. `{x:Static}` refers to a static property. For instance, `{x:Static weather:RS.WeatherSettingsView_Header}` refers to the static `WeatherSettingsView_Header` property on the `RS` class in the `weather` namespace.
11. The `ComboBox.ItemTemplate` property defines a `DataTemplate` that describes how data objects should be displayed. In this case, the `TextBlock` element is employed to display the `Name` property.

Next, let's explore the code-behind:

```csharp
using System.ComponentModel.Composition;
using Asv.Drones.Gui.Core;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.ReactiveUI;

namespace Asv.Drones.Gui.Plugin.Weather;

[ExportView(typeof(WeatherSettingsViewModel))]
[PartCreationPolicy(CreationPolicy.NonShared)]
public partial class WeatherSettingsView : ReactiveUserControl<WeatherSettingsViewModel>
{
    public WeatherSettingsView()
    {
        InitializeComponent();
    }
    
    private void InitializeComponent()
    {
        AvaloniaXamlLoader.Load(this);
    }
}
```

* The `using` statements at the top import required references.
* The namespace `Asv.Drones.Gui.Plugin.Weather` contains this class. Namespaces help organize your code.
* The `[ExportView(typeof(WeatherSettingsViewModel))]` attribute marks this class for export via MEF (Managed Extensibility Framework). In this context, it's paired with a ViewModel type `WeatherSettingsViewModel` through the `ExportView` attribute. The framework will then inject instances of this view when necessary within your application.
* The `[PartCreationPolicy(CreationPolicy.NonShared)]` attribute indicates that new instances of this class should be created every time the class needs to be injected or consumed within the program. The `CreationPolicy.NonShared` specifies that MEF will not cache and reuse the instances of this part. Instead, it will always create a new instance of `WeatherSettingsView` whenever it is requested.
* `ReactiveUserControl<WeatherSettingsViewModel>` is the base class that `WeatherSettingsView` inherits from. Avalonia.ReactiveUI leverages a specific UI programming paradigm inspired by functional reactive programming. In this situation, `WeatherSettingsViewModel` is the associated ViewModel type.
* The `InitializeComponent` method is where the Avalonia UI gets loaded via the `AvaloniaXamlLoader.Load(this)` line. The layout, controls, and styles for this component are expected to be defined in the corresponding XAML file.

Lastly, let's consider the shell's ViewModel:

```csharp
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using Asv.Common;
using Asv.Drones.Gui.Core;
using DynamicData.Binding;
using Material.Icons;
using ReactiveUI;
using ReactiveUI.Fody.Helpers;

namespace Asv.Drones.Gui.Plugin.Weather;

[Export(typeof(ISettingsPart))]
[PartCreationPolicy(CreationPolicy.NonShared)]
public class WeatherSettingsViewModel : SettingsPartBase
{
    private static readonly Uri Uri = new(SettingsPartBase.Uri, "weather");
    private readonly IWeatherService _weatherService;

    public WeatherSettingsViewModel() : base(Uri)
    {
        
    }

    [ImportingConstructor]
    public WeatherSettingsViewModel(IWeatherService weatherService) : this()
    {
        _weatherService = weatherService;
        
        _weatherService.Visibility.Subscribe(_ => Visibility = _).DisposeItWith(Disposable);
        
        this.WhenAnyValue(_ => _.Visibility)
            .Subscribe(_weatherService.Visibility)
            .DisposeItWith(Disposable);
        
        this.WhenValueChanged(_ => _.Visibility)
            .Subscribe(_ =>
            {
                VisibilityButton = _
                    ? RS.WeatherSettingsView_WeatherSwitch_Button_Hide
                    : RS.WeatherSettingsView_WeatherSwitch_Button_Show;
            })
            .DisposeItWith(Disposable);
        
        _weatherService.CurrentWeatherProvider.Subscribe(_ => CurrentWeatherProvider = _).DisposeItWith(Disposable);
        
        this.WhenAnyValue(_ => _.CurrentWeatherProvider)
            .Subscribe(_weatherService.CurrentWeatherProvider)
            .DisposeItWith(Disposable);
        
        _weatherService.CurrentWeatherProviderApiKey.Subscribe(_ => CurrentWeatherProviderApiKey = _).DisposeItWith(Disposable);
        
        this.WhenAnyValue(_ => _.CurrentWeatherProviderApiKey)
            .Subscribe(_weatherService.CurrentWeatherProviderApiKey)
            .DisposeItWith(Disposable);
    }

    public override int Order => 4;
    
    [Reactive]
    public bool Visibility { get; set; }

    [Reactive]
    public string VisibilityButton { get; set; }
    
    [Reactive]
    public IWeatherProviderBase CurrentWeatherProvider { get; set; }
    
    [Reactive]
    public string CurrentWeatherProviderApiKey { get; set; }

    public IEnumerable<IWeatherProviderBase> WeatherProviders => _weatherService.WeatherProviders;
    public string WeatherIcon => MaterialIconDataProvider.GetData(MaterialIconKind.WeatherPartlyCloudy);
    public string WeatherApiKeyIcon => MaterialIconDataProvider.GetData(MaterialIconKind.Key);
    public string WeatherSwitchIcon => MaterialIconDataProvider.GetData(MaterialIconKind.Visibility);
}
```

The `WeatherSettingsViewModel` class extends from `SettingsPartBase` and implements the `ISettingsPart` interface, serving as a ViewModel in an MVVM (Model-View-ViewModel) pattern. It's tasked with defining and managing the state and the operations related to the application's weather settings.

Here are several key points:

1. **MEF and Dependency Injection:** The class employs the Managed Extensibility Framework (MEF), evident from the `Export` and `ImportingConstructor` attributes, as a form of Dependency Injection.
2. **IWeatherService:** This interface delivers methods and properties related to the app's weather functionality. The `WeatherSettingsViewModel` interacts with this service to manipulate and present data.
3. **ReactiveUI and Reactive Properties:** The class uses ReactiveUI, an MVVM framework, for reactive programming to streamline state management. The `[Reactive]` attribute is applied to define properties (`Visibility`, `VisibilityButton`, `CurrentWeatherProvider`, and `CurrentWeatherProviderApiKey`) that will automatically notify the UI of any changes.
4. **Subscriptions:** They enable the ViewModel to subscribe to changes in certain properties and execute corresponding actions. For example, one subscription responds to changes in the `Visibility` property and adjusts the text of `VisibilityButton` accordingly.
5. **Properties:** `WeatherProviders` returns available weather providers, and `WeatherIcon`, `WeatherApiKeyIcon`, and `WeatherSwitchIcon` methods fetch data to display specific icons in the UI.
6. Overall, this class acts as a bridge between the view and the model, manipulating data given by `IWeatherService` and presenting it to the UI in an engaging manner. Changes in the reactive properties will reflect in the UI, offering real-time interactivity.

#### Weather service class and interface

**Interface**

```csharp
using System.Collections.Generic;
using System.Threading.Tasks;
using Asv.Common;

namespace Asv.Drones.Gui.Plugin.Weather;

public interface IWeatherService
{
    public IRxEditableValue<bool> Visibility { get; }
    public IEnumerable<IWeatherProviderBase> WeatherProviders { get; }
    public IRxEditableValue<string> CurrentWeatherProviderApiKey { get; }
    public IRxEditableValue<IWeatherProviderBase> CurrentWeatherProvider { get; }

    public IRxEditableValue<WeatherData> LastWeatherData { get; }
    public Task<WeatherData> GetWeatherData(GeoPoint location);
}
```

**Class**

```csharp
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Threading.Tasks;
using Asv.Cfg;
using Asv.Common;
using Asv.Drones.Gui.Core;

namespace Asv.Drones.Gui.Plugin.Weather;

public class WeatherServiceConfig
{
    public bool Visibility { get; set; }
    public string CurrentProviderName { get; set; }
    public Dictionary<string, string> ProvidersApiKeys { get; set; } = new();
    
    public WeatherData LastWeatherData { get; set; }
}

[Export(typeof(IWeatherService))]
[PartCreationPolicy(CreationPolicy.Shared)]
public class WeatherService : ServiceWithConfigBase<WeatherServiceConfig>, IWeatherService
{
    private readonly IEnumerable<IWeatherProviderBase> _weatherProviders;

    [ImportingConstructor]
    public WeatherService(IConfiguration cfg, [ImportMany] IEnumerable<IWeatherProviderBase> weatherProviders) : base(cfg)
    {
        if (cfg == null) throw new ArgumentNullException(nameof(cfg));
        
        var visibilityFromConfig = InternalGetConfig(_ => _.Visibility);
        
        Visibility = new RxValue<bool>(visibilityFromConfig).DisposeItWith(Disposable);
        
        Visibility.Subscribe(SetVisibility).DisposeItWith(Disposable);
        
        var weatherProviderFromConfig = InternalGetConfig(_ => _.CurrentProviderName);

        if (weatherProviderFromConfig.IsNullOrWhiteSpace())
        {
            CurrentWeatherProvider = new RxValue<IWeatherProviderBase>(
                    weatherProviders.FirstOrDefault())
                .DisposeItWith(Disposable);
        }
        else
        {
            CurrentWeatherProvider = new RxValue<IWeatherProviderBase>(
                    weatherProviders.SingleOrDefault(_ => _.Name == weatherProviderFromConfig))
                .DisposeItWith(Disposable);
        }
        
        CurrentWeatherProvider.Subscribe(SetCurrentProvider).DisposeItWith(Disposable);
        
        var weatherProviderApiKeyFromConfig = 
            InternalGetConfig(_ =>
            {
                if (_.ProvidersApiKeys == null) _.ProvidersApiKeys = new();
                if (_.ProvidersApiKeys.TryGetValue(CurrentWeatherProvider.Value.Name, out var __))
                {
                    return __;
                }
                return "";
            });

        CurrentWeatherProviderApiKey = new RxValue<string>(weatherProviderApiKeyFromConfig)
            .DisposeItWith(Disposable);
        
        CurrentWeatherProviderApiKey.Subscribe(SetCurrentProviderApiKey).DisposeItWith(Disposable);
        
        var lastWeatherDataFromConfig = InternalGetConfig(_ => _.LastWeatherData);
        
        LastWeatherData = new RxValue<WeatherData>(lastWeatherDataFromConfig ?? new WeatherData()).DisposeItWith(Disposable);
        
        LastWeatherData.Subscribe(SetLastWeatherData).DisposeItWith(Disposable);
        
        _weatherProviders = weatherProviders;
    }
    
    public IRxEditableValue<bool> Visibility { get; }

    public IRxEditableValue<WeatherData> LastWeatherData { get; }
    
    public IRxEditableValue<IWeatherProviderBase> CurrentWeatherProvider { get; }

    public IRxEditableValue<string> CurrentWeatherProviderApiKey { get; }
    
    public IEnumerable<IWeatherProviderBase> WeatherProviders => _weatherProviders;
    
    private void SetVisibility(bool visibility)
    {
        InternalSaveConfig(_ => _.Visibility = visibility);
    }

    private async void SetCurrentProvider(IWeatherProviderBase provider)
    {
        if (CurrentWeatherProviderApiKey != null)
        {
            var apiKey = InternalGetConfig(_ =>
            {
                if (_.ProvidersApiKeys == null) 
                    _.ProvidersApiKeys = new();
                
                if (_.ProvidersApiKeys.TryGetValue(provider.Name, out var __))
                {
                    return __;
                }
                return "";
            });
            
            CurrentWeatherProviderApiKey.OnNext(apiKey);

            CurrentWeatherProvider.Value.ApiKey = apiKey;
        }
        
        InternalSaveConfig(_ => _.CurrentProviderName = provider.Name);
    }

    private void SetCurrentProviderApiKey(string key)
    {
        CurrentWeatherProvider.Value.ApiKey = key;
        
        InternalSaveConfig(_ => 
            _.ProvidersApiKeys[CurrentWeatherProvider.Value.Name] = key);
    }
    
    private void SetLastWeatherData(WeatherData data)
    {
        InternalSaveConfig(_ =>_.LastWeatherData = data);
    }
    
    public async Task<WeatherData> GetWeatherData(GeoPoint location)
    {
        return await CurrentWeatherProvider.Value.GetWeatherData(location);
    }
}
```

The `WeatherService` class employs the MEF (Managed Extensibility Framework) for plugin management, as indicated by the `Export` and `ImportingConstructor` attributes. The MEF facilitates loose coupling between the main application and its extensions or plugins.

The `WeatherServiceConfig` class outlines the configuration for the `WeatherService`, such as the visibility setting, the current weather provider, the last weather data, and a dictionary for storing API keys of various weather providers.

Within the `WeatherService` class:

* The class inherits `ServiceWithConfigBase<WeatherServiceConfig>`, using a configuration of the `WeatherServiceConfig` type.
* It contains an instance of `IEnumerable<IWeatherProviderBase>`, representing multiple weather data providers.
* Its constructor imports the configuration and the list of weather providers. The configuration is used to access and adjust properties like visibility, current weather provider, API key, and the last weather data.
* The `IRxEditableValue<T>` instances denote reactive properties. Any change in these properties triggers a defined action. For instance, a modification in the `Visibility` property triggers the `SetVisibility` method.
* Every time there's a shift in a reactive property, the corresponding method (like `SetVisibility`, `SetCurrentProvider`, `SetCurrentProviderApiKey`, `SetLastWeatherData`) is invoked, which in turn updates the configuration accordingly.
* The `GetWeatherData(GeoPoint location)` method fetches weather data for a specific location.

#### WeatherData and IWeatherProviderBase

```csharp
using System.Threading.Tasks;
using Asv.Common;

namespace Asv.Drones.Gui.Plugin.Weather;

public class WeatherData
{
    public double WindSpeed { get; set; }
    public double WindDirection { get; set; }
    public double Temperature { get; set; }
}

public interface IWeatherProviderBase
{
    string ApiKey { get; set; }
    string Name { get; }

    Task<WeatherData> GetWeatherData(GeoPoint location);
    Task<WeatherData> GetWeatherData(double latitude, double longitude);
}
```

The class at the top, `WeatherData`, includes three properties: `WindSpeed`, `WindDirection`, and `Temperature`. Each of these properties is of the `double` type. Presumably, this class is intended to store weather-related data.

The `IWeatherProviderBase` interface is declared at the bottom. It outlines a property `ApiKey`, a read-only property `Name`, and two `GetWeatherData` methods. The `ApiKey` is presumably used for authenticating with the weather data provider's API, while `Name` likely represents the name of the weather provider.

The first `GetWeatherData` method takes a `GeoPoint` object as a parameter, whereas the second `GetWeatherData` method takes two `double` parameters for latitude and longitude. Both methods return a `Task<WeatherData>`, suggesting these are asynchronous methods that fetch `WeatherData` from a source, and are expected to be used with the `async/await` structure.

One note to make is that the `GeoPoint` type is not defined in this code snippet; it appears to be part of the `Asv.Common` namespace.

Any class intending to provide weather data would implement this interface, permitting different providers to be easily swapped out without the rest of the codebase needing to know where the data comes from. By using an interface, concrete implementations can have distinct behaviors yet still conform to a contract defined by the interface, thus promoting code reusability and modularity.

### Another example

**Asv.Drones.Gui.Plugin.FlightDocs** stands as another example of an open-source plugin implementation for the Asv.Drones.Gui project.

This illustrative plugin serves as a showcase, offering insights into the intricate art of extending the capabilities of the parent application. Its primary aim is to familiarize users with the fundamental intricacies of crafting their very own plugins and the vast potential they hold.

In this instructive endeavor, you will discover how to empower your interface with action buttons under the "Actions" banner on the map page, create custom widgets and even design custom control elements that align with your unique vision. Furthermore, it delves into the key elements of constructing services and the pivotal role providers play in these service-oriented extensions.

The project's file structure, meticulously crafted to emulate that of the primary `Asv.Drones.Gui` project, is not a mere coincidence. Rather, it is a deliberate choice, as this structured approach proves most advantageous for the development and upkeep of open-source plugins meant to enrich the functionality of the core application.

### How to build

Make sure the next components are installed:

* .NET SDK 8 - <https://dotnet.microsoft.com/en-us/download/dotnet/8.0>
* AvaloniaUI Templates - <https://docs.avaloniaui.net/docs/get-started/install>
* Avalonia XAML development - <https://docs.avaloniaui.net/docs/get-started/set-up-an-editor>

After you installed all of these, you need to follow the steps:

1. Open terminal and clone this repository using `git clone git@github.com:asv-soft/asv-drones-gui-flight-docs.git` command (URL may be different);
2. Open the cloned repository folder using `cd asv-drones-gui-flight-docs`;
3. Execute `git submodule init` command to initialize Asv.Drones.Gui as a submodule;
4. Execute `git submodule update` to set latest version on Asv.Drones.Gui submodule;
5. Then you need to restore NuGet packages in a plugin project with `dotnet restore`, `nuget restore` or through IDE;
6. Finally - try to build your project with `dotnet build` or through IDE.

### How to use

After building the source code of the plugin project, the final library should be placed in the directory of the already built `Asv.Drones.Gui` application, the next time you launch the application CompositionContainer will see the library and add it to the common list of libraries loaded at startup.

## Plugin development guide

### Introduction

This guide will walk you through the process of developing plugins for the `Asv.Drones.Gui` project. We'll use `Asv.Drones.Gui.Plugin.FlightDocs` as an example as it's a simple project mainly geared towards educational purposes.

### Project Naming

Once you've decided on a project name, follow the plugin naming rule. The main application (`Asv.Drones.Gui`) uses a composition container to load external libraries, which implies that your plugins should be implemented as libraries. Moreover, your library files should follow the naming format `Asv.Drones.Gui.Plugin.**YourPluginName**`. In our case, it will be `Asv.Drones.Gui.Plugin.FlightDocs`. This naming convention is crucial for the composition container to recognize and incorporate your plugin during the program start.

![](/files/CZ92hiPOIsnHCZSAatE2)

### Project Structure and Dependencies

The structure of your files and folders should mirror that of Asv.Drones.Gui. The final project structure is depicted below.

![](/files/StwHewL0txZY0TTXnlzv)

You can see that `Asv.Drones.Gui` project is present in our plugin solution. You need to add it as a Git submodule into your solution root folder as displayed in the image below.

![](/files/c1OHuyAZPrE3TtLPYSM3)

Next, manually add all the existing projects from `Asv.Drones.Gui`.

Ensure the addition of crucial dependencies such as:

* Resource files (RS.resx) - necessary for text localization.
* App.axaml file - helps in importing and exporting styles and custom controls.
* Directory.Build.props file - used for managing the versions of required NuGet packages.

Below is the structure of `Directory.Build.props` file. Copy this structure as it mentions the versions of all critical NuGet packages.

```xml
<Project>
    <PropertyGroup>
        <ProductVersion>1.0.1</ProductVersion>
        <ApiVersion>1.0.1</ApiVersion>
        <ApiPrevVersion>1.0.0</ApiPrevVersion>
        <AvaloniaVersion>11.0.6</AvaloniaVersion>
        <AsvCommonVersion>2.0.2</AsvCommonVersion>
        <AsvAvaloniaToolkitVersion>1.0.1</AsvAvaloniaToolkitVersion>
        <AsvAvaloniaMapVersion>2.0.5</AsvAvaloniaMapVersion>
        <AsvMavlinkVersion>3.10.0</AsvMavlinkVersion>
        <FluentAvaloniaUIVersion>2.0.5</FluentAvaloniaUIVersion>
        <ReactiveUIVersion>19.5.41</ReactiveUIVersion>
        <SystemReactiveVersion>6.0.0</SystemReactiveVersion>
        <MaterialIconsAvaloniaVersion>2.0.1</MaterialIconsAvaloniaVersion>
        <ReactiveUIValidationVersion>3.1.7</ReactiveUIValidationVersion>
        <CompositionVersion>8.0.0</CompositionVersion>
    </PropertyGroup>
</Project>
```

And you must do the same thing into FlightDocs project file.

```xml
<Project>
  <ItemGroup>
    <ProjectReference Condition="'$(ProjectName)' == 'Asv.Drones.Gui'" Include="$(SolutionDir)Asv.Drones.Gui.Plugin.FlightDocs\Asv.Drones.Gui.Plugin.FlightDocs.csproj" >
      <Private>false</Private>
      <ExcludeAssets>runtime</ExcludeAssets>
    </ProjectReference>
  </ItemGroup>
  <PropertyGroup>
    <Nullable>enable</Nullable>
    <PluginVersion>0.1.0</PluginVersion>
    <AvaloniaVersion>11.0.5</AvaloniaVersion>
    <AsvCommonVersion>1.13.1</AsvCommonVersion>
    <AsvMavlinkVersion>3.6.0-alpha12</AsvMavlinkVersion>
    <FluentAvaloniaUIVersion>2.0.0</FluentAvaloniaUIVersion>
    <ReactiveUIVersion>19.3.3</ReactiveUIVersion>
    <MaterialIconsAvaloniaVersion>2.0.1</MaterialIconsAvaloniaVersion>
    <ReactiveUIValidationVersion>3.1.7</ReactiveUIValidationVersion>
    <CompositionVersion>7.0.0</CompositionVersion>
    <NLogVersion>5.2.6</NLogVersion>
  </PropertyGroup>
</Project>
```

Once we've completed the initial steps, we can proceed further.

Our next task involves creating a class that will act as the entry point for our plugin. If we refer to the code provided earlier, we can see that this class is named "FlightDocsPlugin.cs".

Let's delve into the details of this class!

```csharp
using System.ComponentModel.Composition;
using Asv.Drones.Gui.Core;

namespace Asv.Drones.Gui.Plugin.FlightDocs;

[PluginEntryPoint("FlightDocs", CorePlugin.Name)]
[PartCreationPolicy(CreationPolicy.NonShared)]
public class FlightDocsPlugin : IPluginEntryPoint
{
    [ImportingConstructor]
    public FlightDocsPlugin()
    {
    }
    public void Initialize()
    {
    }

    public void OnFrameworkInitializationCompleted()
    {
    }

    public void OnShutdownRequested()
    {
    }
}
```

The FlightDocsPlugin class implements the IPluginEntryPoint interface and the PluginEntryPoint attribute. This designates the FlightDocsPlugin class as a plugin entry point. The creation policy for the entry point is always shared.

The plugin project has Map folder, which contains several more folders:

* **Actions:** Contains all actions that can be perfomed within plugin.
* **Anchors:** Contains all anchors used to mark points on a map.
* **Widgets:** Includes all widgets and dialogs used by plugin.

This organization mirrors the structure of the Asv.Drones.Gui solution files. Let's explore the contents of these folders:

1. **Actions:**

   ![](/files/xiA7sOXcUJ2ORFs4lBiD)

   This folder contains classes that implement several actions that can be perfomed while using this plugin. **FlightZoneAction** allows user to add points that represent the flight zone, **TakeOffLandAction** allows user to specify points where take off and landing will occure, **AnchorMoverAction** allows user to enable anchor editing mode where he can move anchors on map with drag-and-drop and **MapZoomAction** allows user to change map zoom.
2. **Anchors:**

   ![](/files/1BMAaLgKrG9xYUgoujSS)

   This folder contains classes that implement anchors used in this plugin. **FlightZoneAnchor** is used to display flight zone points, **FlightZonePolygon** is used to draw a poligon that connects all flight zone points and **TakeOffLandAnchor** is used to display take off and land points.
3. **Widgets:**

   ![](/files/iGsYZomulZPGBAP1wGvG)

   This folder contains classes and views that implement widgets used in this plugin. **FlightZoneMapWidget** is displayed in the right side of the main screen and is used to change flight zone points location or delete them. **TakeOffLandMapWidget** is used to change take off and land points location or delete them. **FlightPlanGeneratorMapWidget** is used to fill in other flight zone relevant data, such as altitude of flight, date of flight and other information. It is later used to form Flight Plan data that can be used to request flight permission from authorities. **FlightPlanView** is a dialog popup that displays generated Flight Plan data. There is also a **FlightZoneWidgetProvider** class, which we will discuss in the next section of this guide.

### Code Explanation

#### Basic Code Structure

The basics of code structure are the same as for any other MVVM application, written using Avalonia UI. You can check out more details about this topic in our Weather Plugin example written above.

#### Interaction between plugin and main software

Now lets discuss how plugins can interact with main projects codebase. For example, **FlightZoneWidgetProvider** class is used to create and provide map widget view models for flight zones. It takes in a localization service and configuration as inputs when constructed.

```csharp
using System.ComponentModel.Composition;
using Asv.Cfg;
using Asv.Drones.Gui.Core;
using DynamicData;

namespace Asv.Drones.Gui.Plugin.FlightDocs;

[Export(FlightZoneMapViewModel.UriString, typeof(IViewModelProvider<IMapWidget>))]
[PartCreationPolicy(CreationPolicy.NonShared)]
public class FlightZoneWidgetProvider : ViewModelProviderBase<IMapWidget>
{
    [ImportingConstructor]
    public FlightZoneWidgetProvider(ILocalizationService loc, IConfiguration cfg)
    {
        Source.AddOrUpdate(new FlightZoneMapWidgetViewModel(loc));
        Source.AddOrUpdate(new TakeOffLandMapWidgetViewModel(loc));
        Source.AddOrUpdate(new FlightPlanGeneratorMapWidgetViewModel(loc, cfg));
    }
}
```

The main purpose of this class is to create view model instances for different map widgets related to flight zones and add them to the Source collection. It does this by calling the AddOrUpdate method in the constructor, passing new instances of the **FlightZoneMapWidgetViewModel**, **TakeOffLandMapWidgetViewModel**, and **FlightPlanGeneratorMapWidgetViewModel** classes. These view model classes are specific to different flight zone related map widgets. The **FlightZoneWidgetProvider** doesn't contain the implementation logic for these view models. It just handles creating them and adding them to the Source collection. The Source collection property is from the base **ViewModelProviderBase** class, which is a Core class from parent project asv-drones. This contains the view model instances that this provider creates. Other code can then get the appropriate view model from this Source collection for a given map widget type.

So in summary, the **FlightZoneWidgetProvider** class is responsible for creating and providing the view models for flight zone related map widgets. It encapsulates the view model creation logic in one place and exposes the view models through the Source collection for other code to use. This allows separating the view model creation from the consumption.

Another good example is **FlightZoneMapAnchorProvider** class, because it can update it's items dynamically. It is used to provide map anchor data to a flight zone map view model.

```csharp
using System.ComponentModel.Composition;
using Asv.Common;
using Asv.Drones.Gui.Core;
using DynamicData;

namespace Asv.Drones.Gui.Plugin.FlightDocs;

[Export(FlightZoneMapViewModel.UriString, typeof(IViewModelProvider<IMapAnchor>))]
[PartCreationPolicy(CreationPolicy.NonShared)]
public class FlightZoneMapAnchorProvider : ViewModelProviderBase<IMapAnchor>
{
    [ImportingConstructor]
    public FlightZoneMapAnchorProvider()
    {
        
    }

    public void Update(SourceList<IMapAnchor> anchors)
    {
        anchors.Connect()
            .OnItemAdded(_ => Source.AddOrUpdate(_))
            .OnItemRemoved(_ => Source.Remove(_))
            .Subscribe()
            .DisposeItWith(Disposable);
    }
}
```

It takes in a SourceList of IMapAnchor objects as input via the Update method. The IMapAnchor objects contain the data for the anchors to display on the map (e.g. location coordinates, title, etc.). The Update method subscribes to events on the input SourceList to keep the **FlightZoneMapAnchorProvider's** own Source property in sync. When anchors are added or removed from the input, it adds or removes them from its own Source respectively. The Source property is used as the output - it contains the latest set of IMapAnchor objects that should be displayed on the map. By syncing it to the input SourceList, it ensures the map view model always has the updated anchor data.

**The main logic flow is:**

**1. The Update method is called with a SourceList containing map anchors**

**2. It subscribes to events on that SourceList**

**3. When anchors are added/removed from the input, it updates its own Source property accordingly**

**4. The Source property is used by the map view model to show the anchors**

So in summary, the **FlightZoneMapAnchorProvider** acts as a bridge between an input SourceList of anchors and the view model. It propagates changes to the anchors to keep the view model up to date. This allows the view model to always display the latest anchor data.


# Microservices

* **ASV\_GBS** - Mavlink interface of ground base station with RTK support.
* **ASV\_SDR** - Mavlink interface of SDR device with record and calibration support.
* **ASV\_AUDIO** - Mavlink interface for audio stream communication.
* **ASV\_RADIO** - Mavlink interface of radio device for communication with air traffic controllers.
* **ASV\_CHARTS** - Mavlink interface for chart visualization.
* **ASV\_RFSA** - Mavlink interface of Radio Frequency Signal Analyzer.
* **ASV\_TABLE** - Common interface for table editing


# Mavlink SDR

Interface for interaction and configuration of Software-defined radio payload

## How Projects work

Nullam quis risus eget urna mollis ornare vel eu leo. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Maecenas sed diam eget risus varius blandit sit amet non magna. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec id elit non mi porta gravida at eget metus. Donec id elit non mi porta gravida at eget metus.

{% @mermaid/diagram content="sequenceDiagram;
participant GCS
participant Payload

```
GCS->>Payload: ASV_SDR_RECORD_REQUEST
GCS-->>GCS: Start receive timeout (any params)
Drone->>GCS: Send N parameters with PARAM_VALUE
GCS-->>GCS: Start receive timeout (after each param)
Note over GCS: Finish/timeout when no more params received" %}
```

### The Basics

Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

### Creating a Project

Nullam quis risus eget urna mollis ornare vel eu leo. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

### Organizing your Projects

Sed posuere consectetur est at lobortis. Curabitur blandit tempus porttitor. Donec ullamcorper nulla non metus auctor fringilla. Donec sed odio dui.

Curabitur blandit tempus porttitor. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.


# Example


# Flight docs


# Gbs


# Weather


# Airports


# GBS


# SDR


# Asv.Mavlink

.NET Mavlink library and CLI for .NET

## Introduction

The [`asv-mavlink`](https://github.com/asv-soft/asv-mavlink) library provides a robust interface for communication with MAVLink compatible vehicles and payloads. This library is designed to facilitate the interaction with drones and other devices using the MAVLink protocol, enabling users to send commands, receive telemetry data, and perform various operations.

Additionally, the library includes a CLI utility [Asv.Mavlink.Shell](https://github.com/asv-soft/asv-mavlink/tree/main/src/Asv.Mavlink.Shell) for simulating, testing and code generation.

## Installation

To install the [`asv-mavlink`](https://github.com/asv-soft/asv-mavlink) library, you can use the following command:

```
dotnet add package Asv.Mavlink --version <Version>
```

## CLI: Emulate ADSB reciever

This command starts a virtual ADS-B receiver that sends [ADSB\_VEHICLE](https://mavlink.io/en/messages/common.html#ADSB_VEHICLE) packets at a specified rate for every vehicle defined in the configuration file.

Executing this command launches an emulator for an ADS-B receiver, generating and transmitting ADSB\_VEHICLE data packets for virtual vehicles. These packets include information such as position, speed, and other ADS-B message parameters. The vehicles and their respective parameters are specified in the configuration file.

```bash
// run adsb simulator
Asv.Mavlink.Shell adsb -cfg adsb.json
```

<figure><img src="/files/fwCFGQN3WgXc6CGiqAj9" alt=""><figcaption><p>Asv.Mavlink.Shell.exe adsb output</p></figcaption></figure>

### Configuration file

If the configuration file does not exist, the command generates a default configuration file named `adsb.json` with two vehicles that fly in a box pattern over an airport.

#### Configuration file: Base properies

```json
{
    "SystemId": 1,         // Mavlink System ID for ADSB Receiver
    "ComponentId": 240,    // Mavlink Component ID for ADSB Receiver
    "Ports":[],            // Connection ports
    "Vehicles": []         // Vehicles and their routes
}
```

#### Configuration file: Connections

You can add multiple ports at once. All packets will be routed by other ports.

```json
  "Ports": [
    {
      "ConnectionString": "tcp://127.0.0.1:5760", // TCP client example
      "Name": "TCP client",
      "IsEnabled": true,
      "PacketLossChance": 0 // this is for packet loss testing. Must be 0.
    },
    {
      "ConnectionString": "tcp://127.0.0.1:7341?srv=true", // TCP server example
      "Name": "TCP server",
      "IsEnabled": true,
      "PacketLossChance": 0  
    },
    {
      "ConnectionString": "serial:COM1?br=115200", // Serial on Windows example
      "Name": "Serial on Windows",
      "IsEnabled": true,
      "PacketLossChance": 0
    },
    {
      "ConnectionString": "serial:/dev/ttyS0?br=115200", // Serial on Linux example
      "Name": "Serial on Linux",
      "IsEnabled": true,
      "PacketLossChance": 0
    },
    {
      "ConnectionString": "udp:127.0.0.1:7341?rhost=127.0.0.1&rport=7342", // UDP example
      "Name": "UDP",
      "IsEnabled": true,
      "PacketLossChance": 0
    }
  ]

```

#### Configuration file: Vehicles

Base properties are needed to fill [ADSB\_VEHICLE](https://mavlink.io/en/messages/common.html#ADSB_VEHICLE). You can add multiple route points and different velocities for each point. Velocity will be interpolated between points. Latitude and Longitude can be in DMS or angle format (see [GeoPointLatitudeTest.cs](https://github.com/asv-soft/asv-common/blob/main/src/Asv.Common.Test/GeoPointLatitudeTest.cs) and [GeoPointLongitudeTest.cs](https://github.com/asv-soft/asv-common/blob/main/src/Asv.Common.Test/GeoPointLongitudeTest.cs)). Altitude is in meters. Velocity is in three dimensions in m/s. It will be separated by ground and vertical velocity if altitude between two route points is different. Velocity must be greater than 0.

```json
  "Vehicles": [
    {
      "CallSign": "PLANE1",   // Call sign ADSB_VEHICLE (max 9 char)
      "Squawk": 777,
      "UpdateRateMs": 500,    // Rate for sending ADSB_VEHICLE packets
      "IcaoAddress": 1234,    // 24 bit ICAO address (DEC format)
      "Route": [              // Vehicle mission points list (must be > 2)
        {
          "Lat": "55.305641", // Latitude at first point
          "Lon": "61.500886", // Longitude at first point
          "Alt": 250.0,       // Altitude at first point (m)
          "Velocity": 10.0    // Velocity at first point (m/s). Must be > 0
        },
        {
          "Lat": "55.362666", // Latitude at second point
          "Lon": "61.210466", // Latitude at second point
          "Alt": 1000.0,      // Altitude at second point (m)
          "Velocity": 300.0   // Velocity at second point (m/s). Must be > 0
        }
      ]
    },
    {
      "CallSign": "PLANE2",   // Second vehicle example
      ...
```

#### Here's an example of ADSB utility being used with [Asv.Drones](https://github.com/asv-soft/asv-drones).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcQBEOFoUIITaF6DOPy-bSk2HMPm61togLZanzggqhUxTJjTIeTwExO-bEmJgOTtyg-Tsf1jJ9fbPG77JjlRdgBjvIMa0n70tn1UhzXlvBjJ9dREZnC9VQlpfY84DWKOMxe88h0028gDvhwufpWkv3-QNIg?key=riwOy4U3j_pq7fFAx1ly_w" alt=""><figcaption><p>ADSB vehicles in Asv.Drones</p></figcaption></figure>

#### Here's an example of ADSB utility being used with [Mission Planner](https://ardupilot.org/planner/)

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXej5GPu0BsBKrnTfU7dvP4IfRriZe6Sbf5CWpym9CyD1oCpP1aGrDe0kqbZdZzMnsZ3itB4g2h-ZE9Q4jP5stl9KEJg1juKRIWubK_kbkJ3h7ij6pLYCR2LwXSxUGXDABWGietZnXLcUC0O7ajs5WS_T78?key=riwOy4U3j_pq7fFAx1ly_w" alt=""><figcaption><p>ADSB vehicles in Mission Planner</p></figcaption></figure>

## CLI: Packet code generation

Generate C# code for packet serialization\deserialization

```bash
// run code gen
Asv.Mavlink.Shell gen -t=[mavlink-xml-file] -i=[mavlink-xml-folder] -o=[output-folder] -e=cs [path-to-liquid-template]/csharp.tpl
```

This command load XML file with mavlink packet definition

```xml
<message id="0" name="HEARTBEAT">
   <description>The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at https://mavlink.io/en/services/heartbeat.html</description>
   <field type="uint8_t" name="type" enum="MAV_TYPE">Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type.</field>
   <field type="uint8_t" name="autopilot" enum="MAV_AUTOPILOT">Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers.</field>
   <field type="uint8_t" name="base_mode" enum="MAV_MODE_FLAG" display="bitmask">System mode bitmap.</field>
   <field type="uint32_t" name="custom_mode">A bitfield for use for autopilot-specific flags</field>
   <field type="uint8_t" name="system_status" enum="MAV_STATE">System status flag.</field>
   <field type="uint8_t_mavlink_version" name="mavlink_version">MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version</field>
</message>
```

And generate CSharp file, like this:

<pre class="language-csharp"><code class="lang-csharp"><strong>    /// &#x3C;summary>
</strong>    ///  HEARTBEAT
    /// &#x3C;/summary>
    public class HeartbeatPayload : IPayload
    {
        public byte GetMaxByteSize() => 9; // Sum of byte sized of all fields (include extended)
        public byte GetMinByteSize() => 9; // of byte sized of fields (exclude extended)
        public int GetByteSize()
        {
            var sum = 0;
            sum+=4; //CustomMode
            sum+= 1; // Type
            sum+= 1; // Autopilot
            sum+= 1; // BaseMode
            sum+= 1; // SystemStatus
            sum+=1; //MavlinkVersion
            return (byte)sum;
        }
        public void Deserialize(ref ReadOnlySpan&#x3C;byte> buffer)
        {
            CustomMode = BinSerialize.ReadUInt(ref buffer);
            Type = (MavType)BinSerialize.ReadByte(ref buffer);
            Autopilot = (MavAutopilot)BinSerialize.ReadByte(ref buffer);
            BaseMode = (MavModeFlag)BinSerialize.ReadByte(ref buffer);
            SystemStatus = (MavState)BinSerialize.ReadByte(ref buffer);
            MavlinkVersion = (byte)BinSerialize.ReadByte(ref buffer);
        }

        public void Serialize(ref Span&#x3C;byte> buffer)
        {
            BinSerialize.WriteUInt(ref buffer,CustomMode);
            BinSerialize.WriteByte(ref buffer,(byte)Type);
            BinSerialize.WriteByte(ref buffer,(byte)Autopilot);
            BinSerialize.WriteByte(ref buffer,(byte)BaseMode);
            BinSerialize.WriteByte(ref buffer,(byte)SystemStatus);
            BinSerialize.WriteByte(ref buffer,(byte)MavlinkVersion);
            /* PayloadByteSize = 9 */;
        }
        /// &#x3C;summary>
        /// A bitfield for use for autopilot-specific flags
        /// OriginName: custom_mode, Units: , IsExtended: false
        /// &#x3C;/summary>
        public uint CustomMode { get; set; }
        /// &#x3C;summary>
        /// Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type.
        /// OriginName: type, Units: , IsExtended: false
        /// &#x3C;/summary>
        public MavType Type { get; set; }
        /// &#x3C;summary>
        /// Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers.
        /// OriginName: autopilot, Units: , IsExtended: false
        /// &#x3C;/summary>
        public MavAutopilot Autopilot { get; set; }
        /// &#x3C;summary>
        /// System mode bitmap.
        /// OriginName: base_mode, Units: , IsExtended: false
        /// &#x3C;/summary>
        public MavModeFlag BaseMode { get; set; }
        /// &#x3C;summary>
        /// System status flag.
        /// OriginName: system_status, Units: , IsExtended: false
        /// &#x3C;/summary>
        public MavState SystemStatus { get; set; }
        /// &#x3C;summary>
        /// MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version
        /// OriginName: mavlink_version, Units: , IsExtended: false
        /// &#x3C;/summary>
        public byte MavlinkVersion { get; set; }
    }
</code></pre>

## CLI: Ftp tree

This command provides a tree representation of all available files and directories on the drone's FTP server. It allows users to see the entire file structure in a hierarchical format, making it easy to browse and understand the file layout without navigating through individual folders.

```bash
Asv.Mavlink.Shell.exe ftp-tree -cs tcp://127.0.0.1:5760
```

### Features:

* Display the full directory structure of the drone's file system in a tree format.
* Automatically refreshes and loads the / and @SYS directories.
* Displays directories and files with visual guides for better clarity.

You may also use some parameters in the command.

```bash
Usage: ftp-tree [options...] [-h|--help] [--version]

Tree representation of all available files and directories on the drones FTP server

Options:
-cs|--connection <string>    The address of the connection to the mavlink device (Required)
```

<figure><img src="/files/RHpNYtZ0QvB485hslBFR" alt=""><figcaption><p>Asv.Mavlink.Shell.exe ftp-tree output</p></figcaption></figure>

## CLI: Ftp browser

This command is a file manager for interacting with a drone's file system via FTP. It allows users to browse directories, view files, and perform various file operations (e.g., download, rename, remove, etc.) in an interactive console environment. The tool is designed for MAVLink-based systems and provides an intuitive way to manage the drone’s files and directories.

```bash
Asv.Mavlink.Shell.exe ftp-browser -cs tcp://127.0.0.1:5760
```

### Features:

* FTP Connection: The command connects to a drone via TCP using a specified connection string, establishing an FTP client for file interactions.
* Tree Navigation: The file system is presented in a hierarchical structure using a tree model. The user can browse through directories interactively.
* File and Directory Operations: The user can:
  * Open directories.
  * Remove, rename, or create directories.
  * Perform file operations such as downloading, removing, truncating, renaming, and calculating CRC32.

<figure><img src="/files/XGroWx2sGwojY5Gm8aS8" alt=""><figcaption><p>Asv.Mavlink.Shell.exe ftp-browser output</p></figcaption></figure>

You may also use some parameters in the command.

```bash
Usage: ftp-browser [options...] [-h|--help] [--version]

File manager for interacting with a drones file system via FTP

Options:
  -cs|--connection <string>    The address of the connection to the mavlink device (Required)
```

## CLI: Export sdr data

This command extracts SDR (Software Defined Radio) data from a binary file and exports it into a CSV format. The SDR data is deserialized using the AsvSdrRecordDataLlzPayload class, and each record is written as a row in the CSV file with specific data fields such as altitude, signal strength, and power levels.

### Features:

* Reads binary SDR data from an input file.
* Exports the data to a CSV file for further analysis or storage.
* Provides a simple and automated way to convert SDR logs into human-readable tabular data.

```bash
Asv.Mavlink.Shell.exe export-sdr
```

You may also use some parameters in the command.

```bash
Usage: export-sdr [options...] [-h|--help] [--version]

Export sdt data to csv format

Options:
-i|--input-file <string>     Input file (Required)
-o|--output-file <string>    Output file (Default: @"out.csv")
```

<figure><img src="https://github.com/asv-soft/asv-drones-docs/blob/main/.gitbook/assets" alt=""><figcaption><p>Asv.Mavlink.Shell.exe export-sdr</p></figcaption></figure>

## CLI: Mavlink

This command listens to incoming MAVLink packets and displays statistics on the received messages. It allows monitoring of the communication between a ground station and an unmanned vehicle, showing information like the frequency of each type of message and the last few received packets.

### Features:

* Connects to a MAVLink stream via the provided connection string.
* Displays statistics such as message ID, message frequency, and the last received packets
* Continually updates the display with real-time data and allows the user to stop the process by pressing 'Q'.

```bash
Asv.Mavlink.Shell.exe mavlink
```

You may also use some parameters in the command.

```bash
Usage: mavlink [options...] [-h|--help] [--version]

Listen MAVLink packages and print statistic

Options:
  -cs|--connection <string>    Connection string. Default "tcp://127.0.0.1:5760" (Default: null)
```

<figure><img src="/files/XX7e643mnsQ41yyuimtw" alt=""><figcaption><p>Asv.Mavlink.Shell.exe mavlink</p></figcaption></figure>

## CLI: Proxy

This command is used to connect a vehicle with multiple ground stations, creating a hub that routes MAVLink messages between them. It provides flexible filtering options to log specific MAVLink messages, and can output the filtered data to a file. It supports multiple connections (UDP or serial) and can operate in silent mode (without printing to the console).

### Features:

* Connects to multiple MAVLink streams, allowing you to route messages between different systems (e.g., vehicle and multiple ground stations).
* Supports filtering by system ID, message ID, message name (using regex), and message content (JSON text).
* Can log filtered MAVLink messages to a file.
* Allows disabling console output for silent operation.
* Automatically propagates MAVLink messages between the connected links.

```bash
Asv.Mavlink.Shell.exe proxy -l tcp://127.0.0.1:5762 -l tcp://127.0.0.1:7341 -o out.txt
```

You may also use some parameters in the command.

```bash
Usage: proxy [options...] [-h|--help] [--version]

Used for connecting vehicle and several ground station
     Example: proxy -l udp://192.168.0.140:14560 -l udp://192.168.0.140:14550 -o out.txt

Options:
  -l|--links <string[]>            Add connection to hub. Can be used multiple times. Example: udp://192.168.0.140:45560 or serial://COM5?br=57600 (Required)
  -o|--output-file <string>        Write filtered message to file (Default: null)
  -silent|--silent                 Disable print filtered message to screen (Optional)
  -sys|--sys-ids <int[]>           Filter for logging: system id field (Example: -sys 1 -sys 255) (Default: null)
  -id|--msg-ids <int[]>            Filter for logging: message id field (Example: -id 1 -mid 255) (Default: null)
  -name|--name-pattern <string>    Filter for logging: regex message name filter (Example: -name MAV_CMD_D) (Default: null)
  -txt|--text-pattern <string>     Filter for logging: regex json text filter (Example: -txt MAV_CMD_D) (Default: null)
  -from|--directions <int[]>       Filter for packet direction: select only input packets from the specified direction (Default: null)
```

## CLI: Benchmark-serialization

This command benchmarks the serialization and deserialization performance of MAVLink packets. It uses BenchmarkDotNet to measure the efficiency of the serialization process, focusing on how MAVLink packets are serialized and deserialized using spans.### Features:

* Connects to multiple MAVLink streams, allowing you to route messages between different systems (e.g., vehicle and multiple ground stations).
* Supports filtering by system ID, message ID, message name (using regex), and message content (JSON text).
* Can log filtered MAVLink messages to a file.
* Allows disabling console output for silent operation.
* Automatically propagates MAVLink messages between the connected links.

```bash
Asv.Mavlink.Shell.exe benchmark-serialization
```

<figure><img src="/files/pwvT3KQJHzPFuDBYNnk3" alt=""><figcaption><p>Asv.Mavlink.Shell.exe benchmark-serialization</p></figcaption></figure>

## CLI: Devices info

This command shows info about the mavlink device and all other mavlink devices that are connected to it.

```bash
Asv.Mavlink.Shell.exe devices-info -cs "tcp://127.0.0.1:7341"
```

![image](https://github.com/asv-soft/asv-drones-docs/blob/main/.gitbook/assets/asv-drones-mavlink-devices-info-command.png?raw=true)

You may also use some parameters in the command to customise the output

```bash
Usage: devices-info [options...] [-h|--help] [--version]

Command that shows info about devices in the mavlink network

Options:
-cs|--connection-string <string>    The address of the connection to the mavlink device (Required)
-i|--iterations <uint?>             States how many iterations should the program work through (Default: null)
-dt|--devices-timeout <uint>        (in seconds) States the lifetime of a mavlink device that shows no Heartbeat (Default: 10)
-r|--refresh-rate <uint>            (in ms) States how fast should the console be refreshed (Default: 3000)
```

Full possible command with all the parameters

```bash
Asv.Mavlink.Shell.exe devices-info -cs "tcp://127.0.0.1:7341" -i 400 -dt 20 -r 1000
```

## CLI: Print Vehicle State

```bash
Asv.Mavlink.Shell.exe print-vehicle-state --connection tcp://127.0.0.1:5762
```

This command starts the console implementation of UAV controls and Telemetry

**WARNING! Use this command only with simulator because command does not provide full functionality to safe flight. Use this command only for education or introductory purposes**

![image](https://github.com/asv-soft/asv-drones-docs/blob/main/.gitbook/assets/asv-drones-print-vehicle-state.png?raw=true)

Print Vehicle state provides some function to control UAV and also displays some telemetry values such as:

* Link - current state of link between UAV and router;
* Home Position - Point of Start and target of RTL command;
* Global Position - Current UAV location with altitudes MSL(Mean sea level) and AGL (Above ground level);
* Current Azimuth;
* Mavlink Version - version of protocol which operates of process;
* Base Mode - list of base modes supported by current vehicle;
* AutoPilot - Current type of autopilot;
* System Status;
* Type - representation of device type according to MAV\_TYPE;

Table "Log" displays list of recent commands that was executed in CLI.

## CLI: Params command

```bash
Asv.Mavlink.Shell.exe params --connection tcp://127.0.0.1:5762
```

Use this command to see parameters of mavlink devices that available on specified tcp connection.

![image](https://github.com/asv-soft/asv-drones-docs/blob/main/.gitbook/assets/asv-drones-params-command.png?raw=true)

Provides observer of UAV params with navigation and search.

## CLI: Packet Viewer

```bash
Asv.Mavlink.Shell.exe packetviewer --connection tcp://127.0.0.1:5762
```

This command starts the console implementation of packet viewer.

![image](https://github.com/asv-soft/asv-drones-docs/blob/main/.gitbook/assets/asv-drones-mavlink-packets.png?raw=true)

Packet Viewer sets up the Mavlink router and waits for a connection using parameters provided in the command line. Launch a real drone or simulator to connect and start receiving packets from it. Once the connection is established, the packets will be displayed in the "Packets" section below.

It provides the following actions:

* Search for the packet you need;
* Adjust the size of the output;
* Pause the output;
* Safely terminate the execution;

By default, the viewer has no filters enabled and displays all received packets.

## CLI: Generate fake diagnostic data

This command generates fake diagnostic with customizable frequency.

```bash
Asv.Mavlink.Shell.exe generate-diagnostics
```

<figure><img src="/files/0KLFAYM3PqQFRlI4VTUH" alt=""><figcaption></figcaption></figure>

The program generates a default configuration file by default, but you can provide a custom configuration. Simply pass the path to your configuration file as a command-line parameter.

*Note: config is a json file.*

```bash
Asv.Mavlink.Shell.exe generate-diagnostics -cfg "path/to/your/cfg.json"
```

All the possible parameters for the command:

```bash
Usage: generate-diagnostics [options...] [-h|--help] [--version]

Command creates fake diagnostics data from file and opens a mavlink connection.

Options:
  -cfg|--cfg-path <string?>    location of the config file for the generator (Default: null)
  -r|--refresh-rate <uint>     (in ms) States how fast should the console be refreshed (Default: 2000)
```

Full command with all the parameters

```bash
Asv.Mavlink.Shell.exe generate-diagnostics -cfg "path/to/your/cfg.json" -r 3000
```

## CLI: Test diagnostic data

This command creates Diagnostic client and prints all diagnostics that the client retrieves.

```bash
Asv.Mavlink.Shell.exe test-diagnostics -cs tcp://127.0.0.1:7342?srv=true -tsid 1 -tcid 241 -r 3000
```

<figure><img src="/files/qqxPxfLUMsTPGbmWcFYM" alt=""><figcaption></figcaption></figure>

All the possible parameters for the command:

```bash
Command creates diagnostic client that retrieves diagnostic data.

Options:
  -cs|--connection-string <string>      The address of the connection to the mavlink diagnostic server (Required)
  -tsid|--target-system-id <byte>       Server's system id (Required)
  -tcid|--target-component-id <byte>    Server's component id (Required)
  -r|--refresh-rate <uint>              (in ms) States how fast should the console be refreshed (Default: 1000)

```

## CLI: Create Virtual Ftp server

This command creates ftp server and opens connection to it.

```bash
Asv.Mavlink.Shell.exe run-ftp-server
```

<figure><img src="/files/aa84ZnRLegcsGl4zTOrV" alt=""><figcaption></figcaption></figure>

The program generates a default configuration file by default, but you can provide a custom configuration. Simply pass the path to your configuration file as a command-line parameter.

*Note: config is a json file.*

```bash
Asv.Mavlink.Shell.exe run-ftp-server -cfg "path/to/your/cfg.json"
```

All the possible parameters for the command:

```bash
Usage: run-ftp-server [options...] [-h|--help] [--version]

Command creates virtual ftp server.

Options:
  -cfg|--cfg-path <string?>    location of the config file (Default: null)
```


# Asv.Gnss


# Asv.Avalonia.Toolkit


# Asv.Avalonia.Map


# Asv.Ulog


# Asv.Audio


# Asv.Hal


# Asv.Cfg


# For Users

Based on the features and capabilities of Asv.Drones, here are some potential use cases:

1. **Precision Agriculture:**
   * Utilize the software for agricultural purposes, enabling farmers to plan drone missions for crop monitoring, pest control, and assessing overall crop health.
2. **Infrastructure Inspection:**
   * Conduct detailed inspections of infrastructure such as bridges, power lines, and pipelines. Plan missions to capture high-resolution images and videos for inspection and analysis.
3. **Search and Rescue Operations:**
   * Deploy drones in search and rescue missions. Use the software to plan efficient routes, monitor telemetry data, and coordinate multiple drones for comprehensive coverage.
4. **Environmental Monitoring:**
   * Employ drones for environmental monitoring tasks, including tracking wildlife, assessing ecosystem health, and monitoring natural disasters. The software facilitates mission planning for systematic data collection.
5. **Security and Surveillance:**
   * Enhance security measures by using drones for surveillance. Plan and execute missions to monitor large areas, detect anomalies, and ensure the safety of critical infrastructure.
6. **Education and Training:**
   * Integrate the software into educational programs and training sessions for drone pilots. Use the simulator feature for mission planning exercises, allowing users to practice various scenarios.
7. **Telecommunications Tower Inspection:**
   * Streamline the inspection of telecommunications towers by planning drone missions to capture detailed images and videos for maintenance and structural analysis.
8. **Wildlife Conservation:**
   * Contribute to wildlife conservation efforts by using drones to monitor endangered species, track animal migration patterns, and assess the impact of environmental changes.
9. **Event Monitoring:**
   * Employ drones to monitor large-scale events, ensuring crowd safety, traffic management, and overall event coordination. Plan missions for real-time surveillance and situational awareness.
10. **Mapping and Surveying:**
    * Facilitate mapping and surveying tasks by planning drone missions for topographical mapping, land surveying, and construction site monitoring.
11. **Research and Development:**
    * Support research initiatives by providing a platform for researchers to collect data through drone missions. The software enables precise planning and execution of data collection tasks.
12. **Emergency Response:**
    * Use drones in emergency response scenarios to assess disaster-affected areas, deliver medical supplies, and support first responders. The software aids in efficient mission planning for quick and effective response.


# For Developers

## For developers

## Contributing

We would love for you to contribute to our projects and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow:

* [Submission Guidelines](#submit)
* [Missing a feature?](#feature)
* [Coding rules](#rules)
* [Commit Message Guidelines](#commit)
* [Branches naming](#branches)
* [Semantic versioning](#semver)

### Found a Bug? <a href="#issue" id="issue"></a>

If you find a bug in the source code, you can help us by [submitting an issue](#submit-issue) to our [GitHub Repository](https://github.com/asv-soft). Even better, you can submit a Pull Request with a fix.

### Missing a Feature? <a href="#feature" id="feature"></a>

You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub Repository. If you would like to *implement* a new feature, please consider the size of the change in order to determine the right steps to proceed:

* For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed. This process allows us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.

  **Note**: Adding a new topic to the documentation, or significantly re-writing a topic, counts as a major feature.
* **Small Features** can be crafted and directly submitted as a Pull Request.

### Submission Guidelines <a href="#submit" id="submit"></a>

#### Submitting an Issue <a href="#submit-issue" id="submit-issue"></a>

Before you submit an issue, please search the issue tracker. An issue for your problem might already exist and the discussion might inform you of workarounds readily available.

We want to fix all the issues as soon as possible, but before fixing a bug, we need to reproduce and confirm it. In order to reproduce bugs, we require that you provide a minimal reproduction. Having a minimal reproducible scenario gives us a wealth of important information without going back and forth to you with additional questions.

A minimal reproduction allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are fixing the right problem.

We require a minimal reproduction to save maintainers' time and ultimately be able to fix more bugs. Often, developers find coding problems themselves while preparing a minimal reproduction. We understand that sometimes it might be hard to extract essential bits of code from a larger codebase, but we really need to isolate the problem before we can fix it.

Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you, we are going to close an issue that doesn't have enough info to be reproduced.

### Coding Rules <a href="#rules" id="rules"></a>

To ensure consistency throughout the source code, keep these rules in mind as you are working:

* All features or bug fixes **must be tested** by one or more specs (unit-tests).
* All public API methods **must be documented**.

### Commit Message Format <a href="#commit" id="commit"></a>

*This specification is inspired by and supersedes the* [*AngularJS commit message format*](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit)*.*

We have very precise rules over how our Git commit messages must be formatted. This format leads to **easier to read commit history**.

Each commit message consists of a **header**, a **body**, and a **footer**.

```
<header>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```

The `header` is mandatory and must conform to the [Commit Message Header](#commit-header) format.

The `body` is mandatory for all commits except for those of type "docs". When the body is present it must be at least 20 characters long and must conform to the [Commit Message Body](#commit-body) format.

The `footer` is mandatory for all commits. The [Commit Message Footer](#commit-footer) format describes what the footer is used for and the structure it must have.

**Commit Message Header**

```
<type>(<scope>): <short summary>
  │       │             │
  │       │             └─⫸ Summary in present tense. Not capitalized. No period at the end.
  │       │
  │       └─⫸ Commit Scope: asv-common|asv-common-test|asv-cfg|asv-cfg-test|asv-drones|asv-drones-docs|asv-drones-gui|asv-drones-gbs| ... etc
  │
  └─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
```

The `<type>` and `<summary>` fields are mandatory, the `(<scope>)` field is optional.

**Type**

Must be one of the following:

* **build**: Changes that affect the build system or external dependencies
* **ci**: Changes to our CI configuration files and scripts
* **docs**: Documentation only changes
* **feat**: A new feature
* **fix**: A bug fix
* **perf**: A code change that improves performance
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **test**: Adding missing tests or correcting existing tests

**Scope**

The scope should be the name of the project affected (as perceived by the person reading the changelog generated from commit messages). If the scope of changes is project scope you can skip writing this. For all other scopes - you can skip main project scope e.g: asv-drones-gui-core -> core.

The following is the list of supported scopes:

* `asv-common`
* `asv-common-test`
* `asv-cfg`
* `asv-cfg-test`
* `asv-drones`
* `asv-drones-docs`
* `asv-drones-gui`
* `asv-drones-gbs`
* `asv-drones-gui-core`
* `asv-drones-gui-gbs`
* `asv-drones-gui-map`
* `asv-drones-gui-sdr`
* `asv-drones-gui-uav`
* `asv-gnss`
* `asv-gnss-prometheus`
* `asv-gnss-shell`
* `asv-gnss-test`
* `asv-io`
* `asv-io-test`
* `asv-mavlink`
* `asv-mavlink-shell`
* `asv-mavlink-test`
* `asv-store`
* `asv-store-test`

**Summary**

Use the summary field to provide a succinct description of the change:

* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize the first letter
* no dot (.) at the end

**Commit Message Body**

Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".

Explain the motivation for the change in the commit message body. This commit message should explain *why* you are making the change. You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.

**Commit Message Footer**

The footer can contain information about breaking changes and deprecations and is also the place to reference GitHub issues, Asana tickets, and other PRs that this commit closes or is related to. For example:

```
BREAKING CHANGE: <breaking change summary>
<BLANK LINE>
<breaking change description + migration instructions>
<BLANK LINE>
<BLANK LINE>
Fixes #<issue number>
```

or

```
DEPRECATED: <what is deprecated>
<BLANK LINE>
<deprecation description + recommended update path>
<BLANK LINE>
<BLANK LINE>
Closes #<pr number>
```

Breaking Change section should start with the phrase "BREAKING CHANGE: " followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.

Similarly, a Deprecation section should start with "DEPRECATED: " followed by a short description of what is deprecated, a blank line, and a detailed description of the deprecation that also mentions the recommended update path.

Every commit must contain footer, for our team developers footer must contain reference of a task in Asana, for common contributors - reference of an issue on GitHub.

For example:

Our team commit:

```
fix(asv-drones-gui-uav): change drones goto functionality

Change scope of some variables of an anchor to public

Asana: https://app.asana.com/0/12345678901234/1234567890123456/f 
```

Common contributor commit:

```
fix(asv-drones-gui-uav): change drones goto functionality

Change scope of some variables of an anchor to public

Issue: https://github.com/asv-soft/asv-drones/issues/1234   
```

#### Revert commits

If the commit reverts a previous commit, it should begin with `revert:` , followed by the header of the reverted commit.

The content of the commit message body should contain:

* information about the SHA of the commit being reverted in the following format: `This reverts commit <SHA>`,
* a clear description of the reason for reverting the commit message.

### Branches naming <a href="#branches" id="branches"></a>

There is a short list of branch names to create:

* (Feature) - used when adding new functionality on branch
* (Hotfix) - used when fixing existed functionality on branch

### Semantic versioning <a href="#semver" id="semver"></a>

We use semantic versioning in our projects. If you want to read more about it - try visit [this site](https://semver.org/).


