Asv.Mavlink 3.10.5

dotnet add package Asv.Mavlink --version 3.10.5                
NuGet\Install-Package Asv.Mavlink -Version 3.10.5                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Asv.Mavlink" Version="3.10.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Asv.Mavlink --version 3.10.5                
#r "nuget: Asv.Mavlink, 3.10.5"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Asv.Mavlink as a Cake Addin
#addin nuget:?package=Asv.Mavlink&version=3.10.5

// Install Asv.Mavlink as a Cake Tool
#tool nuget:?package=Asv.Mavlink&version=3.10.5                

linkedin

Introduction

The 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 for simulating, testing and code generation.

This library is part of the open-source cross-platform application for drones Asv Drones.

Installation

To install the asv-mavlink library, you can use the following command:

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

Documentation

Documentation can be found here

Example: Emulate ADSB reciever

This command starts a virtual ADS-B receiver that sends ADSB_VEHICLE packets at a specified rate for every vehicle defined in the configuration file.

Asv.Mavlink.Shell.exe adsb --cfg=adsb.json

image

Here's an example of ADSB utility being used with Asv.Drones.

image

Here's an example of ADSB utility being used with Mission Planner

image

Example: Packet code generation

Generate C# code for packet serialization\deserialization

Asv.Mavlink.Shell.exe gen -t=[mavlink-xml-file] -i=[mavlink-xml-folder] -o=[output-folder] -e=cs [path-to-liquid-template]/csharp.tpl
   /// <summary>
    ///  HEARTBEAT
    /// </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<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<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 */;
        }
        ...
    }

CLI: Devices info

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

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

image

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

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

Asv.Mavlink.Shell.exe devices-info -cs "tcp://127.0.0.1:7341" -i 400 -dt 20 -r 1000
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Asv.Mavlink:

Package Downloads
Asv.Mavlink.Vehicle

Mavlink library for .NET 6.0, .NET 7.0 for vehicle control Px4, Ardupilot

Asv.Mavlink.Payload

Mavlink library for .NET 6.0, .NET 7.0 for vehicle control Px4, Ardupilot

Asv.Mavlink.Gbs

Mavlink library for .NET 6.0, .NET 7.0 for controlling ground base station with RTK support

Asv.Mavlink.Sdr

Mavlink library for .NET 6.0, .NET 7.0 for controlling SDR payload

Asv.Drones.Gui.Api

API reference for Asv.Drones GUI application

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Asv.Mavlink:

Repository Stars
asv-soft/asv-drones
Open source implementation of ground control station application for ArduPilot and PX4 autopilot
Version Downloads Last updated
3.10.5 72 12/7/2024
3.10.3 264 8/20/2024
3.10.2 207 7/5/2024
3.10.0 342 7/3/2024
3.9.2 193 6/19/2024
3.9.1 116 6/16/2024
3.9.0 136 6/10/2024
3.8.0-alpha06 193 5/14/2024
3.8.0-alpha05 89 5/14/2024
3.8.0-alpha03 82 5/13/2024
3.8.0-alpha02 64 5/2/2024
3.8.0-alpha01 121 4/17/2024
3.7.1 223 3/26/2024
3.7.0 156 3/2/2024
3.7.0-alpha02 242 1/19/2024
3.7.0-alpha01 104 1/8/2024
3.6.0-alpha13 132 12/29/2023
3.6.0-alpha12 150 12/18/2023
3.6.0-alpha11 230 12/7/2023
3.6.0-alpha10 102 12/7/2023
3.6.0-alpha09 113 12/6/2023
3.6.0-alpha08 221 11/28/2023
3.6.0-alpha07 156 11/22/2023
3.6.0-alpha06 114 11/21/2023
3.6.0-alpha05 110 11/21/2023
3.6.0-alpha04 95 11/20/2023
3.6.0-alpha03 91 11/20/2023
3.6.0-alpha02 99 11/20/2023
3.6.0-alpha01 101 11/20/2023
3.5.0-alpha10 126 11/14/2023
3.5.0-alpha09 105 11/14/2023
3.5.0-alpha08 99 11/13/2023
3.5.0-alpha07 99 11/13/2023
3.5.0-alpha06 100 11/8/2023
3.5.0-alpha05 101 11/8/2023
3.5.0-alpha04 104 11/8/2023
3.5.0-alpha03 114 11/6/2023
3.5.0-alpha02 122 11/4/2023
3.5.0-alpha01 115 11/4/2023
3.4.2-alpha11 132 10/25/2023
3.4.2-alpha10 148 10/7/2023
3.4.2-alpha09 121 10/7/2023
3.4.2-alpha08 124 10/7/2023
3.4.2-alpha07 122 10/5/2023
3.4.2-alpha06 119 10/5/2023
3.4.2-alpha05 122 10/5/2023
3.4.2-alpha04 112 10/5/2023
3.4.2-alpha03 115 10/4/2023
3.4.2-alpha02 117 10/4/2023
3.4.2-alpha01 119 10/3/2023
3.4.1 299 9/30/2023
3.4.0 157 9/30/2023
3.3.8 160 9/16/2023
3.3.7 209 9/14/2023
3.3.6 154 9/11/2023
3.3.5-alpha-07 145 9/4/2023
3.3.5-alpha-06 125 8/31/2023
3.3.5-alpha-05 117 8/25/2023
3.3.5-alpha-04 109 8/24/2023
3.3.5-alpha-03 127 8/22/2023
3.3.4 168 8/18/2023
3.3.3 214 8/14/2023
3.3.2 218 8/10/2023
3.3.1-alpha-05 157 8/8/2023
3.3.1-alpha-04 124 8/8/2023
3.3.1-alpha-03 148 8/4/2023
3.3.1-alpha-01 141 8/4/2023
3.3.0 169 8/4/2023
3.2.5-alpha-20 143 8/2/2023
3.2.5-alpha-18 162 7/10/2023
3.2.5-alpha-17 141 7/5/2023
3.2.5-alpha-16 207 7/3/2023
3.2.5-alpha-15 143 7/3/2023
3.2.5-alpha-14 155 6/27/2023
3.2.5-alpha-13 142 6/23/2023
3.2.5-alpha-10 128 6/20/2023
3.2.5-alpha-07 153 6/20/2023
3.2.5-alpha-06 148 5/18/2023
3.2.5-alpha-05 124 5/18/2023
3.2.5-alpha-04 149 5/16/2023
3.2.5-alpha-02 133 5/9/2023
3.2.3 379 4/24/2023
3.2.2 190 4/23/2023
3.2.1 179 4/22/2023
3.2.0 183 4/22/2023
3.1.0 204 4/17/2023
3.0.2 220 4/17/2023
3.0.0 212 4/16/2023
2.1.2 389 4/11/2023
2.1.1 395 4/5/2023
2.1.0 351 4/5/2023
2.0.4 330 3/28/2023
2.0.3 307 3/28/2023
2.0.2 329 3/27/2023
2.0.1 339 3/23/2023
2.0.0 348 3/22/2023
1.2.2 384 3/21/2023
1.2.1 362 3/21/2023
1.2.0 350 3/20/2023
1.1.11 301 3/20/2023
1.1.10 498 2/27/2023
1.1.9 407 2/27/2023
1.1.7 420 2/27/2023
1.1.6 485 2/19/2023
1.1.5 437 2/19/2023
1.1.4 438 2/14/2023
1.1.3 704 11/14/2022
1.1.2 683 11/9/2022
1.1.1 674 11/7/2022
1.1.0 698 10/31/2022
1.0.0 888 9/21/2022