GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bluenviron/gomavlib: Mavlink library (2.0 and 1.0) for the Go programming language

BranchesTags
Open more actions menu

Latest commit

 

History

1,176 Commits
1,176 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
cmd
cmd
 
 
examples
examples
 
 
pkg
pkg
 
 
scripts
scripts
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.golangci.yml
.golangci.yml
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
channel.go
channel.go
 
 
channel_provider.go
channel_provider.go
 
 
endpoint.go
endpoint.go
 
 
endpoint_custom_client.go
endpoint_custom_client.go
 
 
endpoint_custom_client_test.go
endpoint_custom_client_test.go
 
 
endpoint_custom_server.go
endpoint_custom_server.go
 
 
endpoint_custom_server_test.go
endpoint_custom_server_test.go
 
 
endpoint_serial.go
endpoint_serial.go
 
 
endpoint_serial_test.go
endpoint_serial_test.go
 
 
endpoint_tcp_client.go
endpoint_tcp_client.go
 
 
endpoint_tcp_client_test.go
endpoint_tcp_client_test.go
 
 
endpoint_tcp_server.go
endpoint_tcp_server.go
 
 
endpoint_tcp_server_test.go
endpoint_tcp_server_test.go
 
 
endpoint_udp_broadcast.go
endpoint_udp_broadcast.go
 
 
endpoint_udp_broadcast_test.go
endpoint_udp_broadcast_test.go
 
 
endpoint_udp_client.go
endpoint_udp_client.go
 
 
endpoint_udp_client_test.go
endpoint_udp_client_test.go
 
 
endpoint_udp_server.go
endpoint_udp_server.go
 
 
endpoint_udp_server_test.go
endpoint_udp_server_test.go
 
 
events.go
events.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
node.go
node.go
 
 
node_heartbeat.go
node_heartbeat.go
 
 
node_heartbeat_test.go
node_heartbeat_test.go
 
 
node_stream_request.go
node_stream_request.go
 
 
node_stream_request_test.go
node_stream_request_test.go
 
 
node_test.go
node_test.go
 
 
version.go
version.go
 
 

Repository files navigation

gomavlib

Test Lint CodeCov PkgGoDev

gomavlib is a library that implements the Mavlink protocol (2.0 and 1.0) in the Go programming language. It can interact with Mavlink-capable devices through a serial port, UDP, TCP or a custom transport, and it can be used to power UGVs, UAVs, ground stations, monitoring systems or routers.

Mavlink is a lightweight and transport-independent protocol that is mostly used to communicate with unmanned ground vehicles (UGV) and unmanned aerial vehicles (UAV, drones, quadcopters, multirotors). It is supported by the most popular open-source flight controllers (Ardupilot and PX4).

This library powers the mavp2p router.

Features:

  • Create Mavlink nodes able to communicate with other nodes.
    • Supported transports: serial, UDP (server, client or broadcast mode), TCP (server or client mode), custom reader/writer.
    • Support both domain names and IPs.
    • Emit heartbeats automatically.
    • Send automatic stream requests to Ardupilot devices (disabled by default).
  • Decode and encode Mavlink v2.0 and v1.0.
    • Compute and validate checksums.
    • Support all v2 features: empty-byte truncation, signatures, message extensions.
  • Use dialects in multiple ways.
    • Ready-to-use standard dialects are available in directory dialects/.
    • Custom dialects can be defined. Aa dialect generator is available in order to convert XML definitions into their Go representation.
    • Use no dialect at all. Messages can be routed without having their content decoded.
  • Read and write telemetry logs (tlog)

Table of contents

  • Installation
  • Examples
  • API Documentation
  • Dialect generation
  • Specifications
  • Links

Installation

  1. Install Go ≥ 1.26.

  2. Create an empty folder, open a terminal in it and initialize the Go modules system:

    go mod init main
    
  3. Download one of the example files and place it in the folder.

  4. Compile and run:

    go run name-of-the-go-file.go
    

Examples

  • node-endpoint-serial
  • node-endpoint-udp-server
  • node-endpoint-udp-client
  • node-endpoint-udp-broadcast
  • node-endpoint-tcp-server
  • node-endpoint-tcp-client
  • node-endpoint-custom-client
  • node-endpoint-custom-server
  • node-message-read
  • node-message-write
  • node-command-microservice
  • node-signature
  • node-dialect-absent
  • node-dialect-custom
  • node-events
  • node-router
  • node-router-edit
  • node-serial-to-json
  • node-stream-requests
  • frame-read-writer
  • telemetry-log

API Documentation

Click to open the API Documentation

Dialect generation

Standard dialects are provided in the pkg/dialects/ folder, but it's also possible to use custom dialects, that can be converted into Go files by running:

go install github.com/bluenviron/gomavlib/v4/cmd/dialect-import@latest
dialect-import my_dialect.xml

Specifications

name area
main website protocol
packet format protocol
common dialect dialects
Golang project layout project layout

Links

Related projects

  • mavp2p

Other Go libraries

  • gobot
  • liamstask/go-mavlink
  • ungerik/go-mavlink
  • SpaceLeap/go-mavlink
  • MAVSDK-Go

Other non-Go libraries

  • official library (C)
  • pymavlink (Python)
  • mavlink.net (C#)
  • rust-mavlink (Rust)
  • node-mavlink (JS)

About

Mavlink library (2.0 and 1.0) for the Go programming language

Topics

gogolanggolang-librarymavlinkmavlink-librarymavlink-protocolmavlink-proxyquadcopteruavugv

Resources

Readme
MIT license
Activity
Custom properties

Stars

202 stars

Watchers

5 watching

Forks

60 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.