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.
<PackageVersion Include="Asv.Mavlink" Version="3.10.5" />
                    
Directory.Packages.props
<PackageReference Include="Asv.Mavlink" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version 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.
#addin nuget:?package=Asv.Mavlink&version=3.10.5
                    
Install Asv.Mavlink as a Cake Addin
#tool nuget:?package=Asv.Mavlink&version=3.10.5
                    
Install Asv.Mavlink as a Cake Tool

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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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 310 12/7/2024
3.10.3 336 8/20/2024
3.10.2 225 7/5/2024
3.10.0 505 7/3/2024
3.9.2 216 6/19/2024
3.9.1 132 6/16/2024
3.9.0 152 6/10/2024
3.8.0-alpha06 199 5/14/2024
3.8.0-alpha05 95 5/14/2024
3.8.0-alpha03 90 5/13/2024
3.8.0-alpha02 69 5/2/2024
3.8.0-alpha01 128 4/17/2024
3.7.1 243 3/26/2024
3.7.0 172 3/2/2024
3.7.0-alpha02 270 1/19/2024
3.7.0-alpha01 110 1/8/2024
3.6.0-alpha13 137 12/29/2023
3.6.0-alpha12 154 12/18/2023
3.6.0-alpha11 235 12/7/2023
3.6.0-alpha10 107 12/7/2023
3.6.0-alpha09 118 12/6/2023
3.6.0-alpha08 228 11/28/2023
3.6.0-alpha07 165 11/22/2023
3.6.0-alpha06 119 11/21/2023
3.6.0-alpha05 115 11/21/2023
3.6.0-alpha04 100 11/20/2023
3.6.0-alpha03 96 11/20/2023
3.6.0-alpha02 103 11/20/2023
3.6.0-alpha01 105 11/20/2023
3.5.0-alpha10 130 11/14/2023
3.5.0-alpha09 110 11/14/2023
3.5.0-alpha08 105 11/13/2023
3.5.0-alpha07 103 11/13/2023
3.5.0-alpha06 104 11/8/2023
3.5.0-alpha05 105 11/8/2023
3.5.0-alpha04 108 11/8/2023
3.5.0-alpha03 119 11/6/2023
3.5.0-alpha02 126 11/4/2023
3.5.0-alpha01 119 11/4/2023
3.4.2-alpha11 136 10/25/2023
3.4.2-alpha10 153 10/7/2023
3.4.2-alpha09 125 10/7/2023
3.4.2-alpha08 128 10/7/2023
3.4.2-alpha07 126 10/5/2023
3.4.2-alpha06 124 10/5/2023
3.4.2-alpha05 126 10/5/2023
3.4.2-alpha04 116 10/5/2023
3.4.2-alpha03 121 10/4/2023
3.4.2-alpha02 127 10/4/2023
3.4.2-alpha01 123 10/3/2023
3.4.1 306 9/30/2023
3.4.0 163 9/30/2023
3.3.8 166 9/16/2023
3.3.7 213 9/14/2023
3.3.6 162 9/11/2023
3.3.5-alpha-07 152 9/4/2023
3.3.5-alpha-06 132 8/31/2023
3.3.5-alpha-05 126 8/25/2023
3.3.5-alpha-04 118 8/24/2023
3.3.5-alpha-03 136 8/22/2023
3.3.4 177 8/18/2023
3.3.3 226 8/14/2023
3.3.2 228 8/10/2023
3.3.1-alpha-05 167 8/8/2023
3.3.1-alpha-04 133 8/8/2023
3.3.1-alpha-03 157 8/4/2023
3.3.1-alpha-01 149 8/4/2023
3.3.0 179 8/4/2023
3.2.5-alpha-20 152 8/2/2023
3.2.5-alpha-18 172 7/10/2023
3.2.5-alpha-17 151 7/5/2023
3.2.5-alpha-16 216 7/3/2023
3.2.5-alpha-15 154 7/3/2023
3.2.5-alpha-14 165 6/27/2023
3.2.5-alpha-13 151 6/23/2023
3.2.5-alpha-10 137 6/20/2023
3.2.5-alpha-07 162 6/20/2023
3.2.5-alpha-06 165 5/18/2023
3.2.5-alpha-05 142 5/18/2023
3.2.5-alpha-04 168 5/16/2023
3.2.5-alpha-02 150 5/9/2023
3.2.3 396 4/24/2023
3.2.2 213 4/23/2023
3.2.1 195 4/22/2023
3.2.0 204 4/22/2023
3.1.0 231 4/17/2023
3.0.2 240 4/17/2023
3.0.0 230 4/16/2023
2.1.2 408 4/11/2023
2.1.1 418 4/5/2023
2.1.0 368 4/5/2023
2.0.4 349 3/28/2023
2.0.3 324 3/28/2023
2.0.2 347 3/27/2023
2.0.1 357 3/23/2023
2.0.0 366 3/22/2023
1.2.2 408 3/21/2023
1.2.1 379 3/21/2023
1.2.0 367 3/20/2023
1.1.11 318 3/20/2023
1.1.10 516 2/27/2023
1.1.9 424 2/27/2023
1.1.7 438 2/27/2023
1.1.6 504 2/19/2023
1.1.5 452 2/19/2023
1.1.4 455 2/14/2023
1.1.3 727 11/14/2022
1.1.2 706 11/9/2022
1.1.1 696 11/7/2022
1.1.0 719 10/31/2022
1.0.0 925 9/21/2022