1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-26 15:54:15 +01:00

Merge remote-tracking branch 'upstream/rel-16.09'

This commit is contained in:
Philippe Renon 2016-12-13 00:37:27 +01:00
commit 4952aa5958
2060 changed files with 107180 additions and 151719 deletions

View File

@ -1,23 +1,14 @@
# *************** OpenPilot commits guidelines *************** # *************** LibrePilot commits guidelines ***************
# Each commit needs to have a message like the following sample: # Each commit needs to have a message like the following sample:
# OP-1150 UI for thermal calibration: Connect State machine to UI # LP-188 Determine AccelTau based on usage
# #
# It needs to begin with a reference to one or more Jira tickets followed by a short description. # It needs to begin with a reference to one or more Jira tickets followed by a short description.
# If needed add a longer description in the following lines, after an empty line. # If needed add a longer description in the following lines, after an empty line.
# #
# Before committing, ensure your code is properly formatted using: # Before committing, ensure your code is properly formatted using:
# make uncrustify_all # make uncrustify_all
# You can format flight or ground code only using respectively # You can format flight or ground code only using respectively
# uncrustify_flight or uncrustify_ground # uncrustify_flight or uncrustify_ground
#
# To automatically create a review, append the following smart commit messages:
# +review OPReview
#
# To append the commit to an existing review, use the following smart commit message:
# +review OPReview-NNN
# For example "+review OPReview-609"
#
# *NOTE* leave an empty line between the commit message and "smart commit command"
# Smart commits commands need to starts immediately at first column

1
.drone.sec Normal file
View File

@ -0,0 +1 @@
eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.UPh8KqupamxDSZ-xztWqWKqG7ur8WGg4dW22PRVGchjWsMa_zyuTEEDkl67z_jdHKkxEerWE8J4sROWVixi_xWvEl7OgXlt7H9c4iWtGTyp7n9ibeS1wgDoYes3LbRu9lRTxiTb-8Y-MgY0zeAHTBIQHmECETKF_CE4QkPHjSQCfbb_chn4vIqryM11-QctxDwysR4VC5AO1uA4hB0RReixOuSQFI-LbuLvBozEgsrYe5dFo7-oQJt7-e2-UFoEhomTPZcWc02NznX-GjlaZxpxQQXra5NyN5--aiL2C8kcPYfnEfU4dYudNsm2tDlnxhBPA1Ji3FnDSBp_ZunsvRQ.GGds6H6tZW_Qzh2T.KjsjOsBbAmfhUIWYXJBMcrChr1ckykuPZ8XERPGWuSoMbXkklHGj0MCehIWNDuLX_wPM1wTvZE8unFJIYwYGybYQ8omAHDGOkEM3YDs6VnJ9Y8zBl6wnvTvtsQsrQWqU8vdodzSP62F81wCDCCauOFewz_gjzl6n_1Ajxj9CqTfCR17Gcuui6nrqkn0A5qikWuZz8qsUaQ94t0qVRWOFcZ4NQMH8NJwZCYW0JAAsvoQOidc2dB5zkwx3pzc2hItmzwZq3uVgWr5RFgp2LzBd.45hdSTLtI4gU9-GjkOlZ1A

48
.drone.yml Normal file
View File

@ -0,0 +1,48 @@
build:
image: teaci/msys$$arch
pull: true
shell: mingw$$arch
commands:
- if [ $$arch = 32 ]; then target=i686; fi
- if [ $$arch = 64 ]; then target=x86_64; fi
- echo -e "[librepilot-mingw]\nSigLevel = Optional TrustAll\nServer = http://download.librepilot.org/repo/mingw" >> /etc/pacman.conf
- pacman -Syu --noconfirm --noprogressbar --needed git unzip tar mingw-w64-${target}-toolchain mingw-w64-${target}-ccache mingw-w64-${target}-qt5 mingw-w64-${target}-SDL mingw-w64-${target}-mesa mingw-w64-${target}-openssl mingw-w64-${target}-gdal-minimal mingw-w64-${target}-OpenSceneGraph mingw-w64-${target}-osgearth
- mingw32-make all_sdk_install
- git config core.filemode false
- mingw32-make build-info && cat build/build-info.txt
- mingw32-make opfw_resource
- mingw32-make gcs
- mingw32-make package
- mv `ls build/LibrePilot-*.exe` build/$$BRANCH-$$COMMIT-$$arch-package.exe
clone:
depth: 1000
tags: true
matrix:
arch:
- 32
- 64
publish:
bintray:
username: marcproe
api_key: $$BINTRAY_API_KEY
artifacts:
- file: build/$$BRANCH-$$COMMIT-$$arch-package.exe
owner: librepilot
type: executable
repository: LibrePilot
package: next
version: Windows
publish: true
override: true
target: $$BRANCH-$${COMMIT:0:6}-$$arch-tea-ci-package.exe
notify:
webhook:
urls:
- https://hooks.slack.com/services/$$SLACK_HOOK
content_type: application/json
template: >
{"text": "Tea-CI Build #{{ build.number }} finished with a {{ build.status }} status. If successful, the packages for {{ build.branch }} $${COMMIT:0:8} can be downloaded <https://bintray.com/librepilot/LibrePilot/next/Windows/view/#files|here>"}

5
.gitattributes vendored
View File

@ -32,3 +32,8 @@
/Makefile text eol=lf /Makefile text eol=lf
# More attributes are defined in per-directory .gitattributes which override this file # More attributes are defined in per-directory .gitattributes which override this file
# Not needed in source distribution for building GCS
/artwork/ export-ignore
/flight/ export-ignore
/hardware/ export-ignore

10
.gitignore vendored
View File

@ -5,8 +5,7 @@
/3rdparty /3rdparty
# Ignore user config # Ignore user config
config /config
# Exclude temporary and system files # Exclude temporary and system files
Thumbs.db Thumbs.db
@ -37,9 +36,10 @@ ground/gcs/.settings
# Ignore .pro.user files # Ignore .pro.user files
*.pro.user *.pro.user
# Misc artifacts # Misc artifacts
*.exe *.exe
*.log
*.opl
/ground/gcs/share/translations/extract-mimetypes.xq /ground/gcs/share/translations/extract-mimetypes.xq
/ground/gcs/src/experimental/tools/DocumentationHelper/ui_mainwindow.h /ground/gcs/src/experimental/tools/DocumentationHelper/ui_mainwindow.h
/ground/gcs/src/libs/qextserialport/.hg /ground/gcs/src/libs/qextserialport/.hg
@ -59,8 +59,8 @@ ground/gcs/.settings
/androidgcs/gen/ /androidgcs/gen/
# Ignore Eclipse Projects and Metadata # Ignore Eclipse Projects and Metadata
/.cproject .cproject
/.project .project
/.metadata /.metadata
/.settings /.settings
/.pydevproject /.pydevproject

22
.travis.yml Normal file
View File

@ -0,0 +1,22 @@
language: cpp
sudo: required
dist: trusty
before_install:
- sudo add-apt-repository ppa:librepilot/tools -y
- sudo apt-get update -q
- sudo apt-get install -y libc6-i386 libudev-dev libusb-1.0-0-dev libsdl1.2-dev python libopenscenegraph-dev libosgearth-dev qt56-meta-minimal qt56svg qt56script qt56serialport qt56multimedia qt56translations qt56tools
- make build_sdk_install
script:
- make config_new CCACHE=ccache
- make all_flight
- make opfw_resource
- make gcs
git:
depth: 500
cache: ccache

View File

@ -1,40 +1,82 @@
How to build from source? # How to build from source?
=========================
Both development environment and GCS are supported on Windows, Linux and Mac OS X Both development environment and GCS are supported on Windows, Linux and Mac OS X.
# Install prerequisites
The first step is to Install all OS specific prerequisites. The first step is to Install all OS specific prerequisites.
###Mac OS X
Install XCode and its relatated command line tools (follow Apple documentation).
Install git, curl and p7zip. You can use brew `brew install git curl p7zip` or macport: `sudo port install git curl p7zip`
###Ubuntu
sudo apt-get install git build-essential curl gdb wget debhelper p7zip-full unzip flex bison libsdl1.2-dev libudev-dev libusb-1.0-0-dev libc6-i386 mesa-common-dev ## Mac OS X
Install XCode and its relatated command line tools (follow Apple documentation). Install git, curl and p7zip.
You can use brew with `brew install git curl p7zip` or macport with `sudo port install git curl p7zip`.
###Windows ## Ubuntu
Install [msysGIT](https://msysgit.github.io/) under `C:\git`
Clone LibrePilot Git repository. sudo apt-get install git build-essential curl gdb wget debhelper p7zip-full unzip flex bison libsdl1.2-dev libudev-dev libusb-1.0-0-dev libc6-i386 mesa-common-dev
Open Git Bash and run
cd /path/to/LibrePilot_root
./make/scripts/win_sdk_install.sh
You can build using the `/path/to/LibrePilot_root/make/winx86/bin/make` wrapper to call `mingw32-make.exe` as: ## Windows
./make/winx86/bin/make all_sdk_install ### Install [Msys2](https://msys2.github.io/)
or call `mingw32-make` directly
mingw32-make all_sdk_install Follow the instructions on the web site. You can either install the i686 (Win32) or x86_64 (Win64) version.
It is recommended to go for the Win64 Shell if possible.
The x86_64 version has both Win32 and Win64 shells and it is possible to build both i686 and x86_64 applications.
##Setup the build environment and build ### Add the LibrePilot MinGW package repository
The `all_sdk_install` target will automatically retrieve and install all needed tools (qt, arm gcc etc.) in a local folder `/path/to/LibrePilot_root/tools`
Add the following lines at the end of your /etc/pacman.conf file:
[librepilot-mingw]
SigLevel = Optional TrustAll
Server = http://download.librepilot.org/repo/mingw
### Install required packages
#### For i686 applications
Start a MinGW-w64 Win64 Shell or a MinGW-w64 Win32 Shell.
pacman -Sy
pacman -S --needed git unzip tar mingw-w64-i686-toolchain mingw-w64-i686-ccache mingw-w64-i686-qt5 mingw-w64-i686-SDL mingw-w64-i686-mesa mingw-w64-i686-openssl mingw-w64-i686-gdal-minimal mingw-w64-i686-OpenSceneGraph mingw-w64-i686-osgearth
Optionally install debug packages:
pacman -S --needed mingw-w64-i686-OpenSceneGraph-debug mingw-w64-i686-osgearth-debug
#### For x86_64 applications
Start a MinGW-w64 Win64 Shell.
pacman -Sy
pacman -S --needed git unzip tar mingw-w64-x86_64-toolchain mingw-w64-x86_64-ccache mingw-w64-x86_64-qt5 mingw-w64-x86_64-SDL mingw-w64-x86_64-mesa mingw-w64-x86_64-openssl mingw-w64-x86_64-gdal-minimal mingw-w64-x86_64-OpenSceneGraph mingw-w64-x86_64-osgearth
Optionally install debug packages:
pacman -S --needed mingw-w64-x86_64-OpenSceneGraph-debug mingw-w64-x86_64-osgearth-debug
**NOTE** On Windows you need to run the mingw version of make, which is `mingw32-make`
# Setup the build environment and build
The `all_sdk_install` target will automatically retrieve and install all needed tools (qt, arm gcc, etc.) in a local folder `/path/to/LibrePilot_root/tools`
## Ubuntu / Mac OS X
make all_sdk_install make all_sdk_install
make package make package
## Windows
mingw32-make all_sdk_install
mingw32-make package
The `package` target will build the complete installable package for the current platform. The `package` target will build the complete installable package for the current platform.
Run make with no arguments to show the complete list of supported targets. You can build the `all` target to just build the software.
Run `make` with no arguments to show the complete list of supported targets.

View File

@ -3,6 +3,7 @@ Sergiy Anikeyev
David Ankers David Ankers
Fredrik Arvidsson Fredrik Arvidsson
Pedro Assuncao Pedro Assuncao
Rafael Bachmann
Werner Backes Werner Backes
Jose Barros Jose Barros
Alex Beck Alex Beck
@ -24,6 +25,7 @@ James Cotton
Kalyn Doerr Kalyn Doerr
Steve Doll Steve Doll
James Duley James Duley
Heikko Ellermaa
Piotr Esden-Tempski Piotr Esden-Tempski
Steve Evans Steve Evans
Peter Farnworth Peter Farnworth
@ -43,6 +45,7 @@ Nuno Guedes
Peter Gunnarsson Peter Gunnarsson
Erik Gustavsson Erik Gustavsson
Dean Hall Dean Hall
Harold Hankins
Joe Hlebasko Joe Hlebasko
Andy Honecker Andy Honecker
Patrick Huebner Patrick Huebner
@ -50,6 +53,7 @@ Ryan Hunt
Mark James Mark James
Paul Jewell Paul Jewell
Michael Johnston Michael Johnston
Mateusz Kaduk
Stefan Karlsson Stefan Karlsson
Ricky King Ricky King
Thorsten Klose Thorsten Klose
@ -68,6 +72,7 @@ Pablo Lema
Matt Lipski Matt Lipski
David Llama David Llama
Jasper Van Loenen Jasper Van Loenen
Ákos Máté
Ben Matthews Ben Matthews
Greg Matthews Greg Matthews
Guy McCaldin Guy McCaldin
@ -79,6 +84,7 @@ Ken Northup
Craig Nuttall Craig Nuttall
Bertrand Oresve Bertrand Oresve
Angus Peart Angus Peart
Pablo Francisco Pérez Hidalgo
John Pike John Pike
Jorge Pombo Marcos Jorge Pombo Marcos
Dmytro Poplavskiy Dmytro Poplavskiy
@ -116,9 +122,12 @@ Kevin Vertucio
Alex Vrubel Alex Vrubel
Mike Walters Mike Walters
Sam Wang Sam Wang
Tianhe Wang
Brian Webb Brian Webb
Justin Welander Justin Welander
Mat Wellington Mat Wellington
Kendal Wells Kendal Wells
David Willis David Willis
Dmitriy Zaitsev Dmitriy Zaitsev
Vladimir Zidar

322
Makefile
View File

@ -78,14 +78,10 @@ endef
define DESCRIPTION_LONG := define DESCRIPTION_LONG :=
The LibrePilot open source project was founded in July 2015. The LibrePilot open source project was founded in July 2015.
It focuses on research and development of software and hardware to be used in a variety of applications including vehicle control and stabilization, unmanned autonomous vehicles and robotics. It focuses on research and development of software and hardware to be used in a variety of applications including vehicle control and stabilization, unmanned autonomous vehicles and robotics.
One of the projects primary goals is to provide an open and collaborative environment making it the ideal home for development of innovative ideas. One of the project's primary goals is to provide an open and collaborative environment making it the ideal home for development of innovative ideas.
endef endef
# Set up default build configurations (debug | release)
GCS_BUILD_CONF := release
GOOGLE_API_VERSION := 14
# Clean out undesirable variables from the environment and command-line # Clean out undesirable variables from the environment and command-line
# to remove the chance that they will cause problems with our build # to remove the chance that they will cause problems with our build
define SANITIZE_VAR define SANITIZE_VAR
@ -110,15 +106,6 @@ $(foreach var, $(SANITIZE_GCC_VARS), $(eval $(call SANITIZE_VAR,$(var),disallowe
SANITIZE_DEPRECATED_VARS := USE_BOOTLOADER CLEAN_BUILD SANITIZE_DEPRECATED_VARS := USE_BOOTLOADER CLEAN_BUILD
$(foreach var, $(SANITIZE_DEPRECATED_VARS), $(eval $(call SANITIZE_VAR,$(var),deprecated))) $(foreach var, $(SANITIZE_DEPRECATED_VARS), $(eval $(call SANITIZE_VAR,$(var),deprecated)))
# Make sure this isn't being run as root unless installing (no whoami on Windows, but that is ok here)
ifeq ($(shell whoami 2>/dev/null),root)
ifeq ($(filter install uninstall,$(MAKECMDGOALS)),)
ifndef FAKEROOTKEY
$(error You should not be running this as root)
endif
endif
endif
# Decide on a verbosity level based on the V= parameter # Decide on a verbosity level based on the V= parameter
export AT := @ export AT := @
ifndef V ifndef V
@ -130,14 +117,7 @@ else ifeq ($(V), 0)
else ifeq ($(V), 1) else ifeq ($(V), 1)
endif endif
# Make sure we know few things about the architecture before including ARCH := $(call get_arch)
# the tools.mk to ensure that we download/install the right tools.
UNAME := $(shell uname)
ARCH := $(shell uname -m)
# Here and everywhere if not Linux or Mac then assume Windows
ifeq ($(filter Linux Darwin, $(UNAME)), )
UNAME := Windows
endif
# Include tools installers # Include tools installers
include $(ROOT_DIR)/make/tools.mk include $(ROOT_DIR)/make/tools.mk
@ -147,18 +127,38 @@ include $(ROOT_DIR)/make/tools.mk
# We almost need to consider autoconf/automake instead of this # We almost need to consider autoconf/automake instead of this
ifeq ($(UNAME), Linux) ifeq ($(UNAME), Linux)
QT_SPEC := linux-g++ UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator GCS_WITH_OSG := 1
GCS_WITH_OSGEARTH := 1
GCS_COPY_OSG := 0
else ifeq ($(UNAME), Darwin) else ifeq ($(UNAME), Darwin)
QT_SPEC := macx-g++ UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator GCS_WITH_OSG := 1
GCS_WITH_OSGEARTH := 0
GCS_COPY_OSG := 1
else ifeq ($(UNAME), Windows) else ifeq ($(UNAME), Windows)
QT_SPEC := win32-g++
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator.exe UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator.exe
GCS_WITH_OSG := 1
GCS_WITH_OSGEARTH := 1
GCS_COPY_OSG := 1
endif endif
export UAVOBJGENERATOR export UAVOBJGENERATOR
# Set up default build configurations (debug | release)
GCS_BUILD_CONF := release
# Set extra configuration
ifeq ($(GCS_WITH_OSG), 1)
GCS_EXTRA_CONF += osg
ifeq ($(GCS_COPY_OSG), 1)
GCS_EXTRA_CONF += copy_osg
endif
ifeq ($(GCS_WITH_OSGEARTH), 1)
GCS_EXTRA_CONF += osgearth
endif
endif
############################## ##############################
# #
# All targets # All targets
@ -192,7 +192,7 @@ uavobjgenerator: $(UAVOBJGENERATOR)
$(UAVOBJGENERATOR): | $(UAVOBJGENERATOR_DIR) $(UAVOBJGENERATOR): | $(UAVOBJGENERATOR_DIR)
$(V1) cd $(UAVOBJGENERATOR_DIR) && \ $(V1) cd $(UAVOBJGENERATOR_DIR) && \
( [ -f Makefile ] || $(QMAKE) $(ROOT_DIR)/ground/uavobjgenerator/uavobjgenerator.pro \ ( [ -f Makefile ] || $(QMAKE) $(ROOT_DIR)/ground/uavobjgenerator/uavobjgenerator.pro \
-spec $(QT_SPEC) CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) ) && \ CONFIG+='$(GCS_BUILD_CONF) $(GCS_EXTRA_CONF)' ) && \
$(MAKE) --no-print-directory -w $(MAKE) --no-print-directory -w
UAVOBJ_TARGETS := gcs flight python matlab java wireshark UAVOBJ_TARGETS := gcs flight python matlab java wireshark
@ -240,7 +240,8 @@ endif
FLIGHT_OUT_DIR := $(BUILD_DIR)/firmware FLIGHT_OUT_DIR := $(BUILD_DIR)/firmware
DIRS += $(FLIGHT_OUT_DIR) DIRS += $(FLIGHT_OUT_DIR)
include $(ROOT_DIR)/flight/Makefile # Might not be here in source package
-include $(ROOT_DIR)/flight/Makefile
############################## ##############################
# #
@ -251,10 +252,8 @@ include $(ROOT_DIR)/flight/Makefile
.PHONY: all_ground .PHONY: all_ground
all_ground: gcs uploader all_ground: gcs uploader
ifeq ($(V), 1) ifneq ($(V), 1)
GCS_SILENT := GCS_EXTRA_CONF += silent
else
GCS_SILENT := silent
endif endif
GCS_DIR := $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF) GCS_DIR := $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)
@ -266,7 +265,7 @@ GCS_MAKEFILE := $(GCS_DIR)/Makefile
gcs_qmake $(GCS_MAKEFILE): | $(GCS_DIR) gcs_qmake $(GCS_MAKEFILE): | $(GCS_DIR)
$(V1) cd $(GCS_DIR) && \ $(V1) cd $(GCS_DIR) && \
$(QMAKE) $(ROOT_DIR)/ground/gcs/gcs.pro \ $(QMAKE) $(ROOT_DIR)/ground/gcs/gcs.pro \
-spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) \ -r CONFIG+='$(GCS_BUILD_CONF) $(GCS_EXTRA_CONF)' \
'GCS_BIG_NAME="$(GCS_BIG_NAME)"' GCS_SMALL_NAME=$(GCS_SMALL_NAME) \ 'GCS_BIG_NAME="$(GCS_BIG_NAME)"' GCS_SMALL_NAME=$(GCS_SMALL_NAME) \
'ORG_BIG_NAME="$(ORG_BIG_NAME)"' ORG_SMALL_NAME=$(ORG_SMALL_NAME) \ 'ORG_BIG_NAME="$(ORG_BIG_NAME)"' ORG_SMALL_NAME=$(ORG_SMALL_NAME) \
'WIKI_URL_ROOT="$(WIKI_URL_ROOT)"' \ 'WIKI_URL_ROOT="$(WIKI_URL_ROOT)"' \
@ -300,7 +299,7 @@ UPLOADER_MAKEFILE := $(UPLOADER_DIR)/Makefile
uploader_qmake $(UPLOADER_MAKEFILE): | $(UPLOADER_DIR) uploader_qmake $(UPLOADER_MAKEFILE): | $(UPLOADER_DIR)
$(V1) cd $(UPLOADER_DIR) && \ $(V1) cd $(UPLOADER_DIR) && \
$(QMAKE) $(ROOT_DIR)/ground/gcs/src/experimental/USB_UPLOAD_TOOL/upload.pro \ $(QMAKE) $(ROOT_DIR)/ground/gcs/src/experimental/USB_UPLOAD_TOOL/upload.pro \
-spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) $(GCS_QMAKE_OPTS) -r CONFIG+='$(GCS_BUILD_CONF) $(GCS_EXTRA_CONF)' $(GCS_QMAKE_OPTS)
.PHONY: uploader .PHONY: uploader
uploader: $(UPLOADER_MAKEFILE) uploader: $(UPLOADER_MAKEFILE)
@ -312,174 +311,6 @@ uploader_clean:
$(V1) [ ! -d "$(UPLOADER_DIR)" ] || $(RM) -r "$(UPLOADER_DIR)" $(V1) [ ! -d "$(UPLOADER_DIR)" ] || $(RM) -r "$(UPLOADER_DIR)"
# We want to take snapshots of the UAVOs at each point that they change
# to allow the GCS to be compatible with as many versions as possible.
# We always include a pseudo collection called "srctree" which represents
# the UAVOs in the source tree. So not necessary to add current tree UAVO
# hash here, it is always included.
# Find the git hashes of each commit that changes uavobjects with:
# git log --format=%h -- shared/uavobjectdefinition/ | head -n 2
# List only UAVO hashes of past releases, do not list current hash.
# Past compatible versions are so far: RELEASE-12.10.2
UAVO_GIT_VERSIONS := 5e14f53
# All versions includes also the current source tree UAVO hash
UAVO_ALL_VERSIONS := $(UAVO_GIT_VERSIONS) srctree
# This is where the UAVO collections are stored
UAVO_COLLECTION_DIR := $(BUILD_DIR)/uavo-collections
# $(1) git hash of a UAVO snapshot
define UAVO_COLLECTION_GIT_TEMPLATE
# Make the output directory that will contain all of the synthetics for the
# uavo collection referenced by the git hash $(1)
$$(UAVO_COLLECTION_DIR)/$(1):
$$(V1) $(MKDIR) -p $$(UAVO_COLLECTION_DIR)/$(1)
# Extract the snapshot of shared/uavobjectdefinition from git hash $(1)
$$(UAVO_COLLECTION_DIR)/$(1)/uavo-xml.tar: | $$(UAVO_COLLECTION_DIR)/$(1)
$$(UAVO_COLLECTION_DIR)/$(1)/uavo-xml.tar:
$$(V0) @$(ECHO) " UAVOTAR $(1)"
$$(V1) $(GIT) archive $(1) -o $$@ -- shared/uavobjectdefinition/
# Extract the uavo xml files from our snapshot
$$(UAVO_COLLECTION_DIR)/$(1)/uavo-xml: $$(UAVO_COLLECTION_DIR)/$(1)/uavo-xml.tar
$$(V0) @$(ECHO) " UAVOUNTAR $(1)"
$$(V1) $(RM) -rf $$@
$$(V1) $(MKDIR) -p $$@
$$(V1) $(TAR) -C $$(call toprel, $$@) -xf $$(call toprel, $$<) || $(RM) -rf $$@
endef
# Map the current working directory into the set of UAVO collections
$(UAVO_COLLECTION_DIR)/srctree:
$(V1) $(MKDIR) -p $@
$(UAVO_COLLECTION_DIR)/srctree/uavo-xml: | $(UAVO_COLLECTION_DIR)/srctree
$(UAVO_COLLECTION_DIR)/srctree/uavo-xml: $(UAVOBJ_XML_DIR)
$(V1) $(LN) -sf $(ROOT_DIR) $(UAVO_COLLECTION_DIR)/srctree/uavo-xml
# $(1) git hash (or symbolic name) of a UAVO snapshot
define UAVO_COLLECTION_BUILD_TEMPLATE
# This leaves us with a (broken) symlink that points to the full sha1sum of the collection
$$(UAVO_COLLECTION_DIR)/$(1)/uavohash: $$(UAVO_COLLECTION_DIR)/$(1)/uavo-xml
# Compute the sha1 hash for this UAVO collection
# The sed bit truncates the UAVO hash to 16 hex digits
$$(V1) $$(VERSION_INFO) \
--uavodir=$$(UAVO_COLLECTION_DIR)/$(1)/uavo-xml/shared/uavobjectdefinition \
--format='$$$${UAVO_HASH}' | \
$(SED) -e 's|\(................\).*|\1|' > $$@
$$(V0) @$(ECHO) " UAVOHASH $(1) ->" $$$$(cat $$(UAVO_COLLECTION_DIR)/$(1)/uavohash)
# Generate the java uavobjects for this UAVO collection
$$(UAVO_COLLECTION_DIR)/$(1)/java-build/java: $$(UAVO_COLLECTION_DIR)/$(1)/uavohash
$$(V0) @$(ECHO) " UAVOJAVA $(1) " $$$$(cat $$(UAVO_COLLECTION_DIR)/$(1)/uavohash)
$$(V1) $(MKDIR) -p $$@
$$(V1) ( \
cd $$(UAVO_COLLECTION_DIR)/$(1)/java-build && \
$$(UAVOBJGENERATOR) -java $$(UAVO_COLLECTION_DIR)/$(1)/uavo-xml/shared/uavobjectdefinition $$(ROOT_DIR) ; \
)
# Build a jar file for this UAVO collection
$$(UAVO_COLLECTION_DIR)/$(1)/java-build/uavobjects.jar: | $$(ANDROIDGCS_ASSETS_DIR)/uavos
$$(UAVO_COLLECTION_DIR)/$(1)/java-build/uavobjects.jar: $$(UAVO_COLLECTION_DIR)/$(1)/java-build/java
$$(V0) @$(ECHO) " UAVOJAR $(1) " $$$$(cat $$(UAVO_COLLECTION_DIR)/$(1)/uavohash)
$$(V1) ( \
HASH=$$$$(cat $$(UAVO_COLLECTION_DIR)/$(1)/uavohash) && \
cd $$(UAVO_COLLECTION_DIR)/$(1)/java-build && \
$(JAVAC) java/*.java \
$$(ROOT_DIR)/androidgcs/src/org/openpilot/uavtalk/UAVDataObject.java \
$$(ROOT_DIR)/androidgcs/src/org/openpilot/uavtalk/UAVObject*.java \
$$(ROOT_DIR)/androidgcs/src/org/openpilot/uavtalk/UAVMetaObject.java \
-d . && \
find ./org/openpilot/uavtalk/uavobjects -type f -name '*.class' > classlist.txt && \
$(JAR) cf tmp_uavobjects.jar @classlist.txt && \
$$(ANDROID_DX) \
--dex \
--output $$(ANDROIDGCS_ASSETS_DIR)/uavos/$$$${HASH}.jar \
tmp_uavobjects.jar && \
$(LN) -sf $$(ANDROIDGCS_ASSETS_DIR)/uavos/$$$${HASH}.jar uavobjects.jar \
)
endef
# One of these for each element of UAVO_GIT_VERSIONS so we can extract the UAVOs from git
$(foreach githash, $(UAVO_GIT_VERSIONS), $(eval $(call UAVO_COLLECTION_GIT_TEMPLATE,$(githash))))
# One of these for each UAVO_ALL_VERSIONS which includes the ones in the srctree
$(foreach githash, $(UAVO_ALL_VERSIONS), $(eval $(call UAVO_COLLECTION_BUILD_TEMPLATE,$(githash))))
.PHONY: uavo-collections_java
uavo-collections_java: $(foreach githash, $(UAVO_ALL_VERSIONS), $(UAVO_COLLECTION_DIR)/$(githash)/java-build/uavobjects.jar)
.PHONY: uavo-collections
uavo-collections: uavo-collections_java
.PHONY: uavo-collections_clean
uavo-collections_clean:
@$(ECHO) " CLEAN $(call toprel, $(UAVO_COLLECTION_DIR))"
$(V1) [ ! -d "$(UAVO_COLLECTION_DIR)" ] || $(RM) -r $(UAVO_COLLECTION_DIR)
##############################
#
# Unit Tests
#
##############################
ALL_UNITTESTS := logfs math lednotification
# Build the directory for the unit tests
UT_OUT_DIR := $(BUILD_DIR)/unit_tests
DIRS += $(UT_OUT_DIR)
.PHONY: all_ut
all_ut: $(addsuffix _elf, $(addprefix ut_, $(ALL_UNITTESTS)))
.PHONY: all_ut_xml
all_ut_xml: $(addsuffix _xml, $(addprefix ut_, $(ALL_UNITTESTS)))
.PHONY: all_ut_run
all_ut_run: $(addsuffix _run, $(addprefix ut_, $(ALL_UNITTESTS)))
.PHONY: all_ut_clean
all_ut_clean:
@$(ECHO) " CLEAN $(call toprel, $(UT_OUT_DIR))"
$(V1) [ ! -d "$(UT_OUT_DIR)" ] || $(RM) -r "$(UT_OUT_DIR)"
# $(1) = Unit test name
define UT_TEMPLATE
.PHONY: ut_$(1)
ut_$(1): ut_$(1)_run
ut_$(1)_%: $$(UT_OUT_DIR)
$(V1) $(MKDIR) -p $(UT_OUT_DIR)/$(1)
$(V1) cd $(ROOT_DIR)/flight/tests/$(1) && \
$$(MAKE) -r --no-print-directory \
BUILD_TYPE=ut \
BOARD_SHORT_NAME=$(1) \
TOPDIR=$(ROOT_DIR)/flight/tests/$(1) \
OUTDIR="$(UT_OUT_DIR)/$(1)" \
TARGET=$(1) \
$$*
.PHONY: ut_$(1)_clean
ut_$(1)_clean:
@$(ECHO) " CLEAN $(call toprel, $(UT_OUT_DIR)/$(1))"
$(V1) [ ! -d "$(UT_OUT_DIR)/$(1)" ] || $(RM) -r "$(UT_OUT_DIR)/$(1)"
endef
# Expand the unittest rules
$(foreach ut, $(ALL_UNITTESTS), $(eval $(call UT_TEMPLATE,$(ut))))
# Disable parallel make when the all_ut_run target is requested otherwise the TAP
# output is interleaved with the rest of the make output.
ifneq ($(strip $(filter all_ut_run,$(MAKECMDGOALS))),)
.NOTPARALLEL:
$(info $(EMPTY) NOTE Parallel make disabled by all_ut_run target so we have sane console output)
endif
############################## ##############################
# #
@ -487,7 +318,7 @@ endif
# #
############################## ##############################
# Firmware files to package # Firmware files to package
PACKAGE_FW_TARGETS := fw_coptercontrol fw_oplinkmini fw_revolution fw_osd fw_revoproto fw_gpsplatinum fw_revonano PACKAGE_FW_TARGETS := fw_coptercontrol fw_oplinkmini fw_revolution fw_osd fw_revoproto fw_gpsplatinum fw_revonano fw_sparky2
# Rules to generate GCS resources used to embed firmware binaries into the GCS. # Rules to generate GCS resources used to embed firmware binaries into the GCS.
# They are used later by the vehicle setup wizard to update board firmware. # They are used later by the vehicle setup wizard to update board firmware.
@ -506,7 +337,7 @@ OPFW_FILES := $(foreach fw_targ, $(PACKAGE_FW_TARGETS), $(FIRMWARE_DIR)/$(fw_tar
OPFW_CONTENTS := \ OPFW_CONTENTS := \
<!DOCTYPE RCC><RCC version="1.0"> \ <!DOCTYPE RCC><RCC version="1.0"> \
<qresource prefix="/firmware"> \ <qresource prefix="/firmware"> \
$(foreach fw_file, $(OPFW_FILES), <file alias="$(notdir $(fw_file))">$(fw_file)</file>) \ $(foreach fw_file, $(OPFW_FILES), <file alias="$(notdir $(fw_file))">$(call system_path,$(fw_file))</file>) \
</qresource> \ </qresource> \
</RCC> </RCC>
@ -550,19 +381,22 @@ include $(ROOT_DIR)/package/$(UNAME).mk
# Source for distribution # Source for distribution
# #
############################## ##############################
$(DIST_VER_INFO): .git/index | $(DIST_DIR) FORCE:
$(DIST_VER_INFO): FORCE | $(DIST_DIR)
$(V1) $(VERSION_INFO) --jsonpath="$(DIST_DIR)" $(V1) $(VERSION_INFO) --jsonpath="$(DIST_DIR)"
$(DIST_TAR): $(DIST_VER_INFO) .git/index | $(DIST_DIR) $(DIST_TAR): $(DIST_VER_INFO) | $(DIST_DIR)
@$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_TAR))" @$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_TAR))"
$(V1) git archive --prefix="$(PACKAGE_NAME)/" -o "$(DIST_TAR)" HEAD $(V1) git archive --prefix="$(PACKAGE_NAME)/" -o "$(DIST_TAR)" HEAD
$(V1) tar --append --file="$(DIST_TAR)" \ $(V1) tar --append --file="$(DIST_TAR)" \
--owner=root --group=root --mtime="`git show -s --format=%ci`" \
--transform='s,.*version-info.json,$(PACKAGE_NAME)/version-info.json,' \ --transform='s,.*version-info.json,$(PACKAGE_NAME)/version-info.json,' \
$(call toprel, "$(DIST_VER_INFO)") $(call toprel, "$(DIST_VER_INFO)")
$(DIST_TAR_GZ): $(DIST_TAR) $(DIST_TAR_GZ): $(DIST_TAR)
@$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_TAR_GZ))" @$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_TAR_GZ))"
$(V1) gzip -kf "$(DIST_TAR)" $(V1) gzip -knf "$(DIST_TAR)"
.PHONY: dist_tar_gz .PHONY: dist_tar_gz
dist_tar_gz: $(DIST_TAR_GZ) dist_tar_gz: $(DIST_TAR_GZ)
@ -574,12 +408,14 @@ dist: dist_tar_gz
$(FW_DIST_TAR): $(PACKAGE_FW_TARGETS) | $(DIST_DIR) $(FW_DIST_TAR): $(PACKAGE_FW_TARGETS) | $(DIST_DIR)
@$(ECHO) " FIRMWARE FOR DISTRIBUTION $(call toprel, $(FW_DIST_TAR))" @$(ECHO) " FIRMWARE FOR DISTRIBUTION $(call toprel, $(FW_DIST_TAR))"
$(V1) tar -c --file="$(FW_DIST_TAR)" --directory=$(FLIGHT_OUT_DIR) \ $(V1) tar -c --file="$(FW_DIST_TAR)" --directory=$(FLIGHT_OUT_DIR) \
--owner=root --group=root --mtime="`git show -s --format=%ci`" \
--transform='s,^,firmware/,' \ --transform='s,^,firmware/,' \
--force-local \
$(foreach fw_targ,$(PACKAGE_FW_TARGETS),$(fw_targ)/$(fw_targ).opfw) $(foreach fw_targ,$(PACKAGE_FW_TARGETS),$(fw_targ)/$(fw_targ).opfw)
$(FW_DIST_TAR_GZ): $(FW_DIST_TAR) $(FW_DIST_TAR_GZ): $(FW_DIST_TAR)
@$(ECHO) " FIRMWARE FOR DISTRIBUTION $(call toprel, $(FW_DIST_TAR_GZ))" @$(ECHO) " FIRMWARE FOR DISTRIBUTION $(call toprel, $(FW_DIST_TAR_GZ))"
$(V1) gzip -kf "$(FW_DIST_TAR)" $(V1) gzip -knf "$(FW_DIST_TAR)"
.PHONY: fw_dist_tar_gz .PHONY: fw_dist_tar_gz
fw_dist_tar_gz: $(FW_DIST_TAR_GZ) fw_dist_tar_gz: $(FW_DIST_TAR_GZ)
@ -604,6 +440,9 @@ define UNCRUSTIFY_TEMPLATE
uncrustify_$(1): uncrustify_$(1):
@$(ECHO) "Auto-formatting $(1) source code" @$(ECHO) "Auto-formatting $(1) source code"
$(V1) UNCRUSTIFY_CONFIG="$(ROOT_DIR)/make/uncrustify/uncrustify.cfg" $(SHELL) make/scripts/uncrustify.sh $(call toprel, $(2)) $(V1) UNCRUSTIFY_CONFIG="$(ROOT_DIR)/make/uncrustify/uncrustify.cfg" $(SHELL) make/scripts/uncrustify.sh $(call toprel, $(2))
.PHONY: pretty_$(1)
pretty_$(1): uncrustify_$(1)
endef endef
$(foreach uncrustify_targ, $(UNCRUSTIFY_TARGETS), $(eval $(call UNCRUSTIFY_TEMPLATE,$(uncrustify_targ),$(ROOT_DIR)/$(uncrustify_targ)))) $(foreach uncrustify_targ, $(UNCRUSTIFY_TARGETS), $(eval $(call UNCRUSTIFY_TEMPLATE,$(uncrustify_targ),$(ROOT_DIR)/$(uncrustify_targ))))
@ -611,6 +450,9 @@ $(foreach uncrustify_targ, $(UNCRUSTIFY_TARGETS), $(eval $(call UNCRUSTIFY_TEMPL
.PHONY: uncrustify_all .PHONY: uncrustify_all
uncrustify_all: $(addprefix uncrustify_,$(UNCRUSTIFY_TARGETS)) uncrustify_all: $(addprefix uncrustify_,$(UNCRUSTIFY_TARGETS))
.PHONY: pretty
pretty: $(addprefix pretty_,$(UNCRUSTIFY_TARGETS))
############################## ##############################
# #
# Doxygen documentation # Doxygen documentation
@ -668,8 +510,10 @@ build-info: | $(BUILD_DIR)
# #
############################## ##############################
CONFIG_OPTS := $(addsuffix \n,$(MAKEOVERRIDES)) CONFIG_OPTS := $(subst \$(SPACE),%SPACE_PLACEHOLDER%,$(MAKEOVERRIDES))
CONFIG_OPTS := $(addprefix override$(SPACE),$(CONFIG_OPTS)) CONFIG_OPTS := $(addprefix override%SPACE_PLACEHOLDER%,$(CONFIG_OPTS))
CONFIG_OPTS := $(subst $(SPACE),\n,$(CONFIG_OPTS))\n
CONFIG_OPTS := $(subst %SPACE_PLACEHOLDER%,$(SPACE),$(CONFIG_OPTS))
.PHONY: config_new .PHONY: config_new
config_new: config_new:
@ -681,12 +525,59 @@ config_append:
.PHONY: config_show .PHONY: config_show
config_show: config_show:
@cat $(CONFIG_FILE) @cat $(CONFIG_FILE) | sed 's/override *//'
.PHONY: config_clean .PHONY: config_clean
config_clean: config_clean:
rm -f $(CONFIG_FILE) rm -f $(CONFIG_FILE)
.PHONY: config_help
config_help:
@$(ECHO) " The build system has a simple system for persistent configuration"
@$(ECHO)
@$(ECHO) " To set persistent configuration variables you, for example, do:"
@$(ECHO) " $(MAKE) config_new CCACHE=ccache GCS_WITH_OSG=0"
@$(ECHO)
@$(ECHO) " To add to the existing configuration do:"
@$(ECHO) " $(MAKE) config_append GCS_BUILD_CONF=debug"
@$(ECHO)
@$(ECHO) " To reset the configuration to defaults do:"
@$(ECHO) " $(MAKE) config_clean"
@$(ECHO)
@$(ECHO) " To show the current configuration:"
@$(ECHO) " $(MAKE) config_show"
@$(ECHO)
@$(ECHO) " You can override any make variable this way, but these are the useful ones"
@$(ECHO) " shown with their current (or default values):"
@$(ECHO)
@$(ECHO) " GCS_BUILD_CONF=$(GCS_BUILD_CONF)"
@$(ECHO) " GCS build type"
@$(ECHO) " Options: debug or release"
@$(ECHO)
@$(ECHO) " GCS_WITH_OSG=$(GCS_WITH_OSG)"
@$(ECHO) " Build the GCS with OpenSceneGraph support, this enables the PFD Model View"
@$(ECHO) " Options: 0 or 1"
@$(ECHO)
@$(ECHO) " GCS_WITH_OSGEARTH=$(GCS_WITH_OSGEARTH)"
@$(ECHO) " Build the GCS with osgEarth support, this enables extra PFD terrain views"
@$(ECHO) " Options: 0 or 1"
@$(ECHO)
@$(ECHO) " GCS_COPY_OSG=$(GCS_COPY_OSG)"
@$(ECHO) " Copy OpenSceneGraph/osgEarth libraries into the build"
@$(ECHO) " (Needed unless using system versions)"
@$(ECHO) " Options: 0 or 1"
@$(ECHO)
@$(ECHO) " CCACHE=$(CCACHE)"
@$(ECHO) " A prefix to compiler invocations, usually 'ccache' or 'path/to/ccache'"
@$(ECHO)
@$(ECHO) " QMAKE=$(QMAKE)"
@$(ECHO) " How to invoke qmake, usually 'qmake', 'qmake-qt5' or 'path/to/qmake'"
@$(ECHO)
@$(ECHO) " WITH_PREBUILT_FIRMWARE=$(WITH_PREBUILT_FIRMWARE)"
@$(ECHO) " Set to path of prebuilt firmware or empty to build firmware when needed"
# TODO: add other things like downloads and tools directories, linux make install parameters
############################## ##############################
# #
@ -721,9 +612,7 @@ help:
@$(ECHO) " arm_sdk_install - Install the GNU ARM gcc toolchain" @$(ECHO) " arm_sdk_install - Install the GNU ARM gcc toolchain"
@$(ECHO) " qt_sdk_install - Install the QT development tools" @$(ECHO) " qt_sdk_install - Install the QT development tools"
@$(ECHO) " nsis_install - Install the NSIS Unicode (Windows only)" @$(ECHO) " nsis_install - Install the NSIS Unicode (Windows only)"
@$(ECHO) " sdl_install - Install the SDL library (Windows only)"
@$(ECHO) " mesawin_install - Install the OpenGL32 DLL (Windows only)" @$(ECHO) " mesawin_install - Install the OpenGL32 DLL (Windows only)"
@$(ECHO) " openssl_install - Install the OpenSSL libraries (Windows only)"
@$(ECHO) " uncrustify_install - Install the Uncrustify source code beautifier" @$(ECHO) " uncrustify_install - Install the Uncrustify source code beautifier"
@$(ECHO) " doxygen_install - Install the Doxygen documentation generator" @$(ECHO) " doxygen_install - Install the Doxygen documentation generator"
@$(ECHO) " gtest_install - Install the GoogleTest framework" @$(ECHO) " gtest_install - Install the GoogleTest framework"
@ -830,9 +719,9 @@ help:
@$(ECHO) " install - Install GCS to \"DESTDIR\" with prefix \"prefix\" (Linux only)" @$(ECHO) " install - Install GCS to \"DESTDIR\" with prefix \"prefix\" (Linux only)"
@$(ECHO) @$(ECHO)
@$(ECHO) " [Code Formatting]" @$(ECHO) " [Code Formatting]"
@$(ECHO) " uncrustify_<source> - Reformat <source> code according to the project's standards" @$(ECHO) " pretty_<source> - Reformat <source> code according to the project's standards"
@$(ECHO) " Supported sources are ($(UNCRUSTIFY_TARGETS))" @$(ECHO) " Supported sources are ($(UNCRUSTIFY_TARGETS))"
@$(ECHO) " uncrustify_all - Reformat all source code" @$(ECHO) " pretty - Reformat all source code"
@$(ECHO) @$(ECHO)
@$(ECHO) " [Code Documentation]" @$(ECHO) " [Code Documentation]"
@$(ECHO) " docs_<source> - Generate HTML documentation for <source>" @$(ECHO) " docs_<source> - Generate HTML documentation for <source>"
@ -842,6 +731,7 @@ help:
@$(ECHO) " docs_all_clean - Delete all generated documentation" @$(ECHO) " docs_all_clean - Delete all generated documentation"
@$(ECHO) @$(ECHO)
@$(ECHO) " [Configuration]" @$(ECHO) " [Configuration]"
@$(ECHO) " config_help - Show information on how to configure the build"
@$(ECHO) " config_new - Place your make arguments in the config file" @$(ECHO) " config_new - Place your make arguments in the config file"
@$(ECHO) " config_append - Place your make arguments in the config file but append" @$(ECHO) " config_append - Place your make arguments in the config file but append"
@$(ECHO) " config_clean - Removes the config file" @$(ECHO) " config_clean - Removes the config file"

View File

@ -30,9 +30,16 @@ Links for the LibrePilot Project
- [Main project web site](https://www.librepilot.org) - [Main project web site](https://www.librepilot.org)
- [Project forums](https://forum.librepilot.org) - [Project forums](https://forum.librepilot.org)
- [Software downloads](https://librepilot.atlassian.net/wiki/display/LPDOC/Downloads)
- [Wiki](https://librepilot.atlassian.net/wiki/display/LPDOC/Welcome)
- [Source code repository](https://bitbucket.org/librepilot) - [Source code repository](https://bitbucket.org/librepilot)
- [Mirror](https://github.com/librepilot) - [Mirror](https://github.com/librepilot)
- [Issue tracker](https://librepilot.atlassian.net) - [Issue tracker](https://librepilot.atlassian.net)
- [Gitter Chat](https://gitter.im/librepilot/LibrePilot) - [Gitter Chat](https://gitter.im/librepilot/LibrePilot)
- IRC: #LibrePilot on FreeNode - IRC: #LibrePilot on FreeNode
| Builder | Status |
|:-------------|:--------------|
| Travis CI |[![Build Status](https://travis-ci.org/librepilot/LibrePilot.svg?branch=next)](https://travis-ci.org/librepilot/LibrePilot)|
| Tea CI |[![Build Status](https://tea-ci.org/api/badges/librepilot/LibrePilot/status.svg?branch=next)](https://tea-ci.org/librepilot/LibrePilot)|

View File

@ -1,3 +1,229 @@
-- RELEASE-16.09 - Second LibrePilot Release -- Black Rhino
This is the second LibrePilot release.
This release introduces new features and new hardware support like Sparky2 board and improved external mag support.
New hardware support:
Sparky2 board, Auxiliary Magnetometer: I2C and Naza GPS, Revo FlexiIO port usage e.g. PPM+GPS
New input modes:
Jeti Ex.Bus, Graupner Hott, FlySky IBus, PPM up to 16 channels, Revo/Sparky2 as OpenLRS receiver.
New telemetry protocols:
MSP, MAVLink. OSD devices that use those protocols may now be connected directly (e.g.: minimosd with MWOSD).
New Flight oriented features:
AlwaysStabilizeWhenArmed (Airmode) using switch, Measurement based D term gives smoother flight
SuperExpo (you may need half expo value compared to rel15.09), Camera tilt compensation,
Autotune module (except CC3D).
GCS improvements:
PFD with terrain / OsgEarth improvements
Failsafe settings using GUI
Vehicle and Transmitter wizard improvements
Known issues:
* [LP-289] - pidcontrol ne and down have nan dz if kp is zero
The full list of bug fixes and enhancements in this release is available here:
https://librepilot.atlassian.net/issues/?filter=10500
Release Notes - LibrePilot - Version REL-16.09
** Sub-task
* [LP-120] - Add Ublox GPS + I2C Mag to Wizard
** Bug
* [LP-59] - Replace openpilot email address in packaging
* [LP-83] - Bricking of Revo and Sparky2
* [LP-111] - Fix directory hash calculated to only include tracked files
* [LP-119] - #if used instead of #ifdef in pios_msheap.c
* [LP-139] - Erroneous warning about missing pfd.svg
* [LP-143] - Fix the "firmware upload no responding" issue
* [LP-145] - CC3D GPS issue
* [LP-154] - Fix gitignore - bare config causes all config directories to be ignored.
* [LP-160] - Set default AccelTau value
* [LP-165] - Acro+ factor range in TxPID
* [LP-167] - Stable version checker points to bad url
* [LP-171] - Acro+ Link Roll and Pitch affects all banks
* [LP-175] - Fix src rpm name
* [LP-181] - QT5.5 : PFD parts are broken
* [LP-182] - CC3D/Revonano OPlink Telemetry issue @38400
* [LP-184] - make: incremental build issues
* [LP-185] - Debian dist detection broken
* [LP-191] - Make TxWizard more robust
* [LP-193] - Remove Libpng warnings
* [LP-197] - QT-5.5.1 broken translations
* [LP-198] - Cannot detect lost of PPM signal
* [LP-204] - Fast_invsqrtf() issue
* [LP-205] - Rate trainer wobble at max angle
* [LP-206] - AlwaysStabilizeWhenArmed need to be disabled at takeoff/landing
* [LP-209] - Oplm link_quality still good with link lost
* [LP-215] - OpLink controller Tx should force failsafe if PPM stream fails
* [LP-216] - GCS misbehaves on high DPI devices
* [LP-218] - msys2 provided opengl library breaks GCS
* [LP-221] - Increase Revo System stack size
* [LP-222] - Building osg and osgearth fails
* [LP-223] - Unit tests build is broken
* [LP-228] - CC3D reboot while import config file
* [LP-241] - Allow CruiseControl for Rate mode at least
* [LP-245] - GCS unsaved data prompt when nothing changed
* [LP-249] - Fix bug introduced in LP-235
* [LP-251] - UAVObjectGeneratorGCS::process_object uses incorrect param null check
* [LP-252] - GPSv9 drops packets
* [LP-257] - OSX compile issue introduced by a93f182
* [LP-258] - Update flight controller in real time locks to basic tab
* [LP-261] - Upgrade GCS map versions
* [LP-263] - GCS default config updates
* [LP-266] - pitch virtual board rotation in gui is limited to 90 degrees
* [LP-273] - Reset Mag alarm when going back to Basic complementary fusion algorithm
* [LP-274] - Consistent Attitude board rotation values for all boards
* [LP-275] - OSX build errors
* [LP-277] - OPMap compilation warning
* [LP-281] - PIOS_SENSORS_GetInstanceByType() has incorrect matching operator
* [LP-285] - Tx Wizard : Set Accessory neutral to middle range
* [LP-289] - pidcontrol ne and down have nan dz if kp is zero
* [LP-290] - Windows GCS uninstall is very long
* [LP-299] - gcc5 building isnan issue
* [LP-305] - GCS crashes shortly after start on OSX - when loading OPMap gadget
* [LP-309] - When arming with accessory switch, disarming timeout doesn't work.
* [LP-310] - osg: random GCS crashes when switching or closing PFDQml gadgets
* [LP-312] - GCS config - attitude - mag tab offers sparky2 i2c port on revo
* [LP-313] - using UAVObjectBrowser filter text always enables metadata display
* [LP-321] - MSP in ReceiverPort menu for RevoNano
* [LP-333] - Sparky2 I2CPort needs GPIO_PuPd_UP instead of NOPULL
* [LP-339] - Avoid AutoTakeOff flight mode while already armed
* [LP-341] - VCP doesn't work on Windows 10 or 8.1
* [LP-362] - GCS crashes when logging to file with -log command line argument
* [LP-363] - OPMap missing tiles
* [LP-369] - Fix availability condition for VCP
* [LP-382] - MSP stack overflow on PID save op.
* [LP-387] - Sparky2 analog port mapping
* [LP-388] - Wrong AuxMag calibration due to wrong initial settings
* [LP-391] - Some CC3D ports cause a boot issue and re-init to defaults.
* [LP-392] - Revo attitude settings is missing the "Zero gyro when arming" checkbox
* [LP-395] - Raise BoardSteadyMaxVariance to support some boards having higher gyro noise
* [LP-400] - Doxygen document build fails with latex errors
* [LP-401] - Reboot is required after AutoTune is set in FMS
* [LP-406] - Windows driver fails to install
* [LP-409] - make fw_dist fails on windows
* [LP-421] - GCS setup wizard welcome panel is too big on high dpi screens
* [LP-423] - HMC5x83 driver dereferences null pointer
* [LP-424] - pios_openlrs.c has incorrect reference to rfm22b_id
* [LP-429] - changes to FlightModeSettings do not trigger a configuration check
* [LP-444] - I2C alarm
* [LP-447] - ESC calibration failure with FVT LitteBee 20A
** Story
* [LP-32] - osgearth integration (follow up cleanups)
** New Feature
* [LP-29] - osgearth integration
* [LP-149] - Add STM32F427/429/437/439 chip support, preparation for brand new board.
* [LP-212] - Support DJI GPS and mag combo uses one port
* [LP-214] - Camera tilt compensation
* [LP-233] - OneShot42 / MultiShot support
* [LP-280] - After firmware boots, start calibration when vehicle is not moving
* [LP-286] - Port search field in UAVBrowser from TL
* [LP-291] - Port MSP support from dRonin
* [LP-298] - Create iBus support for RX
* [LP-327] - Wait for board to be steady before calibrating gyro
* [LP-364] - Port and improve MavLink support from dRonin
* [LP-425] - Add Credits to the About dialog
** Task
* [LP-2] - Upgrade to Qt 5.5
* [LP-30] - osg/osgearth/marble build scripts
* [LP-40] - Add support for TravisCI
* [LP-72] - Sparky 2 support
* [LP-73] - External Mags on I2C
* [LP-76] - Port Tau Labs Autotune to LP
* [LP-88] - Remove OpenPilot branding from .commit-template
* [LP-140] - Update Logo files in Artwork
* [LP-186] - Add copyright to qml and js files
* [LP-187] - Use Msys2
* [LP-194] - Hide Yaw Attitude related parameter from Stabilization panel
* [LP-195] - Update World Magnetic Model
* [LP-200] - Remove Opie
* [LP-201] - Update Y6 mixer
* [LP-208] - Upgrade to Qt 5.6
* [LP-230] - PFD refresh after recent additions
* [LP-247] - Add Naza GPS/Mag to Wizard
* [LP-267] - Enable more options in the current GUI for fusion algorithm
* [LP-292] - Oplink tab cleanup
* [LP-306] - Update Ubuntu PPA to build with osgearth
* [LP-307] - Set up Tea CI
* [LP-315] - Update vehicle templates
* [LP-317] - Update RPM packaging for osgearth
* [LP-325] - Reduce the threshold for ASWA switch
* [LP-328] - Sparky2 reboots constantly with only USB power and unpowered external mag
* [LP-330] - Fix copyright symbol in all code, make it consistent
* [LP-349] - shut up the plan warning alarm
* [LP-373] - Add bitbucket pipelines
* [LP-374] - Build x86_64 windows on TeaCI as well.
* [LP-394] - Upload build results from Tea-Ci
** Improvement
* [LP-96] - Review CPU idle time counter
* [LP-97] - Unify Init process between revo*-cc3d boards
* [LP-104] - HOTT SUMD support
* [LP-147] - Rc transmitter wizard : Auto detect flight mode number
* [LP-150] - Run Attitude calculation on CC/CC3D at slower rate than gyro samples
* [LP-151] - Settable OPLink (and FC) Device ID
* [LP-164] - change OSX dmg .webloc to point to LP website
* [LP-168] - Copy the same content and url list as www.librepilot.org in README.md
* [LP-174] - Add current value display to RcInput tab
* [LP-176] - Allow overriding of package type
* [LP-177] - Make debian package src use pre-compiled firmware
* [LP-178] - Add pass through feature for FixedWing
* [LP-179] - Highlight stabilization mode currently used
* [LP-183] - upgrade GCS uav object generator to Qt 5.5
* [LP-190] - Add openLRSng Rx support to OPLink/Revo
* [LP-196] - JETI EX Bus communication protocol support
* [LP-207] - EventDispatcher: Add "fast" callbacks
* [LP-219] - OPLink module should accept more than 8 PPM channels
* [LP-232] - Display flight mode alarm while setup
* [LP-235] - Make Failsafe settings more user friendly by allowing them to be set in the Configuration tab
* [LP-238] - Consolidate CPP firmware requirements within apps/boot-defs.mk
* [LP-239] - GPS on Flexi IO on Revo
* [LP-240] - Aux Mag setup help and GUI
* [LP-254] - Set CruiseControl default CruiseControlMaxThrust to 100
* [LP-256] - Sparky2 timers and output banks and PPM
* [LP-268] - Add TX and RX packet rates to OPLink stats.
* [LP-269] - IoT Stream Service
* [LP-272] - Altitude velocity Integral default value is set too high
* [LP-276] - Measurement based D term
* [LP-293] - Add AlarmString() to alarms library.
* [LP-295] - OP-1900 fix autotakeoff/landing to not break fixed wing
* [LP-302] - Change motor numbering on config - vehicle tab to directional like NW
* [LP-304] - Improvements for performance counters
* [LP-311] - GCS jumps back to Basic Stabilization if FC changes anything
* [LP-322] - USB Com Bridge functionality on OPLink
* [LP-324] - MSP on Sparky2
* [LP-326] - supporting 16 channels PPM
* [LP-335] - add support for address sanitizer in GCS build system
* [LP-338] - upgrade GCS to Qt 5.6.1
* [LP-340] - AutoTune fix some time measurement issues in original code
* [LP-342] - pios_exti to allow runtime (re)configuration
* [LP-343] - PIOS_COM_Available() needs to give out more details about RX and TX availability
* [LP-352] - Increase Expo effect for high rates
* [LP-354] - Add Ublox AssistNow Autonomous setting
* [LP-361] - Led notification improvements
* [LP-365] - Cleanup com port setup in pios_board.c for coptercontrol
* [LP-366] - Set default velocity and altitude in gcs for new waypoints
* [LP-377] - ComBridge Speed settings delete
* [LP-379] - Add receiverActivity to RC Input tab
* [LP-390] - Fix UAVO telemetry errors
* [LP-396] - Yaw AcroPlus controls in GUI
* [LP-410] - silence GCS logs
* [LP-411] - AutoTune Limit Outer PIDs on Powerful Multicopters - dRonin PR 1283
* [LP-417] - Heartbeat LED on OPLink
* [LP-428] - Reduce the threshold for arming switch
* [LP-441] - Template - Wizard dialog on small screens
-- RELEASE-15.09 - First LibrePilot Release -- Supermoon Eclipse -- RELEASE-15.09 - First LibrePilot Release -- Supermoon Eclipse
This is the first LibrePilot release. This is the first LibrePilot release.
The main focus of this release is to bring back support for CC3D and a general re-branding of the GCS. The main focus of this release is to bring back support for CC3D and a general re-branding of the GCS.

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@ -0,0 +1,725 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="302.05917mm"
height="252.19586mm"
viewBox="0 0 1070.2883 893.60738"
id="svg7377"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="LibrePilot_logo.svg"
inkscape:export-filename="./librepilot_logo_64.png"
inkscape:export-xdpi="11.52"
inkscape:export-ydpi="11.52">
<title
id="title3513">LibrePilot Logo</title>
<defs
id="defs7379" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.39867996"
inkscape:cx="517.71302"
inkscape:cy="324.03604"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="10"
fit-margin-right="10"
fit-margin-left="10"
fit-margin-bottom="10"
inkscape:window-width="1280"
inkscape:window-height="927"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:snap-page="true"
inkscape:snap-bbox="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-midpoints="true" />
<metadata
id="metadata7382">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>LibrePilot Logo</dc:title>
<dc:date>July 2015</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>LibrePilot</dc:title>
</cc:Agent>
</dc:creator>
<dc:identifier>www.librepilot.org</dc:identifier>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-nc-nd/3.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-nc-nd/3.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:prohibits
rdf:resource="http://creativecommons.org/ns#CommercialUse" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(566.91944,446.91581)">
<g
id="g3502"
transform="translate(554.89321,146.32681)"
inkscape:export-xdpi="401.10089"
inkscape:export-ydpi="401.10089">
<path
inkscape:connector-curvature="0"
id="rect8168"
d="M -561.37457,-37.809547 L -112.54027,-37.809547 L -112.54027,121.2776 L -561.37457,121.2776 Z"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
<g
inkscape:export-ydpi="56.630924"
inkscape:export-xdpi="56.630924"
id="g8170"
transform="translate(-691.00285,-528.64572)">
<g
id="text8172"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;line-height:125%;font-family:paola;-inkscape-font-specification:paola;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1">
<path
inkscape:connector-curvature="0"
id="path4625"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
d="M 184.74482,611.42617 L 163.06482,611.42617 Q 159.94482,611.42617 159.94482,608.78617 L 159.94482,565.26617 Q 159.94482,564.46617 159.14482,564.46617 L 149.14482,564.46617 Q 148.34482,564.46617 148.34482,565.26617 L 148.34482,607.82617 Q 148.34482,614.54617 151.14482,617.90617 Q 153.94482,621.18617 160.58482,621.74617 Q 160.98482,621.82617 161.54482,621.82617 Q 162.10482,621.82617 162.74482,621.82617 L 184.74482,621.82617 Q 185.54482,621.82617 185.54482,621.02617 L 185.54482,612.22617 Q 185.54482,611.42617 184.74482,611.42617 Z" />
<path
inkscape:connector-curvature="0"
id="path4627"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
d="M 189.36232,621.02617 Q 189.36232,621.82617 190.16232,621.82617 L 198.32232,621.82617 Q 199.12232,621.82617 199.12232,621.02617 L 199.12232,580.94617 Q 199.12232,580.14617 198.32232,580.14617 L 190.16232,580.14617 Q 189.36232,580.14617 189.36232,580.94617 L 189.36232,621.02617 Z M 189.36232,565.26617 L 189.36232,573.42617 Q 189.36232,574.22617 190.16232,574.22617 L 198.32232,574.22617 Q 199.12232,574.22617 199.12232,573.42617 L 199.12232,565.26617 Q 199.12232,564.46617 198.32232,564.46617 L 190.16232,564.46617 Q 189.36232,564.46617 189.36232,565.26617 Z" />
<path
inkscape:connector-curvature="0"
id="path4629"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
d="M 215.52857,579.34617 L 215.52857,565.26617 Q 215.52857,564.46617 214.72857,564.46617 L 206.56857,564.46617 Q 205.76857,564.46617 205.76857,565.26617 L 205.76857,621.02617 Q 205.76857,621.82617 206.56857,621.82617 L 231.44857,621.82617 Q 235.12857,621.82617 237.84857,619.98617 Q 240.64857,618.06617 242.40857,615.18617 Q 244.16857,612.22617 245.04857,608.54617 Q 245.92857,604.86617 245.92857,601.26617 Q 245.92857,596.54617 245.04857,592.62617 Q 244.24857,588.70617 242.48857,585.98617 Q 240.72857,583.18617 238.00857,581.66617 Q 235.28857,580.14617 231.44857,580.14617 L 216.32857,580.14617 Q 215.52857,580.14617 215.52857,579.34617 Z M 215.52857,590.70617 Q 215.52857,589.90617 216.32857,589.90617 L 225.04857,589.90617 Q 227.52857,589.90617 229.52857,590.38617 Q 231.60857,590.78617 233.04857,592.06617 Q 234.56857,593.26617 235.36857,595.50617 Q 236.16857,597.74617 236.16857,601.26617 Q 236.16857,604.54617 235.36857,606.62617 Q 234.56857,608.70617 233.12857,609.90617 Q 231.68857,611.10617 229.60857,611.58617 Q 227.52857,612.06617 225.04857,612.06617 L 216.32857,612.06617 Q 215.52857,612.06617 215.52857,611.26617 L 215.52857,590.70617 Z" />
<path
inkscape:connector-curvature="0"
id="path4631"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
d="M 260.77607,580.14617 Q 258.61607,580.14617 256.69607,581.02617 Q 254.77607,581.82617 253.33607,583.26617 Q 251.89607,584.70617 251.01607,586.62617 Q 250.21607,588.54617 250.21607,590.62617 L 250.21607,621.02617 Q 250.21607,621.82617 251.01607,621.82617 L 259.97607,621.82617 Q 260.77607,621.82617 260.77607,621.02617 L 260.77607,593.42617 Q 260.77607,592.94617 261.01607,592.38617 Q 261.25607,591.74617 261.65607,591.26617 Q 262.13607,590.70617 262.69607,590.30617 Q 263.25607,589.90617 263.97607,589.90617 L 271.65607,589.90617 Q 272.45607,589.90617 272.45607,589.10617 L 272.45607,580.94617 Q 272.45607,580.14617 271.65607,580.14617 L 260.77607,580.14617 Z" />
<path
inkscape:connector-curvature="0"
id="path4633"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
d="M 285.34607,605.66617 L 314.94607,605.66617 Q 315.74607,605.66617 315.74607,604.86617 L 315.74607,596.54617 Q 315.74607,592.78617 314.62607,589.74617 Q 313.58607,586.70617 311.26607,584.62617 Q 308.94607,582.46617 305.34607,581.34617 Q 301.74607,580.14617 296.78607,580.14617 Q 292.78607,580.14617 288.78607,581.18617 Q 284.86607,582.14617 281.66607,584.62617 Q 278.54607,587.10617 276.54607,591.34617 Q 274.62607,595.50617 274.62607,601.90617 Q 274.62607,607.18617 275.74607,610.94617 Q 276.94607,614.70617 279.66607,617.18617 Q 282.46607,619.58617 286.94607,620.70617 Q 291.50607,621.82617 298.22607,621.82617 L 311.74607,621.82617 Q 312.54607,621.82617 312.54607,621.02617 L 312.54607,612.86617 Q 312.54607,612.06617 311.74607,612.06617 L 292.70607,612.06617 Q 291.02607,612.06617 289.50607,611.66617 Q 287.98607,611.18617 286.86607,610.46617 Q 285.82607,609.66617 285.18607,608.70617 Q 284.54607,607.66617 284.54607,606.46617 Q 284.54607,605.66617 285.34607,605.66617 Z M 285.34607,596.30617 Q 284.54607,596.30617 284.54607,595.50617 Q 284.54607,593.98617 285.74607,592.78617 Q 286.94607,591.50617 288.70607,590.70617 Q 290.54607,589.82617 292.46607,589.34617 Q 294.46607,588.86617 296.06607,588.86617 Q 301.10607,588.86617 303.90607,590.70617 Q 306.70607,592.46617 306.70607,595.50617 Q 306.70607,596.30617 305.90607,596.30617 L 285.34607,596.30617 Z" />
</g>
<g
id="text8176"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:85.35001373px;line-height:125%;font-family:paola;-inkscape-font-specification:paola;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="scale(1.0668752,0.93731676)">
<path
inkscape:connector-curvature="0"
id="path4636"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
d="M 368.68865,604.0074 L 368.68865,662.55751 Q 368.68865,663.41101 369.54215,663.41101 L 380.2109,663.41101 Q 381.0644,663.41101 381.0644,662.55751 L 381.0644,643.01236 Q 381.0644,642.15886 381.9179,642.15886 L 396.76881,642.15886 Q 401.54841,642.15886 404.87706,640.79326 Q 408.20571,639.34231 410.25411,636.69646 Q 412.30251,634.05061 413.24136,630.38056 Q 414.18021,626.7105 414.18021,622.18695 Q 414.18021,617.8341 413.24136,614.16405 Q 412.30251,610.494 410.25411,607.84815 Q 408.20571,605.2023 404.87706,603.75135 Q 401.54841,602.21505 396.76881,602.21505 L 369.54215,602.21505 Q 368.68865,602.21505 368.68865,603.06855 L 368.68865,604.0074 Z M 398.21976,613.31055 Q 399.75606,613.31055 400.60956,614.4201 Q 401.54841,615.4443 401.97516,616.89525 Q 402.40191,618.3462 402.48726,619.8825 Q 402.65796,621.33345 402.65796,622.18695 Q 402.65796,623.04045 402.48726,624.57675 Q 402.40186,626.0277 401.97516,627.47865 Q 401.54841,628.92961 400.60956,630.03916 Q 399.75606,631.06336 398.21976,631.06336 L 381.9179,631.06336 Q 381.0644,631.06336 381.0644,630.20986 L 381.0644,614.16405 Q 381.0644,613.31055 381.9179,613.31055 L 398.21976,613.31055 Z" />
<path
inkscape:connector-curvature="0"
id="path4638"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
d="M 418.69842,662.55751 Q 418.69842,663.41101 419.55192,663.41101 L 428.25763,663.41101 Q 429.11113,663.41101 429.11113,662.55751 L 429.11113,619.79715 Q 429.11113,618.94365 428.25763,618.94365 L 419.55192,618.94365 Q 418.69842,618.94365 418.69842,619.79715 L 418.69842,662.55751 Z M 418.69842,603.06855 L 418.69842,611.77425 Q 418.69842,612.62775 419.55192,612.62775 L 428.25763,612.62775 Q 429.11113,612.62775 429.11113,611.77425 L 429.11113,603.06855 Q 429.11113,602.21505 428.25763,602.21505 L 419.55192,602.21505 Q 418.69842,602.21505 418.69842,603.06855 Z" />
<path
inkscape:connector-curvature="0"
id="path4640"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
d="M 436.20184,603.06855 L 436.20184,653.68111 L 436.20184,653.85181 L 436.20184,662.55751 Q 436.20184,663.41101 437.05534,663.41101 L 445.76104,663.41101 Q 446.61454,663.41101 446.61454,662.55751 L 446.61454,653.85181 L 446.61454,653.68111 L 446.61454,603.06855 Q 446.61454,602.21505 445.76104,602.21505 L 437.05534,602.21505 Q 436.20184,602.21505 436.20184,603.06855 Z" />
<path
inkscape:connector-curvature="0"
id="path4642"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
d="M 496.20957,631.74616 Q 496.20957,628.67356 495.01467,626.3691 Q 493.90512,623.9793 492.02742,622.35765 Q 490.23507,620.65065 487.84527,619.79715 Q 485.54082,618.94365 483.23637,618.94365 L 465.99567,618.94365 Q 463.26447,618.94365 460.78932,619.8825 Q 458.39952,620.82135 456.60717,622.6137 Q 454.81482,624.3207 453.70527,626.79585 Q 452.68107,629.27101 452.68107,632.34361 L 452.68107,647.36521 Q 452.68107,650.35246 453.27852,653.25436 Q 453.87597,656.07091 455.41227,658.37536 Q 456.94857,660.59446 459.50907,662.04541 Q 462.06957,663.41101 465.99567,663.41101 L 481.18797,663.41101 Q 485.11407,663.41101 487.93062,662.64286 Q 490.74717,661.87471 492.53952,659.91166 Q 494.41722,657.94861 495.27072,654.61996 Q 496.20957,651.29131 496.20957,646.17031 L 496.20957,631.74616 Z M 485.71152,641.04931 L 485.71152,647.87731 Q 485.71152,650.09641 483.40707,651.54736 Q 481.18797,652.99831 478.11537,652.99831 L 470.26317,652.99831 Q 469.15362,652.99831 467.87337,652.82761 Q 466.59312,652.57156 465.48357,651.97411 Q 464.37402,651.29131 463.60587,650.18176 Q 462.92307,649.07221 462.92307,647.36521 L 462.92307,633.70921 Q 462.92307,632.51431 463.52052,631.66081 Q 464.11797,630.80731 464.97147,630.29521 Q 465.91032,629.78311 467.01987,629.61241 Q 468.12942,629.35636 469.23897,629.35636 L 478.54212,629.35636 Q 479.82237,629.35636 481.10262,629.61241 Q 482.38287,629.86846 483.40707,630.46591 Q 484.43127,630.97801 485.02872,631.83151 Q 485.71152,632.59966 485.71152,633.62386 L 485.71152,641.04931 Z" />
<path
inkscape:connector-curvature="0"
id="path4644"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
d="M 516.89095,630.20986 Q 516.89095,629.35636 517.74445,629.35636 L 524.74315,629.35636 Q 525.59665,629.35636 525.59665,628.50286 L 525.59665,619.79715 Q 525.59665,618.94365 524.74315,618.94365 L 517.74445,618.94365 Q 516.89095,618.94365 516.89095,618.09015 L 516.89095,607.4214 Q 516.89095,606.5679 516.03745,606.5679 L 507.33175,606.5679 Q 506.47825,606.5679 506.47825,607.4214 L 506.47825,618.09015 Q 506.47825,618.94365 505.62475,618.94365 L 501.1012,618.94365 Q 500.2477,618.94365 500.2477,619.79715 L 500.2477,628.50286 Q 500.2477,629.35636 501.1012,629.35636 L 505.62475,629.35636 Q 506.47825,629.35636 506.47825,630.20986 L 506.47825,656.83906 Q 506.47825,659.48491 508.612,661.44796 Q 510.74575,663.41101 513.98905,663.41101 L 524.74315,663.41101 Q 525.59665,663.41101 525.59665,662.55751 L 525.59665,653.85181 Q 525.59665,653.08366 524.91385,652.99831 L 517.74445,652.99831 Q 516.89095,652.99831 516.89095,652.14481 L 516.89095,630.20986 Z" />
</g>
<g
id="text8180"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;line-height:125%;font-family:paola;-inkscape-font-specification:paola;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1">
<path
inkscape:connector-curvature="0"
id="path4647"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
d="M 183.74482,610.42617 L 162.06482,610.42617 Q 158.94482,610.42617 158.94482,607.78617 L 158.94482,564.26617 Q 158.94482,563.46617 158.14482,563.46617 L 148.14482,563.46617 Q 147.34482,563.46617 147.34482,564.26617 L 147.34482,606.82617 Q 147.34482,613.54617 150.14482,616.90617 Q 152.94482,620.18617 159.58482,620.74617 Q 159.98482,620.82617 160.54482,620.82617 Q 161.10482,620.82617 161.74482,620.82617 L 183.74482,620.82617 Q 184.54482,620.82617 184.54482,620.02617 L 184.54482,611.22617 Q 184.54482,610.42617 183.74482,610.42617 Z" />
<path
inkscape:connector-curvature="0"
id="path4649"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
d="M 188.36232,620.02617 Q 188.36232,620.82617 189.16232,620.82617 L 197.32232,620.82617 Q 198.12232,620.82617 198.12232,620.02617 L 198.12232,579.94617 Q 198.12232,579.14617 197.32232,579.14617 L 189.16232,579.14617 Q 188.36232,579.14617 188.36232,579.94617 L 188.36232,620.02617 Z M 188.36232,564.26617 L 188.36232,572.42617 Q 188.36232,573.22617 189.16232,573.22617 L 197.32232,573.22617 Q 198.12232,573.22617 198.12232,572.42617 L 198.12232,564.26617 Q 198.12232,563.46617 197.32232,563.46617 L 189.16232,563.46617 Q 188.36232,563.46617 188.36232,564.26617 Z" />
<path
inkscape:connector-curvature="0"
id="path4651"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
d="M 214.52857,578.34617 L 214.52857,564.26617 Q 214.52857,563.46617 213.72857,563.46617 L 205.56857,563.46617 Q 204.76857,563.46617 204.76857,564.26617 L 204.76857,620.02617 Q 204.76857,620.82617 205.56857,620.82617 L 230.44857,620.82617 Q 234.12857,620.82617 236.84857,618.98617 Q 239.64857,617.06617 241.40857,614.18617 Q 243.16857,611.22617 244.04857,607.54617 Q 244.92857,603.86617 244.92857,600.26617 Q 244.92857,595.54617 244.04857,591.62617 Q 243.24857,587.70617 241.48857,584.98617 Q 239.72857,582.18617 237.00857,580.66617 Q 234.28857,579.14617 230.44857,579.14617 L 215.32857,579.14617 Q 214.52857,579.14617 214.52857,578.34617 Z M 214.52857,589.70617 Q 214.52857,588.90617 215.32857,588.90617 L 224.04857,588.90617 Q 226.52857,588.90617 228.52857,589.38617 Q 230.60857,589.78617 232.04857,591.06617 Q 233.56857,592.26617 234.36857,594.50617 Q 235.16857,596.74617 235.16857,600.26617 Q 235.16857,603.54617 234.36857,605.62617 Q 233.56857,607.70617 232.12857,608.90617 Q 230.68857,610.10617 228.60857,610.58617 Q 226.52857,611.06617 224.04857,611.06617 L 215.32857,611.06617 Q 214.52857,611.06617 214.52857,610.26617 L 214.52857,589.70617 Z" />
<path
inkscape:connector-curvature="0"
id="path4653"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
d="M 259.77607,579.14617 Q 257.61607,579.14617 255.69607,580.02617 Q 253.77607,580.82617 252.33607,582.26617 Q 250.89607,583.70617 250.01607,585.62617 Q 249.21607,587.54617 249.21607,589.62617 L 249.21607,620.02617 Q 249.21607,620.82617 250.01607,620.82617 L 258.97607,620.82617 Q 259.77607,620.82617 259.77607,620.02617 L 259.77607,592.42617 Q 259.77607,591.94617 260.01607,591.38617 Q 260.25607,590.74617 260.65607,590.26617 Q 261.13607,589.70617 261.69607,589.30617 Q 262.25607,588.90617 262.97607,588.90617 L 270.65607,588.90617 Q 271.45607,588.90617 271.45607,588.10617 L 271.45607,579.94617 Q 271.45607,579.14617 270.65607,579.14617 L 259.77607,579.14617 Z" />
<path
inkscape:connector-curvature="0"
id="path4655"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
d="M 284.34607,604.66617 L 313.94607,604.66617 Q 314.74607,604.66617 314.74607,603.86617 L 314.74607,595.54617 Q 314.74607,591.78617 313.62607,588.74617 Q 312.58607,585.70617 310.26607,583.62617 Q 307.94607,581.46617 304.34607,580.34617 Q 300.74607,579.14617 295.78607,579.14617 Q 291.78607,579.14617 287.78607,580.18617 Q 283.86607,581.14617 280.66607,583.62617 Q 277.54607,586.10617 275.54607,590.34617 Q 273.62607,594.50617 273.62607,600.90617 Q 273.62607,606.18617 274.74607,609.94617 Q 275.94607,613.70617 278.66607,616.18617 Q 281.46607,618.58617 285.94607,619.70617 Q 290.50607,620.82617 297.22607,620.82617 L 310.74607,620.82617 Q 311.54607,620.82617 311.54607,620.02617 L 311.54607,611.86617 Q 311.54607,611.06617 310.74607,611.06617 L 291.70607,611.06617 Q 290.02607,611.06617 288.50607,610.66617 Q 286.98607,610.18617 285.86607,609.46617 Q 284.82607,608.66617 284.18607,607.70617 Q 283.54607,606.66617 283.54607,605.46617 Q 283.54607,604.66617 284.34607,604.66617 Z M 284.34607,595.30617 Q 283.54607,595.30617 283.54607,594.50617 Q 283.54607,592.98617 284.74607,591.78617 Q 285.94607,590.50617 287.70607,589.70617 Q 289.54607,588.82617 291.46607,588.34617 Q 293.46607,587.86617 295.06607,587.86617 Q 300.10607,587.86617 302.90607,589.70617 Q 305.70607,591.46617 305.70607,594.50617 Q 305.70607,595.30617 304.90607,595.30617 L 284.34607,595.30617 Z" />
</g>
<g
id="text8184"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:85.35001373px;line-height:125%;font-family:paola;-inkscape-font-specification:paola;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="scale(1.0668752,0.93731676)">
<path
inkscape:connector-curvature="0"
id="path4658"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
d="M 367.75133,602.94063 L 367.75133,661.49074 Q 367.75133,662.34424 368.60483,662.34424 L 379.27359,662.34424 Q 380.12709,662.34424 380.12709,661.49074 L 380.12709,641.94558 Q 380.12709,641.09208 380.98059,641.09208 L 395.83149,641.09208 Q 400.61109,641.09208 403.93974,639.72648 Q 407.26839,638.27553 409.31679,635.62968 Q 411.36519,632.98383 412.30404,629.31378 Q 413.24289,625.64373 413.24289,621.12018 Q 413.24289,616.76733 412.30404,613.09728 Q 411.36519,609.42723 409.31679,606.78138 Q 407.26839,604.13553 403.93974,602.68458 Q 400.61109,601.14828 395.83149,601.14828 L 368.60483,601.14828 Q 367.75133,601.14828 367.75133,602.00178 L 367.75133,602.94063 Z M 397.28244,612.24378 Q 398.81874,612.24378 399.67224,613.35333 Q 400.61109,614.37753 401.03784,615.82848 Q 401.46459,617.27943 401.54994,618.81573 Q 401.72064,620.26668 401.72064,621.12018 Q 401.72064,621.97368 401.54994,623.50998 Q 401.46454,624.96093 401.03784,626.41188 Q 400.61109,627.86283 399.67224,628.97238 Q 398.81874,629.99658 397.28244,629.99658 L 380.98059,629.99658 Q 380.12709,629.99658 380.12709,629.14308 L 380.12709,613.09728 Q 380.12709,612.24378 380.98059,612.24378 L 397.28244,612.24378 Z" />
<path
inkscape:connector-curvature="0"
id="path4660"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
d="M 417.76111,661.49074 Q 417.76111,662.34424 418.61461,662.34424 L 427.32031,662.34424 Q 428.17381,662.34424 428.17381,661.49074 L 428.17381,618.73038 Q 428.17381,617.87688 427.32031,617.87688 L 418.61461,617.87688 Q 417.76111,617.87688 417.76111,618.73038 L 417.76111,661.49074 Z M 417.76111,602.00178 L 417.76111,610.70748 Q 417.76111,611.56098 418.61461,611.56098 L 427.32031,611.56098 Q 428.17381,611.56098 428.17381,610.70748 L 428.17381,602.00178 Q 428.17381,601.14828 427.32031,601.14828 L 418.61461,601.14828 Q 417.76111,601.14828 417.76111,602.00178 Z" />
<path
inkscape:connector-curvature="0"
id="path4662"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
d="M 435.26453,602.00178 L 435.26453,652.61434 L 435.26453,652.78504 L 435.26453,661.49074 Q 435.26453,662.34424 436.11803,662.34424 L 444.82373,662.34424 Q 445.67723,662.34424 445.67723,661.49074 L 445.67723,652.78504 L 445.67723,652.61434 L 445.67723,602.00178 Q 445.67723,601.14828 444.82373,601.14828 L 436.11803,601.14828 Q 435.26453,601.14828 435.26453,602.00178 Z" />
<path
inkscape:connector-curvature="0"
id="path4664"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
d="M 495.27226,630.67938 Q 495.27226,627.60678 494.07736,625.30233 Q 492.96781,622.91253 491.09011,621.29088 Q 489.29776,619.58388 486.90796,618.73038 Q 484.60351,617.87688 482.29906,617.87688 L 465.05835,617.87688 Q 462.32715,617.87688 459.852,618.81573 Q 457.4622,619.75458 455.66985,621.54693 Q 453.8775,623.25393 452.76795,625.72908 Q 451.74375,628.20423 451.74375,631.27683 L 451.74375,646.29844 Q 451.74375,649.28569 452.3412,652.18759 Q 452.93865,655.00414 454.47495,657.30859 Q 456.01125,659.52769 458.57175,660.97864 Q 461.13225,662.34424 465.05835,662.34424 L 480.25066,662.34424 Q 484.17676,662.34424 486.99331,661.57609 Q 489.80986,660.80794 491.60221,658.84489 Q 493.47991,656.88184 494.33341,653.55319 Q 495.27226,650.22454 495.27226,645.10354 L 495.27226,630.67938 Z M 484.77421,639.98253 L 484.77421,646.81054 Q 484.77421,649.02964 482.46976,650.48059 Q 480.25066,651.93154 477.17805,651.93154 L 469.32585,651.93154 Q 468.2163,651.93154 466.93605,651.76084 Q 465.6558,651.50479 464.54625,650.90734 Q 463.4367,650.22454 462.66855,649.11499 Q 461.98575,648.00544 461.98575,646.29844 L 461.98575,632.64243 Q 461.98575,631.44753 462.5832,630.59403 Q 463.18065,629.74053 464.03415,629.22843 Q 464.973,628.71633 466.08255,628.54563 Q 467.1921,628.28958 468.30165,628.28958 L 477.60481,628.28958 Q 478.88506,628.28958 480.16531,628.54563 Q 481.44556,628.80168 482.46976,629.39913 Q 483.49396,629.91123 484.09141,630.76473 Q 484.77421,631.53288 484.77421,632.55708 L 484.77421,639.98253 Z" />
<path
inkscape:connector-curvature="0"
id="path4666"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
d="M 515.95363,629.14308 Q 515.95363,628.28958 516.80713,628.28958 L 523.80583,628.28958 Q 524.65933,628.28958 524.65933,627.43608 L 524.65933,618.73038 Q 524.65933,617.87688 523.80583,617.87688 L 516.80713,617.87688 Q 515.95363,617.87688 515.95363,617.02338 L 515.95363,606.35463 Q 515.95363,605.50113 515.10013,605.50113 L 506.39443,605.50113 Q 505.54093,605.50113 505.54093,606.35463 L 505.54093,617.02338 Q 505.54093,617.87688 504.68743,617.87688 L 500.16388,617.87688 Q 499.31038,617.87688 499.31038,618.73038 L 499.31038,627.43608 Q 499.31038,628.28958 500.16388,628.28958 L 504.68743,628.28958 Q 505.54093,628.28958 505.54093,629.14308 L 505.54093,655.77229 Q 505.54093,658.41814 507.67468,660.38119 Q 509.80843,662.34424 513.05173,662.34424 L 523.80583,662.34424 Q 524.65933,662.34424 524.65933,661.49074 L 524.65933,652.78504 Q 524.65933,652.01689 523.97653,651.93154 L 516.80713,651.93154 Q 515.95363,651.93154 515.95363,651.07804 L 515.95363,629.14308 Z" />
</g>
<g
transform="matrix(0.96592582,-0.25881904,0.25881904,0.96592582,-135.96662,113.04244)"
id="g8188">
<g
transform="matrix(0.5969555,0.15995374,-0.15995374,0.5969555,187.18453,347.03367)"
style="fill:#767575;fill-opacity:1;stroke:none"
id="g8190">
<path
sodipodi:nodetypes="ccccc"
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 403.66024,282.97714 L 350.98876,230.30666 C 305.52073,201.13204 216.95499,216.43139 216.95499,216.43139 L 350.81024,334.95314 Z"
id="path8192"
inkscape:connector-curvature="0" />
<path
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 308.8794,376.0474 L 308.8794,308.0664 L 344.9544,339.9714 Z"
id="path8194"
inkscape:connector-curvature="0" />
<path
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 403.66024,274.97714 L 354.42124,225.73914 L 403.66024,176.49414 Z"
id="path8196"
inkscape:connector-curvature="0" />
<path
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 440.99424,208.82914 L 408.66024,176.49414 L 408.66024,208.82914 Z"
id="path8198"
inkscape:connector-curvature="0" />
</g>
<g
id="g8200"
style="stroke:none"
transform="matrix(0.5969555,0.15995374,-0.15995374,0.5969555,186.71819,346.56976)">
<path
inkscape:connector-curvature="0"
id="path8202"
d="M 403.66024,282.97714 L 350.98876,230.30666 C 305.52073,201.13204 216.95499,216.43139 216.95499,216.43139 L 350.81024,334.95314 Z"
style="fill:#47adc5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
sodipodi:nodetypes="ccccc" />
<path
inkscape:connector-curvature="0"
id="path8204"
d="M 308.8794,376.0474 L 308.8794,308.0664 L 344.9544,339.9714 Z"
style="fill:#47adc5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path8206"
d="M 403.66024,274.97714 L 354.42124,225.73914 L 403.66024,176.49414 Z"
style="fill:#feb103;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path8208"
d="M 440.99424,208.82914 L 408.66024,176.49414 L 408.66024,208.82914 Z"
style="fill:#feb103;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</g>
</g>
</g>
<g
transform="translate(-134.39309,-220.9483)"
id="g8226"
inkscape:export-xdpi="56.630924"
inkscape:export-ydpi="56.630924">
<g
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;line-height:125%;font-family:paola;-inkscape-font-specification:paola;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="text8228">
<path
d="M 184.74482,611.42617 L 163.06482,611.42617 Q 159.94482,611.42617 159.94482,608.78617 L 159.94482,565.26617 Q 159.94482,564.46617 159.14482,564.46617 L 149.14482,564.46617 Q 148.34482,564.46617 148.34482,565.26617 L 148.34482,607.82617 Q 148.34482,614.54617 151.14482,617.90617 Q 153.94482,621.18617 160.58482,621.74617 Q 160.98482,621.82617 161.54482,621.82617 Q 162.10482,621.82617 162.74482,621.82617 L 184.74482,621.82617 Q 185.54482,621.82617 185.54482,621.02617 L 185.54482,612.22617 Q 185.54482,611.42617 184.74482,611.42617 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
id="path4581"
inkscape:connector-curvature="0" />
<path
d="M 189.36232,621.02617 Q 189.36232,621.82617 190.16232,621.82617 L 198.32232,621.82617 Q 199.12232,621.82617 199.12232,621.02617 L 199.12232,580.94617 Q 199.12232,580.14617 198.32232,580.14617 L 190.16232,580.14617 Q 189.36232,580.14617 189.36232,580.94617 L 189.36232,621.02617 Z M 189.36232,565.26617 L 189.36232,573.42617 Q 189.36232,574.22617 190.16232,574.22617 L 198.32232,574.22617 Q 199.12232,574.22617 199.12232,573.42617 L 199.12232,565.26617 Q 199.12232,564.46617 198.32232,564.46617 L 190.16232,564.46617 Q 189.36232,564.46617 189.36232,565.26617 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
id="path4583"
inkscape:connector-curvature="0" />
<path
d="M 215.52857,579.34617 L 215.52857,565.26617 Q 215.52857,564.46617 214.72857,564.46617 L 206.56857,564.46617 Q 205.76857,564.46617 205.76857,565.26617 L 205.76857,621.02617 Q 205.76857,621.82617 206.56857,621.82617 L 231.44857,621.82617 Q 235.12857,621.82617 237.84857,619.98617 Q 240.64857,618.06617 242.40857,615.18617 Q 244.16857,612.22617 245.04857,608.54617 Q 245.92857,604.86617 245.92857,601.26617 Q 245.92857,596.54617 245.04857,592.62617 Q 244.24857,588.70617 242.48857,585.98617 Q 240.72857,583.18617 238.00857,581.66617 Q 235.28857,580.14617 231.44857,580.14617 L 216.32857,580.14617 Q 215.52857,580.14617 215.52857,579.34617 Z M 215.52857,590.70617 Q 215.52857,589.90617 216.32857,589.90617 L 225.04857,589.90617 Q 227.52857,589.90617 229.52857,590.38617 Q 231.60857,590.78617 233.04857,592.06617 Q 234.56857,593.26617 235.36857,595.50617 Q 236.16857,597.74617 236.16857,601.26617 Q 236.16857,604.54617 235.36857,606.62617 Q 234.56857,608.70617 233.12857,609.90617 Q 231.68857,611.10617 229.60857,611.58617 Q 227.52857,612.06617 225.04857,612.06617 L 216.32857,612.06617 Q 215.52857,612.06617 215.52857,611.26617 L 215.52857,590.70617 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
id="path4585"
inkscape:connector-curvature="0" />
<path
d="M 260.77607,580.14617 Q 258.61607,580.14617 256.69607,581.02617 Q 254.77607,581.82617 253.33607,583.26617 Q 251.89607,584.70617 251.01607,586.62617 Q 250.21607,588.54617 250.21607,590.62617 L 250.21607,621.02617 Q 250.21607,621.82617 251.01607,621.82617 L 259.97607,621.82617 Q 260.77607,621.82617 260.77607,621.02617 L 260.77607,593.42617 Q 260.77607,592.94617 261.01607,592.38617 Q 261.25607,591.74617 261.65607,591.26617 Q 262.13607,590.70617 262.69607,590.30617 Q 263.25607,589.90617 263.97607,589.90617 L 271.65607,589.90617 Q 272.45607,589.90617 272.45607,589.10617 L 272.45607,580.94617 Q 272.45607,580.14617 271.65607,580.14617 L 260.77607,580.14617 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
id="path4587"
inkscape:connector-curvature="0" />
<path
d="M 285.34607,605.66617 L 314.94607,605.66617 Q 315.74607,605.66617 315.74607,604.86617 L 315.74607,596.54617 Q 315.74607,592.78617 314.62607,589.74617 Q 313.58607,586.70617 311.26607,584.62617 Q 308.94607,582.46617 305.34607,581.34617 Q 301.74607,580.14617 296.78607,580.14617 Q 292.78607,580.14617 288.78607,581.18617 Q 284.86607,582.14617 281.66607,584.62617 Q 278.54607,587.10617 276.54607,591.34617 Q 274.62607,595.50617 274.62607,601.90617 Q 274.62607,607.18617 275.74607,610.94617 Q 276.94607,614.70617 279.66607,617.18617 Q 282.46607,619.58617 286.94607,620.70617 Q 291.50607,621.82617 298.22607,621.82617 L 311.74607,621.82617 Q 312.54607,621.82617 312.54607,621.02617 L 312.54607,612.86617 Q 312.54607,612.06617 311.74607,612.06617 L 292.70607,612.06617 Q 291.02607,612.06617 289.50607,611.66617 Q 287.98607,611.18617 286.86607,610.46617 Q 285.82607,609.66617 285.18607,608.70617 Q 284.54607,607.66617 284.54607,606.46617 Q 284.54607,605.66617 285.34607,605.66617 Z M 285.34607,596.30617 Q 284.54607,596.30617 284.54607,595.50617 Q 284.54607,593.98617 285.74607,592.78617 Q 286.94607,591.50617 288.70607,590.70617 Q 290.54607,589.82617 292.46607,589.34617 Q 294.46607,588.86617 296.06607,588.86617 Q 301.10607,588.86617 303.90607,590.70617 Q 306.70607,592.46617 306.70607,595.50617 Q 306.70607,596.30617 305.90607,596.30617 L 285.34607,596.30617 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
id="path4589"
inkscape:connector-curvature="0" />
</g>
<g
transform="scale(1.0668752,0.93731676)"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:85.35001373px;line-height:125%;font-family:paola;-inkscape-font-specification:paola;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="text8232">
<path
d="M 368.68865,604.0074 L 368.68865,662.55751 Q 368.68865,663.41101 369.54215,663.41101 L 380.2109,663.41101 Q 381.0644,663.41101 381.0644,662.55751 L 381.0644,643.01236 Q 381.0644,642.15886 381.9179,642.15886 L 396.76881,642.15886 Q 401.54841,642.15886 404.87706,640.79326 Q 408.20571,639.34231 410.25411,636.69646 Q 412.30251,634.05061 413.24136,630.38056 Q 414.18021,626.7105 414.18021,622.18695 Q 414.18021,617.8341 413.24136,614.16405 Q 412.30251,610.494 410.25411,607.84815 Q 408.20571,605.2023 404.87706,603.75135 Q 401.54841,602.21505 396.76881,602.21505 L 369.54215,602.21505 Q 368.68865,602.21505 368.68865,603.06855 L 368.68865,604.0074 Z M 398.21976,613.31055 Q 399.75606,613.31055 400.60956,614.4201 Q 401.54841,615.4443 401.97516,616.89525 Q 402.40191,618.3462 402.48726,619.8825 Q 402.65796,621.33345 402.65796,622.18695 Q 402.65796,623.04045 402.48726,624.57675 Q 402.40186,626.0277 401.97516,627.47865 Q 401.54841,628.92961 400.60956,630.03916 Q 399.75606,631.06336 398.21976,631.06336 L 381.9179,631.06336 Q 381.0644,631.06336 381.0644,630.20986 L 381.0644,614.16405 Q 381.0644,613.31055 381.9179,613.31055 L 398.21976,613.31055 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
id="path4592"
inkscape:connector-curvature="0" />
<path
d="M 418.69842,662.55751 Q 418.69842,663.41101 419.55192,663.41101 L 428.25763,663.41101 Q 429.11113,663.41101 429.11113,662.55751 L 429.11113,619.79715 Q 429.11113,618.94365 428.25763,618.94365 L 419.55192,618.94365 Q 418.69842,618.94365 418.69842,619.79715 L 418.69842,662.55751 Z M 418.69842,603.06855 L 418.69842,611.77425 Q 418.69842,612.62775 419.55192,612.62775 L 428.25763,612.62775 Q 429.11113,612.62775 429.11113,611.77425 L 429.11113,603.06855 Q 429.11113,602.21505 428.25763,602.21505 L 419.55192,602.21505 Q 418.69842,602.21505 418.69842,603.06855 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
id="path4594"
inkscape:connector-curvature="0" />
<path
d="M 436.20184,603.06855 L 436.20184,653.68111 L 436.20184,653.85181 L 436.20184,662.55751 Q 436.20184,663.41101 437.05534,663.41101 L 445.76104,663.41101 Q 446.61454,663.41101 446.61454,662.55751 L 446.61454,653.85181 L 446.61454,653.68111 L 446.61454,603.06855 Q 446.61454,602.21505 445.76104,602.21505 L 437.05534,602.21505 Q 436.20184,602.21505 436.20184,603.06855 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
id="path4596"
inkscape:connector-curvature="0" />
<path
d="M 496.20957,631.74616 Q 496.20957,628.67356 495.01467,626.3691 Q 493.90512,623.9793 492.02742,622.35765 Q 490.23507,620.65065 487.84527,619.79715 Q 485.54082,618.94365 483.23637,618.94365 L 465.99567,618.94365 Q 463.26447,618.94365 460.78932,619.8825 Q 458.39952,620.82135 456.60717,622.6137 Q 454.81482,624.3207 453.70527,626.79585 Q 452.68107,629.27101 452.68107,632.34361 L 452.68107,647.36521 Q 452.68107,650.35246 453.27852,653.25436 Q 453.87597,656.07091 455.41227,658.37536 Q 456.94857,660.59446 459.50907,662.04541 Q 462.06957,663.41101 465.99567,663.41101 L 481.18797,663.41101 Q 485.11407,663.41101 487.93062,662.64286 Q 490.74717,661.87471 492.53952,659.91166 Q 494.41722,657.94861 495.27072,654.61996 Q 496.20957,651.29131 496.20957,646.17031 L 496.20957,631.74616 Z M 485.71152,641.04931 L 485.71152,647.87731 Q 485.71152,650.09641 483.40707,651.54736 Q 481.18797,652.99831 478.11537,652.99831 L 470.26317,652.99831 Q 469.15362,652.99831 467.87337,652.82761 Q 466.59312,652.57156 465.48357,651.97411 Q 464.37402,651.29131 463.60587,650.18176 Q 462.92307,649.07221 462.92307,647.36521 L 462.92307,633.70921 Q 462.92307,632.51431 463.52052,631.66081 Q 464.11797,630.80731 464.97147,630.29521 Q 465.91032,629.78311 467.01987,629.61241 Q 468.12942,629.35636 469.23897,629.35636 L 478.54212,629.35636 Q 479.82237,629.35636 481.10262,629.61241 Q 482.38287,629.86846 483.40707,630.46591 Q 484.43127,630.97801 485.02872,631.83151 Q 485.71152,632.59966 485.71152,633.62386 L 485.71152,641.04931 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
id="path4598"
inkscape:connector-curvature="0" />
<path
d="M 516.89095,630.20986 Q 516.89095,629.35636 517.74445,629.35636 L 524.74315,629.35636 Q 525.59665,629.35636 525.59665,628.50286 L 525.59665,619.79715 Q 525.59665,618.94365 524.74315,618.94365 L 517.74445,618.94365 Q 516.89095,618.94365 516.89095,618.09015 L 516.89095,607.4214 Q 516.89095,606.5679 516.03745,606.5679 L 507.33175,606.5679 Q 506.47825,606.5679 506.47825,607.4214 L 506.47825,618.09015 Q 506.47825,618.94365 505.62475,618.94365 L 501.1012,618.94365 Q 500.2477,618.94365 500.2477,619.79715 L 500.2477,628.50286 Q 500.2477,629.35636 501.1012,629.35636 L 505.62475,629.35636 Q 506.47825,629.35636 506.47825,630.20986 L 506.47825,656.83906 Q 506.47825,659.48491 508.612,661.44796 Q 510.74575,663.41101 513.98905,663.41101 L 524.74315,663.41101 Q 525.59665,663.41101 525.59665,662.55751 L 525.59665,653.85181 Q 525.59665,653.08366 524.91385,652.99831 L 517.74445,652.99831 Q 516.89095,652.99831 516.89095,652.14481 L 516.89095,630.20986 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#767575;fill-opacity:1"
id="path4600"
inkscape:connector-curvature="0" />
</g>
<g
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;line-height:125%;font-family:paola;-inkscape-font-specification:paola;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="text8236">
<path
d="M 183.74482,610.42617 L 162.06482,610.42617 Q 158.94482,610.42617 158.94482,607.78617 L 158.94482,564.26617 Q 158.94482,563.46617 158.14482,563.46617 L 148.14482,563.46617 Q 147.34482,563.46617 147.34482,564.26617 L 147.34482,606.82617 Q 147.34482,613.54617 150.14482,616.90617 Q 152.94482,620.18617 159.58482,620.74617 Q 159.98482,620.82617 160.54482,620.82617 Q 161.10482,620.82617 161.74482,620.82617 L 183.74482,620.82617 Q 184.54482,620.82617 184.54482,620.02617 L 184.54482,611.22617 Q 184.54482,610.42617 183.74482,610.42617 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
id="path4603"
inkscape:connector-curvature="0" />
<path
d="M 188.36232,620.02617 Q 188.36232,620.82617 189.16232,620.82617 L 197.32232,620.82617 Q 198.12232,620.82617 198.12232,620.02617 L 198.12232,579.94617 Q 198.12232,579.14617 197.32232,579.14617 L 189.16232,579.14617 Q 188.36232,579.14617 188.36232,579.94617 L 188.36232,620.02617 Z M 188.36232,564.26617 L 188.36232,572.42617 Q 188.36232,573.22617 189.16232,573.22617 L 197.32232,573.22617 Q 198.12232,573.22617 198.12232,572.42617 L 198.12232,564.26617 Q 198.12232,563.46617 197.32232,563.46617 L 189.16232,563.46617 Q 188.36232,563.46617 188.36232,564.26617 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
id="path4605"
inkscape:connector-curvature="0" />
<path
d="M 214.52857,578.34617 L 214.52857,564.26617 Q 214.52857,563.46617 213.72857,563.46617 L 205.56857,563.46617 Q 204.76857,563.46617 204.76857,564.26617 L 204.76857,620.02617 Q 204.76857,620.82617 205.56857,620.82617 L 230.44857,620.82617 Q 234.12857,620.82617 236.84857,618.98617 Q 239.64857,617.06617 241.40857,614.18617 Q 243.16857,611.22617 244.04857,607.54617 Q 244.92857,603.86617 244.92857,600.26617 Q 244.92857,595.54617 244.04857,591.62617 Q 243.24857,587.70617 241.48857,584.98617 Q 239.72857,582.18617 237.00857,580.66617 Q 234.28857,579.14617 230.44857,579.14617 L 215.32857,579.14617 Q 214.52857,579.14617 214.52857,578.34617 Z M 214.52857,589.70617 Q 214.52857,588.90617 215.32857,588.90617 L 224.04857,588.90617 Q 226.52857,588.90617 228.52857,589.38617 Q 230.60857,589.78617 232.04857,591.06617 Q 233.56857,592.26617 234.36857,594.50617 Q 235.16857,596.74617 235.16857,600.26617 Q 235.16857,603.54617 234.36857,605.62617 Q 233.56857,607.70617 232.12857,608.90617 Q 230.68857,610.10617 228.60857,610.58617 Q 226.52857,611.06617 224.04857,611.06617 L 215.32857,611.06617 Q 214.52857,611.06617 214.52857,610.26617 L 214.52857,589.70617 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
id="path4607"
inkscape:connector-curvature="0" />
<path
d="M 259.77607,579.14617 Q 257.61607,579.14617 255.69607,580.02617 Q 253.77607,580.82617 252.33607,582.26617 Q 250.89607,583.70617 250.01607,585.62617 Q 249.21607,587.54617 249.21607,589.62617 L 249.21607,620.02617 Q 249.21607,620.82617 250.01607,620.82617 L 258.97607,620.82617 Q 259.77607,620.82617 259.77607,620.02617 L 259.77607,592.42617 Q 259.77607,591.94617 260.01607,591.38617 Q 260.25607,590.74617 260.65607,590.26617 Q 261.13607,589.70617 261.69607,589.30617 Q 262.25607,588.90617 262.97607,588.90617 L 270.65607,588.90617 Q 271.45607,588.90617 271.45607,588.10617 L 271.45607,579.94617 Q 271.45607,579.14617 270.65607,579.14617 L 259.77607,579.14617 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
id="path4609"
inkscape:connector-curvature="0" />
<path
d="M 284.34607,604.66617 L 313.94607,604.66617 Q 314.74607,604.66617 314.74607,603.86617 L 314.74607,595.54617 Q 314.74607,591.78617 313.62607,588.74617 Q 312.58607,585.70617 310.26607,583.62617 Q 307.94607,581.46617 304.34607,580.34617 Q 300.74607,579.14617 295.78607,579.14617 Q 291.78607,579.14617 287.78607,580.18617 Q 283.86607,581.14617 280.66607,583.62617 Q 277.54607,586.10617 275.54607,590.34617 Q 273.62607,594.50617 273.62607,600.90617 Q 273.62607,606.18617 274.74607,609.94617 Q 275.94607,613.70617 278.66607,616.18617 Q 281.46607,618.58617 285.94607,619.70617 Q 290.50607,620.82617 297.22607,620.82617 L 310.74607,620.82617 Q 311.54607,620.82617 311.54607,620.02617 L 311.54607,611.86617 Q 311.54607,611.06617 310.74607,611.06617 L 291.70607,611.06617 Q 290.02607,611.06617 288.50607,610.66617 Q 286.98607,610.18617 285.86607,609.46617 Q 284.82607,608.66617 284.18607,607.70617 Q 283.54607,606.66617 283.54607,605.46617 Q 283.54607,604.66617 284.34607,604.66617 Z M 284.34607,595.30617 Q 283.54607,595.30617 283.54607,594.50617 Q 283.54607,592.98617 284.74607,591.78617 Q 285.94607,590.50617 287.70607,589.70617 Q 289.54607,588.82617 291.46607,588.34617 Q 293.46607,587.86617 295.06607,587.86617 Q 300.10607,587.86617 302.90607,589.70617 Q 305.70607,591.46617 305.70607,594.50617 Q 305.70607,595.30617 304.90607,595.30617 L 284.34607,595.30617 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
id="path4611"
inkscape:connector-curvature="0" />
</g>
<g
transform="scale(1.0668752,0.93731676)"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:85.35001373px;line-height:125%;font-family:paola;-inkscape-font-specification:paola;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="text8240">
<path
d="M 367.75133,602.94063 L 367.75133,661.49074 Q 367.75133,662.34424 368.60483,662.34424 L 379.27359,662.34424 Q 380.12709,662.34424 380.12709,661.49074 L 380.12709,641.94558 Q 380.12709,641.09208 380.98059,641.09208 L 395.83149,641.09208 Q 400.61109,641.09208 403.93974,639.72648 Q 407.26839,638.27553 409.31679,635.62968 Q 411.36519,632.98383 412.30404,629.31378 Q 413.24289,625.64373 413.24289,621.12018 Q 413.24289,616.76733 412.30404,613.09728 Q 411.36519,609.42723 409.31679,606.78138 Q 407.26839,604.13553 403.93974,602.68458 Q 400.61109,601.14828 395.83149,601.14828 L 368.60483,601.14828 Q 367.75133,601.14828 367.75133,602.00178 L 367.75133,602.94063 Z M 397.28244,612.24378 Q 398.81874,612.24378 399.67224,613.35333 Q 400.61109,614.37753 401.03784,615.82848 Q 401.46459,617.27943 401.54994,618.81573 Q 401.72064,620.26668 401.72064,621.12018 Q 401.72064,621.97368 401.54994,623.50998 Q 401.46454,624.96093 401.03784,626.41188 Q 400.61109,627.86283 399.67224,628.97238 Q 398.81874,629.99658 397.28244,629.99658 L 380.98059,629.99658 Q 380.12709,629.99658 380.12709,629.14308 L 380.12709,613.09728 Q 380.12709,612.24378 380.98059,612.24378 L 397.28244,612.24378 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
id="path4614"
inkscape:connector-curvature="0" />
<path
d="M 417.76111,661.49074 Q 417.76111,662.34424 418.61461,662.34424 L 427.32031,662.34424 Q 428.17381,662.34424 428.17381,661.49074 L 428.17381,618.73038 Q 428.17381,617.87688 427.32031,617.87688 L 418.61461,617.87688 Q 417.76111,617.87688 417.76111,618.73038 L 417.76111,661.49074 Z M 417.76111,602.00178 L 417.76111,610.70748 Q 417.76111,611.56098 418.61461,611.56098 L 427.32031,611.56098 Q 428.17381,611.56098 428.17381,610.70748 L 428.17381,602.00178 Q 428.17381,601.14828 427.32031,601.14828 L 418.61461,601.14828 Q 417.76111,601.14828 417.76111,602.00178 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
id="path4616"
inkscape:connector-curvature="0" />
<path
d="M 435.26453,602.00178 L 435.26453,652.61434 L 435.26453,652.78504 L 435.26453,661.49074 Q 435.26453,662.34424 436.11803,662.34424 L 444.82373,662.34424 Q 445.67723,662.34424 445.67723,661.49074 L 445.67723,652.78504 L 445.67723,652.61434 L 445.67723,602.00178 Q 445.67723,601.14828 444.82373,601.14828 L 436.11803,601.14828 Q 435.26453,601.14828 435.26453,602.00178 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
id="path4618"
inkscape:connector-curvature="0" />
<path
d="M 495.27226,630.67938 Q 495.27226,627.60678 494.07736,625.30233 Q 492.96781,622.91253 491.09011,621.29088 Q 489.29776,619.58388 486.90796,618.73038 Q 484.60351,617.87688 482.29906,617.87688 L 465.05835,617.87688 Q 462.32715,617.87688 459.852,618.81573 Q 457.4622,619.75458 455.66985,621.54693 Q 453.8775,623.25393 452.76795,625.72908 Q 451.74375,628.20423 451.74375,631.27683 L 451.74375,646.29844 Q 451.74375,649.28569 452.3412,652.18759 Q 452.93865,655.00414 454.47495,657.30859 Q 456.01125,659.52769 458.57175,660.97864 Q 461.13225,662.34424 465.05835,662.34424 L 480.25066,662.34424 Q 484.17676,662.34424 486.99331,661.57609 Q 489.80986,660.80794 491.60221,658.84489 Q 493.47991,656.88184 494.33341,653.55319 Q 495.27226,650.22454 495.27226,645.10354 L 495.27226,630.67938 Z M 484.77421,639.98253 L 484.77421,646.81054 Q 484.77421,649.02964 482.46976,650.48059 Q 480.25066,651.93154 477.17805,651.93154 L 469.32585,651.93154 Q 468.2163,651.93154 466.93605,651.76084 Q 465.6558,651.50479 464.54625,650.90734 Q 463.4367,650.22454 462.66855,649.11499 Q 461.98575,648.00544 461.98575,646.29844 L 461.98575,632.64243 Q 461.98575,631.44753 462.5832,630.59403 Q 463.18065,629.74053 464.03415,629.22843 Q 464.973,628.71633 466.08255,628.54563 Q 467.1921,628.28958 468.30165,628.28958 L 477.60481,628.28958 Q 478.88506,628.28958 480.16531,628.54563 Q 481.44556,628.80168 482.46976,629.39913 Q 483.49396,629.91123 484.09141,630.76473 Q 484.77421,631.53288 484.77421,632.55708 L 484.77421,639.98253 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
id="path4620"
inkscape:connector-curvature="0" />
<path
d="M 515.95363,629.14308 Q 515.95363,628.28958 516.80713,628.28958 L 523.80583,628.28958 Q 524.65933,628.28958 524.65933,627.43608 L 524.65933,618.73038 Q 524.65933,617.87688 523.80583,617.87688 L 516.80713,617.87688 Q 515.95363,617.87688 515.95363,617.02338 L 515.95363,606.35463 Q 515.95363,605.50113 515.10013,605.50113 L 506.39443,605.50113 Q 505.54093,605.50113 505.54093,606.35463 L 505.54093,617.02338 Q 505.54093,617.87688 504.68743,617.87688 L 500.16388,617.87688 Q 499.31038,617.87688 499.31038,618.73038 L 499.31038,627.43608 Q 499.31038,628.28958 500.16388,628.28958 L 504.68743,628.28958 Q 505.54093,628.28958 505.54093,629.14308 L 505.54093,655.77229 Q 505.54093,658.41814 507.67468,660.38119 Q 509.80843,662.34424 513.05173,662.34424 L 523.80583,662.34424 Q 524.65933,662.34424 524.65933,661.49074 L 524.65933,652.78504 Q 524.65933,652.01689 523.97653,651.93154 L 516.80713,651.93154 Q 515.95363,651.93154 515.95363,651.07804 L 515.95363,629.14308 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Prototype;-inkscape-font-specification:Prototype;fill:#ff6000;fill-opacity:1"
id="path4622"
inkscape:connector-curvature="0" />
</g>
<g
id="g8244"
transform="matrix(0.96592582,-0.25881904,0.25881904,0.96592582,-135.96662,113.04244)">
<g
id="g8246"
style="fill:#767575;fill-opacity:1;stroke:none"
transform="matrix(0.5969555,0.15995374,-0.15995374,0.5969555,187.18453,347.03367)">
<path
inkscape:connector-curvature="0"
id="path8248"
d="M 403.66024,282.97714 L 350.98876,230.30666 C 305.52073,201.13204 216.95499,216.43139 216.95499,216.43139 L 350.81024,334.95314 Z"
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
sodipodi:nodetypes="ccccc" />
<path
inkscape:connector-curvature="0"
id="path8250"
d="M 308.8794,376.0474 L 308.8794,308.0664 L 344.9544,339.9714 Z"
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path8252"
d="M 403.66024,274.97714 L 354.42124,225.73914 L 403.66024,176.49414 Z"
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path8254"
d="M 440.99424,208.82914 L 408.66024,176.49414 L 408.66024,208.82914 Z"
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
transform="matrix(0.5969555,0.15995374,-0.15995374,0.5969555,186.71819,346.56976)"
style="stroke:none"
id="g8256">
<path
sodipodi:nodetypes="ccccc"
style="fill:#47adc5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 403.66024,282.97714 L 350.98876,230.30666 C 305.52073,201.13204 216.95499,216.43139 216.95499,216.43139 L 350.81024,334.95314 Z"
id="path8258"
inkscape:connector-curvature="0" />
<path
style="fill:#47adc5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 308.8794,376.0474 L 308.8794,308.0664 L 344.9544,339.9714 Z"
id="path8260"
inkscape:connector-curvature="0" />
<path
style="fill:#feb103;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 403.66024,274.97714 L 354.42124,225.73914 L 403.66024,176.49414 Z"
id="path8262"
inkscape:connector-curvature="0" />
<path
style="fill:#feb103;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 440.99424,208.82914 L 408.66024,176.49414 L 408.66024,208.82914 Z"
id="path8264"
inkscape:connector-curvature="0" />
</g>
</g>
</g>
<g
id="g3579"
inkscape:export-filename="./LP_logo_square.png"
inkscape:export-xdpi="360"
inkscape:export-ydpi="360"
transform="translate(-37.42618,-379.85478)">
<rect
rx="30"
ry="30"
y="-31.627954"
x="5.3619666"
height="500"
width="500"
id="rect3526"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#e5e5e5;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
<g
id="g4328"
inkscape:export-xdpi="177.41391"
inkscape:export-ydpi="177.41391"
transform="matrix(2.5876865,0,0,2.5876865,-706.2251,-2452.6924)">
<g
transform="matrix(0.96592582,-0.25881904,0.25881904,0.96592582,-102.04982,555.17501)"
id="g4332"
inkscape:export-xdpi="64.777489"
inkscape:export-ydpi="64.777489">
<g
transform="matrix(0.5969555,0.15995374,-0.15995374,0.5969555,187.18453,347.03367)"
style="fill:#767575;fill-opacity:1;stroke:none"
id="g4334">
<path
sodipodi:nodetypes="ccccc"
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 403.66024,282.97714 L 350.98876,230.30666 C 305.52073,201.13204 216.95499,216.43139 216.95499,216.43139 L 350.81024,334.95314 Z"
id="path4336"
inkscape:connector-curvature="0" />
<path
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 308.8794,376.0474 L 308.8794,308.0664 L 344.9544,339.9714 Z"
id="path4338"
inkscape:connector-curvature="0" />
<path
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 403.66024,274.97714 L 354.42124,225.73914 L 403.66024,176.49414 Z"
id="path4340"
inkscape:connector-curvature="0" />
<path
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 440.99424,208.82914 L 408.66024,176.49414 L 408.66024,208.82914 Z"
id="path4342"
inkscape:connector-curvature="0" />
</g>
<g
id="g4344"
style="stroke:none"
transform="matrix(0.5969555,0.15995374,-0.15995374,0.5969555,186.71819,346.56976)">
<path
inkscape:connector-curvature="0"
id="path4346"
d="M 403.66024,282.97714 L 350.98876,230.30666 C 305.52073,201.13204 216.95499,216.43139 216.95499,216.43139 L 350.81024,334.95314 Z"
style="fill:#47adc5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
sodipodi:nodetypes="ccccc" />
<path
inkscape:connector-curvature="0"
id="path4348"
d="M 308.8794,376.0474 L 308.8794,308.0664 L 344.9544,339.9714 Z"
style="fill:#47adc5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path4350"
d="M 403.66024,274.97714 L 354.42124,225.73914 L 403.66024,176.49414 Z"
style="fill:#feb103;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path4352"
d="M 440.99424,208.82914 L 408.66024,176.49414 L 408.66024,208.82914 Z"
style="fill:#feb103;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</g>
</g>
<g
transform="matrix(1.161436,0,0,1.161436,-673.02805,-449.62803)"
id="g4506">
<path
inkscape:connector-curvature="0"
d="M 664.54607,745.48685 L 642.86607,745.48685 Q 639.74607,745.48685 639.74607,742.84685 L 639.74607,699.32685 Q 639.74607,698.52685 638.94607,698.52685 L 628.94607,698.52685 Q 628.14607,698.52685 628.14607,699.32685 L 628.14607,741.88685 Q 628.14607,748.60685 630.94607,751.96685 Q 633.74607,755.24685 640.38607,755.80685 Q 640.78607,755.88685 641.34607,755.88685 Q 641.90607,755.88685 642.54607,755.88685 L 664.54607,755.88685 Q 665.34607,755.88685 665.34607,755.08685 L 665.34607,746.28685 Q 665.34607,745.48685 664.54607,745.48685 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4356" />
<path
inkscape:connector-curvature="0"
d="M 669.16357,755.08685 Q 669.16357,755.88685 669.96357,755.88685 L 678.12357,755.88685 Q 678.92357,755.88685 678.92357,755.08685 L 678.92357,715.00685 Q 678.92357,714.20685 678.12357,714.20685 L 669.96357,714.20685 Q 669.16357,714.20685 669.16357,715.00685 L 669.16357,755.08685 Z M 669.16357,699.32685 L 669.16357,707.48685 Q 669.16357,708.28685 669.96357,708.28685 L 678.12357,708.28685 Q 678.92357,708.28685 678.92357,707.48685 L 678.92357,699.32685 Q 678.92357,698.52685 678.12357,698.52685 L 669.96357,698.52685 Q 669.16357,698.52685 669.16357,699.32685 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4358" />
<path
inkscape:connector-curvature="0"
d="M 695.32982,713.40685 L 695.32982,699.32685 Q 695.32982,698.52685 694.52982,698.52685 L 686.36982,698.52685 Q 685.56982,698.52685 685.56982,699.32685 L 685.56982,755.08685 Q 685.56982,755.88685 686.36982,755.88685 L 711.24982,755.88685 Q 714.92982,755.88685 717.64982,754.04685 Q 720.44982,752.12685 722.20982,749.24685 Q 723.96982,746.28685 724.84982,742.60685 Q 725.72982,738.92685 725.72982,735.32685 Q 725.72982,730.60685 724.84982,726.68685 Q 724.04982,722.76685 722.28982,720.04685 Q 720.52982,717.24685 717.80982,715.72685 Q 715.08982,714.20685 711.24982,714.20685 L 696.12982,714.20685 Q 695.32982,714.20685 695.32982,713.40685 Z M 695.32982,724.76685 Q 695.32982,723.96685 696.12982,723.96685 L 704.84982,723.96685 Q 707.32982,723.96685 709.32982,724.44685 Q 711.40982,724.84685 712.84982,726.12685 Q 714.36982,727.32685 715.16982,729.56685 Q 715.96982,731.80685 715.96982,735.32685 Q 715.96982,738.60685 715.16982,740.68685 Q 714.36982,742.76685 712.92982,743.96685 Q 711.48982,745.16685 709.40982,745.64685 Q 707.32982,746.12685 704.84982,746.12685 L 696.12982,746.12685 Q 695.32982,746.12685 695.32982,745.32685 L 695.32982,724.76685 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4360" />
<path
inkscape:connector-curvature="0"
d="M 740.57732,714.20685 Q 738.41732,714.20685 736.49732,715.08685 Q 734.57732,715.88685 733.13732,717.32685 Q 731.69732,718.76685 730.81732,720.68685 Q 730.01732,722.60685 730.01732,724.68685 L 730.01732,755.08685 Q 730.01732,755.88685 730.81732,755.88685 L 739.77732,755.88685 Q 740.57732,755.88685 740.57732,755.08685 L 740.57732,727.48685 Q 740.57732,727.00685 740.81732,726.44685 Q 741.05732,725.80685 741.45732,725.32685 Q 741.93732,724.76685 742.49732,724.36685 Q 743.05732,723.96685 743.77732,723.96685 L 751.45732,723.96685 Q 752.25732,723.96685 752.25732,723.16685 L 752.25732,715.00685 Q 752.25732,714.20685 751.45732,714.20685 L 740.57732,714.20685 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4362" />
<path
inkscape:connector-curvature="0"
d="M 765.14732,739.72685 L 794.74732,739.72685 Q 795.54732,739.72685 795.54732,738.92685 L 795.54732,730.60685 Q 795.54732,726.84685 794.42732,723.80685 Q 793.38732,720.76685 791.06732,718.68685 Q 788.74732,716.52685 785.14732,715.40685 Q 781.54732,714.20685 776.58732,714.20685 Q 772.58732,714.20685 768.58732,715.24685 Q 764.66732,716.20685 761.46732,718.68685 Q 758.34732,721.16685 756.34732,725.40685 Q 754.42732,729.56685 754.42732,735.96685 Q 754.42732,741.24685 755.54732,745.00685 Q 756.74732,748.76685 759.46732,751.24685 Q 762.26732,753.64685 766.74732,754.76685 Q 771.30732,755.88685 778.02732,755.88685 L 791.54732,755.88685 Q 792.34732,755.88685 792.34732,755.08685 L 792.34732,746.92685 Q 792.34732,746.12685 791.54732,746.12685 L 772.50732,746.12685 Q 770.82732,746.12685 769.30732,745.72685 Q 767.78732,745.24685 766.66732,744.52685 Q 765.62732,743.72685 764.98732,742.76685 Q 764.34732,741.72685 764.34732,740.52685 Q 764.34732,739.72685 765.14732,739.72685 Z M 765.14732,730.36685 Q 764.34732,730.36685 764.34732,729.56685 Q 764.34732,728.04685 765.54732,726.84685 Q 766.74732,725.56685 768.50732,724.76685 Q 770.34732,723.88685 772.26732,723.40685 Q 774.26732,722.92685 775.86732,722.92685 Q 780.90732,722.92685 783.70732,724.76685 Q 786.50732,726.52685 786.50732,729.56685 Q 786.50732,730.36685 785.70732,730.36685 L 765.14732,730.36685 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4364" />
<path
inkscape:connector-curvature="0"
d="M 804.14603,700.20694 L 804.14603,755.08694 Q 804.14603,755.88694 805.05661,755.88694 L 816.43883,755.88694 Q 817.34941,755.88694 817.34941,755.08694 L 817.34941,736.76694 Q 817.34941,735.96694 818.25999,735.96694 L 834.10405,735.96694 Q 839.20329,735.96694 842.75454,734.68694 Q 846.3058,733.32694 848.49119,730.84694 Q 850.67657,728.36694 851.67821,724.92694 Q 852.67984,721.48694 852.67984,717.24694 Q 852.67984,713.16694 851.67821,709.72694 Q 850.67657,706.28694 848.49119,703.80694 Q 846.3058,701.32694 842.75454,699.96694 Q 839.20329,698.52694 834.10405,698.52694 L 805.05661,698.52694 Q 804.14603,698.52694 804.14603,699.32694 L 804.14603,700.20694 Z M 835.65204,708.92694 Q 837.29108,708.92694 838.20165,709.96694 Q 839.20329,710.92694 839.65858,712.28694 Q 840.11387,713.64694 840.20493,715.08694 Q 840.38704,716.44694 840.38704,717.24694 Q 840.38704,718.04694 840.20493,719.48694 Q 840.11383,720.84694 839.65858,722.20694 Q 839.20329,723.56694 838.20165,724.60694 Q 837.29108,725.56694 835.65204,725.56694 L 818.25999,725.56694 Q 817.34941,725.56694 817.34941,724.76694 L 817.34941,709.72694 Q 817.34941,708.92694 818.25999,708.92694 L 835.65204,708.92694 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4368" />
<path
inkscape:connector-curvature="0"
d="M 857.50021,755.08694 Q 857.50021,755.88694 858.41079,755.88694 L 867.69869,755.88694 Q 868.60927,755.88694 868.60927,755.08694 L 868.60927,715.00694 Q 868.60927,714.20694 867.69869,714.20694 L 858.41079,714.20694 Q 857.50021,714.20694 857.50021,715.00694 L 857.50021,755.08694 Z M 857.50021,699.32694 L 857.50021,707.48694 Q 857.50021,708.28694 858.41079,708.28694 L 867.69869,708.28694 Q 868.60927,708.28694 868.60927,707.48694 L 868.60927,699.32694 Q 868.60927,698.52694 867.69869,698.52694 L 858.41079,698.52694 Q 857.50021,698.52694 857.50021,699.32694 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4370" />
<path
inkscape:connector-curvature="0"
d="M 876.17418,699.32694 L 876.17418,746.76694 L 876.17418,746.92694 L 876.17418,755.08694 Q 876.17418,755.88694 877.08475,755.88694 L 886.37265,755.88694 Q 887.28323,755.88694 887.28323,755.08694 L 887.28323,746.92694 L 887.28323,746.76694 L 887.28323,699.32694 Q 887.28323,698.52694 886.37265,698.52694 L 877.08475,698.52694 Q 876.17418,698.52694 876.17418,699.32694 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4372" />
<path
inkscape:connector-curvature="0"
d="M 940.1949,726.20694 Q 940.1949,723.32694 938.9201,721.16694 Q 937.7364,718.92694 935.7331,717.40694 Q 933.8209,715.80694 931.2713,715.00694 Q 928.81271,714.20694 926.35415,714.20694 L 907.96047,714.20694 Q 905.04662,714.20694 902.40595,715.08694 Q 899.85633,715.96694 897.94412,717.64694 Q 896.0319,719.24694 894.84815,721.56694 Q 893.75546,723.88694 893.75546,726.76694 L 893.75546,740.84694 Q 893.75546,743.64694 894.39286,746.36694 Q 895.03027,749.00694 896.66931,751.16694 Q 898.30835,753.24694 901.04008,754.60694 Q 903.77181,755.88694 907.96047,755.88694 L 924.16876,755.88694 Q 928.35742,755.88694 931.3623,755.16694 Q 934.3672,754.44694 936.2794,752.60694 Q 938.2827,750.76694 939.1933,747.64694 Q 940.1949,744.52694 940.1949,739.72694 L 940.1949,726.20694 Z M 928.99483,734.92694 L 928.99483,741.32694 Q 928.99483,743.40694 926.53626,744.76694 Q 924.16876,746.12694 920.89068,746.12694 L 912.51336,746.12694 Q 911.32961,746.12694 909.96375,745.96694 Q 908.59788,745.72694 907.41413,745.16694 Q 906.23038,744.52694 905.41086,743.48694 Q 904.68239,742.44694 904.68239,740.84694 L 904.68239,728.04694 Q 904.68239,726.92694 905.3198,726.12694 Q 905.9572,725.32694 906.86778,724.84694 Q 907.86942,724.36694 909.05317,724.20694 Q 910.23692,723.96694 911.42067,723.96694 L 921.34597,723.96694 Q 922.71184,723.96694 924.0777,724.20694 Q 925.44357,724.44694 926.53626,725.00694 Q 927.62896,725.48694 928.26636,726.28694 Q 928.99483,727.00694 928.99483,727.96694 L 928.99483,734.92694 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4374" />
<path
inkscape:connector-curvature="0"
d="M 962.2594,724.76694 Q 962.2594,723.96694 963.17,723.96694 L 970.6367,723.96694 Q 971.5473,723.96694 971.5473,723.16694 L 971.5473,715.00694 Q 971.5473,714.20694 970.6367,714.20694 L 963.17,714.20694 Q 962.2594,714.20694 962.2594,713.40694 L 962.2594,703.40694 Q 962.2594,702.60694 961.3488,702.60694 L 952.0609,702.60694 Q 951.1503,702.60694 951.1503,703.40694 L 951.1503,713.40694 Q 951.1503,714.20694 950.2398,714.20694 L 945.4137,714.20694 Q 944.5031,714.20694 944.5031,715.00694 L 944.5031,723.16694 Q 944.5031,723.96694 945.4137,723.96694 L 950.2398,723.96694 Q 951.1503,723.96694 951.1503,724.76694 L 951.1503,749.72694 Q 951.1503,752.20694 953.4268,754.04694 Q 955.7032,755.88694 959.1634,755.88694 L 970.6367,755.88694 Q 971.5473,755.88694 971.5473,755.08694 L 971.5473,746.92694 Q 971.5473,746.20694 970.8188,746.12694 L 963.17,746.12694 Q 962.2594,746.12694 962.2594,745.32694 L 962.2594,724.76694 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#767575;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4376" />
<path
inkscape:connector-curvature="0"
d="M 663.54607,744.48685 L 641.86607,744.48685 Q 638.74607,744.48685 638.74607,741.84685 L 638.74607,698.32685 Q 638.74607,697.52685 637.94607,697.52685 L 627.94607,697.52685 Q 627.14607,697.52685 627.14607,698.32685 L 627.14607,740.88685 Q 627.14607,747.60685 629.94607,750.96685 Q 632.74607,754.24685 639.38607,754.80685 Q 639.78607,754.88685 640.34607,754.88685 Q 640.90607,754.88685 641.54607,754.88685 L 663.54607,754.88685 Q 664.34607,754.88685 664.34607,754.08685 L 664.34607,745.28685 Q 664.34607,744.48685 663.54607,744.48685 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4380" />
<path
inkscape:connector-curvature="0"
d="M 668.16357,754.08685 Q 668.16357,754.88685 668.96357,754.88685 L 677.12357,754.88685 Q 677.92357,754.88685 677.92357,754.08685 L 677.92357,714.00685 Q 677.92357,713.20685 677.12357,713.20685 L 668.96357,713.20685 Q 668.16357,713.20685 668.16357,714.00685 L 668.16357,754.08685 Z M 668.16357,698.32685 L 668.16357,706.48685 Q 668.16357,707.28685 668.96357,707.28685 L 677.12357,707.28685 Q 677.92357,707.28685 677.92357,706.48685 L 677.92357,698.32685 Q 677.92357,697.52685 677.12357,697.52685 L 668.96357,697.52685 Q 668.16357,697.52685 668.16357,698.32685 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4382" />
<path
inkscape:connector-curvature="0"
d="M 694.32982,712.40685 L 694.32982,698.32685 Q 694.32982,697.52685 693.52982,697.52685 L 685.36982,697.52685 Q 684.56982,697.52685 684.56982,698.32685 L 684.56982,754.08685 Q 684.56982,754.88685 685.36982,754.88685 L 710.24982,754.88685 Q 713.92982,754.88685 716.64982,753.04685 Q 719.44982,751.12685 721.20982,748.24685 Q 722.96982,745.28685 723.84982,741.60685 Q 724.72982,737.92685 724.72982,734.32685 Q 724.72982,729.60685 723.84982,725.68685 Q 723.04982,721.76685 721.28982,719.04685 Q 719.52982,716.24685 716.80982,714.72685 Q 714.08982,713.20685 710.24982,713.20685 L 695.12982,713.20685 Q 694.32982,713.20685 694.32982,712.40685 Z M 694.32982,723.76685 Q 694.32982,722.96685 695.12982,722.96685 L 703.84982,722.96685 Q 706.32982,722.96685 708.32982,723.44685 Q 710.40982,723.84685 711.84982,725.12685 Q 713.36982,726.32685 714.16982,728.56685 Q 714.96982,730.80685 714.96982,734.32685 Q 714.96982,737.60685 714.16982,739.68685 Q 713.36982,741.76685 711.92982,742.96685 Q 710.48982,744.16685 708.40982,744.64685 Q 706.32982,745.12685 703.84982,745.12685 L 695.12982,745.12685 Q 694.32982,745.12685 694.32982,744.32685 L 694.32982,723.76685 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4384" />
<path
inkscape:connector-curvature="0"
d="M 739.57732,713.20685 Q 737.41732,713.20685 735.49732,714.08685 Q 733.57732,714.88685 732.13732,716.32685 Q 730.69732,717.76685 729.81732,719.68685 Q 729.01732,721.60685 729.01732,723.68685 L 729.01732,754.08685 Q 729.01732,754.88685 729.81732,754.88685 L 738.77732,754.88685 Q 739.57732,754.88685 739.57732,754.08685 L 739.57732,726.48685 Q 739.57732,726.00685 739.81732,725.44685 Q 740.05732,724.80685 740.45732,724.32685 Q 740.93732,723.76685 741.49732,723.36685 Q 742.05732,722.96685 742.77732,722.96685 L 750.45732,722.96685 Q 751.25732,722.96685 751.25732,722.16685 L 751.25732,714.00685 Q 751.25732,713.20685 750.45732,713.20685 L 739.57732,713.20685 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4386" />
<path
inkscape:connector-curvature="0"
d="M 764.14732,738.72685 L 793.74732,738.72685 Q 794.54732,738.72685 794.54732,737.92685 L 794.54732,729.60685 Q 794.54732,725.84685 793.42732,722.80685 Q 792.38732,719.76685 790.06732,717.68685 Q 787.74732,715.52685 784.14732,714.40685 Q 780.54732,713.20685 775.58732,713.20685 Q 771.58732,713.20685 767.58732,714.24685 Q 763.66732,715.20685 760.46732,717.68685 Q 757.34732,720.16685 755.34732,724.40685 Q 753.42732,728.56685 753.42732,734.96685 Q 753.42732,740.24685 754.54732,744.00685 Q 755.74732,747.76685 758.46732,750.24685 Q 761.26732,752.64685 765.74732,753.76685 Q 770.30732,754.88685 777.02732,754.88685 L 790.54732,754.88685 Q 791.34732,754.88685 791.34732,754.08685 L 791.34732,745.92685 Q 791.34732,745.12685 790.54732,745.12685 L 771.50732,745.12685 Q 769.82732,745.12685 768.30732,744.72685 Q 766.78732,744.24685 765.66732,743.52685 Q 764.62732,742.72685 763.98732,741.76685 Q 763.34732,740.72685 763.34732,739.52685 Q 763.34732,738.72685 764.14732,738.72685 Z M 764.14732,729.36685 Q 763.34732,729.36685 763.34732,728.56685 Q 763.34732,727.04685 764.54732,725.84685 Q 765.74732,724.56685 767.50732,723.76685 Q 769.34732,722.88685 771.26732,722.40685 Q 773.26732,721.92685 774.86732,721.92685 Q 779.90732,721.92685 782.70732,723.76685 Q 785.50732,725.52685 785.50732,728.56685 Q 785.50732,729.36685 784.70732,729.36685 L 764.14732,729.36685 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4388" />
<path
inkscape:connector-curvature="0"
d="M 803.14602,699.20704 L 803.14602,754.08704 Q 803.14602,754.88704 804.0566,754.88704 L 815.43884,754.88704 Q 816.34942,754.88704 816.34942,754.08704 L 816.34942,735.76703 Q 816.34942,734.96703 817.25999,734.96703 L 833.10405,734.96703 Q 838.20329,734.96703 841.75454,733.68703 Q 845.3058,732.32703 847.49118,729.84703 Q 849.67657,727.36703 850.67821,723.92703 Q 851.67984,720.48703 851.67984,716.24703 Q 851.67984,712.16704 850.67821,708.72704 Q 849.67657,705.28704 847.49118,702.80704 Q 845.3058,700.32704 841.75454,698.96704 Q 838.20329,697.52704 833.10405,697.52704 L 804.0566,697.52704 Q 803.14602,697.52704 803.14602,698.32704 L 803.14602,699.20704 Z M 834.65203,707.92704 Q 836.29107,707.92704 837.20165,708.96704 Q 838.20329,709.92704 838.65858,711.28704 Q 839.11386,712.64704 839.20492,714.08704 Q 839.38704,715.44703 839.38704,716.24703 Q 839.38704,717.04703 839.20492,718.48703 Q 839.11382,719.84703 838.65858,721.20703 Q 838.20329,722.56703 837.20165,723.60703 Q 836.29107,724.56703 834.65203,724.56703 L 817.25999,724.56703 Q 816.34942,724.56703 816.34942,723.76703 L 816.34942,708.72704 Q 816.34942,707.92704 817.25999,707.92704 L 834.65203,707.92704 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4392" />
<path
inkscape:connector-curvature="0"
d="M 856.50022,754.08704 Q 856.50022,754.88704 857.4108,754.88704 L 866.69869,754.88704 Q 867.60927,754.88704 867.60927,754.08704 L 867.60927,714.00704 Q 867.60927,713.20704 866.69869,713.20704 L 857.4108,713.20704 Q 856.50022,713.20704 856.50022,714.00704 L 856.50022,754.08704 Z M 856.50022,698.32704 L 856.50022,706.48704 Q 856.50022,707.28704 857.4108,707.28704 L 866.69869,707.28704 Q 867.60927,707.28704 867.60927,706.48704 L 867.60927,698.32704 Q 867.60927,697.52704 866.69869,697.52704 L 857.4108,697.52704 Q 856.50022,697.52704 856.50022,698.32704 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4394" />
<path
inkscape:connector-curvature="0"
d="M 875.17418,698.32704 L 875.17418,745.76704 L 875.17418,745.92704 L 875.17418,754.08704 Q 875.17418,754.88704 876.08476,754.88704 L 885.37266,754.88704 Q 886.28323,754.88704 886.28323,754.08704 L 886.28323,745.92704 L 886.28323,745.76704 L 886.28323,698.32704 Q 886.28323,697.52704 885.37266,697.52704 L 876.08476,697.52704 Q 875.17418,697.52704 875.17418,698.32704 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4396" />
<path
inkscape:connector-curvature="0"
d="M 939.1949,725.20703 Q 939.1949,722.32703 937.9201,720.16703 Q 936.7364,717.92703 934.7331,716.40703 Q 932.8209,714.80703 930.27128,714.00704 Q 927.81272,713.20704 925.35416,713.20704 L 906.96047,713.20704 Q 904.04662,713.20704 901.40594,714.08704 Q 898.85633,714.96703 896.94411,716.64703 Q 895.0319,718.24703 893.84815,720.56703 Q 892.75545,722.88703 892.75545,725.76703 L 892.75545,739.84704 Q 892.75545,742.64704 893.39286,745.36704 Q 894.03026,748.00704 895.6693,750.16704 Q 897.30834,752.24704 900.04008,753.60704 Q 902.77181,754.88704 906.96047,754.88704 L 923.16877,754.88704 Q 927.35743,754.88704 930.36234,754.16704 Q 933.3672,753.44704 935.2795,751.60704 Q 937.2827,749.76704 938.1933,746.64704 Q 939.1949,743.52704 939.1949,738.72704 L 939.1949,725.20703 Z M 927.99483,733.92703 L 927.99483,740.32704 Q 927.99483,742.40704 925.53627,743.76704 Q 923.16877,745.12704 919.89068,745.12704 L 911.51336,745.12704 Q 910.32961,745.12704 908.96374,744.96704 Q 907.59787,744.72704 906.41412,744.16704 Q 905.23037,743.52704 904.41085,742.48704 Q 903.68239,741.44704 903.68239,739.84704 L 903.68239,727.04703 Q 903.68239,725.92703 904.31979,725.12703 Q 904.9572,724.32703 905.86778,723.84703 Q 906.86941,723.36703 908.05316,723.20703 Q 909.23692,722.96703 910.42067,722.96703 L 920.34598,722.96703 Q 921.71184,722.96703 923.07771,723.20703 Q 924.44358,723.44703 925.53627,724.00703 Q 926.62897,724.48703 927.26637,725.28703 Q 927.99483,726.00703 927.99483,726.96703 L 927.99483,733.92703 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4398" />
<path
inkscape:connector-curvature="0"
d="M 961.2594,723.76703 Q 961.2594,722.96703 962.17,722.96703 L 969.6367,722.96703 Q 970.5473,722.96703 970.5473,722.16703 L 970.5473,714.00704 Q 970.5473,713.20704 969.6367,713.20704 L 962.17,713.20704 Q 961.2594,713.20704 961.2594,712.40704 L 961.2594,702.40704 Q 961.2594,701.60704 960.3488,701.60704 L 951.0609,701.60704 Q 950.1503,701.60704 950.1503,702.40704 L 950.1503,712.40704 Q 950.1503,713.20704 949.2398,713.20704 L 944.4137,713.20704 Q 943.5031,713.20704 943.5031,714.00704 L 943.5031,722.16703 Q 943.5031,722.96703 944.4137,722.96703 L 949.2398,722.96703 Q 950.1503,722.96703 950.1503,723.76703 L 950.1503,748.72704 Q 950.1503,751.20704 952.4268,753.04704 Q 954.7032,754.88704 958.1634,754.88704 L 969.6367,754.88704 Q 970.5473,754.88704 970.5473,754.08704 L 970.5473,745.92704 Q 970.5473,745.20704 969.8188,745.12704 L 962.17,745.12704 Q 961.2594,745.12704 961.2594,744.32704 L 961.2594,723.76703 Z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:125%;font-family:Prototype;-inkscape-font-specification:Prototype;letter-spacing:0px;word-spacing:0px;fill:#ff6000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4400" />
</g>
</g>
<g
id="g4436"
transform="translate(32.551166,70.704061)">
<rect
ry="27.086214"
rx="27.086214"
y="-454.30685"
x="-564.0376"
height="444.24011"
width="444.24011"
id="rect4434"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4.51436901;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
<g
transform="matrix(2.5876865,0,0,2.5876865,-1303.5046,-2852.2513)"
inkscape:export-ydpi="177.41391"
inkscape:export-xdpi="177.41391"
id="g3489">
<g
inkscape:export-ydpi="64.777489"
inkscape:export-xdpi="64.777489"
id="g3491"
transform="matrix(0.96592582,-0.25881904,0.25881904,0.96592582,-102.04982,555.17501)">
<g
id="g3493"
style="fill:#767575;fill-opacity:1;stroke:none"
transform="matrix(0.5969555,0.15995374,-0.15995374,0.5969555,187.18453,347.03367)">
<path
inkscape:connector-curvature="0"
id="path3495"
d="M 403.66024,282.97714 L 350.98876,230.30666 C 305.52073,201.13204 216.95499,216.43139 216.95499,216.43139 L 350.81024,334.95314 Z"
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
sodipodi:nodetypes="ccccc" />
<path
inkscape:connector-curvature="0"
id="path3497"
d="M 308.8794,376.0474 L 308.8794,308.0664 L 344.9544,339.9714 Z"
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path3499"
d="M 403.66024,274.97714 L 354.42124,225.73914 L 403.66024,176.49414 Z"
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path3501"
d="M 440.99424,208.82914 L 408.66024,176.49414 L 408.66024,208.82914 Z"
style="fill:#767575;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
transform="matrix(0.5969555,0.15995374,-0.15995374,0.5969555,186.71819,346.56976)"
style="stroke:none"
id="g3503">
<path
sodipodi:nodetypes="ccccc"
style="fill:#47adc5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 403.66024,282.97714 L 350.98876,230.30666 C 305.52073,201.13204 216.95499,216.43139 216.95499,216.43139 L 350.81024,334.95314 Z"
id="path3505"
inkscape:connector-curvature="0" />
<path
style="fill:#47adc5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 308.8794,376.0474 L 308.8794,308.0664 L 344.9544,339.9714 Z"
id="path3507"
inkscape:connector-curvature="0" />
<path
style="fill:#feb103;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 403.66024,274.97714 L 354.42124,225.73914 L 403.66024,176.49414 Z"
id="path3509"
inkscape:connector-curvature="0" />
<path
style="fill:#feb103;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 440.99424,208.82914 L 408.66024,176.49414 L 408.66024,208.82914 Z"
id="path3511"
inkscape:connector-curvature="0" />
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 94 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 252 KiB

After

Width:  |  Height:  |  Size: 252 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

Before

Width:  |  Height:  |  Size: 638 KiB

After

Width:  |  Height:  |  Size: 638 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 674 KiB

After

Width:  |  Height:  |  Size: 674 KiB

11
bitbucket-pipelines.yml Normal file
View File

@ -0,0 +1,11 @@
pipelines:
default:
- step:
script:
- add-apt-repository ppa:librepilot/tools -y
- apt-get update -q
- apt-get install -y libc6-i386 libudev-dev libusb-1.0-0-dev libsdl1.2-dev python libopenscenegraph-dev libosgearth-dev qt56-meta-minimal qt56svg qt56script qt56serialport qt56multimedia qt56translations qt56tools
- make build_sdk_install
- make all_flight
- make opfw_resource
- make gcs

62
fix_vehicle_templates.py Normal file
View File

@ -0,0 +1,62 @@
#!/usr/bin/python
###############################################################################
#
# The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015.
# Script to update vehicle templates files to match current UAVO structure
# and data.
#
###############################################################################
import json
import re
import collections
import fnmatch
import os
class DecimalEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, Decimal):
return float(obj)
return json.JSONEncoder.default(self, obj)
json.encoder.FLOAT_REPR = lambda o: format(o, '.17g')
files = []
for root, dirnames, filenames in os.walk('ground/gcs/src/share/vehicletemplates/'):
for filename in fnmatch.filter(filenames, '*.optmpl'):
files.append(os.path.join(root, filename))
for f in files:
data = json.load(open(f, 'r'), object_pairs_hook=collections.OrderedDict)
for item in data['objects']:
fieldsToRemove = []
for i in item['fields']:
name = i['name']
values = i['values']
if re.compile('ThrustPIDScaleCurve').match(name):
i['type'] = "int8"
for j in values:
j['value'] = int(j['value'] * 100)
elif re.compile('AcroInsanityFactor').match(name):
i['type'] = "int8"
value = 0
for j in values:
value = int(j['value'] * 100)
values.pop()
values.append({'name': 'roll', 'value': value})
values.append({'name': 'pitch', 'value': value})
values.append({'name': 'yaw', 'value': value})
elif re.compile('FeedForward').match(name):
fieldsToRemove.append(i)
elif re.compile('MaxAccel').match(name):
fieldsToRemove.append(i)
elif re.compile('AccelTime').match(name):
fieldsToRemove.append(i)
elif re.compile('DecelTime').match(name):
fieldsToRemove.append(i)
for field in fieldsToRemove:
item['fields'].remove(field)
with open(f, 'w') as outfile:
json.dump(data, outfile, indent=4, separators=(',', ': '), cls=DecimalEncoder)

View File

@ -8,7 +8,7 @@ export OPUAVTALK := $(FLIGHT_ROOT_DIR)/uavtalk
export FLIGHT_OUT_DIR ?= $(CURDIR) export FLIGHT_OUT_DIR ?= $(CURDIR)
# Define supported board lists # Define supported board lists
ALL_BOARDS := coptercontrol oplinkmini revolution osd revoproto simposix discoveryf4bare gpsplatinum revonano ALL_BOARDS := coptercontrol oplinkmini revolution osd revoproto simposix discoveryf4bare gpsplatinum revonano sparky2
# Short names of each board (used to display board name in parallel builds) # Short names of each board (used to display board name in parallel builds)
coptercontrol_short := 'cc ' coptercontrol_short := 'cc '
@ -17,6 +17,7 @@ revolution_short := 'revo'
osd_short := 'osd ' osd_short := 'osd '
revoproto_short := 'revp' revoproto_short := 'revp'
revonano_short := 'revn' revonano_short := 'revn'
sparky2_short := 'spk2'
simposix_short := 'posx' simposix_short := 'posx'
discoveryf4bare_short := 'df4b' discoveryf4bare_short := 'df4b'
gpsplatinum_short := 'gps9' gpsplatinum_short := 'gps9'
@ -254,3 +255,62 @@ flight_uavobjects: $(UAVOBJGENERATOR)
$(V1) cd $(FLIGHT_UAVOBJ_DIR) && \ $(V1) cd $(FLIGHT_UAVOBJ_DIR) && \
$(UAVOBJGENERATOR) -flight $(UAVOBJ_XML_DIR) $(FLIGHT_ROOT_DIR)/.. $(UAVOBJGENERATOR) -flight $(UAVOBJ_XML_DIR) $(FLIGHT_ROOT_DIR)/..
##############################
#
# Unit Tests
#
##############################
ALL_UNITTESTS := logfs math lednotification
# Build the directory for the unit tests
UT_OUT_DIR := $(BUILD_DIR)/unit_tests
DIRS += $(UT_OUT_DIR)
.PHONY: all_ut
all_ut: $(addsuffix _elf, $(addprefix ut_, $(ALL_UNITTESTS)))
.PHONY: all_ut_xml
all_ut_xml: $(addsuffix _xml, $(addprefix ut_, $(ALL_UNITTESTS)))
.PHONY: all_ut_run
all_ut_run: $(addsuffix _run, $(addprefix ut_, $(ALL_UNITTESTS)))
.PHONY: all_ut_clean
all_ut_clean:
@$(ECHO) " CLEAN $(call toprel, $(UT_OUT_DIR))"
$(V1) [ ! -d "$(UT_OUT_DIR)" ] || $(RM) -r "$(UT_OUT_DIR)"
# $(1) = Unit test name
define UT_TEMPLATE
.PHONY: ut_$(1)
ut_$(1): ut_$(1)_run
ut_$(1)_%: $$(UT_OUT_DIR)
$(V1) $(MKDIR) -p $(UT_OUT_DIR)/$(1)
$(V1) cd $(ROOT_DIR)/flight/tests/$(1) && \
$$(MAKE) -r --no-print-directory \
BUILD_TYPE=ut \
BOARD_SHORT_NAME=$(1) \
TOPDIR=$(ROOT_DIR)/flight/tests/$(1) \
OUTDIR="$(UT_OUT_DIR)/$(1)" \
TARGET=$(1) \
$$*
.PHONY: ut_$(1)_clean
ut_$(1)_clean:
@$(ECHO) " CLEAN $(call toprel, $(UT_OUT_DIR)/$(1))"
$(V1) [ ! -d "$(UT_OUT_DIR)/$(1)" ] || $(RM) -r "$(UT_OUT_DIR)/$(1)"
endef
# Expand the unittest rules
$(foreach ut, $(ALL_UNITTESTS), $(eval $(call UT_TEMPLATE,$(ut))))
# Disable parallel make when the all_ut_run target is requested otherwise the TAP
# output is interleaved with the rest of the make output.
ifneq ($(strip $(filter all_ut_run,$(MAKECMDGOALS))),)
.NOTPARALLEL:
$(info $(EMPTY) NOTE Parallel make disabled by all_ut_run target so we have sane console output)
endif

View File

@ -2,11 +2,12 @@
****************************************************************************** ******************************************************************************
* *
* @file WorldMagModel.c * @file WorldMagModel.c
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015.
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Source file for the World Magnetic Model * @brief Source file for the World Magnetic Model
* This is a port of code available from the US NOAA. * This is a port of code available from the US NOAA.
* *
* The hard coded coefficients should be valid until 2015. * The hard coded coefficients should be valid until 2020.
* *
* Updated coeffs from .. * Updated coeffs from ..
* http://www.ngdc.noaa.gov/geomag/WMM/wmm_ddownload.shtml * http://www.ngdc.noaa.gov/geomag/WMM/wmm_ddownload.shtml
@ -60,96 +61,96 @@
// first column not used but it will be optimized out by compiler // first column not used but it will be optimized out by compiler
static const float CoeffFile[91][6] = { static const float CoeffFile[91][6] = {
{ 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f },
{ 1.0f, 0.0f, -29496.6f, 0.0f, 11.6f, 0.0f }, { 1.0f, 0.0f, -29438.5f, 0.0f, 10.7f, 0.0f },
{ 1.0f, 1.0f, -1586.3f, 4944.4f, 16.5f, -25.9f }, { 1.0f, 1.0f, -1501.1f, 4796.2f, 17.9f, -26.8f },
{ 2.0f, 0.0f, -2396.6f, 0.0f, -12.1f, 0.0f }, { 2.0f, 0.0f, -2445.3f, 0.0f, -8.6f, 0.0f },
{ 2.0f, 1.0f, 3026.1f, -2707.7f, -4.4f, -22.5f }, { 2.0f, 1.0f, 3012.5f, -2845.6f, -3.3f, -27.1f },
{ 2.0f, 2.0f, 1668.6f, -576.1f, 1.9f, -11.8f }, { 2.0f, 2.0f, 1676.6f, -642.0f, 2.4f, -13.3f },
{ 3.0f, 0.0f, 1340.1f, 0.0f, 0.4f, 0.0f }, { 3.0f, 0.0f, 1351.1f, 0.0f, 3.1f, 0.0f },
{ 3.0f, 1.0f, -2326.2f, -160.2f, -4.1f, 7.3f }, { 3.0f, 1.0f, -2352.3f, -115.3f, -6.2f, 8.4f },
{ 3.0f, 2.0f, 1231.9f, 251.9f, -2.9f, -3.9f }, { 3.0f, 2.0f, 1225.6f, 245.0f, -0.4f, -0.4f },
{ 3.0f, 3.0f, 634.0f, -536.6f, -7.7f, -2.6f }, { 3.0f, 3.0f, 581.9f, -538.3f, -10.4f, 2.3f },
{ 4.0f, 0.0f, 912.6f, 0.0f, -1.8f, 0.0f }, { 4.0f, 0.0f, 907.2f, 0.0f, -0.4f, 0.0f },
{ 4.0f, 1.0f, 808.9f, 286.4f, 2.3f, 1.1f }, { 4.0f, 1.0f, 813.7f, 283.4f, 0.8f, -0.6f },
{ 4.0f, 2.0f, 166.7f, -211.2f, -8.7f, 2.7f }, { 4.0f, 2.0f, 120.3f, -188.6f, -9.2f, 5.3f },
{ 4.0f, 3.0f, -357.1f, 164.3f, 4.6f, 3.9f }, { 4.0f, 3.0f, -335.0f, 180.9f, 4.0f, 3.0f },
{ 4.0f, 4.0f, 89.4f, -309.1f, -2.1f, -0.8f }, { 4.0f, 4.0f, 70.3f, -329.5f, -4.2f, -5.3f },
{ 5.0f, 0.0f, -230.9f, 0.0f, -1.0f, 0.0f }, { 5.0f, 0.0f, -232.6f, 0.0f, -0.2f, 0.0f },
{ 5.0f, 1.0f, 357.2f, 44.6f, 0.6f, 0.4f }, { 5.0f, 1.0f, 360.1f, 47.4f, 0.1f, 0.4f },
{ 5.0f, 2.0f, 200.3f, 188.9f, -1.8f, 1.8f }, { 5.0f, 2.0f, 192.4f, 196.9f, -1.4f, 1.6f },
{ 5.0f, 3.0f, -141.1f, -118.2f, -1.0f, 1.2f }, { 5.0f, 3.0f, -141.0f, -119.4f, 0.0f, -1.1f },
{ 5.0f, 4.0f, -163.0f, 0.0f, 0.9f, 4.0f }, { 5.0f, 4.0f, -157.4f, 16.1f, 1.3f, 3.3f },
{ 5.0f, 5.0f, -7.8f, 100.9f, 1.0f, -0.6f }, { 5.0f, 5.0f, 4.3f, 100.1f, 3.8f, 0.1f },
{ 6.0f, 0.0f, 72.8f, 0.0f, -0.2f, 0.0f }, { 6.0f, 0.0f, 69.5f, 0.0f, -0.5f, 0.0f },
{ 6.0f, 1.0f, 68.6f, -20.8f, -0.2f, -0.2f }, { 6.0f, 1.0f, 67.4f, -20.7f, -0.2f, 0.0f },
{ 6.0f, 2.0f, 76.0f, 44.1f, -0.1f, -2.1f }, { 6.0f, 2.0f, 72.8f, 33.2f, -0.6f, -2.2f },
{ 6.0f, 3.0f, -141.4f, 61.5f, 2.0f, -0.4f }, { 6.0f, 3.0f, -129.8f, 58.8f, 2.4f, -0.7f },
{ 6.0f, 4.0f, -22.8f, -66.3f, -1.7f, -0.6f }, { 6.0f, 4.0f, -29.0f, -66.5f, -1.1f, 0.1f },
{ 6.0f, 5.0f, 13.2f, 3.1f, -0.3f, 0.5f }, { 6.0f, 5.0f, 13.2f, 7.3f, 0.3f, 1.0f },
{ 6.0f, 6.0f, -77.9f, 55.0f, 1.7f, 0.9f }, { 6.0f, 6.0f, -70.9f, 62.5f, 1.5f, 1.3f },
{ 7.0f, 0.0f, 80.5f, 0.0f, 0.1f, 0.0f }, { 7.0f, 0.0f, 81.6f, 0.0f, 0.2f, 0.0f },
{ 7.0f, 1.0f, -75.1f, -57.9f, -0.1f, 0.7f }, { 7.0f, 1.0f, -76.1f, -54.1f, -0.2f, 0.7f },
{ 7.0f, 2.0f, -4.7f, -21.1f, -0.6f, 0.3f }, { 7.0f, 2.0f, -6.8f, -19.4f, -0.4f, 0.5f },
{ 7.0f, 3.0f, 45.3f, 6.5f, 1.3f, -0.1f }, { 7.0f, 3.0f, 51.9f, 5.6f, 1.3f, -0.2f },
{ 7.0f, 4.0f, 13.9f, 24.9f, 0.4f, -0.1f }, { 7.0f, 4.0f, 15.0f, 24.4f, 0.2f, -0.1f },
{ 7.0f, 5.0f, 10.4f, 7.0f, 0.3f, -0.8f }, { 7.0f, 5.0f, 9.3f, 3.3f, -0.4f, -0.7f },
{ 7.0f, 6.0f, 1.7f, -27.7f, -0.7f, -0.3f }, { 7.0f, 6.0f, -2.8f, -27.5f, -0.9f, 0.1f },
{ 7.0f, 7.0f, 4.9f, -3.3f, 0.6f, 0.3f }, { 7.0f, 7.0f, 6.7f, -2.3f, 0.3f, 0.1f },
{ 8.0f, 0.0f, 24.4f, 0.0f, -0.1f, 0.0f }, { 8.0f, 0.0f, 24.0f, 0.0f, 0.0f, 0.0f },
{ 8.0f, 1.0f, 8.1f, 11.0f, 0.1f, -0.1f }, { 8.0f, 1.0f, 8.6f, 10.2f, 0.1f, -0.3f },
{ 8.0f, 2.0f, -14.5f, -20.0f, -0.6f, 0.2f }, { 8.0f, 2.0f, -16.9f, -18.1f, -0.5f, 0.3f },
{ 8.0f, 3.0f, -5.6f, 11.9f, 0.2f, 0.4f }, { 8.0f, 3.0f, -3.2f, 13.2f, 0.5f, 0.3f },
{ 8.0f, 4.0f, -19.3f, -17.4f, -0.2f, 0.4f }, { 8.0f, 4.0f, -20.6f, -14.6f, -0.2f, 0.6f },
{ 8.0f, 5.0f, 11.5f, 16.7f, 0.3f, 0.1f }, { 8.0f, 5.0f, 13.3f, 16.2f, 0.4f, -0.1f },
{ 8.0f, 6.0f, 10.9f, 7.0f, 0.3f, -0.1f }, { 8.0f, 6.0f, 11.7f, 5.7f, 0.2f, -0.2f },
{ 8.0f, 7.0f, -14.1f, -10.8f, -0.6f, 0.4f }, { 8.0f, 7.0f, -16.0f, -9.1f, -0.4f, 0.3f },
{ 8.0f, 8.0f, -3.7f, 1.7f, 0.2f, 0.3f }, { 8.0f, 8.0f, -2.0f, 2.2f, 0.3f, 0.0f },
{ 9.0f, 0.0f, 5.4f, 0.0f, 0.0f, 0.0f }, { 9.0f, 0.0f, 5.4f, 0.0f, 0.0f, 0.0f },
{ 9.0f, 1.0f, 9.4f, -20.5f, -0.1f, 0.0f }, { 9.0f, 1.0f, 8.8f, -21.6f, -0.1f, -0.2f },
{ 9.0f, 2.0f, 3.4f, 11.5f, 0.0f, -0.2f }, { 9.0f, 2.0f, 3.1f, 10.8f, -0.1f, -0.1f },
{ 9.0f, 3.0f, -5.2f, 12.8f, 0.3f, 0.0f }, { 9.0f, 3.0f, -3.1f, 11.7f, 0.4f, -0.2f },
{ 9.0f, 4.0f, 3.1f, -7.2f, -0.4f, -0.1f }, { 9.0f, 4.0f, 0.6f, -6.8f, -0.5f, 0.1f },
{ 9.0f, 5.0f, -12.4f, -7.4f, -0.3f, 0.1f }, { 9.0f, 5.0f, -13.3f, -6.9f, -0.2f, 0.1f },
{ 9.0f, 6.0f, -0.7f, 8.0f, 0.1f, 0.0f }, { 9.0f, 6.0f, -0.1f, 7.8f, 0.1f, 0.0f },
{ 9.0f, 7.0f, 8.4f, 2.1f, -0.1f, -0.2f }, { 9.0f, 7.0f, 8.7f, 1.0f, 0.0f, -0.2f },
{ 9.0f, 8.0f, -8.5f, -6.1f, -0.4f, 0.3f }, { 9.0f, 8.0f, -9.1f, -3.9f, -0.2f, 0.4f },
{ 9.0f, 9.0f, -10.1f, 7.0f, -0.2f, 0.2f }, { 9.0f, 9.0f, -10.5f, 8.5f, -0.1f, 0.3f },
{ 10.0f, 0.0f, -2.0f, 0.0f, 0.0f, 0.0f }, { 10.0f, 0.0f, -1.9f, 0.0f, 0.0f, 0.0f },
{ 10.0f, 1.0f, -6.3f, 2.8f, 0.0f, 0.1f }, { 10.0f, 1.0f, -6.5f, 3.3f, 0.0f, 0.1f },
{ 10.0f, 2.0f, 0.9f, -0.1f, -0.1f, -0.1f }, { 10.0f, 2.0f, 0.2f, -0.3f, -0.1f, -0.1f },
{ 10.0f, 3.0f, -1.1f, 4.7f, 0.2f, 0.0f }, { 10.0f, 3.0f, 0.6f, 4.6f, 0.3f, 0.0f },
{ 10.0f, 4.0f, -0.2f, 4.4f, 0.0f, -0.1f }, { 10.0f, 4.0f, -0.6f, 4.4f, -0.1f, 0.0f },
{ 10.0f, 5.0f, 2.5f, -7.2f, -0.1f, -0.1f }, { 10.0f, 5.0f, 1.7f, -7.9f, -0.1f, -0.2f },
{ 10.0f, 6.0f, -0.3f, -1.0f, -0.2f, 0.0f }, { 10.0f, 6.0f, -0.7f, -0.6f, -0.1f, 0.1f },
{ 10.0f, 7.0f, 2.2f, -3.9f, 0.0f, -0.1f }, { 10.0f, 7.0f, 2.1f, -4.1f, 0.0f, -0.1f },
{ 10.0f, 8.0f, 3.1f, -2.0f, -0.1f, -0.2f }, { 10.0f, 8.0f, 2.3f, -2.8f, -0.2f, -0.2f },
{ 10.0f, 9.0f, -1.0f, -2.0f, -0.2f, 0.0f }, { 10.0f, 9.0f, -1.8f, -1.1f, -0.1f, 0.1f },
{ 10.0f, 10.0f, -2.8f, -8.3f, -0.2f, -0.1f }, { 10.0f, 10.0f, -3.6f, -8.7f, -0.2f, -0.1f },
{ 11.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f }, { 11.0f, 0.0f, 3.1f, 0.0f, 0.0f, 0.0f },
{ 11.0f, 1.0f, -1.5f, 0.2f, 0.0f, 0.0f }, { 11.0f, 1.0f, -1.5f, -0.1f, 0.0f, 0.0f },
{ 11.0f, 2.0f, -2.1f, 1.7f, 0.0f, 0.1f }, { 11.0f, 2.0f, -2.3f, 2.1f, -0.1f, 0.1f },
{ 11.0f, 3.0f, 1.7f, -0.6f, 0.1f, 0.0f }, { 11.0f, 3.0f, 2.1f, -0.7f, 0.1f, 0.0f },
{ 11.0f, 4.0f, -0.5f, -1.8f, 0.0f, 0.1f }, { 11.0f, 4.0f, -0.9f, -1.1f, 0.0f, 0.1f },
{ 11.0f, 5.0f, 0.5f, 0.9f, 0.0f, 0.0f }, { 11.0f, 5.0f, 0.6f, 0.7f, 0.0f, 0.0f },
{ 11.0f, 6.0f, -0.8f, -0.4f, 0.0f, 0.1f }, { 11.0f, 6.0f, -0.7f, -0.2f, 0.0f, 0.0f },
{ 11.0f, 7.0f, 0.4f, -2.5f, 0.0f, 0.0f }, { 11.0f, 7.0f, 0.2f, -2.1f, 0.0f, 0.1f },
{ 11.0f, 8.0f, 1.8f, -1.3f, 0.0f, -0.1f }, { 11.0f, 8.0f, 1.7f, -1.5f, 0.0f, 0.0f },
{ 11.0f, 9.0f, 0.1f, -2.1f, 0.0f, -0.1f }, { 11.0f, 9.0f, -0.2f, -2.5f, 0.0f, -0.1f },
{ 11.0f, 10.0f, 0.7f, -1.9f, -0.1f, 0.0f }, { 11.0f, 10.0f, 0.4f, -2.0f, -0.1f, 0.0f },
{ 11.0f, 11.0f, 3.8f, -1.8f, 0.0f, -0.1f }, { 11.0f, 11.0f, 3.5f, -2.3f, -0.1f, -0.1f },
{ 12.0f, 0.0f, -2.2f, 0.0f, 0.0f, 0.0f }, { 12.0f, 0.0f, -2.0f, 0.0f, 0.1f, 0.0f },
{ 12.0f, 1.0f, -0.2f, -0.9f, 0.0f, 0.0f }, { 12.0f, 1.0f, -0.3f, -1.0f, 0.0f, 0.0f },
{ 12.0f, 2.0f, 0.3f, 0.3f, 0.1f, 0.0f }, { 12.0f, 2.0f, 0.4f, 0.5f, 0.0f, 0.0f },
{ 12.0f, 3.0f, 1.0f, 2.1f, 0.1f, 0.0f }, { 12.0f, 3.0f, 1.3f, 1.8f, 0.1f, -0.1f },
{ 12.0f, 4.0f, -0.6f, -2.5f, -0.1f, 0.0f }, { 12.0f, 4.0f, -0.9f, -2.2f, -0.1f, 0.0f },
{ 12.0f, 5.0f, 0.9f, 0.5f, 0.0f, 0.0f }, { 12.0f, 5.0f, 0.9f, 0.3f, 0.0f, 0.0f },
{ 12.0f, 6.0f, -0.1f, 0.6f, 0.0f, 0.1f }, { 12.0f, 6.0f, 0.1f, 0.7f, 0.1f, 0.0f },
{ 12.0f, 7.0f, 0.5f, 0.0f, 0.0f, 0.0f }, { 12.0f, 7.0f, 0.5f, -0.1f, 0.0f, 0.0f },
{ 12.0f, 8.0f, -0.4f, 0.1f, 0.0f, 0.0f }, { 12.0f, 8.0f, -0.4f, 0.3f, 0.0f, 0.0f },
{ 12.0f, 9.0f, -0.4f, 0.3f, 0.0f, 0.0f }, { 12.0f, 9.0f, -0.4f, 0.2f, 0.0f, 0.0f },
{ 12.0f, 10.0f, 0.2f, -0.9f, 0.0f, 0.0f }, { 12.0f, 10.0f, 0.2f, -0.9f, 0.0f, 0.0f },
{ 12.0f, 11.0f, -0.8f, -0.2f, -0.1f, 0.0f }, { 12.0f, 11.0f, -0.9f, -0.2f, 0.0f, 0.0f },
{ 12.0f, 12.0f, 0.0f, 0.9f, 0.1f, 0.0f } { 12.0f, 12.0f, 0.0f, 0.7f, 0.0f, 0.0f }
}; };
static WMMtype_Ellipsoid *Ellip = NULL; static WMMtype_Ellipsoid *Ellip = NULL;
@ -190,10 +191,10 @@ int WMM_Initialize()
MagneticModel->nMaxSecVar = WMM_MAX_SECULAR_VARIATION_MODEL_DEGREES; MagneticModel->nMaxSecVar = WMM_MAX_SECULAR_VARIATION_MODEL_DEGREES;
MagneticModel->SecularVariationUsed = 0; MagneticModel->SecularVariationUsed = 0;
// Really, Really needs to be read from a file - out of date in 2015 at latest // Really, Really needs to be read from a file - out of date in 2020 at latest
MagneticModel->EditionDate = 0.0f; /* OP change. Originally 5.7863328170559505e-307, truncates to 0.0f */ MagneticModel->EditionDate = 0.0f; /* OP change. Originally 5.7863328170559505e-307, truncates to 0.0f */
MagneticModel->epoch = 2010.0f; MagneticModel->epoch = 2015.0f;
sprintf(MagneticModel->ModelName, "WMM-2010"); sprintf(MagneticModel->ModelName, "WMM-2015");
return 0; // OK return 0; // OK
} }

View File

@ -6,7 +6,8 @@
* @brief OpenPilot System libraries are available to all OP modules. * @brief OpenPilot System libraries are available to all OP modules.
* @{ * @{
* @file alarms.c * @file alarms.c
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Library for setting and clearing system alarms * @brief Library for setting and clearing system alarms
* @see The GNU Public License (GPL) Version 3 * @see The GNU Public License (GPL) Version 3
* *
@ -281,6 +282,107 @@ SystemAlarmsAlarmOptions AlarmsGetHighestSeverity()
return highest; return highest;
} }
static const char *const systemalarms_severity_names[] = {
[SYSTEMALARMS_ALARM_UNINITIALISED] = "UNINITIALISED",
[SYSTEMALARMS_ALARM_OK] = "OK",
[SYSTEMALARMS_ALARM_WARNING] = "WARNING",
[SYSTEMALARMS_ALARM_CRITICAL] = "CRITICAL",
[SYSTEMALARMS_ALARM_ERROR] = "ERROR"
};
static const char *const systemalarms_alarm_names[] = {
[SYSTEMALARMS_ALARM_SYSTEMCONFIGURATION] = "CONFIG",
[SYSTEMALARMS_ALARM_BOOTFAULT] = "BOOT",
[SYSTEMALARMS_ALARM_OUTOFMEMORY] = "MEM",
[SYSTEMALARMS_ALARM_STACKOVERFLOW] = "STACK",
[SYSTEMALARMS_ALARM_CPUOVERLOAD] = "CPU",
[SYSTEMALARMS_ALARM_EVENTSYSTEM] = "EVENT",
[SYSTEMALARMS_ALARM_TELEMETRY] = "TELEMETRY",
[SYSTEMALARMS_ALARM_RECEIVER] = "INPUT",
[SYSTEMALARMS_ALARM_MANUALCONTROL] = "MANUAL",
[SYSTEMALARMS_ALARM_ACTUATOR] = "ACTUATOR",
[SYSTEMALARMS_ALARM_ATTITUDE] = "ATTI",
[SYSTEMALARMS_ALARM_SENSORS] = "SENSOR",
[SYSTEMALARMS_ALARM_MAGNETOMETER] = "MAG",
[SYSTEMALARMS_ALARM_AIRSPEED] = "AIRSPD",
[SYSTEMALARMS_ALARM_STABILIZATION] = "STAB",
[SYSTEMALARMS_ALARM_GUIDANCE] = "GUIDANCE",
[SYSTEMALARMS_ALARM_PATHPLAN] = "PLAN",
[SYSTEMALARMS_ALARM_BATTERY] = "BATT",
[SYSTEMALARMS_ALARM_FLIGHTTIME] = "TIME",
[SYSTEMALARMS_ALARM_I2C] = "I2C",
[SYSTEMALARMS_ALARM_GPS] = "GPS",
};
static const char *const systemalarms_extendedalarmstatus_names[] = {
[SYSTEMALARMS_EXTENDEDALARMSTATUS_REBOOTREQUIRED] = "CFG:REBOOT",
[SYSTEMALARMS_EXTENDEDALARMSTATUS_FLIGHTMODE] = "CFG:FLIGHTMODE",
[SYSTEMALARMS_EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT] = "CFG:ONESHOT",
[SYSTEMALARMS_EXTENDEDALARMSTATUS_BADTHROTTLEORCOLLECTIVEINPUTRANGE] = "CFG:THR-COL",
};
size_t AlarmString(SystemAlarmsData *alarm, char *buffer, size_t buffer_size, SystemAlarmsAlarmOptions level, SystemAlarmsAlarmOptions *highestSeverity)
{
size_t pos = 0;
PIOS_STATIC_ASSERT(NELEMENTS(systemalarms_alarm_names) == SYSTEMALARMS_ALARM_NUMELEM);
for (unsigned severity = SYSTEMALARMS_ALARM_ERROR; severity >= level; --severity) {
// should we prepend severity level here? No, not for now.
for (unsigned i = 0; i < SYSTEMALARMS_ALARM_NUMELEM; ++i) {
if ((SystemAlarmsAlarmToArray(alarm->Alarm)[i] == severity)
&& (systemalarms_alarm_names[i])) {
if (highestSeverity) { // they are already sorted by severity as we are processing in specific order
*highestSeverity = severity;
highestSeverity = 0;
}
// in which case should we dig into extended alarm status?
// looks like SYSTEMALARMS_ALARM_SYSTEMCONFIGURATION sets most of the extended alarms
// except SYSTEMALARMS_ALARM_BOOTFAULT which also sets SYSTEMALARMS_EXTENDEDALARMSTATUS_REBOOTREQUIRED
const char *current_msg = systemalarms_alarm_names[i];
switch (i) {
case SYSTEMALARMS_ALARM_SYSTEMCONFIGURATION:
if (alarm->ExtendedAlarmStatus.SystemConfiguration < NELEMENTS(systemalarms_extendedalarmstatus_names)) {
current_msg = systemalarms_extendedalarmstatus_names[alarm->ExtendedAlarmStatus.SystemConfiguration];
}
break;
case SYSTEMALARMS_ALARM_BOOTFAULT:
if (alarm->ExtendedAlarmStatus.BootFault < NELEMENTS(systemalarms_extendedalarmstatus_names)) {
current_msg = systemalarms_extendedalarmstatus_names[alarm->ExtendedAlarmStatus.BootFault];
}
break;
}
int current_len = strlen(current_msg);
if ((pos + current_len + 1) > buffer_size) {
break;
}
memcpy(buffer + pos, current_msg, current_len);
pos += current_len;
buffer[pos++] = ',';
}
}
}
if (pos > 0) {
--pos; // get rid of that trailing separator.
}
buffer[pos] = 0;
return pos; // return length of the string in buffer. Actual bytes written is +1
}
/** /**
* @} * @}
* @} * @}

View File

@ -2,7 +2,8 @@
****************************************************************************** ******************************************************************************
* *
* @file auxmagsupport.c * @file auxmagsupport.c
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2014. * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015-2016.
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2014.
* @brief Functions to handle aux mag data and calibration. * @brief Functions to handle aux mag data and calibration.
* -- * --
* @see The GNU Public License (GPL) Version 3 * @see The GNU Public License (GPL) Version 3
@ -37,16 +38,30 @@ AuxMagSettingsTypeOptions option;
void auxmagsupport_reload_settings() void auxmagsupport_reload_settings()
{ {
AuxMagSettingsData cal;
float magQuat[4];
float R[3][3];
AuxMagSettingsGet(&cal);
mag_bias[0] = cal.mag_bias.X;
mag_bias[1] = cal.mag_bias.Y;
mag_bias[2] = cal.mag_bias.Z;
// convert the RPY mag board rotation to into a rotation matrix
// rotate the vector into the level hover frame (the attitude frame)
const float magRpy[3] = { cal.BoardRotation.Roll, cal.BoardRotation.Pitch, cal.BoardRotation.Yaw };
RPY2Quaternion(magRpy, magQuat);
Quaternion2R(magQuat, R);
// the mag transform only scales the raw mag values
matrix_mult_3x3f((float(*)[3])AuxMagSettingsmag_transformToArray(cal.mag_transform), R, mag_transform);
// GPSV9, Ext (unused), and Flexi
AuxMagSettingsTypeGet(&option); AuxMagSettingsTypeGet(&option);
float a[3][3];
float b[3][3]; const uint8_t status = AUXMAGSENSOR_STATUS_NONE;
float rotz; // next sample from other external mags will provide the right status if present
AuxMagSettingsmag_transformArrayGet((float *)a); AuxMagSensorStatusSet((uint8_t *)&status);
AuxMagSettingsOrientationGet(&rotz);
rotz = DEG2RAD(rotz);
rot_about_axis_z(rotz, b);
matrix_mult_3x3f(a, b, mag_transform);
AuxMagSettingsmag_biasArrayGet(mag_bias);
} }
void auxmagsupport_publish_samples(float mags[3], uint8_t status) void auxmagsupport_publish_samples(float mags[3], uint8_t status)

View File

@ -5,7 +5,8 @@
* @addtogroup OpenPilotLibraries OpenPilot System Libraries * @addtogroup OpenPilotLibraries OpenPilot System Libraries
* @{ * @{
* @file alarms.h * @file alarms.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Include file of the alarm library * @brief Include file of the alarm library
* @see The GNU Public License (GPL) Version 3 * @see The GNU Public License (GPL) Version 3
* *
@ -48,6 +49,8 @@ int32_t AlarmsHasErrors();
int32_t AlarmsHasCritical(); int32_t AlarmsHasCritical();
SystemAlarmsAlarmOptions AlarmsGetHighestSeverity(); SystemAlarmsAlarmOptions AlarmsGetHighestSeverity();
size_t AlarmString(SystemAlarmsData *alarm, char *buffer, size_t buffer_size, SystemAlarmsAlarmOptions level, SystemAlarmsAlarmOptions *highestSeverity);
#endif // ALARMS_H #endif // ALARMS_H
/** /**

View File

@ -50,15 +50,18 @@ extern const Color_t Color_White;
#define COLOR_BLACK { .R = 0x00, .G = 0x00, .B = 0x00 } #define COLOR_BLACK { .R = 0x00, .G = 0x00, .B = 0x00 }
#define COLOR_OFF COLOR_BLACK #define COLOR_OFF COLOR_BLACK
#define COLOR_RED { .R = 0xFF, .G = 0x00, .B = 0x00 } #define COLOR_RED { .R = 0xFF, .G = 0x00, .B = 0x00 }
#define COLOR_DARKRED { .R = 0x80, .G = 0x00, .B = 0x00 }
#define COLOR_LIME { .R = 0x00, .G = 0xFF, .B = 0x00 } #define COLOR_LIME { .R = 0x00, .G = 0xFF, .B = 0x00 }
#define COLOR_BLUE { .R = 0x00, .G = 0x00, .B = 0xFF } #define COLOR_BLUE { .R = 0x00, .G = 0x00, .B = 0xFF }
#define COLOR_YELLOW { .R = 0xFF, .G = 0xFF, .B = 0x00 } #define COLOR_YELLOW { .R = 0xCC, .G = 0xCC, .B = 0x00 }
#define COLOR_CIAN { .R = 0x00, .G = 0xFF, .B = 0xFF } #define COLOR_CIAN { .R = 0x00, .G = 0xFF, .B = 0xFF }
#define COLOR_MAGENTA { .R = 0xFF, .G = 0x00, .B = 0xFF } #define COLOR_MAGENTA { .R = 0xFF, .G = 0x00, .B = 0xFF }
#define COLOR_NAVY { .R = 0x00, .G = 0x00, .B = 0x80 } #define COLOR_NAVY { .R = 0x00, .G = 0x00, .B = 0x80 }
#define COLOR_GREEN { .R = 0x00, .G = 0x80, .B = 0x00 } #define COLOR_GREEN { .R = 0x00, .G = 0x80, .B = 0x00 }
#define COLOR_PURPLE { .R = 0x80, .G = 0x00, .B = 0x80 } #define COLOR_PURPLE { .R = 0x80, .G = 0x00, .B = 0x80 }
#define COLOR_TEAL { .R = 0x00, .G = 0x80, .B = 0x80 } #define COLOR_TEAL { .R = 0x00, .G = 0x80, .B = 0x80 }
#define COLOR_ORANGE { .R = 0xFF, .G = 0xA5, .B = 0x00 } #define COLOR_ORANGE { .R = 0xAA, .G = 0x44, .B = 0x00 }
#define COLOR_WHITE { .R = 0xAA, .G = 0xAA, .B = 0xAA } #define COLOR_WHITE { .R = 0xAA, .G = 0xAA, .B = 0xAA }
#endif /* UTIL_H */ #endif /* UTIL_H */

View File

@ -280,11 +280,11 @@ void INSSetBaroVar(float baro_var)
void INSSetMagNorth(float B[3]) void INSSetMagNorth(float B[3])
{ {
float mag = sqrtf(B[0] * B[0] + B[1] * B[1] + B[2] * B[2]); float invmag = invsqrtf(B[0] * B[0] + B[1] * B[1] + B[2] * B[2]);
ekf.Be[0] = B[0] / mag; ekf.Be[0] = B[0] * invmag;
ekf.Be[1] = B[1] / mag; ekf.Be[1] = B[1] * invmag;
ekf.Be[2] = B[2] / mag; ekf.Be[2] = B[2] * invmag;
} }
void INSStatePrediction(float gyro_data[3], float accel_data[3], float dT) void INSStatePrediction(float gyro_data[3], float accel_data[3], float dT)
@ -305,7 +305,7 @@ void INSStatePrediction(float gyro_data[3], float accel_data[3], float dT)
// EKF prediction step // EKF prediction step
LinearizeFG(ekf.X, U, ekf.F, ekf.G); LinearizeFG(ekf.X, U, ekf.F, ekf.G);
RungeKutta(ekf.X, U, dT); RungeKutta(ekf.X, U, dT);
invqmag = fast_invsqrtf(ekf.X[6] * ekf.X[6] + ekf.X[7] * ekf.X[7] + ekf.X[8] * ekf.X[8] + ekf.X[9] * ekf.X[9]); invqmag = invsqrtf(ekf.X[6] * ekf.X[6] + ekf.X[7] * ekf.X[7] + ekf.X[8] * ekf.X[8] + ekf.X[9] * ekf.X[9]);
ekf.X[6] *= invqmag; ekf.X[6] *= invqmag;
ekf.X[7] *= invqmag; ekf.X[7] *= invqmag;
ekf.X[8] *= invqmag; ekf.X[8] *= invqmag;
@ -390,7 +390,7 @@ void INSCorrection(float mag_data[3], float Pos[3], float Vel[3],
if (SensorsUsed & MAG_SENSORS) { if (SensorsUsed & MAG_SENSORS) {
float invBmag = fast_invsqrtf(mag_data[0] * mag_data[0] + mag_data[1] * mag_data[1] + mag_data[2] * mag_data[2]); float invBmag = invsqrtf(mag_data[0] * mag_data[0] + mag_data[1] * mag_data[1] + mag_data[2] * mag_data[2]);
Z[6] = mag_data[0] * invBmag; Z[6] = mag_data[0] * invBmag;
Z[7] = mag_data[1] * invBmag; Z[7] = mag_data[1] * invBmag;
Z[8] = mag_data[2] * invBmag; Z[8] = mag_data[2] * invBmag;
@ -404,7 +404,7 @@ void INSCorrection(float mag_data[3], float Pos[3], float Vel[3],
MeasurementEq(ekf.X, ekf.Be, Y); MeasurementEq(ekf.X, ekf.Be, Y);
SerialUpdate(ekf.H, ekf.R, Z, Y, ekf.P, ekf.X, SensorsUsed); SerialUpdate(ekf.H, ekf.R, Z, Y, ekf.P, ekf.X, SensorsUsed);
float invqmag = fast_invsqrtf(ekf.X[6] * ekf.X[6] + ekf.X[7] * ekf.X[7] + ekf.X[8] * ekf.X[8] + ekf.X[9] * ekf.X[9]); float invqmag = invsqrtf(ekf.X[6] * ekf.X[6] + ekf.X[7] * ekf.X[7] + ekf.X[8] * ekf.X[8] + ekf.X[9] * ekf.X[9]);
ekf.X[6] *= invqmag; ekf.X[6] *= invqmag;
ekf.X[7] *= invqmag; ekf.X[7] *= invqmag;
ekf.X[8] *= invqmag; ekf.X[8] *= invqmag;

View File

@ -5,8 +5,9 @@
* @addtogroup Reuseable math functions * @addtogroup Reuseable math functions
* @{ * @{
* *
* @file mathmisc.h * @file mathmisc.c
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012. * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
* @brief Reuseable math functions * @brief Reuseable math functions
* *
* @see The GNU Public License (GPL) Version 3 * @see The GNU Public License (GPL) Version 3
@ -28,5 +29,17 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <mathmisc.h>
// space deliberately left empty, any non inline misc math functions can go here void pseudo_windowed_variance_init(pw_variance_t *variance, int32_t window_size)
{
variance->new_sma = 0.0f;
variance->new_smsa = 0.0f;
variance->p1 = 1.0f / (float)window_size;
variance->p2 = 1.0f - variance->p1;
}
float pseudo_windowed_variance_get(pw_variance_t *variance)
{
return variance->new_smsa - variance->new_sma * variance->new_sma;
}

View File

@ -6,7 +6,8 @@
* @{ * @{
* *
* @file mathmisc.h * @file mathmisc.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012. * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
* @brief Reuseable math functions * @brief Reuseable math functions
* *
* @see The GNU Public License (GPL) Version 3 * @see The GNU Public License (GPL) Version 3
@ -34,6 +35,38 @@
#include <math.h> #include <math.h>
#include <stdint.h> #include <stdint.h>
typedef struct {
float p1;
float p2;
float new_sma;
float new_smsa;
} pw_variance_t;
/***
* initialize pseudo windowed
* @param variance the instance to be initialized
* @param window_size size of the sample window
*/
void pseudo_windowed_variance_init(pw_variance_t *variance, int32_t window_size);
/***
* Push a new sample
* @param variance the working instance
* @param sample the new sample
*/
static inline void pseudo_windowed_variance_push_sample(pw_variance_t *variance, float sample)
{
variance->new_sma = variance->new_sma * variance->p2 + sample * variance->p1;
variance->new_smsa = variance->new_smsa * variance->p2 + sample * sample * variance->p1;
}
/***
* Get the current variance value
* @param variance the working instance
* @return
*/
float pseudo_windowed_variance_get(pw_variance_t *variance);
// returns min(boundary1,boundary2) if val<min(boundary1,boundary2) // returns min(boundary1,boundary2) if val<min(boundary1,boundary2)
// returns max(boundary1,boundary2) if val>max(boundary1,boundary2) // returns max(boundary1,boundary2) if val>max(boundary1,boundary2)
// returns val if min(boundary1,boundary2)<=val<=max(boundary1,boundary2) // returns val if min(boundary1,boundary2)<=val<=max(boundary1,boundary2)
@ -119,28 +152,12 @@ static inline float y_on_curve(float x, const pointf points[], int num_points)
// Find the y value on the selected line. // Find the y value on the selected line.
return y_on_line(x, &points[end_point - 1], &points[end_point]); return y_on_line(x, &points[end_point - 1], &points[end_point]);
} }
// Fast inverse square root implementation from "quake3-1.32b/code/game/q_math.c"
// http://en.wikipedia.org/wiki/Fast_inverse_square_root
static inline float fast_invsqrtf(float number) static inline float invsqrtf(float number)
{ {
float x2, y; float y;
const float threehalfs = 1.5F;
union {
float f;
uint32_t u;
} i;
x2 = number * 0.5F;
y = number;
i.f = y; // evil floating point bit level hacking
i.u = 0x5f3759df - (i.u >> 1); // what the fxck?
y = i.f;
y = y * (threehalfs - (x2 * y * y)); // 1st iteration
// y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed
y = 1.0f / sqrtf(number);
return y; return y;
} }

View File

@ -76,7 +76,7 @@ float pid_apply(struct pid *pid, const float err, float dT)
* This version of apply uses setpoint weighting for the derivative component so the gain * This version of apply uses setpoint weighting for the derivative component so the gain
* on the gyro derivative can be different than the gain on the setpoint derivative * on the gyro derivative can be different than the gain on the setpoint derivative
*/ */
float pid_apply_setpoint(struct pid *pid, const pid_scaler *scaler, const float setpoint, const float measured, float dT) float pid_apply_setpoint(struct pid *pid, const pid_scaler *scaler, const float setpoint, const float measured, float dT, bool meas_based_d_term)
{ {
float err = setpoint - measured; float err = setpoint - measured;
@ -85,9 +85,18 @@ float pid_apply_setpoint(struct pid *pid, const pid_scaler *scaler, const float
pid->iAccumulator = boundf(pid->iAccumulator, pid->iLim * -1000.0f, pid->iLim * 1000.0f); pid->iAccumulator = boundf(pid->iAccumulator, pid->iLim * -1000.0f, pid->iLim * 1000.0f);
// Calculate DT1 term, // Calculate DT1 term,
float diff;
float derr = (-measured);
if (!meas_based_d_term) {
derr += deriv_gamma * setpoint;
}
diff = derr - pid->lastErr;
pid->lastErr = derr;
float dterm = 0; float dterm = 0;
float diff = ((deriv_gamma * setpoint - measured) - pid->lastErr);
pid->lastErr = (deriv_gamma * setpoint - measured);
if (pid->d > 0.0f && dT > 0.0f) { if (pid->d > 0.0f && dT > 0.0f) {
// low pass filter derivative term. below formula is the same as // low pass filter derivative term. below formula is the same as
// dterm = (1-alpha)*pid->lastDer + alpha * (...)/dT // dterm = (1-alpha)*pid->lastDer + alpha * (...)/dT
@ -95,7 +104,6 @@ float pid_apply_setpoint(struct pid *pid, const pid_scaler *scaler, const float
dterm = pid->lastDer + dT / (dT + deriv_tau) * ((scaler->d * diff * pid->d / dT) - pid->lastDer); dterm = pid->lastDer + dT / (dT + deriv_tau) * ((scaler->d * diff * pid->d / dT) - pid->lastDer);
pid->lastDer = dterm; pid->lastDer = dterm;
} }
return (err * scaler->p * pid->p) + pid->iAccumulator / 1000.0f + dterm; return (err * scaler->p * pid->p) + pid->iAccumulator / 1000.0f + dterm;
} }

View File

@ -70,7 +70,7 @@ typedef struct pid_scaler_s {
// ! Methods to use the pid structures // ! Methods to use the pid structures
float pid_apply(struct pid *pid, const float err, float dT); float pid_apply(struct pid *pid, const float err, float dT);
float pid_apply_setpoint(struct pid *pid, const pid_scaler *scaler, const float setpoint, const float measured, float dT); float pid_apply_setpoint(struct pid *pid, const pid_scaler *scaler, const float setpoint, const float measured, float dT, bool meas_based_d_term);
void pid_zero(struct pid *pid); void pid_zero(struct pid *pid);
void pid_configure(struct pid *pid, float p, float i, float d, float iLim); void pid_configure(struct pid *pid, float p, float i, float d, float iLim);
void pid_configure_derivative(float cutoff, float gamma); void pid_configure_derivative(float cutoff, float gamma);

View File

@ -0,0 +1 @@
#define MAVLINK_VERSION "1.0.7"

View File

@ -0,0 +1,89 @@
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _CHECKSUM_H_
#define _CHECKSUM_H_
/**
*
* CALCULATE THE CHECKSUM
*
*/
#define X25_INIT_CRC 0xffff
#define X25_VALIDATE_CRC 0xf0b8
/**
* @brief Accumulate the X.25 CRC by adding one char at a time.
*
* The checksum function adds the hash of one char at a time to the
* 16 bit checksum (uint16_t).
*
* @param data new char to hash
* @param crcAccum the already accumulated checksum
**/
static inline void crc_accumulate(uint8_t data, uint16_t *crcAccum)
{
/*Accumulate one byte of data into the CRC*/
uint8_t tmp;
tmp = data ^ (uint8_t)(*crcAccum & 0xff);
tmp ^= (tmp << 4);
*crcAccum = (*crcAccum >> 8) ^ (tmp << 8) ^ (tmp << 3) ^ (tmp >> 4);
}
/**
* @brief Initiliaze the buffer for the X.25 CRC
*
* @param crcAccum the 16 bit X.25 CRC
*/
static inline void crc_init(uint16_t *crcAccum)
{
*crcAccum = X25_INIT_CRC;
}
/**
* @brief Calculates the X.25 checksum on a byte buffer
*
* @param pBuffer buffer containing the byte array to hash
* @param length length of the byte array
* @return the checksum over the buffer bytes
**/
static inline uint16_t crc_calculate(const uint8_t *pBuffer, uint16_t length)
{
uint16_t crcTmp;
crc_init(&crcTmp);
while (length--) {
crc_accumulate(*pBuffer++, &crcTmp);
}
return crcTmp;
}
/**
* @brief Accumulate the X.25 CRC by adding an array of bytes
*
* The checksum function adds the hash of one char at a time to the
* 16 bit checksum (uint16_t).
*
* @param data new bytes to hash
* @param crcAccum the already accumulated checksum
**/
static inline void crc_accumulate_buffer(uint16_t *crcAccum, const char *pBuffer, uint8_t length)
{
const uint8_t *p = (const uint8_t *)pBuffer;
while (length--) {
crc_accumulate(*p++, crcAccum);
}
}
#endif /* _CHECKSUM_H_ */
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,1020 @@
/** @file
* @brief MAVLink comm protocol generated from common.xml
* @see http://qgroundcontrol.org/mavlink/
*/
#ifndef COMMON_H
#define COMMON_H
#ifdef __cplusplus
extern "C" {
#endif
// MESSAGE LENGTHS AND CRCS
#ifndef MAVLINK_MESSAGE_LENGTHS
#define MAVLINK_MESSAGE_LENGTHS { 9, 31, 12, 0, 14, 28, 3, 32, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 20, 2, 25, 23, 30, 101, 22, 26, 16, 14, 28, 32, 28, 28, 22, 22, 21, 6, 6, 37, 4, 4, 2, 2, 4, 2, 2, 3, 13, 12, 19, 17, 15, 15, 27, 25, 18, 18, 20, 20, 9, 34, 26, 46, 36, 0, 6, 4, 0, 21, 18, 0, 0, 0, 20, 0, 33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 56, 42, 33, 0, 0, 0, 0, 0, 0, 0, 26, 32, 32, 20, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 30, 18, 18, 51, 9, 0 }
#endif
#ifndef MAVLINK_MESSAGE_CRCS
#define MAVLINK_MESSAGE_CRCS { 50, 124, 137, 0, 237, 217, 104, 119, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 214, 159, 220, 168, 24, 23, 170, 144, 67, 115, 39, 246, 185, 104, 237, 244, 222, 212, 9, 254, 230, 28, 28, 132, 221, 232, 11, 153, 41, 39, 214, 223, 141, 33, 15, 3, 100, 24, 239, 238, 30, 240, 183, 130, 130, 0, 148, 21, 0, 52, 124, 0, 0, 0, 20, 0, 152, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 231, 183, 63, 54, 0, 0, 0, 0, 0, 0, 0, 175, 102, 158, 208, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 49, 170, 44, 83, 46, 0 }
#endif
#ifndef MAVLINK_MESSAGE_INFO
#define MAVLINK_MESSAGE_INFO \
{ MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, MAVLINK_MESSAGE_INFO_SET_MODE, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_SET_LOCAL_POSITION_SETPOINT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_SETPOINT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_SETPOINT_INT, MAVLINK_MESSAGE_INFO_SET_GLOBAL_POSITION_SETPOINT_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SET_ROLL_PITCH_YAW_THRUST, MAVLINK_MESSAGE_INFO_SET_ROLL_PITCH_YAW_SPEED_THRUST, MAVLINK_MESSAGE_INFO_ROLL_PITCH_YAW_THRUST_SETPOINT, MAVLINK_MESSAGE_INFO_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT, MAVLINK_MESSAGE_INFO_SET_QUAD_MOTORS_SETPOINT, MAVLINK_MESSAGE_INFO_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_SET_QUAD_SWARM_LED_ROLL_PITCH_YAW_THRUST, MAVLINK_MESSAGE_INFO_STATE_CORRECTION, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, MAVLINK_MESSAGE_INFO_VFR_HUD, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
}, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, { "EMPTY", 0, { \
{ "", "", MAVLINK_TYPE_CHAR, 0, 0, 0 } \
} \
} \
}
#endif // ifndef MAVLINK_MESSAGE_INFO
#include "../protocol.h"
#define MAVLINK_ENABLED_COMMON
// ENUM DEFINITIONS
/** @brief Micro air vehicle / autopilot classes. This identifies the individual model. */
#ifndef HAVE_ENUM_MAV_AUTOPILOT
#define HAVE_ENUM_MAV_AUTOPILOT
enum MAV_AUTOPILOT {
MAV_AUTOPILOT_GENERIC = 0, /* Generic autopilot, full support for everything | */
MAV_AUTOPILOT_PIXHAWK = 1, /* PIXHAWK autopilot, http://pixhawk.ethz.ch | */
MAV_AUTOPILOT_SLUGS = 2, /* SLUGS autopilot, http://slugsuav.soe.ucsc.edu | */
MAV_AUTOPILOT_ARDUPILOTMEGA = 3, /* ArduPilotMega / ArduCopter, http://diydrones.com | */
MAV_AUTOPILOT_OPENPILOT = 4, /* OpenPilot, http://openpilot.org | */
MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5, /* Generic autopilot only supporting simple waypoints | */
MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6, /* Generic autopilot supporting waypoints and other simple navigation commands | */
MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7, /* Generic autopilot supporting the full mission command set | */
MAV_AUTOPILOT_INVALID = 8, /* No valid autopilot, e.g. a GCS or other MAVLink component | */
MAV_AUTOPILOT_PPZ = 9, /* PPZ UAV - http://nongnu.org/paparazzi | */
MAV_AUTOPILOT_UDB = 10, /* UAV Dev Board | */
MAV_AUTOPILOT_FP = 11, /* FlexiPilot | */
MAV_AUTOPILOT_PX4 = 12, /* PX4 Autopilot - http://pixhawk.ethz.ch/px4/ | */
MAV_AUTOPILOT_ENUM_END = 13, /* | */
};
#endif
/** @brief */
#ifndef HAVE_ENUM_MAV_TYPE
#define HAVE_ENUM_MAV_TYPE
enum MAV_TYPE {
MAV_TYPE_GENERIC = 0, /* Generic micro air vehicle. | */
MAV_TYPE_FIXED_WING = 1, /* Fixed wing aircraft. | */
MAV_TYPE_QUADROTOR = 2, /* Quadrotor | */
MAV_TYPE_COAXIAL = 3, /* Coaxial helicopter | */
MAV_TYPE_HELICOPTER = 4, /* Normal helicopter with tail rotor. | */
MAV_TYPE_ANTENNA_TRACKER = 5, /* Ground installation | */
MAV_TYPE_GCS = 6, /* Operator control unit / ground control station | */
MAV_TYPE_AIRSHIP = 7, /* Airship, controlled | */
MAV_TYPE_FREE_BALLOON = 8, /* Free balloon, uncontrolled | */
MAV_TYPE_ROCKET = 9, /* Rocket | */
MAV_TYPE_GROUND_ROVER = 10, /* Ground rover | */
MAV_TYPE_SURFACE_BOAT = 11, /* Surface vessel, boat, ship | */
MAV_TYPE_SUBMARINE = 12, /* Submarine | */
MAV_TYPE_HEXAROTOR = 13, /* Hexarotor | */
MAV_TYPE_OCTOROTOR = 14, /* Octorotor | */
MAV_TYPE_TRICOPTER = 15, /* Octorotor | */
MAV_TYPE_FLAPPING_WING = 16, /* Flapping wing | */
MAV_TYPE_KITE = 17, /* Flapping wing | */
MAV_TYPE_ENUM_END = 18, /* | */
};
#endif // ifndef HAVE_ENUM_MAV_TYPE
/** @brief These flags encode the MAV mode. */
#ifndef HAVE_ENUM_MAV_MODE_FLAG
#define HAVE_ENUM_MAV_MODE_FLAG
enum MAV_MODE_FLAG {
MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1, /* 0b00000001 Reserved for future use. | */
MAV_MODE_FLAG_TEST_ENABLED = 2, /* 0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations. | */
MAV_MODE_FLAG_AUTO_ENABLED = 4, /* 0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation. | */
MAV_MODE_FLAG_GUIDED_ENABLED = 8, /* 0b00001000 guided mode enabled, system flies MISSIONs / mission items. | */
MAV_MODE_FLAG_STABILIZE_ENABLED = 16, /* 0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around. | */
MAV_MODE_FLAG_HIL_ENABLED = 32, /* 0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational. | */
MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64, /* 0b01000000 remote control input is enabled. | */
MAV_MODE_FLAG_SAFETY_ARMED = 128, /* 0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. | */
MAV_MODE_FLAG_ENUM_END = 129, /* | */
};
#endif
/** @brief These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not. */
#ifndef HAVE_ENUM_MAV_MODE_FLAG_DECODE_POSITION
#define HAVE_ENUM_MAV_MODE_FLAG_DECODE_POSITION
enum MAV_MODE_FLAG_DECODE_POSITION {
MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1, /* Eighth bit: 00000001 | */
MAV_MODE_FLAG_DECODE_POSITION_TEST = 2, /* Seventh bit: 00000010 | */
MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4, /* Sixt bit: 00000100 | */
MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8, /* Fifth bit: 00001000 | */
MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16, /* Fourth bit: 00010000 | */
MAV_MODE_FLAG_DECODE_POSITION_HIL = 32, /* Third bit: 00100000 | */
MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64, /* Second bit: 01000000 | */
MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128, /* First bit: 10000000 | */
MAV_MODE_FLAG_DECODE_POSITION_ENUM_END = 129, /* | */
};
#endif
/** @brief Override command, pauses current mission execution and moves immediately to a position */
#ifndef HAVE_ENUM_MAV_GOTO
#define HAVE_ENUM_MAV_GOTO
enum MAV_GOTO {
MAV_GOTO_DO_HOLD = 0, /* Hold at the current position. | */
MAV_GOTO_DO_CONTINUE = 1, /* Continue with the next item in mission execution. | */
MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2, /* Hold at the current position of the system | */
MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3, /* Hold at the position specified in the parameters of the DO_HOLD action | */
MAV_GOTO_ENUM_END = 4, /* | */
};
#endif
/** @brief These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it
simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override. */
#ifndef HAVE_ENUM_MAV_MODE
#define HAVE_ENUM_MAV_MODE
enum MAV_MODE {
MAV_MODE_PREFLIGHT = 0, /* System is not ready to fly, booting, calibrating, etc. No flag is set. | */
MAV_MODE_MANUAL_DISARMED = 64, /* System is allowed to be active, under manual (RC) control, no stabilization | */
MAV_MODE_TEST_DISARMED = 66, /* UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only. | */
MAV_MODE_STABILIZE_DISARMED = 80, /* System is allowed to be active, under assisted RC control. | */
MAV_MODE_GUIDED_DISARMED = 88, /* System is allowed to be active, under autonomous control, manual setpoint | */
MAV_MODE_AUTO_DISARMED = 92, /* System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by MISSIONs) | */
MAV_MODE_MANUAL_ARMED = 192, /* System is allowed to be active, under manual (RC) control, no stabilization | */
MAV_MODE_TEST_ARMED = 194, /* UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only. | */
MAV_MODE_STABILIZE_ARMED = 208, /* System is allowed to be active, under assisted RC control. | */
MAV_MODE_GUIDED_ARMED = 216, /* System is allowed to be active, under autonomous control, manual setpoint | */
MAV_MODE_AUTO_ARMED = 220, /* System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by MISSIONs) | */
MAV_MODE_ENUM_END = 221, /* | */
};
#endif
/** @brief */
#ifndef HAVE_ENUM_MAV_STATE
#define HAVE_ENUM_MAV_STATE
enum MAV_STATE {
MAV_STATE_UNINIT = 0, /* Uninitialized system, state is unknown. | */
MAV_STATE_BOOT = 1, /* System is booting up. | */
MAV_STATE_CALIBRATING = 2, /* System is calibrating and not flight-ready. | */
MAV_STATE_STANDBY = 3, /* System is grounded and on standby. It can be launched any time. | */
MAV_STATE_ACTIVE = 4, /* System is active and might be already airborne. Motors are engaged. | */
MAV_STATE_CRITICAL = 5, /* System is in a non-normal flight mode. It can however still navigate. | */
MAV_STATE_EMERGENCY = 6, /* System is in a non-normal flight mode. It lost control over parts or over the whole airframe. It is in mayday and going down. | */
MAV_STATE_POWEROFF = 7, /* System just initialized its power-down sequence, will shut down now. | */
MAV_STATE_ENUM_END = 8, /* | */
};
#endif
/** @brief */
#ifndef HAVE_ENUM_MAV_COMPONENT
#define HAVE_ENUM_MAV_COMPONENT
enum MAV_COMPONENT {
MAV_COMP_ID_ALL = 0, /* | */
MAV_COMP_ID_CAMERA = 100, /* | */
MAV_COMP_ID_SERVO1 = 140, /* | */
MAV_COMP_ID_SERVO2 = 141, /* | */
MAV_COMP_ID_SERVO3 = 142, /* | */
MAV_COMP_ID_SERVO4 = 143, /* | */
MAV_COMP_ID_SERVO5 = 144, /* | */
MAV_COMP_ID_SERVO6 = 145, /* | */
MAV_COMP_ID_SERVO7 = 146, /* | */
MAV_COMP_ID_SERVO8 = 147, /* | */
MAV_COMP_ID_SERVO9 = 148, /* | */
MAV_COMP_ID_SERVO10 = 149, /* | */
MAV_COMP_ID_SERVO11 = 150, /* | */
MAV_COMP_ID_SERVO12 = 151, /* | */
MAV_COMP_ID_SERVO13 = 152, /* | */
MAV_COMP_ID_SERVO14 = 153, /* | */
MAV_COMP_ID_MAPPER = 180, /* | */
MAV_COMP_ID_MISSIONPLANNER = 190, /* | */
MAV_COMP_ID_PATHPLANNER = 195, /* | */
MAV_COMP_ID_IMU = 200, /* | */
MAV_COMP_ID_IMU_2 = 201, /* | */
MAV_COMP_ID_IMU_3 = 202, /* | */
MAV_COMP_ID_GPS = 220, /* | */
MAV_COMP_ID_UDP_BRIDGE = 240, /* | */
MAV_COMP_ID_UART_BRIDGE = 241, /* | */
MAV_COMP_ID_SYSTEM_CONTROL = 250, /* | */
MAV_COMPONENT_ENUM_END = 251, /* | */
};
#endif // ifndef HAVE_ENUM_MAV_COMPONENT
/** @brief */
#ifndef HAVE_ENUM_MAV_FRAME
#define HAVE_ENUM_MAV_FRAME
enum MAV_FRAME {
MAV_FRAME_GLOBAL = 0, /* Global coordinate frame, WGS84 coordinate system. First value / x: latitude, second value / y: longitude, third value / z: positive altitude over mean sea level (MSL) | */
MAV_FRAME_LOCAL_NED = 1, /* Local coordinate frame, Z-up (x: north, y: east, z: down). | */
MAV_FRAME_MISSION = 2, /* NOT a coordinate frame, indicates a mission command. | */
MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, /* Global coordinate frame, WGS84 coordinate system, relative altitude over ground with respect to the home position. First value / x: latitude, second value / y: longitude, third value / z: positive altitude with 0 being at the altitude of the home location. | */
MAV_FRAME_LOCAL_ENU = 4, /* Local coordinate frame, Z-down (x: east, y: north, z: up) | */
MAV_FRAME_ENUM_END = 5, /* | */
};
#endif
/** @brief */
#ifndef HAVE_ENUM_MAVLINK_DATA_STREAM_TYPE
#define HAVE_ENUM_MAVLINK_DATA_STREAM_TYPE
enum MAVLINK_DATA_STREAM_TYPE {
MAVLINK_DATA_STREAM_IMG_JPEG = 1, /* | */
MAVLINK_DATA_STREAM_IMG_BMP = 2, /* | */
MAVLINK_DATA_STREAM_IMG_RAW8U = 3, /* | */
MAVLINK_DATA_STREAM_IMG_RAW32U = 4, /* | */
MAVLINK_DATA_STREAM_IMG_PGM = 5, /* | */
MAVLINK_DATA_STREAM_IMG_PNG = 6, /* | */
MAVLINK_DATA_STREAM_TYPE_ENUM_END = 7, /* | */
};
#endif
/** @brief Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. */
#ifndef HAVE_ENUM_MAV_CMD
#define HAVE_ENUM_MAV_CMD
enum MAV_CMD {
MAV_CMD_NAV_WAYPOINT = 16, /* Navigate to MISSION. |Hold time in decimal seconds. (ignored by fixed wing, time to stay at MISSION for rotary wing)| Acceptance radius in meters (if the sphere with this radius is hit, the MISSION counts as reached)| 0 to pass through the WP, if > 0 radius in meters to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| Desired yaw angle at MISSION (rotary wing)| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_LOITER_UNLIM = 17, /* Loiter around this MISSION an unlimited amount of time |Empty| Empty| Radius around MISSION, in meters. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_LOITER_TURNS = 18, /* Loiter around this MISSION for X turns |Turns| Empty| Radius around MISSION, in meters. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_LOITER_TIME = 19, /* Loiter around this MISSION for X seconds |Seconds (decimal)| Empty| Radius around MISSION, in meters. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_RETURN_TO_LAUNCH = 20, /* Return to launch location |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_NAV_LAND = 21, /* Land at location |Empty| Empty| Empty| Desired yaw angle.| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_TAKEOFF = 22, /* Takeoff from ground / hand |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_ROI = 80, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicles control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of intereset mode. (see MAV_ROI enum)| MISSION index/ target ID. (see MAV_ROI enum)| ROI index (allows a vehicle to manage multiple ROI's)| Empty| x the location of the fixed ROI (see MAV_FRAME)| y| z| */
MAV_CMD_NAV_PATHPLANNING = 81, /* Control autonomous path planning on the MAV. |0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| Empty| Yaw angle at goal, in compass degrees, [0..360]| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */
MAV_CMD_NAV_LAST = 95, /* NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_CONDITION_DELAY = 112, /* Delay mission state machine. |Delay in seconds (decimal)| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_CONDITION_CHANGE_ALT = 113, /* Ascend/descend at rate. Delay mission state machine until desired altitude reached. |Descent / Ascend rate (m/s)| Empty| Empty| Empty| Empty| Empty| Finish Altitude| */
MAV_CMD_CONDITION_DISTANCE = 114, /* Delay mission state machine until within desired distance of next NAV point. |Distance (meters)| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_CONDITION_YAW = 115, /* Reach a certain target angle. |target angle: [0-360], 0 is north| speed during yaw change:[deg per second]| direction: negative: counter clockwise, positive: clockwise [-1,1]| relative offset or absolute angle: [ 1,0]| Empty| Empty| Empty| */
MAV_CMD_CONDITION_LAST = 159, /* NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SET_MODE = 176, /* Set system mode. |Mode, as defined by ENUM MAV_MODE| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_JUMP = 177, /* Jump to the desired command in the mission list. Repeat this action only the specified number of times |Sequence number| Repeat count| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_CHANGE_SPEED = 178, /* Change speed and/or throttle set points. |Speed type (0=Airspeed, 1=Ground Speed)| Speed (m/s, -1 indicates no change)| Throttle ( Percent, -1 indicates no change)| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SET_HOME = 179, /* Changes the home location either to the current location or a specified location. |Use current (1=use current location, 0=use specified location)| Empty| Empty| Empty| Latitude| Longitude| Altitude| */
MAV_CMD_DO_SET_PARAMETER = 180, /* Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter. |Parameter number| Parameter value| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SET_RELAY = 181, /* Set a relay to a condition. |Relay number| Setting (1=on, 0=off, others possible depending on system hardware)| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_REPEAT_RELAY = 182, /* Cycle a relay on and off for a desired number of cyles with a desired period. |Relay number| Cycle count| Cycle time (seconds, decimal)| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SET_SERVO = 183, /* Set a servo to a desired PWM value. |Servo number| PWM (microseconds, 1000 to 2000 typical)| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_REPEAT_SERVO = 184, /* Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo number| PWM (microseconds, 1000 to 2000 typical)| Cycle count| Cycle time (seconds)| Empty| Empty| Empty| */
MAV_CMD_DO_CONTROL_VIDEO = 200, /* Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds (decimal)| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty| */
MAV_CMD_DO_LAST = 240, /* NOP - This command is only used to mark the upper limit of the DO commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_PREFLIGHT_CALIBRATION = 241, /* Trigger calibration. This command will be only accepted if in pre-flight mode. |Gyro calibration: 0: no, 1: yes| Magnetometer calibration: 0: no, 1: yes| Ground pressure: 0: no, 1: yes| Radio calibration: 0: no, 1: yes| Empty| Empty| Empty| */
MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242, /* Set sensor offsets. This command will be only accepted if in pre-flight mode. |Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow| X axis offset (or generic dimension 1), in the sensor's raw units| Y axis offset (or generic dimension 2), in the sensor's raw units| Z axis offset (or generic dimension 3), in the sensor's raw units| Generic dimension 4, in the sensor's raw units| Generic dimension 5, in the sensor's raw units| Generic dimension 6, in the sensor's raw units| */
MAV_CMD_PREFLIGHT_STORAGE = 245, /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. |Parameter storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM| Mission storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM| Reserved| Reserved| Empty| Empty| Empty| */
MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246, /* Request the reboot or shutdown of system components. |0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot.| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer.| Reserved| Reserved| Empty| Empty| Empty| */
MAV_CMD_OVERRIDE_GOTO = 252, /* Hold / continue the current action |MAV_GOTO_DO_HOLD: hold MAV_GOTO_DO_CONTINUE: continue with next item in mission plan| MAV_GOTO_HOLD_AT_CURRENT_POSITION: Hold at current position MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position| MAV_FRAME coordinate frame of hold point| Desired yaw angle in degrees| Latitude / X position| Longitude / Y position| Altitude / Z position| */
MAV_CMD_MISSION_START = 300, /* start running a mission |first_item: the first mission item to run| last_item: the last mission item to run (after this item is run, the mission ends)| */
MAV_CMD_COMPONENT_ARM_DISARM = 400, /* Arms / Disarms a component |1 to arm, 0 to disarm| */
MAV_CMD_ENUM_END = 401, /* | */
};
#endif // ifndef HAVE_ENUM_MAV_CMD
/** @brief Data stream IDs. A data stream is not a fixed set of messages, but rather a
recommendation to the autopilot software. Individual autopilots may or may not obey
the recommended messages. */
#ifndef HAVE_ENUM_MAV_DATA_STREAM
#define HAVE_ENUM_MAV_DATA_STREAM
enum MAV_DATA_STREAM {
MAV_DATA_STREAM_ALL = 0, /* Enable all data streams | */
MAV_DATA_STREAM_RAW_SENSORS = 1, /* Enable IMU_RAW, GPS_RAW, GPS_STATUS packets. | */
MAV_DATA_STREAM_EXTENDED_STATUS = 2, /* Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS | */
MAV_DATA_STREAM_RC_CHANNELS = 3, /* Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW | */
MAV_DATA_STREAM_RAW_CONTROLLER = 4, /* Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT. | */
MAV_DATA_STREAM_POSITION = 6, /* Enable LOCAL_POSITION, GLOBAL_POSITION/GLOBAL_POSITION_INT messages. | */
MAV_DATA_STREAM_EXTRA1 = 10, /* Dependent on the autopilot | */
MAV_DATA_STREAM_EXTRA2 = 11, /* Dependent on the autopilot | */
MAV_DATA_STREAM_EXTRA3 = 12, /* Dependent on the autopilot | */
MAV_DATA_STREAM_ENUM_END = 13, /* | */
};
#endif
/** @brief The ROI (region of interest) for the vehicle. This can be
be used by the vehicle for camera/vehicle attitude alignment (see
MAV_CMD_NAV_ROI). */
#ifndef HAVE_ENUM_MAV_ROI
#define HAVE_ENUM_MAV_ROI
enum MAV_ROI {
MAV_ROI_NONE = 0, /* No region of interest. | */
MAV_ROI_WPNEXT = 1, /* Point toward next MISSION. | */
MAV_ROI_WPINDEX = 2, /* Point toward given MISSION. | */
MAV_ROI_LOCATION = 3, /* Point toward fixed location. | */
MAV_ROI_TARGET = 4, /* Point toward of given id. | */
MAV_ROI_ENUM_END = 5, /* | */
};
#endif
/** @brief ACK / NACK / ERROR values as a result of MAV_CMDs and for mission item transmission. */
#ifndef HAVE_ENUM_MAV_CMD_ACK
#define HAVE_ENUM_MAV_CMD_ACK
enum MAV_CMD_ACK {
MAV_CMD_ACK_OK = 1, /* Command / mission item is ok. | */
MAV_CMD_ACK_ERR_FAIL = 2, /* Generic error message if none of the other reasons fails or if no detailed error reporting is implemented. | */
MAV_CMD_ACK_ERR_ACCESS_DENIED = 3, /* The system is refusing to accept this command from this source / communication partner. | */
MAV_CMD_ACK_ERR_NOT_SUPPORTED = 4, /* Command or mission item is not supported, other commands would be accepted. | */
MAV_CMD_ACK_ERR_COORDINATE_FRAME_NOT_SUPPORTED = 5, /* The coordinate frame of this command / mission item is not supported. | */
MAV_CMD_ACK_ERR_COORDINATES_OUT_OF_RANGE = 6, /* The coordinate frame of this command is ok, but he coordinate values exceed the safety limits of this system. This is a generic error, please use the more specific error messages below if possible. | */
MAV_CMD_ACK_ERR_X_LAT_OUT_OF_RANGE = 7, /* The X or latitude value is out of range. | */
MAV_CMD_ACK_ERR_Y_LON_OUT_OF_RANGE = 8, /* The Y or longitude value is out of range. | */
MAV_CMD_ACK_ERR_Z_ALT_OUT_OF_RANGE = 9, /* The Z or altitude value is out of range. | */
MAV_CMD_ACK_ENUM_END = 10, /* | */
};
#endif
/** @brief Specifies the datatype of a MAVLink parameter. */
#ifndef HAVE_ENUM_MAV_PARAM_TYPE
#define HAVE_ENUM_MAV_PARAM_TYPE
enum MAV_PARAM_TYPE {
MAV_PARAM_TYPE_UINT8 = 1, /* 8-bit unsigned integer | */
MAV_PARAM_TYPE_INT8 = 2, /* 8-bit signed integer | */
MAV_PARAM_TYPE_UINT16 = 3, /* 16-bit unsigned integer | */
MAV_PARAM_TYPE_INT16 = 4, /* 16-bit signed integer | */
MAV_PARAM_TYPE_UINT32 = 5, /* 32-bit unsigned integer | */
MAV_PARAM_TYPE_INT32 = 6, /* 32-bit signed integer | */
MAV_PARAM_TYPE_UINT64 = 7, /* 64-bit unsigned integer | */
MAV_PARAM_TYPE_INT64 = 8, /* 64-bit signed integer | */
MAV_PARAM_TYPE_REAL32 = 9, /* 32-bit floating-point | */
MAV_PARAM_TYPE_REAL64 = 10, /* 64-bit floating-point | */
MAV_PARAM_TYPE_ENUM_END = 11, /* | */
};
#endif
/** @brief result from a mavlink command */
#ifndef HAVE_ENUM_MAV_RESULT
#define HAVE_ENUM_MAV_RESULT
enum MAV_RESULT {
MAV_RESULT_ACCEPTED = 0, /* Command ACCEPTED and EXECUTED | */
MAV_RESULT_TEMPORARILY_REJECTED = 1, /* Command TEMPORARY REJECTED/DENIED | */
MAV_RESULT_DENIED = 2, /* Command PERMANENTLY DENIED | */
MAV_RESULT_UNSUPPORTED = 3, /* Command UNKNOWN/UNSUPPORTED | */
MAV_RESULT_FAILED = 4, /* Command executed, but failed | */
MAV_RESULT_ENUM_END = 5, /* | */
};
#endif
/** @brief result in a mavlink mission ack */
#ifndef HAVE_ENUM_MAV_MISSION_RESULT
#define HAVE_ENUM_MAV_MISSION_RESULT
enum MAV_MISSION_RESULT {
MAV_MISSION_ACCEPTED = 0, /* mission accepted OK | */
MAV_MISSION_ERROR = 1, /* generic error / not accepting mission commands at all right now | */
MAV_MISSION_UNSUPPORTED_FRAME = 2, /* coordinate frame is not supported | */
MAV_MISSION_UNSUPPORTED = 3, /* command is not supported | */
MAV_MISSION_NO_SPACE = 4, /* mission item exceeds storage space | */
MAV_MISSION_INVALID = 5, /* one of the parameters has an invalid value | */
MAV_MISSION_INVALID_PARAM1 = 6, /* param1 has an invalid value | */
MAV_MISSION_INVALID_PARAM2 = 7, /* param2 has an invalid value | */
MAV_MISSION_INVALID_PARAM3 = 8, /* param3 has an invalid value | */
MAV_MISSION_INVALID_PARAM4 = 9, /* param4 has an invalid value | */
MAV_MISSION_INVALID_PARAM5_X = 10, /* x/param5 has an invalid value | */
MAV_MISSION_INVALID_PARAM6_Y = 11, /* y/param6 has an invalid value | */
MAV_MISSION_INVALID_PARAM7 = 12, /* param7 has an invalid value | */
MAV_MISSION_INVALID_SEQUENCE = 13, /* received waypoint out of sequence | */
MAV_MISSION_DENIED = 14, /* not accepting any mission commands from this communication partner | */
MAV_MISSION_RESULT_ENUM_END = 15, /* | */
};
#endif
/** @brief Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: http://www.kiwisyslog.com/kb/info:-syslog-message-levels/. */
#ifndef HAVE_ENUM_MAV_SEVERITY
#define HAVE_ENUM_MAV_SEVERITY
enum MAV_SEVERITY {
MAV_SEVERITY_EMERGENCY = 0, /* System is unusable. This is a "panic" condition. | */
MAV_SEVERITY_ALERT = 1, /* Action should be taken immediately. Indicates error in non-critical systems. | */
MAV_SEVERITY_CRITICAL = 2, /* Action must be taken immediately. Indicates failure in a primary system. | */
MAV_SEVERITY_ERROR = 3, /* Indicates an error in secondary/redundant systems. | */
MAV_SEVERITY_WARNING = 4, /* Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning. | */
MAV_SEVERITY_NOTICE = 5, /* An unusual event has occured, though not an error condition. This should be investigated for the root cause. | */
MAV_SEVERITY_INFO = 6, /* Normal operational messages. Useful for logging. No action is required for these messages. | */
MAV_SEVERITY_DEBUG = 7, /* Useful non-operational messages that can assist in debugging. These should not occur during normal operation. | */
MAV_SEVERITY_ENUM_END = 8, /* | */
};
#endif
// MAVLINK VERSION
#ifndef MAVLINK_VERSION
#define MAVLINK_VERSION 3
#endif
#if (MAVLINK_VERSION == 0)
#undef MAVLINK_VERSION
#define MAVLINK_VERSION 3
#endif
// MESSAGE DEFINITIONS
#include "./mavlink_msg_heartbeat.h"
#include "./mavlink_msg_sys_status.h"
#include "./mavlink_msg_system_time.h"
#include "./mavlink_msg_ping.h"
#include "./mavlink_msg_change_operator_control.h"
#include "./mavlink_msg_change_operator_control_ack.h"
#include "./mavlink_msg_auth_key.h"
#include "./mavlink_msg_set_mode.h"
#include "./mavlink_msg_param_request_read.h"
#include "./mavlink_msg_param_request_list.h"
#include "./mavlink_msg_param_value.h"
#include "./mavlink_msg_param_set.h"
#include "./mavlink_msg_gps_raw_int.h"
#include "./mavlink_msg_gps_status.h"
#include "./mavlink_msg_scaled_imu.h"
#include "./mavlink_msg_raw_imu.h"
#include "./mavlink_msg_raw_pressure.h"
#include "./mavlink_msg_scaled_pressure.h"
#include "./mavlink_msg_attitude.h"
#include "./mavlink_msg_attitude_quaternion.h"
#include "./mavlink_msg_local_position_ned.h"
#include "./mavlink_msg_global_position_int.h"
#include "./mavlink_msg_rc_channels_scaled.h"
#include "./mavlink_msg_rc_channels_raw.h"
#include "./mavlink_msg_servo_output_raw.h"
#include "./mavlink_msg_mission_request_partial_list.h"
#include "./mavlink_msg_mission_write_partial_list.h"
#include "./mavlink_msg_mission_item.h"
#include "./mavlink_msg_mission_request.h"
#include "./mavlink_msg_mission_set_current.h"
#include "./mavlink_msg_mission_current.h"
#include "./mavlink_msg_mission_request_list.h"
#include "./mavlink_msg_mission_count.h"
#include "./mavlink_msg_mission_clear_all.h"
#include "./mavlink_msg_mission_item_reached.h"
#include "./mavlink_msg_mission_ack.h"
#include "./mavlink_msg_set_gps_global_origin.h"
#include "./mavlink_msg_gps_global_origin.h"
#include "./mavlink_msg_set_local_position_setpoint.h"
#include "./mavlink_msg_local_position_setpoint.h"
#include "./mavlink_msg_global_position_setpoint_int.h"
#include "./mavlink_msg_set_global_position_setpoint_int.h"
#include "./mavlink_msg_safety_set_allowed_area.h"
#include "./mavlink_msg_safety_allowed_area.h"
#include "./mavlink_msg_set_roll_pitch_yaw_thrust.h"
#include "./mavlink_msg_set_roll_pitch_yaw_speed_thrust.h"
#include "./mavlink_msg_roll_pitch_yaw_thrust_setpoint.h"
#include "./mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint.h"
#include "./mavlink_msg_set_quad_motors_setpoint.h"
#include "./mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust.h"
#include "./mavlink_msg_nav_controller_output.h"
#include "./mavlink_msg_set_quad_swarm_led_roll_pitch_yaw_thrust.h"
#include "./mavlink_msg_state_correction.h"
#include "./mavlink_msg_request_data_stream.h"
#include "./mavlink_msg_data_stream.h"
#include "./mavlink_msg_manual_control.h"
#include "./mavlink_msg_rc_channels_override.h"
#include "./mavlink_msg_vfr_hud.h"
#include "./mavlink_msg_command_long.h"
#include "./mavlink_msg_command_ack.h"
#include "./mavlink_msg_local_position_ned_system_global_offset.h"
#include "./mavlink_msg_hil_state.h"
#include "./mavlink_msg_hil_controls.h"
#include "./mavlink_msg_hil_rc_inputs_raw.h"
#include "./mavlink_msg_optical_flow.h"
#include "./mavlink_msg_global_vision_position_estimate.h"
#include "./mavlink_msg_vision_position_estimate.h"
#include "./mavlink_msg_vision_speed_estimate.h"
#include "./mavlink_msg_vicon_position_estimate.h"
#include "./mavlink_msg_memory_vect.h"
#include "./mavlink_msg_debug_vect.h"
#include "./mavlink_msg_named_value_float.h"
#include "./mavlink_msg_named_value_int.h"
#include "./mavlink_msg_statustext.h"
#include "./mavlink_msg_debug.h"
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // COMMON_H

View File

@ -0,0 +1,25 @@
/* Dervied from minimosd-extra code at https://github.com/diydrones/MinimOSD-Extra/blob/master/MinimOsd-Extra/OSD_Panels.ino (GPLv3) */
#ifndef _CUSTOM_TYPES_H
#define _CUSTOM_TYPES_H
#define CUSTOM_MODE_STAB 0 /* manual airframe angle with manual throttle */
#define CUSTOM_MODE_ACRO 1 /* manual body-frame angular rate with manual throttle */
#define CUSTOM_MODE_ALTH 2 /* manual airframe angle with automatic throttle */
#define CUSTOM_MODE_AUTO 3 /* fully automatic waypoint control using mission commands */
#define CUSTOM_MODE_GUIDED 4 /* fully automatic fly to coordinate or fly at velocity/direction using GCS immediate commands */
#define CUSTOM_MODE_LOITER 5 /* automatic horizontal acceleration with automatic throttle */
#define CUSTOM_MODE_RTL 6 /* automatic return to launching point */
#define CUSTOM_MODE_CIRCLE 7 /* automatic circular flight with automatic throttle */
#define CUSTOM_MODE_POSH 8 /* Position: auto control; deprecated? */
#define CUSTOM_MODE_LAND 9 /* automatic landing with horizontal position control */
#define CUSTOM_MODE_OFLOITER 10 /* deprecated */
#define CUSTOM_MODE_DRIFT 11 /* semi-automous position, yaw and throttle control */
#define CUSTOM_MODE_SPORT 13 /* manual earth-frame angular rate control with manual throttle */
#define CUSTOM_MODE_FLIP 14 /* automatically flip the vehicle on the roll axis */
#define CUSTOM_MODE_ATUN 15 /* automatically tune the vehicle's roll and pitch gains */
#define CUSTOM_MODE_PHLD 16 /* automatic position hold with manual override, with automatic throttle */
#define CUSTOM_MODE_BRAK 17 /* full-brake using inertial/GPS system, no pilot input */
#endif // ifndef _CUSTOM_TYPES_H

View File

@ -0,0 +1,27 @@
/** @file
* @brief MAVLink comm protocol built from common.xml
* @see http://pixhawk.ethz.ch/software/mavlink
*/
#ifndef MAVLINK_H
#define MAVLINK_H
#ifndef MAVLINK_STX
#define MAVLINK_STX 254
#endif
#ifndef MAVLINK_ENDIAN
#define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
#endif
#ifndef MAVLINK_ALIGNED_FIELDS
#define MAVLINK_ALIGNED_FIELDS 1
#endif
#ifndef MAVLINK_CRC_EXTRA
#define MAVLINK_CRC_EXTRA 1
#endif
#include "version.h"
#include "common.h"
#endif // MAVLINK_H

View File

@ -0,0 +1,276 @@
// MESSAGE ATTITUDE PACKING
#define MAVLINK_MSG_ID_ATTITUDE 30
typedef struct __mavlink_attitude_t {
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
float roll; ///< Roll angle (rad)
float pitch; ///< Pitch angle (rad)
float yaw; ///< Yaw angle (rad)
float rollspeed; ///< Roll angular speed (rad/s)
float pitchspeed; ///< Pitch angular speed (rad/s)
float yawspeed; ///< Yaw angular speed (rad/s)
} mavlink_attitude_t;
#define MAVLINK_MSG_ID_ATTITUDE_LEN 28
#define MAVLINK_MSG_ID_30_LEN 28
#define MAVLINK_MESSAGE_INFO_ATTITUDE \
{ \
"ATTITUDE", \
7, \
{ \
{ "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_attitude_t, time_boot_ms) }, \
{ "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_attitude_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_attitude_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_attitude_t, yaw) }, \
{ "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_attitude_t, rollspeed) }, \
{ "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_attitude_t, pitchspeed) }, \
{ "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_attitude_t, yawspeed) }, \
} \
}
/**
* @brief Pack a attitude message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_attitude_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint32_t time_boot_ms, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
_mav_put_float(buf, 12, yaw);
_mav_put_float(buf, 16, rollspeed);
_mav_put_float(buf, 20, pitchspeed);
_mav_put_float(buf, 24, yawspeed);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_attitude_t packet;
packet.time_boot_ms = time_boot_ms;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_ATTITUDE;
return mavlink_finalize_message(msg, system_id, component_id, 28, 39);
}
/**
* @brief Pack a attitude message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_attitude_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint32_t time_boot_ms, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
_mav_put_float(buf, 12, yaw);
_mav_put_float(buf, 16, rollspeed);
_mav_put_float(buf, 20, pitchspeed);
_mav_put_float(buf, 24, yawspeed);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_attitude_t packet;
packet.time_boot_ms = time_boot_ms;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_ATTITUDE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 39);
}
/**
* @brief Encode a attitude struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param attitude C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_attitude_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_attitude_t *attitude)
{
return mavlink_msg_attitude_pack(system_id, component_id, msg, attitude->time_boot_ms, attitude->roll, attitude->pitch, attitude->yaw, attitude->rollspeed, attitude->pitchspeed, attitude->yawspeed);
}
/**
* @brief Send a attitude message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_attitude_send(mavlink_channel_t chan, uint32_t time_boot_ms, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
_mav_put_float(buf, 12, yaw);
_mav_put_float(buf, 16, rollspeed);
_mav_put_float(buf, 20, pitchspeed);
_mav_put_float(buf, 24, yawspeed);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE, buf, 28, 39);
#else
mavlink_attitude_t packet;
packet.time_boot_ms = time_boot_ms;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE, (const char *)&packet, 28, 39);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE ATTITUDE UNPACKING
/**
* @brief Get field time_boot_ms from attitude message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_attitude_get_time_boot_ms(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field roll from attitude message
*
* @return Roll angle (rad)
*/
static inline float mavlink_msg_attitude_get_roll(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field pitch from attitude message
*
* @return Pitch angle (rad)
*/
static inline float mavlink_msg_attitude_get_pitch(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field yaw from attitude message
*
* @return Yaw angle (rad)
*/
static inline float mavlink_msg_attitude_get_yaw(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field rollspeed from attitude message
*
* @return Roll angular speed (rad/s)
*/
static inline float mavlink_msg_attitude_get_rollspeed(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field pitchspeed from attitude message
*
* @return Pitch angular speed (rad/s)
*/
static inline float mavlink_msg_attitude_get_pitchspeed(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field yawspeed from attitude message
*
* @return Yaw angular speed (rad/s)
*/
static inline float mavlink_msg_attitude_get_yawspeed(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Decode a attitude message into a struct
*
* @param msg The message to decode
* @param attitude C-struct to decode the message contents into
*/
static inline void mavlink_msg_attitude_decode(const mavlink_message_t *msg, mavlink_attitude_t *attitude)
{
#if MAVLINK_NEED_BYTE_SWAP
attitude->time_boot_ms = mavlink_msg_attitude_get_time_boot_ms(msg);
attitude->roll = mavlink_msg_attitude_get_roll(msg);
attitude->pitch = mavlink_msg_attitude_get_pitch(msg);
attitude->yaw = mavlink_msg_attitude_get_yaw(msg);
attitude->rollspeed = mavlink_msg_attitude_get_rollspeed(msg);
attitude->pitchspeed = mavlink_msg_attitude_get_pitchspeed(msg);
attitude->yawspeed = mavlink_msg_attitude_get_yawspeed(msg);
#else
memcpy(attitude, _MAV_PAYLOAD(msg), 28);
#endif
}

View File

@ -0,0 +1,298 @@
// MESSAGE ATTITUDE_QUATERNION PACKING
#define MAVLINK_MSG_ID_ATTITUDE_QUATERNION 31
typedef struct __mavlink_attitude_quaternion_t {
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
float q1; ///< Quaternion component 1
float q2; ///< Quaternion component 2
float q3; ///< Quaternion component 3
float q4; ///< Quaternion component 4
float rollspeed; ///< Roll angular speed (rad/s)
float pitchspeed; ///< Pitch angular speed (rad/s)
float yawspeed; ///< Yaw angular speed (rad/s)
} mavlink_attitude_quaternion_t;
#define MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN 32
#define MAVLINK_MSG_ID_31_LEN 32
#define MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION \
{ \
"ATTITUDE_QUATERNION", \
8, \
{ \
{ "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_attitude_quaternion_t, time_boot_ms) }, \
{ "q1", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_attitude_quaternion_t, q1) }, \
{ "q2", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_attitude_quaternion_t, q2) }, \
{ "q3", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_attitude_quaternion_t, q3) }, \
{ "q4", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_attitude_quaternion_t, q4) }, \
{ "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_attitude_quaternion_t, rollspeed) }, \
{ "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_attitude_quaternion_t, pitchspeed) }, \
{ "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_attitude_quaternion_t, yawspeed) }, \
} \
}
/**
* @brief Pack a attitude_quaternion message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param q1 Quaternion component 1
* @param q2 Quaternion component 2
* @param q3 Quaternion component 3
* @param q4 Quaternion component 4
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_attitude_quaternion_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint32_t time_boot_ms, float q1, float q2, float q3, float q4, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, q1);
_mav_put_float(buf, 8, q2);
_mav_put_float(buf, 12, q3);
_mav_put_float(buf, 16, q4);
_mav_put_float(buf, 20, rollspeed);
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_attitude_quaternion_t packet;
packet.time_boot_ms = time_boot_ms;
packet.q1 = q1;
packet.q2 = q2;
packet.q3 = q3;
packet.q4 = q4;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_ATTITUDE_QUATERNION;
return mavlink_finalize_message(msg, system_id, component_id, 32, 246);
}
/**
* @brief Pack a attitude_quaternion message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param q1 Quaternion component 1
* @param q2 Quaternion component 2
* @param q3 Quaternion component 3
* @param q4 Quaternion component 4
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_attitude_quaternion_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint32_t time_boot_ms, float q1, float q2, float q3, float q4, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, q1);
_mav_put_float(buf, 8, q2);
_mav_put_float(buf, 12, q3);
_mav_put_float(buf, 16, q4);
_mav_put_float(buf, 20, rollspeed);
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_attitude_quaternion_t packet;
packet.time_boot_ms = time_boot_ms;
packet.q1 = q1;
packet.q2 = q2;
packet.q3 = q3;
packet.q4 = q4;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_ATTITUDE_QUATERNION;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 246);
}
/**
* @brief Encode a attitude_quaternion struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param attitude_quaternion C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_attitude_quaternion_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_attitude_quaternion_t *attitude_quaternion)
{
return mavlink_msg_attitude_quaternion_pack(system_id, component_id, msg, attitude_quaternion->time_boot_ms, attitude_quaternion->q1, attitude_quaternion->q2, attitude_quaternion->q3, attitude_quaternion->q4, attitude_quaternion->rollspeed, attitude_quaternion->pitchspeed, attitude_quaternion->yawspeed);
}
/**
* @brief Send a attitude_quaternion message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param q1 Quaternion component 1
* @param q2 Quaternion component 2
* @param q3 Quaternion component 3
* @param q4 Quaternion component 4
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_attitude_quaternion_send(mavlink_channel_t chan, uint32_t time_boot_ms, float q1, float q2, float q3, float q4, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, q1);
_mav_put_float(buf, 8, q2);
_mav_put_float(buf, 12, q3);
_mav_put_float(buf, 16, q4);
_mav_put_float(buf, 20, rollspeed);
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION, buf, 32, 246);
#else
mavlink_attitude_quaternion_t packet;
packet.time_boot_ms = time_boot_ms;
packet.q1 = q1;
packet.q2 = q2;
packet.q3 = q3;
packet.q4 = q4;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION, (const char *)&packet, 32, 246);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE ATTITUDE_QUATERNION UNPACKING
/**
* @brief Get field time_boot_ms from attitude_quaternion message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_attitude_quaternion_get_time_boot_ms(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field q1 from attitude_quaternion message
*
* @return Quaternion component 1
*/
static inline float mavlink_msg_attitude_quaternion_get_q1(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field q2 from attitude_quaternion message
*
* @return Quaternion component 2
*/
static inline float mavlink_msg_attitude_quaternion_get_q2(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field q3 from attitude_quaternion message
*
* @return Quaternion component 3
*/
static inline float mavlink_msg_attitude_quaternion_get_q3(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field q4 from attitude_quaternion message
*
* @return Quaternion component 4
*/
static inline float mavlink_msg_attitude_quaternion_get_q4(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field rollspeed from attitude_quaternion message
*
* @return Roll angular speed (rad/s)
*/
static inline float mavlink_msg_attitude_quaternion_get_rollspeed(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field pitchspeed from attitude_quaternion message
*
* @return Pitch angular speed (rad/s)
*/
static inline float mavlink_msg_attitude_quaternion_get_pitchspeed(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Get field yawspeed from attitude_quaternion message
*
* @return Yaw angular speed (rad/s)
*/
static inline float mavlink_msg_attitude_quaternion_get_yawspeed(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 28);
}
/**
* @brief Decode a attitude_quaternion message into a struct
*
* @param msg The message to decode
* @param attitude_quaternion C-struct to decode the message contents into
*/
static inline void mavlink_msg_attitude_quaternion_decode(const mavlink_message_t *msg, mavlink_attitude_quaternion_t *attitude_quaternion)
{
#if MAVLINK_NEED_BYTE_SWAP
attitude_quaternion->time_boot_ms = mavlink_msg_attitude_quaternion_get_time_boot_ms(msg);
attitude_quaternion->q1 = mavlink_msg_attitude_quaternion_get_q1(msg);
attitude_quaternion->q2 = mavlink_msg_attitude_quaternion_get_q2(msg);
attitude_quaternion->q3 = mavlink_msg_attitude_quaternion_get_q3(msg);
attitude_quaternion->q4 = mavlink_msg_attitude_quaternion_get_q4(msg);
attitude_quaternion->rollspeed = mavlink_msg_attitude_quaternion_get_rollspeed(msg);
attitude_quaternion->pitchspeed = mavlink_msg_attitude_quaternion_get_pitchspeed(msg);
attitude_quaternion->yawspeed = mavlink_msg_attitude_quaternion_get_yawspeed(msg);
#else
memcpy(attitude_quaternion, _MAV_PAYLOAD(msg), 32);
#endif
}

View File

@ -0,0 +1,145 @@
// MESSAGE AUTH_KEY PACKING
#define MAVLINK_MSG_ID_AUTH_KEY 7
typedef struct __mavlink_auth_key_t {
char key[32]; ///< key
} mavlink_auth_key_t;
#define MAVLINK_MSG_ID_AUTH_KEY_LEN 32
#define MAVLINK_MSG_ID_7_LEN 32
#define MAVLINK_MSG_AUTH_KEY_FIELD_KEY_LEN 32
#define MAVLINK_MESSAGE_INFO_AUTH_KEY \
{ \
"AUTH_KEY", \
1, \
{ \
{ "key", NULL, MAVLINK_TYPE_CHAR, 32, 0, offsetof(mavlink_auth_key_t, key) }, \
} \
}
/**
* @brief Pack a auth_key message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param key key
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_auth_key_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
const char *key)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_char_array(buf, 0, key, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_auth_key_t packet;
mav_array_memcpy(packet.key, key, sizeof(char) * 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif
msg->msgid = MAVLINK_MSG_ID_AUTH_KEY;
return mavlink_finalize_message(msg, system_id, component_id, 32, 119);
}
/**
* @brief Pack a auth_key message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param key key
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_auth_key_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
const char *key)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_char_array(buf, 0, key, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_auth_key_t packet;
mav_array_memcpy(packet.key, key, sizeof(char) * 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif
msg->msgid = MAVLINK_MSG_ID_AUTH_KEY;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 119);
}
/**
* @brief Encode a auth_key struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param auth_key C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_auth_key_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_auth_key_t *auth_key)
{
return mavlink_msg_auth_key_pack(system_id, component_id, msg, auth_key->key);
}
/**
* @brief Send a auth_key message
* @param chan MAVLink channel to send the message
*
* @param key key
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_auth_key_send(mavlink_channel_t chan, const char *key)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_char_array(buf, 0, key, 32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, buf, 32, 119);
#else
mavlink_auth_key_t packet;
mav_array_memcpy(packet.key, key, sizeof(char) * 32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, (const char *)&packet, 32, 119);
#endif
}
#endif
// MESSAGE AUTH_KEY UNPACKING
/**
* @brief Get field key from auth_key message
*
* @return key
*/
static inline uint16_t mavlink_msg_auth_key_get_key(const mavlink_message_t *msg, char *key)
{
return _MAV_RETURN_char_array(msg, key, 32, 0);
}
/**
* @brief Decode a auth_key message into a struct
*
* @param msg The message to decode
* @param auth_key C-struct to decode the message contents into
*/
static inline void mavlink_msg_auth_key_decode(const mavlink_message_t *msg, mavlink_auth_key_t *auth_key)
{
#if MAVLINK_NEED_BYTE_SWAP
mavlink_msg_auth_key_get_key(msg, auth_key->key);
#else
memcpy(auth_key, _MAV_PAYLOAD(msg), 32);
#endif
}

View File

@ -0,0 +1,205 @@
// MESSAGE CHANGE_OPERATOR_CONTROL PACKING
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL 5
typedef struct __mavlink_change_operator_control_t {
uint8_t target_system; ///< System the GCS requests control for
uint8_t control_request; ///< 0: request control of this MAV, 1: Release control of this MAV
uint8_t version; ///< 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
char passkey[25]; ///< Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
} mavlink_change_operator_control_t;
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN 28
#define MAVLINK_MSG_ID_5_LEN 28
#define MAVLINK_MSG_CHANGE_OPERATOR_CONTROL_FIELD_PASSKEY_LEN 25
#define MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL \
{ \
"CHANGE_OPERATOR_CONTROL", \
4, \
{ \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_change_operator_control_t, target_system) }, \
{ "control_request", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_change_operator_control_t, control_request) }, \
{ "version", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_change_operator_control_t, version) }, \
{ "passkey", NULL, MAVLINK_TYPE_CHAR, 25, 3, offsetof(mavlink_change_operator_control_t, passkey) }, \
} \
}
/**
* @brief Pack a change_operator_control message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System the GCS requests control for
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param version 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
* @param passkey Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_change_operator_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_change_operator_control_t packet;
packet.target_system = target_system;
packet.control_request = control_request;
packet.version = version;
mav_array_memcpy(packet.passkey, passkey, sizeof(char) * 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif
msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL;
return mavlink_finalize_message(msg, system_id, component_id, 28, 217);
}
/**
* @brief Pack a change_operator_control message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System the GCS requests control for
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param version 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
* @param passkey Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_change_operator_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_change_operator_control_t packet;
packet.target_system = target_system;
packet.control_request = control_request;
packet.version = version;
mav_array_memcpy(packet.passkey, passkey, sizeof(char) * 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif
msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 217);
}
/**
* @brief Encode a change_operator_control struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param change_operator_control C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_change_operator_control_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_change_operator_control_t *change_operator_control)
{
return mavlink_msg_change_operator_control_pack(system_id, component_id, msg, change_operator_control->target_system, change_operator_control->control_request, change_operator_control->version, change_operator_control->passkey);
}
/**
* @brief Send a change_operator_control message
* @param chan MAVLink channel to send the message
*
* @param target_system System the GCS requests control for
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param version 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
* @param passkey Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_change_operator_control_send(mavlink_channel_t chan, uint8_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL, buf, 28, 217);
#else
mavlink_change_operator_control_t packet;
packet.target_system = target_system;
packet.control_request = control_request;
packet.version = version;
mav_array_memcpy(packet.passkey, passkey, sizeof(char) * 25);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL, (const char *)&packet, 28, 217);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE CHANGE_OPERATOR_CONTROL UNPACKING
/**
* @brief Get field target_system from change_operator_control message
*
* @return System the GCS requests control for
*/
static inline uint8_t mavlink_msg_change_operator_control_get_target_system(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field control_request from change_operator_control message
*
* @return 0: request control of this MAV, 1: Release control of this MAV
*/
static inline uint8_t mavlink_msg_change_operator_control_get_control_request(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field version from change_operator_control message
*
* @return 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
*/
static inline uint8_t mavlink_msg_change_operator_control_get_version(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field passkey from change_operator_control message
*
* @return Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
*/
static inline uint16_t mavlink_msg_change_operator_control_get_passkey(const mavlink_message_t *msg, char *passkey)
{
return _MAV_RETURN_char_array(msg, passkey, 25, 3);
}
/**
* @brief Decode a change_operator_control message into a struct
*
* @param msg The message to decode
* @param change_operator_control C-struct to decode the message contents into
*/
static inline void mavlink_msg_change_operator_control_decode(const mavlink_message_t *msg, mavlink_change_operator_control_t *change_operator_control)
{
#if MAVLINK_NEED_BYTE_SWAP
change_operator_control->target_system = mavlink_msg_change_operator_control_get_target_system(msg);
change_operator_control->control_request = mavlink_msg_change_operator_control_get_control_request(msg);
change_operator_control->version = mavlink_msg_change_operator_control_get_version(msg);
mavlink_msg_change_operator_control_get_passkey(msg, change_operator_control->passkey);
#else
memcpy(change_operator_control, _MAV_PAYLOAD(msg), 28);
#endif
}

View File

@ -0,0 +1,188 @@
// MESSAGE CHANGE_OPERATOR_CONTROL_ACK PACKING
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK 6
typedef struct __mavlink_change_operator_control_ack_t {
uint8_t gcs_system_id; ///< ID of the GCS this message
uint8_t control_request; ///< 0: request control of this MAV, 1: Release control of this MAV
uint8_t ack; ///< 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control
} mavlink_change_operator_control_ack_t;
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN 3
#define MAVLINK_MSG_ID_6_LEN 3
#define MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK \
{ \
"CHANGE_OPERATOR_CONTROL_ACK", \
3, \
{ \
{ "gcs_system_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_change_operator_control_ack_t, gcs_system_id) }, \
{ "control_request", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_change_operator_control_ack_t, control_request) }, \
{ "ack", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_change_operator_control_ack_t, ack) }, \
} \
}
/**
* @brief Pack a change_operator_control_ack message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param gcs_system_id ID of the GCS this message
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param ack 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_change_operator_control_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t gcs_system_id, uint8_t control_request, uint8_t ack)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint8_t(buf, 0, gcs_system_id);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, ack);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
#else
mavlink_change_operator_control_ack_t packet;
packet.gcs_system_id = gcs_system_id;
packet.control_request = control_request;
packet.ack = ack;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
#endif
msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK;
return mavlink_finalize_message(msg, system_id, component_id, 3, 104);
}
/**
* @brief Pack a change_operator_control_ack message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param gcs_system_id ID of the GCS this message
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param ack 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_change_operator_control_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t gcs_system_id, uint8_t control_request, uint8_t ack)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint8_t(buf, 0, gcs_system_id);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, ack);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
#else
mavlink_change_operator_control_ack_t packet;
packet.gcs_system_id = gcs_system_id;
packet.control_request = control_request;
packet.ack = ack;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
#endif
msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 104);
}
/**
* @brief Encode a change_operator_control_ack struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param change_operator_control_ack C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_change_operator_control_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_change_operator_control_ack_t *change_operator_control_ack)
{
return mavlink_msg_change_operator_control_ack_pack(system_id, component_id, msg, change_operator_control_ack->gcs_system_id, change_operator_control_ack->control_request, change_operator_control_ack->ack);
}
/**
* @brief Send a change_operator_control_ack message
* @param chan MAVLink channel to send the message
*
* @param gcs_system_id ID of the GCS this message
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param ack 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_change_operator_control_ack_send(mavlink_channel_t chan, uint8_t gcs_system_id, uint8_t control_request, uint8_t ack)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint8_t(buf, 0, gcs_system_id);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, ack);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, buf, 3, 104);
#else
mavlink_change_operator_control_ack_t packet;
packet.gcs_system_id = gcs_system_id;
packet.control_request = control_request;
packet.ack = ack;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, (const char *)&packet, 3, 104);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE CHANGE_OPERATOR_CONTROL_ACK UNPACKING
/**
* @brief Get field gcs_system_id from change_operator_control_ack message
*
* @return ID of the GCS this message
*/
static inline uint8_t mavlink_msg_change_operator_control_ack_get_gcs_system_id(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field control_request from change_operator_control_ack message
*
* @return 0: request control of this MAV, 1: Release control of this MAV
*/
static inline uint8_t mavlink_msg_change_operator_control_ack_get_control_request(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field ack from change_operator_control_ack message
*
* @return 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control
*/
static inline uint8_t mavlink_msg_change_operator_control_ack_get_ack(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Decode a change_operator_control_ack message into a struct
*
* @param msg The message to decode
* @param change_operator_control_ack C-struct to decode the message contents into
*/
static inline void mavlink_msg_change_operator_control_ack_decode(const mavlink_message_t *msg, mavlink_change_operator_control_ack_t *change_operator_control_ack)
{
#if MAVLINK_NEED_BYTE_SWAP
change_operator_control_ack->gcs_system_id = mavlink_msg_change_operator_control_ack_get_gcs_system_id(msg);
change_operator_control_ack->control_request = mavlink_msg_change_operator_control_ack_get_control_request(msg);
change_operator_control_ack->ack = mavlink_msg_change_operator_control_ack_get_ack(msg);
#else
memcpy(change_operator_control_ack, _MAV_PAYLOAD(msg), 3);
#endif
}

View File

@ -0,0 +1,166 @@
// MESSAGE COMMAND_ACK PACKING
#define MAVLINK_MSG_ID_COMMAND_ACK 77
typedef struct __mavlink_command_ack_t {
uint16_t command; ///< Command ID, as defined by MAV_CMD enum.
uint8_t result; ///< See MAV_RESULT enum
} mavlink_command_ack_t;
#define MAVLINK_MSG_ID_COMMAND_ACK_LEN 3
#define MAVLINK_MSG_ID_77_LEN 3
#define MAVLINK_MESSAGE_INFO_COMMAND_ACK \
{ \
"COMMAND_ACK", \
2, \
{ \
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_command_ack_t, command) }, \
{ "result", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_command_ack_t, result) }, \
} \
}
/**
* @brief Pack a command_ack message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param command Command ID, as defined by MAV_CMD enum.
* @param result See MAV_RESULT enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_command_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint16_t command, uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint16_t(buf, 0, command);
_mav_put_uint8_t(buf, 2, result);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
#else
mavlink_command_ack_t packet;
packet.command = command;
packet.result = result;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
#endif
msg->msgid = MAVLINK_MSG_ID_COMMAND_ACK;
return mavlink_finalize_message(msg, system_id, component_id, 3, 143);
}
/**
* @brief Pack a command_ack message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param command Command ID, as defined by MAV_CMD enum.
* @param result See MAV_RESULT enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_command_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint16_t command, uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint16_t(buf, 0, command);
_mav_put_uint8_t(buf, 2, result);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
#else
mavlink_command_ack_t packet;
packet.command = command;
packet.result = result;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
#endif
msg->msgid = MAVLINK_MSG_ID_COMMAND_ACK;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 143);
}
/**
* @brief Encode a command_ack struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param command_ack C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_command_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_command_ack_t *command_ack)
{
return mavlink_msg_command_ack_pack(system_id, component_id, msg, command_ack->command, command_ack->result);
}
/**
* @brief Send a command_ack message
* @param chan MAVLink channel to send the message
*
* @param command Command ID, as defined by MAV_CMD enum.
* @param result See MAV_RESULT enum
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_command_ack_send(mavlink_channel_t chan, uint16_t command, uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint16_t(buf, 0, command);
_mav_put_uint8_t(buf, 2, result);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_ACK, buf, 3, 143);
#else
mavlink_command_ack_t packet;
packet.command = command;
packet.result = result;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_ACK, (const char *)&packet, 3, 143);
#endif
}
#endif
// MESSAGE COMMAND_ACK UNPACKING
/**
* @brief Get field command from command_ack message
*
* @return Command ID, as defined by MAV_CMD enum.
*/
static inline uint16_t mavlink_msg_command_ack_get_command(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
* @brief Get field result from command_ack message
*
* @return See MAV_RESULT enum
*/
static inline uint8_t mavlink_msg_command_ack_get_result(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Decode a command_ack message into a struct
*
* @param msg The message to decode
* @param command_ack C-struct to decode the message contents into
*/
static inline void mavlink_msg_command_ack_decode(const mavlink_message_t *msg, mavlink_command_ack_t *command_ack)
{
#if MAVLINK_NEED_BYTE_SWAP
command_ack->command = mavlink_msg_command_ack_get_command(msg);
command_ack->result = mavlink_msg_command_ack_get_result(msg);
#else
memcpy(command_ack, _MAV_PAYLOAD(msg), 3);
#endif
}

View File

@ -0,0 +1,364 @@
// MESSAGE COMMAND_LONG PACKING
#define MAVLINK_MSG_ID_COMMAND_LONG 76
typedef struct __mavlink_command_long_t {
float param1; ///< Parameter 1, as defined by MAV_CMD enum.
float param2; ///< Parameter 2, as defined by MAV_CMD enum.
float param3; ///< Parameter 3, as defined by MAV_CMD enum.
float param4; ///< Parameter 4, as defined by MAV_CMD enum.
float param5; ///< Parameter 5, as defined by MAV_CMD enum.
float param6; ///< Parameter 6, as defined by MAV_CMD enum.
float param7; ///< Parameter 7, as defined by MAV_CMD enum.
uint16_t command; ///< Command ID, as defined by MAV_CMD enum.
uint8_t target_system; ///< System which should execute the command
uint8_t target_component; ///< Component which should execute the command, 0 for all components
uint8_t confirmation; ///< 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
} mavlink_command_long_t;
#define MAVLINK_MSG_ID_COMMAND_LONG_LEN 33
#define MAVLINK_MSG_ID_76_LEN 33
#define MAVLINK_MESSAGE_INFO_COMMAND_LONG \
{ \
"COMMAND_LONG", \
11, \
{ \
{ "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_command_long_t, param1) }, \
{ "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_command_long_t, param2) }, \
{ "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_command_long_t, param3) }, \
{ "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_command_long_t, param4) }, \
{ "param5", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_command_long_t, param5) }, \
{ "param6", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_command_long_t, param6) }, \
{ "param7", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_command_long_t, param7) }, \
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_command_long_t, command) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_command_long_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_command_long_t, target_component) }, \
{ "confirmation", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_command_long_t, confirmation) }, \
} \
}
/**
* @brief Pack a command_long message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System which should execute the command
* @param target_component Component which should execute the command, 0 for all components
* @param command Command ID, as defined by MAV_CMD enum.
* @param confirmation 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
* @param param1 Parameter 1, as defined by MAV_CMD enum.
* @param param2 Parameter 2, as defined by MAV_CMD enum.
* @param param3 Parameter 3, as defined by MAV_CMD enum.
* @param param4 Parameter 4, as defined by MAV_CMD enum.
* @param param5 Parameter 5, as defined by MAV_CMD enum.
* @param param6 Parameter 6, as defined by MAV_CMD enum.
* @param param7 Parameter 7, as defined by MAV_CMD enum.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_command_long_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component, uint16_t command, uint8_t confirmation, float param1, float param2, float param3, float param4, float param5, float param6, float param7)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
_mav_put_float(buf, 12, param4);
_mav_put_float(buf, 16, param5);
_mav_put_float(buf, 20, param6);
_mav_put_float(buf, 24, param7);
_mav_put_uint16_t(buf, 28, command);
_mav_put_uint8_t(buf, 30, target_system);
_mav_put_uint8_t(buf, 31, target_component);
_mav_put_uint8_t(buf, 32, confirmation);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 33);
#else
mavlink_command_long_t packet;
packet.param1 = param1;
packet.param2 = param2;
packet.param3 = param3;
packet.param4 = param4;
packet.param5 = param5;
packet.param6 = param6;
packet.param7 = param7;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.confirmation = confirmation;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 33);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_COMMAND_LONG;
return mavlink_finalize_message(msg, system_id, component_id, 33, 152);
}
/**
* @brief Pack a command_long message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System which should execute the command
* @param target_component Component which should execute the command, 0 for all components
* @param command Command ID, as defined by MAV_CMD enum.
* @param confirmation 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
* @param param1 Parameter 1, as defined by MAV_CMD enum.
* @param param2 Parameter 2, as defined by MAV_CMD enum.
* @param param3 Parameter 3, as defined by MAV_CMD enum.
* @param param4 Parameter 4, as defined by MAV_CMD enum.
* @param param5 Parameter 5, as defined by MAV_CMD enum.
* @param param6 Parameter 6, as defined by MAV_CMD enum.
* @param param7 Parameter 7, as defined by MAV_CMD enum.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_command_long_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component, uint16_t command, uint8_t confirmation, float param1, float param2, float param3, float param4, float param5, float param6, float param7)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
_mav_put_float(buf, 12, param4);
_mav_put_float(buf, 16, param5);
_mav_put_float(buf, 20, param6);
_mav_put_float(buf, 24, param7);
_mav_put_uint16_t(buf, 28, command);
_mav_put_uint8_t(buf, 30, target_system);
_mav_put_uint8_t(buf, 31, target_component);
_mav_put_uint8_t(buf, 32, confirmation);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 33);
#else
mavlink_command_long_t packet;
packet.param1 = param1;
packet.param2 = param2;
packet.param3 = param3;
packet.param4 = param4;
packet.param5 = param5;
packet.param6 = param6;
packet.param7 = param7;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.confirmation = confirmation;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 33);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_COMMAND_LONG;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 33, 152);
}
/**
* @brief Encode a command_long struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param command_long C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_command_long_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_command_long_t *command_long)
{
return mavlink_msg_command_long_pack(system_id, component_id, msg, command_long->target_system, command_long->target_component, command_long->command, command_long->confirmation, command_long->param1, command_long->param2, command_long->param3, command_long->param4, command_long->param5, command_long->param6, command_long->param7);
}
/**
* @brief Send a command_long message
* @param chan MAVLink channel to send the message
*
* @param target_system System which should execute the command
* @param target_component Component which should execute the command, 0 for all components
* @param command Command ID, as defined by MAV_CMD enum.
* @param confirmation 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
* @param param1 Parameter 1, as defined by MAV_CMD enum.
* @param param2 Parameter 2, as defined by MAV_CMD enum.
* @param param3 Parameter 3, as defined by MAV_CMD enum.
* @param param4 Parameter 4, as defined by MAV_CMD enum.
* @param param5 Parameter 5, as defined by MAV_CMD enum.
* @param param6 Parameter 6, as defined by MAV_CMD enum.
* @param param7 Parameter 7, as defined by MAV_CMD enum.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_command_long_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t command, uint8_t confirmation, float param1, float param2, float param3, float param4, float param5, float param6, float param7)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
_mav_put_float(buf, 12, param4);
_mav_put_float(buf, 16, param5);
_mav_put_float(buf, 20, param6);
_mav_put_float(buf, 24, param7);
_mav_put_uint16_t(buf, 28, command);
_mav_put_uint8_t(buf, 30, target_system);
_mav_put_uint8_t(buf, 31, target_component);
_mav_put_uint8_t(buf, 32, confirmation);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG, buf, 33, 152);
#else
mavlink_command_long_t packet;
packet.param1 = param1;
packet.param2 = param2;
packet.param3 = param3;
packet.param4 = param4;
packet.param5 = param5;
packet.param6 = param6;
packet.param7 = param7;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.confirmation = confirmation;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG, (const char *)&packet, 33, 152);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE COMMAND_LONG UNPACKING
/**
* @brief Get field target_system from command_long message
*
* @return System which should execute the command
*/
static inline uint8_t mavlink_msg_command_long_get_target_system(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 30);
}
/**
* @brief Get field target_component from command_long message
*
* @return Component which should execute the command, 0 for all components
*/
static inline uint8_t mavlink_msg_command_long_get_target_component(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 31);
}
/**
* @brief Get field command from command_long message
*
* @return Command ID, as defined by MAV_CMD enum.
*/
static inline uint16_t mavlink_msg_command_long_get_command(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 28);
}
/**
* @brief Get field confirmation from command_long message
*
* @return 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
*/
static inline uint8_t mavlink_msg_command_long_get_confirmation(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 32);
}
/**
* @brief Get field param1 from command_long message
*
* @return Parameter 1, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param1(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field param2 from command_long message
*
* @return Parameter 2, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param2(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field param3 from command_long message
*
* @return Parameter 3, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param3(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field param4 from command_long message
*
* @return Parameter 4, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param4(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field param5 from command_long message
*
* @return Parameter 5, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param5(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field param6 from command_long message
*
* @return Parameter 6, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param6(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field param7 from command_long message
*
* @return Parameter 7, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param7(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Decode a command_long message into a struct
*
* @param msg The message to decode
* @param command_long C-struct to decode the message contents into
*/
static inline void mavlink_msg_command_long_decode(const mavlink_message_t *msg, mavlink_command_long_t *command_long)
{
#if MAVLINK_NEED_BYTE_SWAP
command_long->param1 = mavlink_msg_command_long_get_param1(msg);
command_long->param2 = mavlink_msg_command_long_get_param2(msg);
command_long->param3 = mavlink_msg_command_long_get_param3(msg);
command_long->param4 = mavlink_msg_command_long_get_param4(msg);
command_long->param5 = mavlink_msg_command_long_get_param5(msg);
command_long->param6 = mavlink_msg_command_long_get_param6(msg);
command_long->param7 = mavlink_msg_command_long_get_param7(msg);
command_long->command = mavlink_msg_command_long_get_command(msg);
command_long->target_system = mavlink_msg_command_long_get_target_system(msg);
command_long->target_component = mavlink_msg_command_long_get_target_component(msg);
command_long->confirmation = mavlink_msg_command_long_get_confirmation(msg);
#else
memcpy(command_long, _MAV_PAYLOAD(msg), 33);
#endif
}

View File

@ -0,0 +1,188 @@
// MESSAGE DATA_STREAM PACKING
#define MAVLINK_MSG_ID_DATA_STREAM 67
typedef struct __mavlink_data_stream_t {
uint16_t message_rate; ///< The requested interval between two messages of this type
uint8_t stream_id; ///< The ID of the requested data stream
uint8_t on_off; ///< 1 stream is enabled, 0 stream is stopped.
} mavlink_data_stream_t;
#define MAVLINK_MSG_ID_DATA_STREAM_LEN 4
#define MAVLINK_MSG_ID_67_LEN 4
#define MAVLINK_MESSAGE_INFO_DATA_STREAM \
{ \
"DATA_STREAM", \
3, \
{ \
{ "message_rate", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_data_stream_t, message_rate) }, \
{ "stream_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_data_stream_t, stream_id) }, \
{ "on_off", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_data_stream_t, on_off) }, \
} \
}
/**
* @brief Pack a data_stream message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param stream_id The ID of the requested data stream
* @param message_rate The requested interval between two messages of this type
* @param on_off 1 stream is enabled, 0 stream is stopped.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_data_stream_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t stream_id, uint16_t message_rate, uint8_t on_off)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, message_rate);
_mav_put_uint8_t(buf, 2, stream_id);
_mav_put_uint8_t(buf, 3, on_off);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_data_stream_t packet;
packet.message_rate = message_rate;
packet.stream_id = stream_id;
packet.on_off = on_off;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA_STREAM;
return mavlink_finalize_message(msg, system_id, component_id, 4, 21);
}
/**
* @brief Pack a data_stream message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param stream_id The ID of the requested data stream
* @param message_rate The requested interval between two messages of this type
* @param on_off 1 stream is enabled, 0 stream is stopped.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_data_stream_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t stream_id, uint16_t message_rate, uint8_t on_off)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, message_rate);
_mav_put_uint8_t(buf, 2, stream_id);
_mav_put_uint8_t(buf, 3, on_off);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_data_stream_t packet;
packet.message_rate = message_rate;
packet.stream_id = stream_id;
packet.on_off = on_off;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA_STREAM;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 21);
}
/**
* @brief Encode a data_stream struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param data_stream C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_data_stream_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_data_stream_t *data_stream)
{
return mavlink_msg_data_stream_pack(system_id, component_id, msg, data_stream->stream_id, data_stream->message_rate, data_stream->on_off);
}
/**
* @brief Send a data_stream message
* @param chan MAVLink channel to send the message
*
* @param stream_id The ID of the requested data stream
* @param message_rate The requested interval between two messages of this type
* @param on_off 1 stream is enabled, 0 stream is stopped.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_data_stream_send(mavlink_channel_t chan, uint8_t stream_id, uint16_t message_rate, uint8_t on_off)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, message_rate);
_mav_put_uint8_t(buf, 2, stream_id);
_mav_put_uint8_t(buf, 3, on_off);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_STREAM, buf, 4, 21);
#else
mavlink_data_stream_t packet;
packet.message_rate = message_rate;
packet.stream_id = stream_id;
packet.on_off = on_off;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_STREAM, (const char *)&packet, 4, 21);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE DATA_STREAM UNPACKING
/**
* @brief Get field stream_id from data_stream message
*
* @return The ID of the requested data stream
*/
static inline uint8_t mavlink_msg_data_stream_get_stream_id(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field message_rate from data_stream message
*
* @return The requested interval between two messages of this type
*/
static inline uint16_t mavlink_msg_data_stream_get_message_rate(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
* @brief Get field on_off from data_stream message
*
* @return 1 stream is enabled, 0 stream is stopped.
*/
static inline uint8_t mavlink_msg_data_stream_get_on_off(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
/**
* @brief Decode a data_stream message into a struct
*
* @param msg The message to decode
* @param data_stream C-struct to decode the message contents into
*/
static inline void mavlink_msg_data_stream_decode(const mavlink_message_t *msg, mavlink_data_stream_t *data_stream)
{
#if MAVLINK_NEED_BYTE_SWAP
data_stream->message_rate = mavlink_msg_data_stream_get_message_rate(msg);
data_stream->stream_id = mavlink_msg_data_stream_get_stream_id(msg);
data_stream->on_off = mavlink_msg_data_stream_get_on_off(msg);
#else
memcpy(data_stream, _MAV_PAYLOAD(msg), 4);
#endif
}

View File

@ -0,0 +1,188 @@
// MESSAGE DEBUG PACKING
#define MAVLINK_MSG_ID_DEBUG 254
typedef struct __mavlink_debug_t {
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
float value; ///< DEBUG value
uint8_t ind; ///< index of debug variable
} mavlink_debug_t;
#define MAVLINK_MSG_ID_DEBUG_LEN 9
#define MAVLINK_MSG_ID_254_LEN 9
#define MAVLINK_MESSAGE_INFO_DEBUG \
{ \
"DEBUG", \
3, \
{ \
{ "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_debug_t, time_boot_ms) }, \
{ "value", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_debug_t, value) }, \
{ "ind", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_debug_t, ind) }, \
} \
}
/**
* @brief Pack a debug message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param ind index of debug variable
* @param value DEBUG value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_debug_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint32_t time_boot_ms, uint8_t ind, float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_uint8_t(buf, 8, ind);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
#else
mavlink_debug_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
packet.ind = ind;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
#endif
msg->msgid = MAVLINK_MSG_ID_DEBUG;
return mavlink_finalize_message(msg, system_id, component_id, 9, 46);
}
/**
* @brief Pack a debug message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param ind index of debug variable
* @param value DEBUG value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_debug_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint32_t time_boot_ms, uint8_t ind, float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_uint8_t(buf, 8, ind);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
#else
mavlink_debug_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
packet.ind = ind;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
#endif
msg->msgid = MAVLINK_MSG_ID_DEBUG;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 9, 46);
}
/**
* @brief Encode a debug struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param debug C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_debug_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_debug_t *debug)
{
return mavlink_msg_debug_pack(system_id, component_id, msg, debug->time_boot_ms, debug->ind, debug->value);
}
/**
* @brief Send a debug message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param ind index of debug variable
* @param value DEBUG value
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_debug_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t ind, float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_uint8_t(buf, 8, ind);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, buf, 9, 46);
#else
mavlink_debug_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
packet.ind = ind;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, (const char *)&packet, 9, 46);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE DEBUG UNPACKING
/**
* @brief Get field time_boot_ms from debug message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_debug_get_time_boot_ms(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field ind from debug message
*
* @return index of debug variable
*/
static inline uint8_t mavlink_msg_debug_get_ind(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
/**
* @brief Get field value from debug message
*
* @return DEBUG value
*/
static inline float mavlink_msg_debug_get_value(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Decode a debug message into a struct
*
* @param msg The message to decode
* @param debug C-struct to decode the message contents into
*/
static inline void mavlink_msg_debug_decode(const mavlink_message_t *msg, mavlink_debug_t *debug)
{
#if MAVLINK_NEED_BYTE_SWAP
debug->time_boot_ms = mavlink_msg_debug_get_time_boot_ms(msg);
debug->value = mavlink_msg_debug_get_value(msg);
debug->ind = mavlink_msg_debug_get_ind(msg);
#else
memcpy(debug, _MAV_PAYLOAD(msg), 9);
#endif
}

View File

@ -0,0 +1,227 @@
// MESSAGE DEBUG_VECT PACKING
#define MAVLINK_MSG_ID_DEBUG_VECT 250
typedef struct __mavlink_debug_vect_t {
uint64_t time_usec; ///< Timestamp
float x; ///< x
float y; ///< y
float z; ///< z
char name[10]; ///< Name
} mavlink_debug_vect_t;
#define MAVLINK_MSG_ID_DEBUG_VECT_LEN 30
#define MAVLINK_MSG_ID_250_LEN 30
#define MAVLINK_MSG_DEBUG_VECT_FIELD_NAME_LEN 10
#define MAVLINK_MESSAGE_INFO_DEBUG_VECT \
{ \
"DEBUG_VECT", \
5, \
{ \
{ "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_debug_vect_t, time_usec) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_debug_vect_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_debug_vect_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_debug_vect_t, z) }, \
{ "name", NULL, MAVLINK_TYPE_CHAR, 10, 20, offsetof(mavlink_debug_vect_t, name) }, \
} \
}
/**
* @brief Pack a debug_vect message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param name Name
* @param time_usec Timestamp
* @param x x
* @param y y
* @param z z
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_debug_vect_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
const char *name, uint64_t time_usec, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_char_array(buf, 20, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 30);
#else
mavlink_debug_vect_t packet;
packet.time_usec = time_usec;
packet.x = x;
packet.y = y;
packet.z = z;
mav_array_memcpy(packet.name, name, sizeof(char) * 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 30);
#endif
msg->msgid = MAVLINK_MSG_ID_DEBUG_VECT;
return mavlink_finalize_message(msg, system_id, component_id, 30, 49);
}
/**
* @brief Pack a debug_vect message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param name Name
* @param time_usec Timestamp
* @param x x
* @param y y
* @param z z
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_debug_vect_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
const char *name, uint64_t time_usec, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_char_array(buf, 20, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 30);
#else
mavlink_debug_vect_t packet;
packet.time_usec = time_usec;
packet.x = x;
packet.y = y;
packet.z = z;
mav_array_memcpy(packet.name, name, sizeof(char) * 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 30);
#endif
msg->msgid = MAVLINK_MSG_ID_DEBUG_VECT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 30, 49);
}
/**
* @brief Encode a debug_vect struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param debug_vect C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_debug_vect_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_debug_vect_t *debug_vect)
{
return mavlink_msg_debug_vect_pack(system_id, component_id, msg, debug_vect->name, debug_vect->time_usec, debug_vect->x, debug_vect->y, debug_vect->z);
}
/**
* @brief Send a debug_vect message
* @param chan MAVLink channel to send the message
*
* @param name Name
* @param time_usec Timestamp
* @param x x
* @param y y
* @param z z
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_debug_vect_send(mavlink_channel_t chan, const char *name, uint64_t time_usec, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_char_array(buf, 20, name, 10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG_VECT, buf, 30, 49);
#else
mavlink_debug_vect_t packet;
packet.time_usec = time_usec;
packet.x = x;
packet.y = y;
packet.z = z;
mav_array_memcpy(packet.name, name, sizeof(char) * 10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG_VECT, (const char *)&packet, 30, 49);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE DEBUG_VECT UNPACKING
/**
* @brief Get field name from debug_vect message
*
* @return Name
*/
static inline uint16_t mavlink_msg_debug_vect_get_name(const mavlink_message_t *msg, char *name)
{
return _MAV_RETURN_char_array(msg, name, 10, 20);
}
/**
* @brief Get field time_usec from debug_vect message
*
* @return Timestamp
*/
static inline uint64_t mavlink_msg_debug_vect_get_time_usec(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
/**
* @brief Get field x from debug_vect message
*
* @return x
*/
static inline float mavlink_msg_debug_vect_get_x(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field y from debug_vect message
*
* @return y
*/
static inline float mavlink_msg_debug_vect_get_y(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field z from debug_vect message
*
* @return z
*/
static inline float mavlink_msg_debug_vect_get_z(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Decode a debug_vect message into a struct
*
* @param msg The message to decode
* @param debug_vect C-struct to decode the message contents into
*/
static inline void mavlink_msg_debug_vect_decode(const mavlink_message_t *msg, mavlink_debug_vect_t *debug_vect)
{
#if MAVLINK_NEED_BYTE_SWAP
debug_vect->time_usec = mavlink_msg_debug_vect_get_time_usec(msg);
debug_vect->x = mavlink_msg_debug_vect_get_x(msg);
debug_vect->y = mavlink_msg_debug_vect_get_y(msg);
debug_vect->z = mavlink_msg_debug_vect_get_z(msg);
mavlink_msg_debug_vect_get_name(msg, debug_vect->name);
#else
memcpy(debug_vect, _MAV_PAYLOAD(msg), 30);
#endif
}

View File

@ -0,0 +1,320 @@
// MESSAGE GLOBAL_POSITION_INT PACKING
#define MAVLINK_MSG_ID_GLOBAL_POSITION_INT 33
typedef struct __mavlink_global_position_int_t {
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
int32_t lat; ///< Latitude, expressed as * 1E7
int32_t lon; ///< Longitude, expressed as * 1E7
int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters), above MSL
int32_t relative_alt; ///< Altitude above ground in meters, expressed as * 1000 (millimeters)
int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100
int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100
int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100
uint16_t hdg; ///< Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
} mavlink_global_position_int_t;
#define MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN 28
#define MAVLINK_MSG_ID_33_LEN 28
#define MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT \
{ \
"GLOBAL_POSITION_INT", \
9, \
{ \
{ "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_global_position_int_t, time_boot_ms) }, \
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_global_position_int_t, lat) }, \
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_global_position_int_t, lon) }, \
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_global_position_int_t, alt) }, \
{ "relative_alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_global_position_int_t, relative_alt) }, \
{ "vx", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_global_position_int_t, vx) }, \
{ "vy", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_global_position_int_t, vy) }, \
{ "vz", NULL, MAVLINK_TYPE_INT16_T, 0, 24, offsetof(mavlink_global_position_int_t, vz) }, \
{ "hdg", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_global_position_int_t, hdg) }, \
} \
}
/**
* @brief Pack a global_position_int message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters), above MSL
* @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint32_t time_boot_ms, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, int16_t vx, int16_t vy, int16_t vz, uint16_t hdg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, lat);
_mav_put_int32_t(buf, 8, lon);
_mav_put_int32_t(buf, 12, alt);
_mav_put_int32_t(buf, 16, relative_alt);
_mav_put_int16_t(buf, 20, vx);
_mav_put_int16_t(buf, 22, vy);
_mav_put_int16_t(buf, 24, vz);
_mav_put_uint16_t(buf, 26, hdg);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_global_position_int_t packet;
packet.time_boot_ms = time_boot_ms;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.relative_alt = relative_alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.hdg = hdg;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_INT;
return mavlink_finalize_message(msg, system_id, component_id, 28, 104);
}
/**
* @brief Pack a global_position_int message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters), above MSL
* @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_position_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint32_t time_boot_ms, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, int16_t vx, int16_t vy, int16_t vz, uint16_t hdg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, lat);
_mav_put_int32_t(buf, 8, lon);
_mav_put_int32_t(buf, 12, alt);
_mav_put_int32_t(buf, 16, relative_alt);
_mav_put_int16_t(buf, 20, vx);
_mav_put_int16_t(buf, 22, vy);
_mav_put_int16_t(buf, 24, vz);
_mav_put_uint16_t(buf, 26, hdg);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_global_position_int_t packet;
packet.time_boot_ms = time_boot_ms;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.relative_alt = relative_alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.hdg = hdg;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 104);
}
/**
* @brief Encode a global_position_int struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param global_position_int C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_global_position_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_global_position_int_t *global_position_int)
{
return mavlink_msg_global_position_int_pack(system_id, component_id, msg, global_position_int->time_boot_ms, global_position_int->lat, global_position_int->lon, global_position_int->alt, global_position_int->relative_alt, global_position_int->vx, global_position_int->vy, global_position_int->vz, global_position_int->hdg);
}
/**
* @brief Send a global_position_int message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters), above MSL
* @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_global_position_int_send(mavlink_channel_t chan, uint32_t time_boot_ms, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, int16_t vx, int16_t vy, int16_t vz, uint16_t hdg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, lat);
_mav_put_int32_t(buf, 8, lon);
_mav_put_int32_t(buf, 12, alt);
_mav_put_int32_t(buf, 16, relative_alt);
_mav_put_int16_t(buf, 20, vx);
_mav_put_int16_t(buf, 22, vy);
_mav_put_int16_t(buf, 24, vz);
_mav_put_uint16_t(buf, 26, hdg);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT, buf, 28, 104);
#else
mavlink_global_position_int_t packet;
packet.time_boot_ms = time_boot_ms;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.relative_alt = relative_alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.hdg = hdg;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT, (const char *)&packet, 28, 104);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE GLOBAL_POSITION_INT UNPACKING
/**
* @brief Get field time_boot_ms from global_position_int message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_global_position_int_get_time_boot_ms(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field lat from global_position_int message
*
* @return Latitude, expressed as * 1E7
*/
static inline int32_t mavlink_msg_global_position_int_get_lat(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 4);
}
/**
* @brief Get field lon from global_position_int message
*
* @return Longitude, expressed as * 1E7
*/
static inline int32_t mavlink_msg_global_position_int_get_lon(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
/**
* @brief Get field alt from global_position_int message
*
* @return Altitude in meters, expressed as * 1000 (millimeters), above MSL
*/
static inline int32_t mavlink_msg_global_position_int_get_alt(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 12);
}
/**
* @brief Get field relative_alt from global_position_int message
*
* @return Altitude above ground in meters, expressed as * 1000 (millimeters)
*/
static inline int32_t mavlink_msg_global_position_int_get_relative_alt(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 16);
}
/**
* @brief Get field vx from global_position_int message
*
* @return Ground X Speed (Latitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_global_position_int_get_vx(const mavlink_message_t *msg)
{
return _MAV_RETURN_int16_t(msg, 20);
}
/**
* @brief Get field vy from global_position_int message
*
* @return Ground Y Speed (Longitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_global_position_int_get_vy(const mavlink_message_t *msg)
{
return _MAV_RETURN_int16_t(msg, 22);
}
/**
* @brief Get field vz from global_position_int message
*
* @return Ground Z Speed (Altitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_global_position_int_get_vz(const mavlink_message_t *msg)
{
return _MAV_RETURN_int16_t(msg, 24);
}
/**
* @brief Get field hdg from global_position_int message
*
* @return Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_global_position_int_get_hdg(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 26);
}
/**
* @brief Decode a global_position_int message into a struct
*
* @param msg The message to decode
* @param global_position_int C-struct to decode the message contents into
*/
static inline void mavlink_msg_global_position_int_decode(const mavlink_message_t *msg, mavlink_global_position_int_t *global_position_int)
{
#if MAVLINK_NEED_BYTE_SWAP
global_position_int->time_boot_ms = mavlink_msg_global_position_int_get_time_boot_ms(msg);
global_position_int->lat = mavlink_msg_global_position_int_get_lat(msg);
global_position_int->lon = mavlink_msg_global_position_int_get_lon(msg);
global_position_int->alt = mavlink_msg_global_position_int_get_alt(msg);
global_position_int->relative_alt = mavlink_msg_global_position_int_get_relative_alt(msg);
global_position_int->vx = mavlink_msg_global_position_int_get_vx(msg);
global_position_int->vy = mavlink_msg_global_position_int_get_vy(msg);
global_position_int->vz = mavlink_msg_global_position_int_get_vz(msg);
global_position_int->hdg = mavlink_msg_global_position_int_get_hdg(msg);
#else
memcpy(global_position_int, _MAV_PAYLOAD(msg), 28);
#endif
}

View File

@ -0,0 +1,232 @@
// MESSAGE GLOBAL_POSITION_SETPOINT_INT PACKING
#define MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT 52
typedef struct __mavlink_global_position_setpoint_int_t {
int32_t latitude; ///< WGS84 Latitude position in degrees * 1E7
int32_t longitude; ///< WGS84 Longitude position in degrees * 1E7
int32_t altitude; ///< WGS84 Altitude in meters * 1000 (positive for up)
int16_t yaw; ///< Desired yaw angle in degrees * 100
uint8_t coordinate_frame; ///< Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
} mavlink_global_position_setpoint_int_t;
#define MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN 15
#define MAVLINK_MSG_ID_52_LEN 15
#define MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_SETPOINT_INT \
{ \
"GLOBAL_POSITION_SETPOINT_INT", \
5, \
{ \
{ "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_global_position_setpoint_int_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_global_position_setpoint_int_t, longitude) }, \
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_global_position_setpoint_int_t, altitude) }, \
{ "yaw", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_global_position_setpoint_int_t, yaw) }, \
{ "coordinate_frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_global_position_setpoint_int_t, coordinate_frame) }, \
} \
}
/**
* @brief Pack a global_position_setpoint_int message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_position_setpoint_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t coordinate_frame, int32_t latitude, int32_t longitude, int32_t altitude, int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
#else
mavlink_global_position_setpoint_int_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
#endif
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT;
return mavlink_finalize_message(msg, system_id, component_id, 15, 141);
}
/**
* @brief Pack a global_position_setpoint_int message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_position_setpoint_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t coordinate_frame, int32_t latitude, int32_t longitude, int32_t altitude, int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
#else
mavlink_global_position_setpoint_int_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
#endif
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 15, 141);
}
/**
* @brief Encode a global_position_setpoint_int struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param global_position_setpoint_int C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_global_position_setpoint_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_global_position_setpoint_int_t *global_position_setpoint_int)
{
return mavlink_msg_global_position_setpoint_int_pack(system_id, component_id, msg, global_position_setpoint_int->coordinate_frame, global_position_setpoint_int->latitude, global_position_setpoint_int->longitude, global_position_setpoint_int->altitude, global_position_setpoint_int->yaw);
}
/**
* @brief Send a global_position_setpoint_int message
* @param chan MAVLink channel to send the message
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_global_position_setpoint_int_send(mavlink_channel_t chan, uint8_t coordinate_frame, int32_t latitude, int32_t longitude, int32_t altitude, int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT, buf, 15, 141);
#else
mavlink_global_position_setpoint_int_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT, (const char *)&packet, 15, 141);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE GLOBAL_POSITION_SETPOINT_INT UNPACKING
/**
* @brief Get field coordinate_frame from global_position_setpoint_int message
*
* @return Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
*/
static inline uint8_t mavlink_msg_global_position_setpoint_int_get_coordinate_frame(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 14);
}
/**
* @brief Get field latitude from global_position_setpoint_int message
*
* @return WGS84 Latitude position in degrees * 1E7
*/
static inline int32_t mavlink_msg_global_position_setpoint_int_get_latitude(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 0);
}
/**
* @brief Get field longitude from global_position_setpoint_int message
*
* @return WGS84 Longitude position in degrees * 1E7
*/
static inline int32_t mavlink_msg_global_position_setpoint_int_get_longitude(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 4);
}
/**
* @brief Get field altitude from global_position_setpoint_int message
*
* @return WGS84 Altitude in meters * 1000 (positive for up)
*/
static inline int32_t mavlink_msg_global_position_setpoint_int_get_altitude(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
/**
* @brief Get field yaw from global_position_setpoint_int message
*
* @return Desired yaw angle in degrees * 100
*/
static inline int16_t mavlink_msg_global_position_setpoint_int_get_yaw(const mavlink_message_t *msg)
{
return _MAV_RETURN_int16_t(msg, 12);
}
/**
* @brief Decode a global_position_setpoint_int message into a struct
*
* @param msg The message to decode
* @param global_position_setpoint_int C-struct to decode the message contents into
*/
static inline void mavlink_msg_global_position_setpoint_int_decode(const mavlink_message_t *msg, mavlink_global_position_setpoint_int_t *global_position_setpoint_int)
{
#if MAVLINK_NEED_BYTE_SWAP
global_position_setpoint_int->latitude = mavlink_msg_global_position_setpoint_int_get_latitude(msg);
global_position_setpoint_int->longitude = mavlink_msg_global_position_setpoint_int_get_longitude(msg);
global_position_setpoint_int->altitude = mavlink_msg_global_position_setpoint_int_get_altitude(msg);
global_position_setpoint_int->yaw = mavlink_msg_global_position_setpoint_int_get_yaw(msg);
global_position_setpoint_int->coordinate_frame = mavlink_msg_global_position_setpoint_int_get_coordinate_frame(msg);
#else
memcpy(global_position_setpoint_int, _MAV_PAYLOAD(msg), 15);
#endif
}

View File

@ -0,0 +1,276 @@
// MESSAGE GLOBAL_VISION_POSITION_ESTIMATE PACKING
#define MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE 101
typedef struct __mavlink_global_vision_position_estimate_t {
uint64_t usec; ///< Timestamp (milliseconds)
float x; ///< Global X position
float y; ///< Global Y position
float z; ///< Global Z position
float roll; ///< Roll angle in rad
float pitch; ///< Pitch angle in rad
float yaw; ///< Yaw angle in rad
} mavlink_global_vision_position_estimate_t;
#define MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN 32
#define MAVLINK_MSG_ID_101_LEN 32
#define MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE \
{ \
"GLOBAL_VISION_POSITION_ESTIMATE", \
7, \
{ \
{ "usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_global_vision_position_estimate_t, usec) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_global_vision_position_estimate_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_global_vision_position_estimate_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_global_vision_position_estimate_t, z) }, \
{ "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_global_vision_position_estimate_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_global_vision_position_estimate_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_global_vision_position_estimate_t, yaw) }, \
} \
}
/**
* @brief Pack a global_vision_position_estimate message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param usec Timestamp (milliseconds)
* @param x Global X position
* @param y Global Y position
* @param z Global Z position
* @param roll Roll angle in rad
* @param pitch Pitch angle in rad
* @param yaw Yaw angle in rad
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_vision_position_estimate_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint64_t usec, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_float(buf, 20, roll);
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_global_vision_position_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE;
return mavlink_finalize_message(msg, system_id, component_id, 32, 102);
}
/**
* @brief Pack a global_vision_position_estimate message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param usec Timestamp (milliseconds)
* @param x Global X position
* @param y Global Y position
* @param z Global Z position
* @param roll Roll angle in rad
* @param pitch Pitch angle in rad
* @param yaw Yaw angle in rad
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_vision_position_estimate_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint64_t usec, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_float(buf, 20, roll);
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_global_vision_position_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 102);
}
/**
* @brief Encode a global_vision_position_estimate struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param global_vision_position_estimate C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_global_vision_position_estimate_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_global_vision_position_estimate_t *global_vision_position_estimate)
{
return mavlink_msg_global_vision_position_estimate_pack(system_id, component_id, msg, global_vision_position_estimate->usec, global_vision_position_estimate->x, global_vision_position_estimate->y, global_vision_position_estimate->z, global_vision_position_estimate->roll, global_vision_position_estimate->pitch, global_vision_position_estimate->yaw);
}
/**
* @brief Send a global_vision_position_estimate message
* @param chan MAVLink channel to send the message
*
* @param usec Timestamp (milliseconds)
* @param x Global X position
* @param y Global Y position
* @param z Global Z position
* @param roll Roll angle in rad
* @param pitch Pitch angle in rad
* @param yaw Yaw angle in rad
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_global_vision_position_estimate_send(mavlink_channel_t chan, uint64_t usec, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_float(buf, 20, roll);
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE, buf, 32, 102);
#else
mavlink_global_vision_position_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE, (const char *)&packet, 32, 102);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE GLOBAL_VISION_POSITION_ESTIMATE UNPACKING
/**
* @brief Get field usec from global_vision_position_estimate message
*
* @return Timestamp (milliseconds)
*/
static inline uint64_t mavlink_msg_global_vision_position_estimate_get_usec(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
/**
* @brief Get field x from global_vision_position_estimate message
*
* @return Global X position
*/
static inline float mavlink_msg_global_vision_position_estimate_get_x(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field y from global_vision_position_estimate message
*
* @return Global Y position
*/
static inline float mavlink_msg_global_vision_position_estimate_get_y(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field z from global_vision_position_estimate message
*
* @return Global Z position
*/
static inline float mavlink_msg_global_vision_position_estimate_get_z(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field roll from global_vision_position_estimate message
*
* @return Roll angle in rad
*/
static inline float mavlink_msg_global_vision_position_estimate_get_roll(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field pitch from global_vision_position_estimate message
*
* @return Pitch angle in rad
*/
static inline float mavlink_msg_global_vision_position_estimate_get_pitch(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Get field yaw from global_vision_position_estimate message
*
* @return Yaw angle in rad
*/
static inline float mavlink_msg_global_vision_position_estimate_get_yaw(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 28);
}
/**
* @brief Decode a global_vision_position_estimate message into a struct
*
* @param msg The message to decode
* @param global_vision_position_estimate C-struct to decode the message contents into
*/
static inline void mavlink_msg_global_vision_position_estimate_decode(const mavlink_message_t *msg, mavlink_global_vision_position_estimate_t *global_vision_position_estimate)
{
#if MAVLINK_NEED_BYTE_SWAP
global_vision_position_estimate->usec = mavlink_msg_global_vision_position_estimate_get_usec(msg);
global_vision_position_estimate->x = mavlink_msg_global_vision_position_estimate_get_x(msg);
global_vision_position_estimate->y = mavlink_msg_global_vision_position_estimate_get_y(msg);
global_vision_position_estimate->z = mavlink_msg_global_vision_position_estimate_get_z(msg);
global_vision_position_estimate->roll = mavlink_msg_global_vision_position_estimate_get_roll(msg);
global_vision_position_estimate->pitch = mavlink_msg_global_vision_position_estimate_get_pitch(msg);
global_vision_position_estimate->yaw = mavlink_msg_global_vision_position_estimate_get_yaw(msg);
#else
memcpy(global_vision_position_estimate, _MAV_PAYLOAD(msg), 32);
#endif
}

View File

@ -0,0 +1,188 @@
// MESSAGE GPS_GLOBAL_ORIGIN PACKING
#define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN 49
typedef struct __mavlink_gps_global_origin_t {
int32_t latitude; ///< Latitude (WGS84), expressed as * 1E7
int32_t longitude; ///< Longitude (WGS84), expressed as * 1E7
int32_t altitude; ///< Altitude(WGS84), expressed as * 1000
} mavlink_gps_global_origin_t;
#define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN 12
#define MAVLINK_MSG_ID_49_LEN 12
#define MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN \
{ \
"GPS_GLOBAL_ORIGIN", \
3, \
{ \
{ "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_gps_global_origin_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_gps_global_origin_t, longitude) }, \
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_global_origin_t, altitude) }, \
} \
}
/**
* @brief Pack a gps_global_origin message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param latitude Latitude (WGS84), expressed as * 1E7
* @param longitude Longitude (WGS84), expressed as * 1E7
* @param altitude Altitude(WGS84), expressed as * 1000
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
int32_t latitude, int32_t longitude, int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
#else
mavlink_gps_global_origin_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN;
return mavlink_finalize_message(msg, system_id, component_id, 12, 39);
}
/**
* @brief Pack a gps_global_origin message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param latitude Latitude (WGS84), expressed as * 1E7
* @param longitude Longitude (WGS84), expressed as * 1E7
* @param altitude Altitude(WGS84), expressed as * 1000
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_global_origin_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
int32_t latitude, int32_t longitude, int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
#else
mavlink_gps_global_origin_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 12, 39);
}
/**
* @brief Encode a gps_global_origin struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gps_global_origin C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gps_global_origin_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_gps_global_origin_t *gps_global_origin)
{
return mavlink_msg_gps_global_origin_pack(system_id, component_id, msg, gps_global_origin->latitude, gps_global_origin->longitude, gps_global_origin->altitude);
}
/**
* @brief Send a gps_global_origin message
* @param chan MAVLink channel to send the message
*
* @param latitude Latitude (WGS84), expressed as * 1E7
* @param longitude Longitude (WGS84), expressed as * 1E7
* @param altitude Altitude(WGS84), expressed as * 1000
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gps_global_origin_send(mavlink_channel_t chan, int32_t latitude, int32_t longitude, int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, buf, 12, 39);
#else
mavlink_gps_global_origin_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, (const char *)&packet, 12, 39);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE GPS_GLOBAL_ORIGIN UNPACKING
/**
* @brief Get field latitude from gps_global_origin message
*
* @return Latitude (WGS84), expressed as * 1E7
*/
static inline int32_t mavlink_msg_gps_global_origin_get_latitude(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 0);
}
/**
* @brief Get field longitude from gps_global_origin message
*
* @return Longitude (WGS84), expressed as * 1E7
*/
static inline int32_t mavlink_msg_gps_global_origin_get_longitude(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 4);
}
/**
* @brief Get field altitude from gps_global_origin message
*
* @return Altitude(WGS84), expressed as * 1000
*/
static inline int32_t mavlink_msg_gps_global_origin_get_altitude(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
/**
* @brief Decode a gps_global_origin message into a struct
*
* @param msg The message to decode
* @param gps_global_origin C-struct to decode the message contents into
*/
static inline void mavlink_msg_gps_global_origin_decode(const mavlink_message_t *msg, mavlink_gps_global_origin_t *gps_global_origin)
{
#if MAVLINK_NEED_BYTE_SWAP
gps_global_origin->latitude = mavlink_msg_gps_global_origin_get_latitude(msg);
gps_global_origin->longitude = mavlink_msg_gps_global_origin_get_longitude(msg);
gps_global_origin->altitude = mavlink_msg_gps_global_origin_get_altitude(msg);
#else
memcpy(gps_global_origin, _MAV_PAYLOAD(msg), 12);
#endif
}

View File

@ -0,0 +1,342 @@
// MESSAGE GPS_RAW_INT PACKING
#define MAVLINK_MSG_ID_GPS_RAW_INT 24
typedef struct __mavlink_gps_raw_int_t {
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
int32_t lat; ///< Latitude in 1E7 degrees
int32_t lon; ///< Longitude in 1E7 degrees
int32_t alt; ///< Altitude in 1E3 meters (millimeters) above MSL
uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
uint16_t epv; ///< GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: 65535
uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
uint8_t fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
uint8_t satellites_visible; ///< Number of satellites visible. If unknown, set to 255
} mavlink_gps_raw_int_t;
#define MAVLINK_MSG_ID_GPS_RAW_INT_LEN 30
#define MAVLINK_MSG_ID_24_LEN 30
#define MAVLINK_MESSAGE_INFO_GPS_RAW_INT \
{ \
"GPS_RAW_INT", \
10, \
{ \
{ "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_gps_raw_int_t, time_usec) }, \
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_raw_int_t, lat) }, \
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps_raw_int_t, lon) }, \
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_gps_raw_int_t, alt) }, \
{ "eph", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_gps_raw_int_t, eph) }, \
{ "epv", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_gps_raw_int_t, epv) }, \
{ "vel", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_gps_raw_int_t, vel) }, \
{ "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_gps_raw_int_t, cog) }, \
{ "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_gps_raw_int_t, fix_type) }, \
{ "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_gps_raw_int_t, satellites_visible) }, \
} \
}
/**
* @brief Pack a gps_raw_int message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat Latitude in 1E7 degrees
* @param lon Longitude in 1E7 degrees
* @param alt Altitude in 1E3 meters (millimeters) above MSL
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param satellites_visible Number of satellites visible. If unknown, set to 255
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint64_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, uint16_t cog, uint8_t satellites_visible)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int32_t(buf, 8, lat);
_mav_put_int32_t(buf, 12, lon);
_mav_put_int32_t(buf, 16, alt);
_mav_put_uint16_t(buf, 20, eph);
_mav_put_uint16_t(buf, 22, epv);
_mav_put_uint16_t(buf, 24, vel);
_mav_put_uint16_t(buf, 26, cog);
_mav_put_uint8_t(buf, 28, fix_type);
_mav_put_uint8_t(buf, 29, satellites_visible);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 30);
#else
mavlink_gps_raw_int_t packet;
packet.time_usec = time_usec;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.eph = eph;
packet.epv = epv;
packet.vel = vel;
packet.cog = cog;
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 30);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_GPS_RAW_INT;
return mavlink_finalize_message(msg, system_id, component_id, 30, 24);
}
/**
* @brief Pack a gps_raw_int message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat Latitude in 1E7 degrees
* @param lon Longitude in 1E7 degrees
* @param alt Altitude in 1E3 meters (millimeters) above MSL
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param satellites_visible Number of satellites visible. If unknown, set to 255
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_raw_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint64_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, uint16_t cog, uint8_t satellites_visible)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int32_t(buf, 8, lat);
_mav_put_int32_t(buf, 12, lon);
_mav_put_int32_t(buf, 16, alt);
_mav_put_uint16_t(buf, 20, eph);
_mav_put_uint16_t(buf, 22, epv);
_mav_put_uint16_t(buf, 24, vel);
_mav_put_uint16_t(buf, 26, cog);
_mav_put_uint8_t(buf, 28, fix_type);
_mav_put_uint8_t(buf, 29, satellites_visible);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 30);
#else
mavlink_gps_raw_int_t packet;
packet.time_usec = time_usec;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.eph = eph;
packet.epv = epv;
packet.vel = vel;
packet.cog = cog;
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 30);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_GPS_RAW_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 30, 24);
}
/**
* @brief Encode a gps_raw_int struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gps_raw_int C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gps_raw_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_gps_raw_int_t *gps_raw_int)
{
return mavlink_msg_gps_raw_int_pack(system_id, component_id, msg, gps_raw_int->time_usec, gps_raw_int->fix_type, gps_raw_int->lat, gps_raw_int->lon, gps_raw_int->alt, gps_raw_int->eph, gps_raw_int->epv, gps_raw_int->vel, gps_raw_int->cog, gps_raw_int->satellites_visible);
}
/**
* @brief Send a gps_raw_int message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat Latitude in 1E7 degrees
* @param lon Longitude in 1E7 degrees
* @param alt Altitude in 1E3 meters (millimeters) above MSL
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param satellites_visible Number of satellites visible. If unknown, set to 255
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gps_raw_int_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, uint16_t cog, uint8_t satellites_visible)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int32_t(buf, 8, lat);
_mav_put_int32_t(buf, 12, lon);
_mav_put_int32_t(buf, 16, alt);
_mav_put_uint16_t(buf, 20, eph);
_mav_put_uint16_t(buf, 22, epv);
_mav_put_uint16_t(buf, 24, vel);
_mav_put_uint16_t(buf, 26, cog);
_mav_put_uint8_t(buf, 28, fix_type);
_mav_put_uint8_t(buf, 29, satellites_visible);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, buf, 30, 24);
#else
mavlink_gps_raw_int_t packet;
packet.time_usec = time_usec;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.eph = eph;
packet.epv = epv;
packet.vel = vel;
packet.cog = cog;
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, (const char *)&packet, 30, 24);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE GPS_RAW_INT UNPACKING
/**
* @brief Get field time_usec from gps_raw_int message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_gps_raw_int_get_time_usec(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
/**
* @brief Get field fix_type from gps_raw_int message
*
* @return 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
*/
static inline uint8_t mavlink_msg_gps_raw_int_get_fix_type(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 28);
}
/**
* @brief Get field lat from gps_raw_int message
*
* @return Latitude in 1E7 degrees
*/
static inline int32_t mavlink_msg_gps_raw_int_get_lat(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
/**
* @brief Get field lon from gps_raw_int message
*
* @return Longitude in 1E7 degrees
*/
static inline int32_t mavlink_msg_gps_raw_int_get_lon(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 12);
}
/**
* @brief Get field alt from gps_raw_int message
*
* @return Altitude in 1E3 meters (millimeters) above MSL
*/
static inline int32_t mavlink_msg_gps_raw_int_get_alt(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 16);
}
/**
* @brief Get field eph from gps_raw_int message
*
* @return GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_gps_raw_int_get_eph(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 20);
}
/**
* @brief Get field epv from gps_raw_int message
*
* @return GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_gps_raw_int_get_epv(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 22);
}
/**
* @brief Get field vel from gps_raw_int message
*
* @return GPS ground speed (m/s * 100). If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_gps_raw_int_get_vel(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 24);
}
/**
* @brief Get field cog from gps_raw_int message
*
* @return Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_gps_raw_int_get_cog(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 26);
}
/**
* @brief Get field satellites_visible from gps_raw_int message
*
* @return Number of satellites visible. If unknown, set to 255
*/
static inline uint8_t mavlink_msg_gps_raw_int_get_satellites_visible(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 29);
}
/**
* @brief Decode a gps_raw_int message into a struct
*
* @param msg The message to decode
* @param gps_raw_int C-struct to decode the message contents into
*/
static inline void mavlink_msg_gps_raw_int_decode(const mavlink_message_t *msg, mavlink_gps_raw_int_t *gps_raw_int)
{
#if MAVLINK_NEED_BYTE_SWAP
gps_raw_int->time_usec = mavlink_msg_gps_raw_int_get_time_usec(msg);
gps_raw_int->lat = mavlink_msg_gps_raw_int_get_lat(msg);
gps_raw_int->lon = mavlink_msg_gps_raw_int_get_lon(msg);
gps_raw_int->alt = mavlink_msg_gps_raw_int_get_alt(msg);
gps_raw_int->eph = mavlink_msg_gps_raw_int_get_eph(msg);
gps_raw_int->epv = mavlink_msg_gps_raw_int_get_epv(msg);
gps_raw_int->vel = mavlink_msg_gps_raw_int_get_vel(msg);
gps_raw_int->cog = mavlink_msg_gps_raw_int_get_cog(msg);
gps_raw_int->fix_type = mavlink_msg_gps_raw_int_get_fix_type(msg);
gps_raw_int->satellites_visible = mavlink_msg_gps_raw_int_get_satellites_visible(msg);
#else
memcpy(gps_raw_int, _MAV_PAYLOAD(msg), 30);
#endif
}

View File

@ -0,0 +1,253 @@
// MESSAGE GPS_STATUS PACKING
#define MAVLINK_MSG_ID_GPS_STATUS 25
typedef struct __mavlink_gps_status_t {
uint8_t satellites_visible; ///< Number of satellites visible
uint8_t satellite_prn[20]; ///< Global satellite ID
uint8_t satellite_used[20]; ///< 0: Satellite not used, 1: used for localization
uint8_t satellite_elevation[20]; ///< Elevation (0: right on top of receiver, 90: on the horizon) of satellite
uint8_t satellite_azimuth[20]; ///< Direction of satellite, 0: 0 deg, 255: 360 deg.
uint8_t satellite_snr[20]; ///< Signal to noise ratio of satellite
} mavlink_gps_status_t;
#define MAVLINK_MSG_ID_GPS_STATUS_LEN 101
#define MAVLINK_MSG_ID_25_LEN 101
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_PRN_LEN 20
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_USED_LEN 20
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_ELEVATION_LEN 20
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_AZIMUTH_LEN 20
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_SNR_LEN 20
#define MAVLINK_MESSAGE_INFO_GPS_STATUS \
{ \
"GPS_STATUS", \
6, \
{ \
{ "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gps_status_t, satellites_visible) }, \
{ "satellite_prn", NULL, MAVLINK_TYPE_UINT8_T, 20, 1, offsetof(mavlink_gps_status_t, satellite_prn) }, \
{ "satellite_used", NULL, MAVLINK_TYPE_UINT8_T, 20, 21, offsetof(mavlink_gps_status_t, satellite_used) }, \
{ "satellite_elevation", NULL, MAVLINK_TYPE_UINT8_T, 20, 41, offsetof(mavlink_gps_status_t, satellite_elevation) }, \
{ "satellite_azimuth", NULL, MAVLINK_TYPE_UINT8_T, 20, 61, offsetof(mavlink_gps_status_t, satellite_azimuth) }, \
{ "satellite_snr", NULL, MAVLINK_TYPE_UINT8_T, 20, 81, offsetof(mavlink_gps_status_t, satellite_snr) }, \
} \
}
/**
* @brief Pack a gps_status message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param satellites_visible Number of satellites visible
* @param satellite_prn Global satellite ID
* @param satellite_used 0: Satellite not used, 1: used for localization
* @param satellite_elevation Elevation (0: right on top of receiver, 90: on the horizon) of satellite
* @param satellite_azimuth Direction of satellite, 0: 0 deg, 255: 360 deg.
* @param satellite_snr Signal to noise ratio of satellite
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t satellites_visible, const uint8_t *satellite_prn, const uint8_t *satellite_used, const uint8_t *satellite_elevation, const uint8_t *satellite_azimuth, const uint8_t *satellite_snr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[101];
_mav_put_uint8_t(buf, 0, satellites_visible);
_mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
_mav_put_uint8_t_array(buf, 21, satellite_used, 20);
_mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
_mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
_mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 101);
#else
mavlink_gps_status_t packet;
packet.satellites_visible = satellites_visible;
mav_array_memcpy(packet.satellite_prn, satellite_prn, sizeof(uint8_t) * 20);
mav_array_memcpy(packet.satellite_used, satellite_used, sizeof(uint8_t) * 20);
mav_array_memcpy(packet.satellite_elevation, satellite_elevation, sizeof(uint8_t) * 20);
mav_array_memcpy(packet.satellite_azimuth, satellite_azimuth, sizeof(uint8_t) * 20);
mav_array_memcpy(packet.satellite_snr, satellite_snr, sizeof(uint8_t) * 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 101);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_STATUS;
return mavlink_finalize_message(msg, system_id, component_id, 101, 23);
}
/**
* @brief Pack a gps_status message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param satellites_visible Number of satellites visible
* @param satellite_prn Global satellite ID
* @param satellite_used 0: Satellite not used, 1: used for localization
* @param satellite_elevation Elevation (0: right on top of receiver, 90: on the horizon) of satellite
* @param satellite_azimuth Direction of satellite, 0: 0 deg, 255: 360 deg.
* @param satellite_snr Signal to noise ratio of satellite
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t satellites_visible, const uint8_t *satellite_prn, const uint8_t *satellite_used, const uint8_t *satellite_elevation, const uint8_t *satellite_azimuth, const uint8_t *satellite_snr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[101];
_mav_put_uint8_t(buf, 0, satellites_visible);
_mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
_mav_put_uint8_t_array(buf, 21, satellite_used, 20);
_mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
_mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
_mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 101);
#else
mavlink_gps_status_t packet;
packet.satellites_visible = satellites_visible;
mav_array_memcpy(packet.satellite_prn, satellite_prn, sizeof(uint8_t) * 20);
mav_array_memcpy(packet.satellite_used, satellite_used, sizeof(uint8_t) * 20);
mav_array_memcpy(packet.satellite_elevation, satellite_elevation, sizeof(uint8_t) * 20);
mav_array_memcpy(packet.satellite_azimuth, satellite_azimuth, sizeof(uint8_t) * 20);
mav_array_memcpy(packet.satellite_snr, satellite_snr, sizeof(uint8_t) * 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 101);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_STATUS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 101, 23);
}
/**
* @brief Encode a gps_status struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gps_status C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gps_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_gps_status_t *gps_status)
{
return mavlink_msg_gps_status_pack(system_id, component_id, msg, gps_status->satellites_visible, gps_status->satellite_prn, gps_status->satellite_used, gps_status->satellite_elevation, gps_status->satellite_azimuth, gps_status->satellite_snr);
}
/**
* @brief Send a gps_status message
* @param chan MAVLink channel to send the message
*
* @param satellites_visible Number of satellites visible
* @param satellite_prn Global satellite ID
* @param satellite_used 0: Satellite not used, 1: used for localization
* @param satellite_elevation Elevation (0: right on top of receiver, 90: on the horizon) of satellite
* @param satellite_azimuth Direction of satellite, 0: 0 deg, 255: 360 deg.
* @param satellite_snr Signal to noise ratio of satellite
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gps_status_send(mavlink_channel_t chan, uint8_t satellites_visible, const uint8_t *satellite_prn, const uint8_t *satellite_used, const uint8_t *satellite_elevation, const uint8_t *satellite_azimuth, const uint8_t *satellite_snr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[101];
_mav_put_uint8_t(buf, 0, satellites_visible);
_mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
_mav_put_uint8_t_array(buf, 21, satellite_used, 20);
_mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
_mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
_mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_STATUS, buf, 101, 23);
#else
mavlink_gps_status_t packet;
packet.satellites_visible = satellites_visible;
mav_array_memcpy(packet.satellite_prn, satellite_prn, sizeof(uint8_t) * 20);
mav_array_memcpy(packet.satellite_used, satellite_used, sizeof(uint8_t) * 20);
mav_array_memcpy(packet.satellite_elevation, satellite_elevation, sizeof(uint8_t) * 20);
mav_array_memcpy(packet.satellite_azimuth, satellite_azimuth, sizeof(uint8_t) * 20);
mav_array_memcpy(packet.satellite_snr, satellite_snr, sizeof(uint8_t) * 20);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_STATUS, (const char *)&packet, 101, 23);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE GPS_STATUS UNPACKING
/**
* @brief Get field satellites_visible from gps_status message
*
* @return Number of satellites visible
*/
static inline uint8_t mavlink_msg_gps_status_get_satellites_visible(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field satellite_prn from gps_status message
*
* @return Global satellite ID
*/
static inline uint16_t mavlink_msg_gps_status_get_satellite_prn(const mavlink_message_t *msg, uint8_t *satellite_prn)
{
return _MAV_RETURN_uint8_t_array(msg, satellite_prn, 20, 1);
}
/**
* @brief Get field satellite_used from gps_status message
*
* @return 0: Satellite not used, 1: used for localization
*/
static inline uint16_t mavlink_msg_gps_status_get_satellite_used(const mavlink_message_t *msg, uint8_t *satellite_used)
{
return _MAV_RETURN_uint8_t_array(msg, satellite_used, 20, 21);
}
/**
* @brief Get field satellite_elevation from gps_status message
*
* @return Elevation (0: right on top of receiver, 90: on the horizon) of satellite
*/
static inline uint16_t mavlink_msg_gps_status_get_satellite_elevation(const mavlink_message_t *msg, uint8_t *satellite_elevation)
{
return _MAV_RETURN_uint8_t_array(msg, satellite_elevation, 20, 41);
}
/**
* @brief Get field satellite_azimuth from gps_status message
*
* @return Direction of satellite, 0: 0 deg, 255: 360 deg.
*/
static inline uint16_t mavlink_msg_gps_status_get_satellite_azimuth(const mavlink_message_t *msg, uint8_t *satellite_azimuth)
{
return _MAV_RETURN_uint8_t_array(msg, satellite_azimuth, 20, 61);
}
/**
* @brief Get field satellite_snr from gps_status message
*
* @return Signal to noise ratio of satellite
*/
static inline uint16_t mavlink_msg_gps_status_get_satellite_snr(const mavlink_message_t *msg, uint8_t *satellite_snr)
{
return _MAV_RETURN_uint8_t_array(msg, satellite_snr, 20, 81);
}
/**
* @brief Decode a gps_status message into a struct
*
* @param msg The message to decode
* @param gps_status C-struct to decode the message contents into
*/
static inline void mavlink_msg_gps_status_decode(const mavlink_message_t *msg, mavlink_gps_status_t *gps_status)
{
#if MAVLINK_NEED_BYTE_SWAP
gps_status->satellites_visible = mavlink_msg_gps_status_get_satellites_visible(msg);
mavlink_msg_gps_status_get_satellite_prn(msg, gps_status->satellite_prn);
mavlink_msg_gps_status_get_satellite_used(msg, gps_status->satellite_used);
mavlink_msg_gps_status_get_satellite_elevation(msg, gps_status->satellite_elevation);
mavlink_msg_gps_status_get_satellite_azimuth(msg, gps_status->satellite_azimuth);
mavlink_msg_gps_status_get_satellite_snr(msg, gps_status->satellite_snr);
#else
memcpy(gps_status, _MAV_PAYLOAD(msg), 101);
#endif
}

View File

@ -0,0 +1,251 @@
// MESSAGE HEARTBEAT PACKING
#define MAVLINK_MSG_ID_HEARTBEAT 0
typedef struct __mavlink_heartbeat_t {
uint32_t custom_mode; ///< A bitfield for use for autopilot-specific flags.
uint8_t type; ///< Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
uint8_t autopilot; ///< Autopilot type / class. defined in MAV_AUTOPILOT ENUM
uint8_t base_mode; ///< System mode bitfield, see MAV_MODE_FLAGS ENUM in mavlink/include/mavlink_types.h
uint8_t system_status; ///< System status flag, see MAV_STATE ENUM
uint8_t mavlink_version; ///< MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version
} mavlink_heartbeat_t;
#define MAVLINK_MSG_ID_HEARTBEAT_LEN 9
#define MAVLINK_MSG_ID_0_LEN 9
#define MAVLINK_MESSAGE_INFO_HEARTBEAT \
{ \
"HEARTBEAT", \
6, \
{ \
{ "custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_heartbeat_t, custom_mode) }, \
{ "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_heartbeat_t, type) }, \
{ "autopilot", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_heartbeat_t, autopilot) }, \
{ "base_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_heartbeat_t, base_mode) }, \
{ "system_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_heartbeat_t, system_status) }, \
{ "mavlink_version", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_heartbeat_t, mavlink_version) }, \
} \
}
/**
* @brief Pack a heartbeat message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param type Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
* @param autopilot Autopilot type / class. defined in MAV_AUTOPILOT ENUM
* @param base_mode System mode bitfield, see MAV_MODE_FLAGS ENUM in mavlink/include/mavlink_types.h
* @param custom_mode A bitfield for use for autopilot-specific flags.
* @param system_status System status flag, see MAV_STATE ENUM
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_heartbeat_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t type, uint8_t autopilot, uint8_t base_mode, uint32_t custom_mode, uint8_t system_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint32_t(buf, 0, custom_mode);
_mav_put_uint8_t(buf, 4, type);
_mav_put_uint8_t(buf, 5, autopilot);
_mav_put_uint8_t(buf, 6, base_mode);
_mav_put_uint8_t(buf, 7, system_status);
_mav_put_uint8_t(buf, 8, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
#else
mavlink_heartbeat_t packet;
packet.custom_mode = custom_mode;
packet.type = type;
packet.autopilot = autopilot;
packet.base_mode = base_mode;
packet.system_status = system_status;
packet.mavlink_version = 3;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
#endif
msg->msgid = MAVLINK_MSG_ID_HEARTBEAT;
return mavlink_finalize_message(msg, system_id, component_id, 9, 50);
}
/**
* @brief Pack a heartbeat message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param type Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
* @param autopilot Autopilot type / class. defined in MAV_AUTOPILOT ENUM
* @param base_mode System mode bitfield, see MAV_MODE_FLAGS ENUM in mavlink/include/mavlink_types.h
* @param custom_mode A bitfield for use for autopilot-specific flags.
* @param system_status System status flag, see MAV_STATE ENUM
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_heartbeat_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t type, uint8_t autopilot, uint8_t base_mode, uint32_t custom_mode, uint8_t system_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint32_t(buf, 0, custom_mode);
_mav_put_uint8_t(buf, 4, type);
_mav_put_uint8_t(buf, 5, autopilot);
_mav_put_uint8_t(buf, 6, base_mode);
_mav_put_uint8_t(buf, 7, system_status);
_mav_put_uint8_t(buf, 8, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
#else
mavlink_heartbeat_t packet;
packet.custom_mode = custom_mode;
packet.type = type;
packet.autopilot = autopilot;
packet.base_mode = base_mode;
packet.system_status = system_status;
packet.mavlink_version = 3;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
#endif
msg->msgid = MAVLINK_MSG_ID_HEARTBEAT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 9, 50);
}
/**
* @brief Encode a heartbeat struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param heartbeat C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_heartbeat_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_heartbeat_t *heartbeat)
{
return mavlink_msg_heartbeat_pack(system_id, component_id, msg, heartbeat->type, heartbeat->autopilot, heartbeat->base_mode, heartbeat->custom_mode, heartbeat->system_status);
}
/**
* @brief Send a heartbeat message
* @param chan MAVLink channel to send the message
*
* @param type Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
* @param autopilot Autopilot type / class. defined in MAV_AUTOPILOT ENUM
* @param base_mode System mode bitfield, see MAV_MODE_FLAGS ENUM in mavlink/include/mavlink_types.h
* @param custom_mode A bitfield for use for autopilot-specific flags.
* @param system_status System status flag, see MAV_STATE ENUM
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_heartbeat_send(mavlink_channel_t chan, uint8_t type, uint8_t autopilot, uint8_t base_mode, uint32_t custom_mode, uint8_t system_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint32_t(buf, 0, custom_mode);
_mav_put_uint8_t(buf, 4, type);
_mav_put_uint8_t(buf, 5, autopilot);
_mav_put_uint8_t(buf, 6, base_mode);
_mav_put_uint8_t(buf, 7, system_status);
_mav_put_uint8_t(buf, 8, 3);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, buf, 9, 50);
#else
mavlink_heartbeat_t packet;
packet.custom_mode = custom_mode;
packet.type = type;
packet.autopilot = autopilot;
packet.base_mode = base_mode;
packet.system_status = system_status;
packet.mavlink_version = 3;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, (const char *)&packet, 9, 50);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE HEARTBEAT UNPACKING
/**
* @brief Get field type from heartbeat message
*
* @return Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
*/
static inline uint8_t mavlink_msg_heartbeat_get_type(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
/**
* @brief Get field autopilot from heartbeat message
*
* @return Autopilot type / class. defined in MAV_AUTOPILOT ENUM
*/
static inline uint8_t mavlink_msg_heartbeat_get_autopilot(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
/**
* @brief Get field base_mode from heartbeat message
*
* @return System mode bitfield, see MAV_MODE_FLAGS ENUM in mavlink/include/mavlink_types.h
*/
static inline uint8_t mavlink_msg_heartbeat_get_base_mode(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 6);
}
/**
* @brief Get field custom_mode from heartbeat message
*
* @return A bitfield for use for autopilot-specific flags.
*/
static inline uint32_t mavlink_msg_heartbeat_get_custom_mode(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field system_status from heartbeat message
*
* @return System status flag, see MAV_STATE ENUM
*/
static inline uint8_t mavlink_msg_heartbeat_get_system_status(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 7);
}
/**
* @brief Get field mavlink_version from heartbeat message
*
* @return MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version
*/
static inline uint8_t mavlink_msg_heartbeat_get_mavlink_version(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
/**
* @brief Decode a heartbeat message into a struct
*
* @param msg The message to decode
* @param heartbeat C-struct to decode the message contents into
*/
static inline void mavlink_msg_heartbeat_decode(const mavlink_message_t *msg, mavlink_heartbeat_t *heartbeat)
{
#if MAVLINK_NEED_BYTE_SWAP
heartbeat->custom_mode = mavlink_msg_heartbeat_get_custom_mode(msg);
heartbeat->type = mavlink_msg_heartbeat_get_type(msg);
heartbeat->autopilot = mavlink_msg_heartbeat_get_autopilot(msg);
heartbeat->base_mode = mavlink_msg_heartbeat_get_base_mode(msg);
heartbeat->system_status = mavlink_msg_heartbeat_get_system_status(msg);
heartbeat->mavlink_version = mavlink_msg_heartbeat_get_mavlink_version(msg);
#else
memcpy(heartbeat, _MAV_PAYLOAD(msg), 9);
#endif
}

View File

@ -0,0 +1,364 @@
// MESSAGE HIL_CONTROLS PACKING
#define MAVLINK_MSG_ID_HIL_CONTROLS 91
typedef struct __mavlink_hil_controls_t {
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
float roll_ailerons; ///< Control output -1 .. 1
float pitch_elevator; ///< Control output -1 .. 1
float yaw_rudder; ///< Control output -1 .. 1
float throttle; ///< Throttle 0 .. 1
float aux1; ///< Aux 1, -1 .. 1
float aux2; ///< Aux 2, -1 .. 1
float aux3; ///< Aux 3, -1 .. 1
float aux4; ///< Aux 4, -1 .. 1
uint8_t mode; ///< System mode (MAV_MODE)
uint8_t nav_mode; ///< Navigation mode (MAV_NAV_MODE)
} mavlink_hil_controls_t;
#define MAVLINK_MSG_ID_HIL_CONTROLS_LEN 42
#define MAVLINK_MSG_ID_91_LEN 42
#define MAVLINK_MESSAGE_INFO_HIL_CONTROLS \
{ \
"HIL_CONTROLS", \
11, \
{ \
{ "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_controls_t, time_usec) }, \
{ "roll_ailerons", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_hil_controls_t, roll_ailerons) }, \
{ "pitch_elevator", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_hil_controls_t, pitch_elevator) }, \
{ "yaw_rudder", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_hil_controls_t, yaw_rudder) }, \
{ "throttle", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_hil_controls_t, throttle) }, \
{ "aux1", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_hil_controls_t, aux1) }, \
{ "aux2", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_hil_controls_t, aux2) }, \
{ "aux3", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_hil_controls_t, aux3) }, \
{ "aux4", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_hil_controls_t, aux4) }, \
{ "mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_hil_controls_t, mode) }, \
{ "nav_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_hil_controls_t, nav_mode) }, \
} \
}
/**
* @brief Pack a hil_controls message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param roll_ailerons Control output -1 .. 1
* @param pitch_elevator Control output -1 .. 1
* @param yaw_rudder Control output -1 .. 1
* @param throttle Throttle 0 .. 1
* @param aux1 Aux 1, -1 .. 1
* @param aux2 Aux 2, -1 .. 1
* @param aux3 Aux 3, -1 .. 1
* @param aux4 Aux 4, -1 .. 1
* @param mode System mode (MAV_MODE)
* @param nav_mode Navigation mode (MAV_NAV_MODE)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_controls_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint64_t time_usec, float roll_ailerons, float pitch_elevator, float yaw_rudder, float throttle, float aux1, float aux2, float aux3, float aux4, uint8_t mode, uint8_t nav_mode)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[42];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll_ailerons);
_mav_put_float(buf, 12, pitch_elevator);
_mav_put_float(buf, 16, yaw_rudder);
_mav_put_float(buf, 20, throttle);
_mav_put_float(buf, 24, aux1);
_mav_put_float(buf, 28, aux2);
_mav_put_float(buf, 32, aux3);
_mav_put_float(buf, 36, aux4);
_mav_put_uint8_t(buf, 40, mode);
_mav_put_uint8_t(buf, 41, nav_mode);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 42);
#else
mavlink_hil_controls_t packet;
packet.time_usec = time_usec;
packet.roll_ailerons = roll_ailerons;
packet.pitch_elevator = pitch_elevator;
packet.yaw_rudder = yaw_rudder;
packet.throttle = throttle;
packet.aux1 = aux1;
packet.aux2 = aux2;
packet.aux3 = aux3;
packet.aux4 = aux4;
packet.mode = mode;
packet.nav_mode = nav_mode;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 42);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_HIL_CONTROLS;
return mavlink_finalize_message(msg, system_id, component_id, 42, 63);
}
/**
* @brief Pack a hil_controls message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param roll_ailerons Control output -1 .. 1
* @param pitch_elevator Control output -1 .. 1
* @param yaw_rudder Control output -1 .. 1
* @param throttle Throttle 0 .. 1
* @param aux1 Aux 1, -1 .. 1
* @param aux2 Aux 2, -1 .. 1
* @param aux3 Aux 3, -1 .. 1
* @param aux4 Aux 4, -1 .. 1
* @param mode System mode (MAV_MODE)
* @param nav_mode Navigation mode (MAV_NAV_MODE)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_controls_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint64_t time_usec, float roll_ailerons, float pitch_elevator, float yaw_rudder, float throttle, float aux1, float aux2, float aux3, float aux4, uint8_t mode, uint8_t nav_mode)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[42];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll_ailerons);
_mav_put_float(buf, 12, pitch_elevator);
_mav_put_float(buf, 16, yaw_rudder);
_mav_put_float(buf, 20, throttle);
_mav_put_float(buf, 24, aux1);
_mav_put_float(buf, 28, aux2);
_mav_put_float(buf, 32, aux3);
_mav_put_float(buf, 36, aux4);
_mav_put_uint8_t(buf, 40, mode);
_mav_put_uint8_t(buf, 41, nav_mode);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 42);
#else
mavlink_hil_controls_t packet;
packet.time_usec = time_usec;
packet.roll_ailerons = roll_ailerons;
packet.pitch_elevator = pitch_elevator;
packet.yaw_rudder = yaw_rudder;
packet.throttle = throttle;
packet.aux1 = aux1;
packet.aux2 = aux2;
packet.aux3 = aux3;
packet.aux4 = aux4;
packet.mode = mode;
packet.nav_mode = nav_mode;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 42);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_HIL_CONTROLS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 42, 63);
}
/**
* @brief Encode a hil_controls struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param hil_controls C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_hil_controls_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_hil_controls_t *hil_controls)
{
return mavlink_msg_hil_controls_pack(system_id, component_id, msg, hil_controls->time_usec, hil_controls->roll_ailerons, hil_controls->pitch_elevator, hil_controls->yaw_rudder, hil_controls->throttle, hil_controls->aux1, hil_controls->aux2, hil_controls->aux3, hil_controls->aux4, hil_controls->mode, hil_controls->nav_mode);
}
/**
* @brief Send a hil_controls message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param roll_ailerons Control output -1 .. 1
* @param pitch_elevator Control output -1 .. 1
* @param yaw_rudder Control output -1 .. 1
* @param throttle Throttle 0 .. 1
* @param aux1 Aux 1, -1 .. 1
* @param aux2 Aux 2, -1 .. 1
* @param aux3 Aux 3, -1 .. 1
* @param aux4 Aux 4, -1 .. 1
* @param mode System mode (MAV_MODE)
* @param nav_mode Navigation mode (MAV_NAV_MODE)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_hil_controls_send(mavlink_channel_t chan, uint64_t time_usec, float roll_ailerons, float pitch_elevator, float yaw_rudder, float throttle, float aux1, float aux2, float aux3, float aux4, uint8_t mode, uint8_t nav_mode)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[42];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll_ailerons);
_mav_put_float(buf, 12, pitch_elevator);
_mav_put_float(buf, 16, yaw_rudder);
_mav_put_float(buf, 20, throttle);
_mav_put_float(buf, 24, aux1);
_mav_put_float(buf, 28, aux2);
_mav_put_float(buf, 32, aux3);
_mav_put_float(buf, 36, aux4);
_mav_put_uint8_t(buf, 40, mode);
_mav_put_uint8_t(buf, 41, nav_mode);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, buf, 42, 63);
#else
mavlink_hil_controls_t packet;
packet.time_usec = time_usec;
packet.roll_ailerons = roll_ailerons;
packet.pitch_elevator = pitch_elevator;
packet.yaw_rudder = yaw_rudder;
packet.throttle = throttle;
packet.aux1 = aux1;
packet.aux2 = aux2;
packet.aux3 = aux3;
packet.aux4 = aux4;
packet.mode = mode;
packet.nav_mode = nav_mode;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, (const char *)&packet, 42, 63);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE HIL_CONTROLS UNPACKING
/**
* @brief Get field time_usec from hil_controls message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_hil_controls_get_time_usec(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
/**
* @brief Get field roll_ailerons from hil_controls message
*
* @return Control output -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_roll_ailerons(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field pitch_elevator from hil_controls message
*
* @return Control output -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_pitch_elevator(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field yaw_rudder from hil_controls message
*
* @return Control output -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_yaw_rudder(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field throttle from hil_controls message
*
* @return Throttle 0 .. 1
*/
static inline float mavlink_msg_hil_controls_get_throttle(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field aux1 from hil_controls message
*
* @return Aux 1, -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_aux1(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Get field aux2 from hil_controls message
*
* @return Aux 2, -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_aux2(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 28);
}
/**
* @brief Get field aux3 from hil_controls message
*
* @return Aux 3, -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_aux3(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 32);
}
/**
* @brief Get field aux4 from hil_controls message
*
* @return Aux 4, -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_aux4(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 36);
}
/**
* @brief Get field mode from hil_controls message
*
* @return System mode (MAV_MODE)
*/
static inline uint8_t mavlink_msg_hil_controls_get_mode(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 40);
}
/**
* @brief Get field nav_mode from hil_controls message
*
* @return Navigation mode (MAV_NAV_MODE)
*/
static inline uint8_t mavlink_msg_hil_controls_get_nav_mode(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 41);
}
/**
* @brief Decode a hil_controls message into a struct
*
* @param msg The message to decode
* @param hil_controls C-struct to decode the message contents into
*/
static inline void mavlink_msg_hil_controls_decode(const mavlink_message_t *msg, mavlink_hil_controls_t *hil_controls)
{
#if MAVLINK_NEED_BYTE_SWAP
hil_controls->time_usec = mavlink_msg_hil_controls_get_time_usec(msg);
hil_controls->roll_ailerons = mavlink_msg_hil_controls_get_roll_ailerons(msg);
hil_controls->pitch_elevator = mavlink_msg_hil_controls_get_pitch_elevator(msg);
hil_controls->yaw_rudder = mavlink_msg_hil_controls_get_yaw_rudder(msg);
hil_controls->throttle = mavlink_msg_hil_controls_get_throttle(msg);
hil_controls->aux1 = mavlink_msg_hil_controls_get_aux1(msg);
hil_controls->aux2 = mavlink_msg_hil_controls_get_aux2(msg);
hil_controls->aux3 = mavlink_msg_hil_controls_get_aux3(msg);
hil_controls->aux4 = mavlink_msg_hil_controls_get_aux4(msg);
hil_controls->mode = mavlink_msg_hil_controls_get_mode(msg);
hil_controls->nav_mode = mavlink_msg_hil_controls_get_nav_mode(msg);
#else
memcpy(hil_controls, _MAV_PAYLOAD(msg), 42);
#endif
}

View File

@ -0,0 +1,430 @@
// MESSAGE HIL_RC_INPUTS_RAW PACKING
#define MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW 92
typedef struct __mavlink_hil_rc_inputs_raw_t {
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
uint16_t chan1_raw; ///< RC channel 1 value, in microseconds
uint16_t chan2_raw; ///< RC channel 2 value, in microseconds
uint16_t chan3_raw; ///< RC channel 3 value, in microseconds
uint16_t chan4_raw; ///< RC channel 4 value, in microseconds
uint16_t chan5_raw; ///< RC channel 5 value, in microseconds
uint16_t chan6_raw; ///< RC channel 6 value, in microseconds
uint16_t chan7_raw; ///< RC channel 7 value, in microseconds
uint16_t chan8_raw; ///< RC channel 8 value, in microseconds
uint16_t chan9_raw; ///< RC channel 9 value, in microseconds
uint16_t chan10_raw; ///< RC channel 10 value, in microseconds
uint16_t chan11_raw; ///< RC channel 11 value, in microseconds
uint16_t chan12_raw; ///< RC channel 12 value, in microseconds
uint8_t rssi; ///< Receive signal strength indicator, 0: 0%, 255: 100%
} mavlink_hil_rc_inputs_raw_t;
#define MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN 33
#define MAVLINK_MSG_ID_92_LEN 33
#define MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW \
{ \
"HIL_RC_INPUTS_RAW", \
14, \
{ \
{ "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_rc_inputs_raw_t, time_usec) }, \
{ "chan1_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_hil_rc_inputs_raw_t, chan1_raw) }, \
{ "chan2_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_hil_rc_inputs_raw_t, chan2_raw) }, \
{ "chan3_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_hil_rc_inputs_raw_t, chan3_raw) }, \
{ "chan4_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_hil_rc_inputs_raw_t, chan4_raw) }, \
{ "chan5_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_hil_rc_inputs_raw_t, chan5_raw) }, \
{ "chan6_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_hil_rc_inputs_raw_t, chan6_raw) }, \
{ "chan7_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_hil_rc_inputs_raw_t, chan7_raw) }, \
{ "chan8_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_hil_rc_inputs_raw_t, chan8_raw) }, \
{ "chan9_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_hil_rc_inputs_raw_t, chan9_raw) }, \
{ "chan10_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_hil_rc_inputs_raw_t, chan10_raw) }, \
{ "chan11_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_hil_rc_inputs_raw_t, chan11_raw) }, \
{ "chan12_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_hil_rc_inputs_raw_t, chan12_raw) }, \
{ "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_hil_rc_inputs_raw_t, rssi) }, \
} \
}
/**
* @brief Pack a hil_rc_inputs_raw message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @param chan9_raw RC channel 9 value, in microseconds
* @param chan10_raw RC channel 10 value, in microseconds
* @param chan11_raw RC channel 11 value, in microseconds
* @param chan12_raw RC channel 12 value, in microseconds
* @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint64_t time_usec, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint16_t chan9_raw, uint16_t chan10_raw, uint16_t chan11_raw, uint16_t chan12_raw, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 8, chan1_raw);
_mav_put_uint16_t(buf, 10, chan2_raw);
_mav_put_uint16_t(buf, 12, chan3_raw);
_mav_put_uint16_t(buf, 14, chan4_raw);
_mav_put_uint16_t(buf, 16, chan5_raw);
_mav_put_uint16_t(buf, 18, chan6_raw);
_mav_put_uint16_t(buf, 20, chan7_raw);
_mav_put_uint16_t(buf, 22, chan8_raw);
_mav_put_uint16_t(buf, 24, chan9_raw);
_mav_put_uint16_t(buf, 26, chan10_raw);
_mav_put_uint16_t(buf, 28, chan11_raw);
_mav_put_uint16_t(buf, 30, chan12_raw);
_mav_put_uint8_t(buf, 32, rssi);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 33);
#else
mavlink_hil_rc_inputs_raw_t packet;
packet.time_usec = time_usec;
packet.chan1_raw = chan1_raw;
packet.chan2_raw = chan2_raw;
packet.chan3_raw = chan3_raw;
packet.chan4_raw = chan4_raw;
packet.chan5_raw = chan5_raw;
packet.chan6_raw = chan6_raw;
packet.chan7_raw = chan7_raw;
packet.chan8_raw = chan8_raw;
packet.chan9_raw = chan9_raw;
packet.chan10_raw = chan10_raw;
packet.chan11_raw = chan11_raw;
packet.chan12_raw = chan12_raw;
packet.rssi = rssi;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 33);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW;
return mavlink_finalize_message(msg, system_id, component_id, 33, 54);
}
/**
* @brief Pack a hil_rc_inputs_raw message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @param chan9_raw RC channel 9 value, in microseconds
* @param chan10_raw RC channel 10 value, in microseconds
* @param chan11_raw RC channel 11 value, in microseconds
* @param chan12_raw RC channel 12 value, in microseconds
* @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint64_t time_usec, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint16_t chan9_raw, uint16_t chan10_raw, uint16_t chan11_raw, uint16_t chan12_raw, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 8, chan1_raw);
_mav_put_uint16_t(buf, 10, chan2_raw);
_mav_put_uint16_t(buf, 12, chan3_raw);
_mav_put_uint16_t(buf, 14, chan4_raw);
_mav_put_uint16_t(buf, 16, chan5_raw);
_mav_put_uint16_t(buf, 18, chan6_raw);
_mav_put_uint16_t(buf, 20, chan7_raw);
_mav_put_uint16_t(buf, 22, chan8_raw);
_mav_put_uint16_t(buf, 24, chan9_raw);
_mav_put_uint16_t(buf, 26, chan10_raw);
_mav_put_uint16_t(buf, 28, chan11_raw);
_mav_put_uint16_t(buf, 30, chan12_raw);
_mav_put_uint8_t(buf, 32, rssi);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 33);
#else
mavlink_hil_rc_inputs_raw_t packet;
packet.time_usec = time_usec;
packet.chan1_raw = chan1_raw;
packet.chan2_raw = chan2_raw;
packet.chan3_raw = chan3_raw;
packet.chan4_raw = chan4_raw;
packet.chan5_raw = chan5_raw;
packet.chan6_raw = chan6_raw;
packet.chan7_raw = chan7_raw;
packet.chan8_raw = chan8_raw;
packet.chan9_raw = chan9_raw;
packet.chan10_raw = chan10_raw;
packet.chan11_raw = chan11_raw;
packet.chan12_raw = chan12_raw;
packet.rssi = rssi;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 33);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 33, 54);
}
/**
* @brief Encode a hil_rc_inputs_raw struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param hil_rc_inputs_raw C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_hil_rc_inputs_raw_t *hil_rc_inputs_raw)
{
return mavlink_msg_hil_rc_inputs_raw_pack(system_id, component_id, msg, hil_rc_inputs_raw->time_usec, hil_rc_inputs_raw->chan1_raw, hil_rc_inputs_raw->chan2_raw, hil_rc_inputs_raw->chan3_raw, hil_rc_inputs_raw->chan4_raw, hil_rc_inputs_raw->chan5_raw, hil_rc_inputs_raw->chan6_raw, hil_rc_inputs_raw->chan7_raw, hil_rc_inputs_raw->chan8_raw, hil_rc_inputs_raw->chan9_raw, hil_rc_inputs_raw->chan10_raw, hil_rc_inputs_raw->chan11_raw, hil_rc_inputs_raw->chan12_raw, hil_rc_inputs_raw->rssi);
}
/**
* @brief Send a hil_rc_inputs_raw message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @param chan9_raw RC channel 9 value, in microseconds
* @param chan10_raw RC channel 10 value, in microseconds
* @param chan11_raw RC channel 11 value, in microseconds
* @param chan12_raw RC channel 12 value, in microseconds
* @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_hil_rc_inputs_raw_send(mavlink_channel_t chan, uint64_t time_usec, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint16_t chan9_raw, uint16_t chan10_raw, uint16_t chan11_raw, uint16_t chan12_raw, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 8, chan1_raw);
_mav_put_uint16_t(buf, 10, chan2_raw);
_mav_put_uint16_t(buf, 12, chan3_raw);
_mav_put_uint16_t(buf, 14, chan4_raw);
_mav_put_uint16_t(buf, 16, chan5_raw);
_mav_put_uint16_t(buf, 18, chan6_raw);
_mav_put_uint16_t(buf, 20, chan7_raw);
_mav_put_uint16_t(buf, 22, chan8_raw);
_mav_put_uint16_t(buf, 24, chan9_raw);
_mav_put_uint16_t(buf, 26, chan10_raw);
_mav_put_uint16_t(buf, 28, chan11_raw);
_mav_put_uint16_t(buf, 30, chan12_raw);
_mav_put_uint8_t(buf, 32, rssi);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, buf, 33, 54);
#else
mavlink_hil_rc_inputs_raw_t packet;
packet.time_usec = time_usec;
packet.chan1_raw = chan1_raw;
packet.chan2_raw = chan2_raw;
packet.chan3_raw = chan3_raw;
packet.chan4_raw = chan4_raw;
packet.chan5_raw = chan5_raw;
packet.chan6_raw = chan6_raw;
packet.chan7_raw = chan7_raw;
packet.chan8_raw = chan8_raw;
packet.chan9_raw = chan9_raw;
packet.chan10_raw = chan10_raw;
packet.chan11_raw = chan11_raw;
packet.chan12_raw = chan12_raw;
packet.rssi = rssi;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, (const char *)&packet, 33, 54);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE HIL_RC_INPUTS_RAW UNPACKING
/**
* @brief Get field time_usec from hil_rc_inputs_raw message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_hil_rc_inputs_raw_get_time_usec(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
/**
* @brief Get field chan1_raw from hil_rc_inputs_raw message
*
* @return RC channel 1 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan1_raw(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 8);
}
/**
* @brief Get field chan2_raw from hil_rc_inputs_raw message
*
* @return RC channel 2 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan2_raw(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 10);
}
/**
* @brief Get field chan3_raw from hil_rc_inputs_raw message
*
* @return RC channel 3 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan3_raw(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 12);
}
/**
* @brief Get field chan4_raw from hil_rc_inputs_raw message
*
* @return RC channel 4 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan4_raw(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 14);
}
/**
* @brief Get field chan5_raw from hil_rc_inputs_raw message
*
* @return RC channel 5 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan5_raw(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 16);
}
/**
* @brief Get field chan6_raw from hil_rc_inputs_raw message
*
* @return RC channel 6 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan6_raw(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 18);
}
/**
* @brief Get field chan7_raw from hil_rc_inputs_raw message
*
* @return RC channel 7 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan7_raw(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 20);
}
/**
* @brief Get field chan8_raw from hil_rc_inputs_raw message
*
* @return RC channel 8 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan8_raw(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 22);
}
/**
* @brief Get field chan9_raw from hil_rc_inputs_raw message
*
* @return RC channel 9 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan9_raw(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 24);
}
/**
* @brief Get field chan10_raw from hil_rc_inputs_raw message
*
* @return RC channel 10 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan10_raw(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 26);
}
/**
* @brief Get field chan11_raw from hil_rc_inputs_raw message
*
* @return RC channel 11 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan11_raw(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 28);
}
/**
* @brief Get field chan12_raw from hil_rc_inputs_raw message
*
* @return RC channel 12 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan12_raw(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 30);
}
/**
* @brief Get field rssi from hil_rc_inputs_raw message
*
* @return Receive signal strength indicator, 0: 0%, 255: 100%
*/
static inline uint8_t mavlink_msg_hil_rc_inputs_raw_get_rssi(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 32);
}
/**
* @brief Decode a hil_rc_inputs_raw message into a struct
*
* @param msg The message to decode
* @param hil_rc_inputs_raw C-struct to decode the message contents into
*/
static inline void mavlink_msg_hil_rc_inputs_raw_decode(const mavlink_message_t *msg, mavlink_hil_rc_inputs_raw_t *hil_rc_inputs_raw)
{
#if MAVLINK_NEED_BYTE_SWAP
hil_rc_inputs_raw->time_usec = mavlink_msg_hil_rc_inputs_raw_get_time_usec(msg);
hil_rc_inputs_raw->chan1_raw = mavlink_msg_hil_rc_inputs_raw_get_chan1_raw(msg);
hil_rc_inputs_raw->chan2_raw = mavlink_msg_hil_rc_inputs_raw_get_chan2_raw(msg);
hil_rc_inputs_raw->chan3_raw = mavlink_msg_hil_rc_inputs_raw_get_chan3_raw(msg);
hil_rc_inputs_raw->chan4_raw = mavlink_msg_hil_rc_inputs_raw_get_chan4_raw(msg);
hil_rc_inputs_raw->chan5_raw = mavlink_msg_hil_rc_inputs_raw_get_chan5_raw(msg);
hil_rc_inputs_raw->chan6_raw = mavlink_msg_hil_rc_inputs_raw_get_chan6_raw(msg);
hil_rc_inputs_raw->chan7_raw = mavlink_msg_hil_rc_inputs_raw_get_chan7_raw(msg);
hil_rc_inputs_raw->chan8_raw = mavlink_msg_hil_rc_inputs_raw_get_chan8_raw(msg);
hil_rc_inputs_raw->chan9_raw = mavlink_msg_hil_rc_inputs_raw_get_chan9_raw(msg);
hil_rc_inputs_raw->chan10_raw = mavlink_msg_hil_rc_inputs_raw_get_chan10_raw(msg);
hil_rc_inputs_raw->chan11_raw = mavlink_msg_hil_rc_inputs_raw_get_chan11_raw(msg);
hil_rc_inputs_raw->chan12_raw = mavlink_msg_hil_rc_inputs_raw_get_chan12_raw(msg);
hil_rc_inputs_raw->rssi = mavlink_msg_hil_rc_inputs_raw_get_rssi(msg);
#else
memcpy(hil_rc_inputs_raw, _MAV_PAYLOAD(msg), 33);
#endif
}

View File

@ -0,0 +1,474 @@
// MESSAGE HIL_STATE PACKING
#define MAVLINK_MSG_ID_HIL_STATE 90
typedef struct __mavlink_hil_state_t {
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
float roll; ///< Roll angle (rad)
float pitch; ///< Pitch angle (rad)
float yaw; ///< Yaw angle (rad)
float rollspeed; ///< Roll angular speed (rad/s)
float pitchspeed; ///< Pitch angular speed (rad/s)
float yawspeed; ///< Yaw angular speed (rad/s)
int32_t lat; ///< Latitude, expressed as * 1E7
int32_t lon; ///< Longitude, expressed as * 1E7
int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters)
int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100
int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100
int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100
int16_t xacc; ///< X acceleration (mg)
int16_t yacc; ///< Y acceleration (mg)
int16_t zacc; ///< Z acceleration (mg)
} mavlink_hil_state_t;
#define MAVLINK_MSG_ID_HIL_STATE_LEN 56
#define MAVLINK_MSG_ID_90_LEN 56
#define MAVLINK_MESSAGE_INFO_HIL_STATE \
{ \
"HIL_STATE", \
16, \
{ \
{ "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_state_t, time_usec) }, \
{ "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_hil_state_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_hil_state_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_hil_state_t, yaw) }, \
{ "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_hil_state_t, rollspeed) }, \
{ "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_hil_state_t, pitchspeed) }, \
{ "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_hil_state_t, yawspeed) }, \
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 32, offsetof(mavlink_hil_state_t, lat) }, \
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_hil_state_t, lon) }, \
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 40, offsetof(mavlink_hil_state_t, alt) }, \
{ "vx", NULL, MAVLINK_TYPE_INT16_T, 0, 44, offsetof(mavlink_hil_state_t, vx) }, \
{ "vy", NULL, MAVLINK_TYPE_INT16_T, 0, 46, offsetof(mavlink_hil_state_t, vy) }, \
{ "vz", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_hil_state_t, vz) }, \
{ "xacc", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_hil_state_t, xacc) }, \
{ "yacc", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_hil_state_t, yacc) }, \
{ "zacc", NULL, MAVLINK_TYPE_INT16_T, 0, 54, offsetof(mavlink_hil_state_t, zacc) }, \
} \
}
/**
* @brief Pack a hil_state message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param xacc X acceleration (mg)
* @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_state_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint64_t time_usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[56];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll);
_mav_put_float(buf, 12, pitch);
_mav_put_float(buf, 16, yaw);
_mav_put_float(buf, 20, rollspeed);
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
_mav_put_int32_t(buf, 32, lat);
_mav_put_int32_t(buf, 36, lon);
_mav_put_int32_t(buf, 40, alt);
_mav_put_int16_t(buf, 44, vx);
_mav_put_int16_t(buf, 46, vy);
_mav_put_int16_t(buf, 48, vz);
_mav_put_int16_t(buf, 50, xacc);
_mav_put_int16_t(buf, 52, yacc);
_mav_put_int16_t(buf, 54, zacc);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 56);
#else
mavlink_hil_state_t packet;
packet.time_usec = time_usec;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 56);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_HIL_STATE;
return mavlink_finalize_message(msg, system_id, component_id, 56, 183);
}
/**
* @brief Pack a hil_state message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param xacc X acceleration (mg)
* @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_state_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint64_t time_usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[56];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll);
_mav_put_float(buf, 12, pitch);
_mav_put_float(buf, 16, yaw);
_mav_put_float(buf, 20, rollspeed);
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
_mav_put_int32_t(buf, 32, lat);
_mav_put_int32_t(buf, 36, lon);
_mav_put_int32_t(buf, 40, alt);
_mav_put_int16_t(buf, 44, vx);
_mav_put_int16_t(buf, 46, vy);
_mav_put_int16_t(buf, 48, vz);
_mav_put_int16_t(buf, 50, xacc);
_mav_put_int16_t(buf, 52, yacc);
_mav_put_int16_t(buf, 54, zacc);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 56);
#else
mavlink_hil_state_t packet;
packet.time_usec = time_usec;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 56);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_HIL_STATE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 56, 183);
}
/**
* @brief Encode a hil_state struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param hil_state C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_hil_state_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_hil_state_t *hil_state)
{
return mavlink_msg_hil_state_pack(system_id, component_id, msg, hil_state->time_usec, hil_state->roll, hil_state->pitch, hil_state->yaw, hil_state->rollspeed, hil_state->pitchspeed, hil_state->yawspeed, hil_state->lat, hil_state->lon, hil_state->alt, hil_state->vx, hil_state->vy, hil_state->vz, hil_state->xacc, hil_state->yacc, hil_state->zacc);
}
/**
* @brief Send a hil_state message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param xacc X acceleration (mg)
* @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_hil_state_send(mavlink_channel_t chan, uint64_t time_usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[56];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll);
_mav_put_float(buf, 12, pitch);
_mav_put_float(buf, 16, yaw);
_mav_put_float(buf, 20, rollspeed);
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
_mav_put_int32_t(buf, 32, lat);
_mav_put_int32_t(buf, 36, lon);
_mav_put_int32_t(buf, 40, alt);
_mav_put_int16_t(buf, 44, vx);
_mav_put_int16_t(buf, 46, vy);
_mav_put_int16_t(buf, 48, vz);
_mav_put_int16_t(buf, 50, xacc);
_mav_put_int16_t(buf, 52, yacc);
_mav_put_int16_t(buf, 54, zacc);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE, buf, 56, 183);
#else
mavlink_hil_state_t packet;
packet.time_usec = time_usec;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE, (const char *)&packet, 56, 183);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE HIL_STATE UNPACKING
/**
* @brief Get field time_usec from hil_state message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_hil_state_get_time_usec(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
/**
* @brief Get field roll from hil_state message
*
* @return Roll angle (rad)
*/
static inline float mavlink_msg_hil_state_get_roll(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field pitch from hil_state message
*
* @return Pitch angle (rad)
*/
static inline float mavlink_msg_hil_state_get_pitch(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field yaw from hil_state message
*
* @return Yaw angle (rad)
*/
static inline float mavlink_msg_hil_state_get_yaw(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field rollspeed from hil_state message
*
* @return Roll angular speed (rad/s)
*/
static inline float mavlink_msg_hil_state_get_rollspeed(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field pitchspeed from hil_state message
*
* @return Pitch angular speed (rad/s)
*/
static inline float mavlink_msg_hil_state_get_pitchspeed(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Get field yawspeed from hil_state message
*
* @return Yaw angular speed (rad/s)
*/
static inline float mavlink_msg_hil_state_get_yawspeed(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 28);
}
/**
* @brief Get field lat from hil_state message
*
* @return Latitude, expressed as * 1E7
*/
static inline int32_t mavlink_msg_hil_state_get_lat(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 32);
}
/**
* @brief Get field lon from hil_state message
*
* @return Longitude, expressed as * 1E7
*/
static inline int32_t mavlink_msg_hil_state_get_lon(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 36);
}
/**
* @brief Get field alt from hil_state message
*
* @return Altitude in meters, expressed as * 1000 (millimeters)
*/
static inline int32_t mavlink_msg_hil_state_get_alt(const mavlink_message_t *msg)
{
return _MAV_RETURN_int32_t(msg, 40);
}
/**
* @brief Get field vx from hil_state message
*
* @return Ground X Speed (Latitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_hil_state_get_vx(const mavlink_message_t *msg)
{
return _MAV_RETURN_int16_t(msg, 44);
}
/**
* @brief Get field vy from hil_state message
*
* @return Ground Y Speed (Longitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_hil_state_get_vy(const mavlink_message_t *msg)
{
return _MAV_RETURN_int16_t(msg, 46);
}
/**
* @brief Get field vz from hil_state message
*
* @return Ground Z Speed (Altitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_hil_state_get_vz(const mavlink_message_t *msg)
{
return _MAV_RETURN_int16_t(msg, 48);
}
/**
* @brief Get field xacc from hil_state message
*
* @return X acceleration (mg)
*/
static inline int16_t mavlink_msg_hil_state_get_xacc(const mavlink_message_t *msg)
{
return _MAV_RETURN_int16_t(msg, 50);
}
/**
* @brief Get field yacc from hil_state message
*
* @return Y acceleration (mg)
*/
static inline int16_t mavlink_msg_hil_state_get_yacc(const mavlink_message_t *msg)
{
return _MAV_RETURN_int16_t(msg, 52);
}
/**
* @brief Get field zacc from hil_state message
*
* @return Z acceleration (mg)
*/
static inline int16_t mavlink_msg_hil_state_get_zacc(const mavlink_message_t *msg)
{
return _MAV_RETURN_int16_t(msg, 54);
}
/**
* @brief Decode a hil_state message into a struct
*
* @param msg The message to decode
* @param hil_state C-struct to decode the message contents into
*/
static inline void mavlink_msg_hil_state_decode(const mavlink_message_t *msg, mavlink_hil_state_t *hil_state)
{
#if MAVLINK_NEED_BYTE_SWAP
hil_state->time_usec = mavlink_msg_hil_state_get_time_usec(msg);
hil_state->roll = mavlink_msg_hil_state_get_roll(msg);
hil_state->pitch = mavlink_msg_hil_state_get_pitch(msg);
hil_state->yaw = mavlink_msg_hil_state_get_yaw(msg);
hil_state->rollspeed = mavlink_msg_hil_state_get_rollspeed(msg);
hil_state->pitchspeed = mavlink_msg_hil_state_get_pitchspeed(msg);
hil_state->yawspeed = mavlink_msg_hil_state_get_yawspeed(msg);
hil_state->lat = mavlink_msg_hil_state_get_lat(msg);
hil_state->lon = mavlink_msg_hil_state_get_lon(msg);
hil_state->alt = mavlink_msg_hil_state_get_alt(msg);
hil_state->vx = mavlink_msg_hil_state_get_vx(msg);
hil_state->vy = mavlink_msg_hil_state_get_vy(msg);
hil_state->vz = mavlink_msg_hil_state_get_vz(msg);
hil_state->xacc = mavlink_msg_hil_state_get_xacc(msg);
hil_state->yacc = mavlink_msg_hil_state_get_yacc(msg);
hil_state->zacc = mavlink_msg_hil_state_get_zacc(msg);
#else
memcpy(hil_state, _MAV_PAYLOAD(msg), 56);
#endif
}

View File

@ -0,0 +1,276 @@
// MESSAGE LOCAL_POSITION_NED PACKING
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED 32
typedef struct __mavlink_local_position_ned_t {
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
float x; ///< X Position
float y; ///< Y Position
float z; ///< Z Position
float vx; ///< X Speed
float vy; ///< Y Speed
float vz; ///< Z Speed
} mavlink_local_position_ned_t;
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN 28
#define MAVLINK_MSG_ID_32_LEN 28
#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED \
{ \
"LOCAL_POSITION_NED", \
7, \
{ \
{ "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_local_position_ned_t, time_boot_ms) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_local_position_ned_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_local_position_ned_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_local_position_ned_t, z) }, \
{ "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_local_position_ned_t, vx) }, \
{ "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_local_position_ned_t, vy) }, \
{ "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_local_position_ned_t, vz) }, \
} \
}
/**
* @brief Pack a local_position_ned message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param x X Position
* @param y Y Position
* @param z Z Position
* @param vx X Speed
* @param vy Y Speed
* @param vz Z Speed
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_position_ned_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint32_t time_boot_ms, float x, float y, float z, float vx, float vy, float vz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
_mav_put_float(buf, 12, z);
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_local_position_ned_t packet;
packet.time_boot_ms = time_boot_ms;
packet.x = x;
packet.y = y;
packet.z = z;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_NED;
return mavlink_finalize_message(msg, system_id, component_id, 28, 185);
}
/**
* @brief Pack a local_position_ned message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param x X Position
* @param y Y Position
* @param z Z Position
* @param vx X Speed
* @param vy Y Speed
* @param vz Z Speed
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_position_ned_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint32_t time_boot_ms, float x, float y, float z, float vx, float vy, float vz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
_mav_put_float(buf, 12, z);
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_local_position_ned_t packet;
packet.time_boot_ms = time_boot_ms;
packet.x = x;
packet.y = y;
packet.z = z;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_NED;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 185);
}
/**
* @brief Encode a local_position_ned struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param local_position_ned C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_local_position_ned_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_local_position_ned_t *local_position_ned)
{
return mavlink_msg_local_position_ned_pack(system_id, component_id, msg, local_position_ned->time_boot_ms, local_position_ned->x, local_position_ned->y, local_position_ned->z, local_position_ned->vx, local_position_ned->vy, local_position_ned->vz);
}
/**
* @brief Send a local_position_ned message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param x X Position
* @param y Y Position
* @param z Z Position
* @param vx X Speed
* @param vy Y Speed
* @param vz Z Speed
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_local_position_ned_send(mavlink_channel_t chan, uint32_t time_boot_ms, float x, float y, float z, float vx, float vy, float vz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
_mav_put_float(buf, 12, z);
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, buf, 28, 185);
#else
mavlink_local_position_ned_t packet;
packet.time_boot_ms = time_boot_ms;
packet.x = x;
packet.y = y;
packet.z = z;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, (const char *)&packet, 28, 185);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE LOCAL_POSITION_NED UNPACKING
/**
* @brief Get field time_boot_ms from local_position_ned message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_local_position_ned_get_time_boot_ms(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field x from local_position_ned message
*
* @return X Position
*/
static inline float mavlink_msg_local_position_ned_get_x(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field y from local_position_ned message
*
* @return Y Position
*/
static inline float mavlink_msg_local_position_ned_get_y(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field z from local_position_ned message
*
* @return Z Position
*/
static inline float mavlink_msg_local_position_ned_get_z(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field vx from local_position_ned message
*
* @return X Speed
*/
static inline float mavlink_msg_local_position_ned_get_vx(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field vy from local_position_ned message
*
* @return Y Speed
*/
static inline float mavlink_msg_local_position_ned_get_vy(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field vz from local_position_ned message
*
* @return Z Speed
*/
static inline float mavlink_msg_local_position_ned_get_vz(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Decode a local_position_ned message into a struct
*
* @param msg The message to decode
* @param local_position_ned C-struct to decode the message contents into
*/
static inline void mavlink_msg_local_position_ned_decode(const mavlink_message_t *msg, mavlink_local_position_ned_t *local_position_ned)
{
#if MAVLINK_NEED_BYTE_SWAP
local_position_ned->time_boot_ms = mavlink_msg_local_position_ned_get_time_boot_ms(msg);
local_position_ned->x = mavlink_msg_local_position_ned_get_x(msg);
local_position_ned->y = mavlink_msg_local_position_ned_get_y(msg);
local_position_ned->z = mavlink_msg_local_position_ned_get_z(msg);
local_position_ned->vx = mavlink_msg_local_position_ned_get_vx(msg);
local_position_ned->vy = mavlink_msg_local_position_ned_get_vy(msg);
local_position_ned->vz = mavlink_msg_local_position_ned_get_vz(msg);
#else
memcpy(local_position_ned, _MAV_PAYLOAD(msg), 28);
#endif
}

View File

@ -0,0 +1,276 @@
// MESSAGE LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET PACKING
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET 89
typedef struct __mavlink_local_position_ned_system_global_offset_t {
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
float x; ///< X Position
float y; ///< Y Position
float z; ///< Z Position
float roll; ///< Roll
float pitch; ///< Pitch
float yaw; ///< Yaw
} mavlink_local_position_ned_system_global_offset_t;
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN 28
#define MAVLINK_MSG_ID_89_LEN 28
#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET \
{ \
"LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", \
7, \
{ \
{ "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_local_position_ned_system_global_offset_t, time_boot_ms) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_local_position_ned_system_global_offset_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_local_position_ned_system_global_offset_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_local_position_ned_system_global_offset_t, z) }, \
{ "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_local_position_ned_system_global_offset_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_local_position_ned_system_global_offset_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_local_position_ned_system_global_offset_t, yaw) }, \
} \
}
/**
* @brief Pack a local_position_ned_system_global_offset message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param x X Position
* @param y Y Position
* @param z Z Position
* @param roll Roll
* @param pitch Pitch
* @param yaw Yaw
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint32_t time_boot_ms, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
_mav_put_float(buf, 12, z);
_mav_put_float(buf, 16, roll);
_mav_put_float(buf, 20, pitch);
_mav_put_float(buf, 24, yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_local_position_ned_system_global_offset_t packet;
packet.time_boot_ms = time_boot_ms;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET;
return mavlink_finalize_message(msg, system_id, component_id, 28, 231);
}
/**
* @brief Pack a local_position_ned_system_global_offset message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param x X Position
* @param y Y Position
* @param z Z Position
* @param roll Roll
* @param pitch Pitch
* @param yaw Yaw
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint32_t time_boot_ms, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
_mav_put_float(buf, 12, z);
_mav_put_float(buf, 16, roll);
_mav_put_float(buf, 20, pitch);
_mav_put_float(buf, 24, yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_local_position_ned_system_global_offset_t packet;
packet.time_boot_ms = time_boot_ms;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 231);
}
/**
* @brief Encode a local_position_ned_system_global_offset struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param local_position_ned_system_global_offset C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_local_position_ned_system_global_offset_t *local_position_ned_system_global_offset)
{
return mavlink_msg_local_position_ned_system_global_offset_pack(system_id, component_id, msg, local_position_ned_system_global_offset->time_boot_ms, local_position_ned_system_global_offset->x, local_position_ned_system_global_offset->y, local_position_ned_system_global_offset->z, local_position_ned_system_global_offset->roll, local_position_ned_system_global_offset->pitch, local_position_ned_system_global_offset->yaw);
}
/**
* @brief Send a local_position_ned_system_global_offset message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param x X Position
* @param y Y Position
* @param z Z Position
* @param roll Roll
* @param pitch Pitch
* @param yaw Yaw
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_local_position_ned_system_global_offset_send(mavlink_channel_t chan, uint32_t time_boot_ms, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
_mav_put_float(buf, 12, z);
_mav_put_float(buf, 16, roll);
_mav_put_float(buf, 20, pitch);
_mav_put_float(buf, 24, yaw);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, buf, 28, 231);
#else
mavlink_local_position_ned_system_global_offset_t packet;
packet.time_boot_ms = time_boot_ms;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, (const char *)&packet, 28, 231);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET UNPACKING
/**
* @brief Get field time_boot_ms from local_position_ned_system_global_offset message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_local_position_ned_system_global_offset_get_time_boot_ms(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field x from local_position_ned_system_global_offset message
*
* @return X Position
*/
static inline float mavlink_msg_local_position_ned_system_global_offset_get_x(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field y from local_position_ned_system_global_offset message
*
* @return Y Position
*/
static inline float mavlink_msg_local_position_ned_system_global_offset_get_y(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field z from local_position_ned_system_global_offset message
*
* @return Z Position
*/
static inline float mavlink_msg_local_position_ned_system_global_offset_get_z(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field roll from local_position_ned_system_global_offset message
*
* @return Roll
*/
static inline float mavlink_msg_local_position_ned_system_global_offset_get_roll(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field pitch from local_position_ned_system_global_offset message
*
* @return Pitch
*/
static inline float mavlink_msg_local_position_ned_system_global_offset_get_pitch(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field yaw from local_position_ned_system_global_offset message
*
* @return Yaw
*/
static inline float mavlink_msg_local_position_ned_system_global_offset_get_yaw(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Decode a local_position_ned_system_global_offset message into a struct
*
* @param msg The message to decode
* @param local_position_ned_system_global_offset C-struct to decode the message contents into
*/
static inline void mavlink_msg_local_position_ned_system_global_offset_decode(const mavlink_message_t *msg, mavlink_local_position_ned_system_global_offset_t *local_position_ned_system_global_offset)
{
#if MAVLINK_NEED_BYTE_SWAP
local_position_ned_system_global_offset->time_boot_ms = mavlink_msg_local_position_ned_system_global_offset_get_time_boot_ms(msg);
local_position_ned_system_global_offset->x = mavlink_msg_local_position_ned_system_global_offset_get_x(msg);
local_position_ned_system_global_offset->y = mavlink_msg_local_position_ned_system_global_offset_get_y(msg);
local_position_ned_system_global_offset->z = mavlink_msg_local_position_ned_system_global_offset_get_z(msg);
local_position_ned_system_global_offset->roll = mavlink_msg_local_position_ned_system_global_offset_get_roll(msg);
local_position_ned_system_global_offset->pitch = mavlink_msg_local_position_ned_system_global_offset_get_pitch(msg);
local_position_ned_system_global_offset->yaw = mavlink_msg_local_position_ned_system_global_offset_get_yaw(msg);
#else
memcpy(local_position_ned_system_global_offset, _MAV_PAYLOAD(msg), 28);
#endif
}

View File

@ -0,0 +1,232 @@
// MESSAGE LOCAL_POSITION_SETPOINT PACKING
#define MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT 51
typedef struct __mavlink_local_position_setpoint_t {
float x; ///< x position
float y; ///< y position
float z; ///< z position
float yaw; ///< Desired yaw angle
uint8_t coordinate_frame; ///< Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
} mavlink_local_position_setpoint_t;
#define MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN 17
#define MAVLINK_MSG_ID_51_LEN 17
#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_SETPOINT \
{ \
"LOCAL_POSITION_SETPOINT", \
5, \
{ \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_local_position_setpoint_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_local_position_setpoint_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_local_position_setpoint_t, z) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_local_position_setpoint_t, yaw) }, \
{ "coordinate_frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_local_position_setpoint_t, coordinate_frame) }, \
} \
}
/**
* @brief Pack a local_position_setpoint message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
* @param x x position
* @param y y position
* @param z z position
* @param yaw Desired yaw angle
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_position_setpoint_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t coordinate_frame, float x, float y, float z, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[17];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
_mav_put_float(buf, 12, yaw);
_mav_put_uint8_t(buf, 16, coordinate_frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 17);
#else
mavlink_local_position_setpoint_t packet;
packet.x = x;
packet.y = y;
packet.z = z;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 17);
#endif
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT;
return mavlink_finalize_message(msg, system_id, component_id, 17, 223);
}
/**
* @brief Pack a local_position_setpoint message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
* @param x x position
* @param y y position
* @param z z position
* @param yaw Desired yaw angle
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_position_setpoint_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t coordinate_frame, float x, float y, float z, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[17];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
_mav_put_float(buf, 12, yaw);
_mav_put_uint8_t(buf, 16, coordinate_frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 17);
#else
mavlink_local_position_setpoint_t packet;
packet.x = x;
packet.y = y;
packet.z = z;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 17);
#endif
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 17, 223);
}
/**
* @brief Encode a local_position_setpoint struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param local_position_setpoint C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_local_position_setpoint_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_local_position_setpoint_t *local_position_setpoint)
{
return mavlink_msg_local_position_setpoint_pack(system_id, component_id, msg, local_position_setpoint->coordinate_frame, local_position_setpoint->x, local_position_setpoint->y, local_position_setpoint->z, local_position_setpoint->yaw);
}
/**
* @brief Send a local_position_setpoint message
* @param chan MAVLink channel to send the message
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
* @param x x position
* @param y y position
* @param z z position
* @param yaw Desired yaw angle
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_local_position_setpoint_send(mavlink_channel_t chan, uint8_t coordinate_frame, float x, float y, float z, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[17];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
_mav_put_float(buf, 12, yaw);
_mav_put_uint8_t(buf, 16, coordinate_frame);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, buf, 17, 223);
#else
mavlink_local_position_setpoint_t packet;
packet.x = x;
packet.y = y;
packet.z = z;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, (const char *)&packet, 17, 223);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE LOCAL_POSITION_SETPOINT UNPACKING
/**
* @brief Get field coordinate_frame from local_position_setpoint message
*
* @return Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
*/
static inline uint8_t mavlink_msg_local_position_setpoint_get_coordinate_frame(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 16);
}
/**
* @brief Get field x from local_position_setpoint message
*
* @return x position
*/
static inline float mavlink_msg_local_position_setpoint_get_x(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field y from local_position_setpoint message
*
* @return y position
*/
static inline float mavlink_msg_local_position_setpoint_get_y(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field z from local_position_setpoint message
*
* @return z position
*/
static inline float mavlink_msg_local_position_setpoint_get_z(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field yaw from local_position_setpoint message
*
* @return Desired yaw angle
*/
static inline float mavlink_msg_local_position_setpoint_get_yaw(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Decode a local_position_setpoint message into a struct
*
* @param msg The message to decode
* @param local_position_setpoint C-struct to decode the message contents into
*/
static inline void mavlink_msg_local_position_setpoint_decode(const mavlink_message_t *msg, mavlink_local_position_setpoint_t *local_position_setpoint)
{
#if MAVLINK_NEED_BYTE_SWAP
local_position_setpoint->x = mavlink_msg_local_position_setpoint_get_x(msg);
local_position_setpoint->y = mavlink_msg_local_position_setpoint_get_y(msg);
local_position_setpoint->z = mavlink_msg_local_position_setpoint_get_z(msg);
local_position_setpoint->yaw = mavlink_msg_local_position_setpoint_get_yaw(msg);
local_position_setpoint->coordinate_frame = mavlink_msg_local_position_setpoint_get_coordinate_frame(msg);
#else
memcpy(local_position_setpoint, _MAV_PAYLOAD(msg), 17);
#endif
}

View File

@ -0,0 +1,320 @@
// MESSAGE MANUAL_CONTROL PACKING
#define MAVLINK_MSG_ID_MANUAL_CONTROL 69
typedef struct __mavlink_manual_control_t {
float roll; ///< roll
float pitch; ///< pitch
float yaw; ///< yaw
float thrust; ///< thrust
uint8_t target; ///< The system to be controlled
uint8_t roll_manual; ///< roll control enabled auto:0, manual:1
uint8_t pitch_manual; ///< pitch auto:0, manual:1
uint8_t yaw_manual; ///< yaw auto:0, manual:1
uint8_t thrust_manual; ///< thrust auto:0, manual:1
} mavlink_manual_control_t;
#define MAVLINK_MSG_ID_MANUAL_CONTROL_LEN 21
#define MAVLINK_MSG_ID_69_LEN 21
#define MAVLINK_MESSAGE_INFO_MANUAL_CONTROL \
{ \
"MANUAL_CONTROL", \
9, \
{ \
{ "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_manual_control_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_manual_control_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_manual_control_t, yaw) }, \
{ "thrust", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_manual_control_t, thrust) }, \
{ "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_manual_control_t, target) }, \
{ "roll_manual", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_manual_control_t, roll_manual) }, \
{ "pitch_manual", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_manual_control_t, pitch_manual) }, \
{ "yaw_manual", NULL, MAVLINK_TYPE_UINT8_T, 0, 19, offsetof(mavlink_manual_control_t, yaw_manual) }, \
{ "thrust_manual", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_manual_control_t, thrust_manual) }, \
} \
}
/**
* @brief Pack a manual_control message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target The system to be controlled
* @param roll roll
* @param pitch pitch
* @param yaw yaw
* @param thrust thrust
* @param roll_manual roll control enabled auto:0, manual:1
* @param pitch_manual pitch auto:0, manual:1
* @param yaw_manual yaw auto:0, manual:1
* @param thrust_manual thrust auto:0, manual:1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_manual_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t target, float roll, float pitch, float yaw, float thrust, uint8_t roll_manual, uint8_t pitch_manual, uint8_t yaw_manual, uint8_t thrust_manual)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[21];
_mav_put_float(buf, 0, roll);
_mav_put_float(buf, 4, pitch);
_mav_put_float(buf, 8, yaw);
_mav_put_float(buf, 12, thrust);
_mav_put_uint8_t(buf, 16, target);
_mav_put_uint8_t(buf, 17, roll_manual);
_mav_put_uint8_t(buf, 18, pitch_manual);
_mav_put_uint8_t(buf, 19, yaw_manual);
_mav_put_uint8_t(buf, 20, thrust_manual);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 21);
#else
mavlink_manual_control_t packet;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.thrust = thrust;
packet.target = target;
packet.roll_manual = roll_manual;
packet.pitch_manual = pitch_manual;
packet.yaw_manual = yaw_manual;
packet.thrust_manual = thrust_manual;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 21);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_MANUAL_CONTROL;
return mavlink_finalize_message(msg, system_id, component_id, 21, 52);
}
/**
* @brief Pack a manual_control message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target The system to be controlled
* @param roll roll
* @param pitch pitch
* @param yaw yaw
* @param thrust thrust
* @param roll_manual roll control enabled auto:0, manual:1
* @param pitch_manual pitch auto:0, manual:1
* @param yaw_manual yaw auto:0, manual:1
* @param thrust_manual thrust auto:0, manual:1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_manual_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t target, float roll, float pitch, float yaw, float thrust, uint8_t roll_manual, uint8_t pitch_manual, uint8_t yaw_manual, uint8_t thrust_manual)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[21];
_mav_put_float(buf, 0, roll);
_mav_put_float(buf, 4, pitch);
_mav_put_float(buf, 8, yaw);
_mav_put_float(buf, 12, thrust);
_mav_put_uint8_t(buf, 16, target);
_mav_put_uint8_t(buf, 17, roll_manual);
_mav_put_uint8_t(buf, 18, pitch_manual);
_mav_put_uint8_t(buf, 19, yaw_manual);
_mav_put_uint8_t(buf, 20, thrust_manual);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 21);
#else
mavlink_manual_control_t packet;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.thrust = thrust;
packet.target = target;
packet.roll_manual = roll_manual;
packet.pitch_manual = pitch_manual;
packet.yaw_manual = yaw_manual;
packet.thrust_manual = thrust_manual;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 21);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_MANUAL_CONTROL;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 21, 52);
}
/**
* @brief Encode a manual_control struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param manual_control C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_manual_control_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_manual_control_t *manual_control)
{
return mavlink_msg_manual_control_pack(system_id, component_id, msg, manual_control->target, manual_control->roll, manual_control->pitch, manual_control->yaw, manual_control->thrust, manual_control->roll_manual, manual_control->pitch_manual, manual_control->yaw_manual, manual_control->thrust_manual);
}
/**
* @brief Send a manual_control message
* @param chan MAVLink channel to send the message
*
* @param target The system to be controlled
* @param roll roll
* @param pitch pitch
* @param yaw yaw
* @param thrust thrust
* @param roll_manual roll control enabled auto:0, manual:1
* @param pitch_manual pitch auto:0, manual:1
* @param yaw_manual yaw auto:0, manual:1
* @param thrust_manual thrust auto:0, manual:1
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_manual_control_send(mavlink_channel_t chan, uint8_t target, float roll, float pitch, float yaw, float thrust, uint8_t roll_manual, uint8_t pitch_manual, uint8_t yaw_manual, uint8_t thrust_manual)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[21];
_mav_put_float(buf, 0, roll);
_mav_put_float(buf, 4, pitch);
_mav_put_float(buf, 8, yaw);
_mav_put_float(buf, 12, thrust);
_mav_put_uint8_t(buf, 16, target);
_mav_put_uint8_t(buf, 17, roll_manual);
_mav_put_uint8_t(buf, 18, pitch_manual);
_mav_put_uint8_t(buf, 19, yaw_manual);
_mav_put_uint8_t(buf, 20, thrust_manual);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, buf, 21, 52);
#else
mavlink_manual_control_t packet;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.thrust = thrust;
packet.target = target;
packet.roll_manual = roll_manual;
packet.pitch_manual = pitch_manual;
packet.yaw_manual = yaw_manual;
packet.thrust_manual = thrust_manual;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, (const char *)&packet, 21, 52);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE MANUAL_CONTROL UNPACKING
/**
* @brief Get field target from manual_control message
*
* @return The system to be controlled
*/
static inline uint8_t mavlink_msg_manual_control_get_target(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 16);
}
/**
* @brief Get field roll from manual_control message
*
* @return roll
*/
static inline float mavlink_msg_manual_control_get_roll(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field pitch from manual_control message
*
* @return pitch
*/
static inline float mavlink_msg_manual_control_get_pitch(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field yaw from manual_control message
*
* @return yaw
*/
static inline float mavlink_msg_manual_control_get_yaw(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field thrust from manual_control message
*
* @return thrust
*/
static inline float mavlink_msg_manual_control_get_thrust(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field roll_manual from manual_control message
*
* @return roll control enabled auto:0, manual:1
*/
static inline uint8_t mavlink_msg_manual_control_get_roll_manual(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 17);
}
/**
* @brief Get field pitch_manual from manual_control message
*
* @return pitch auto:0, manual:1
*/
static inline uint8_t mavlink_msg_manual_control_get_pitch_manual(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 18);
}
/**
* @brief Get field yaw_manual from manual_control message
*
* @return yaw auto:0, manual:1
*/
static inline uint8_t mavlink_msg_manual_control_get_yaw_manual(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 19);
}
/**
* @brief Get field thrust_manual from manual_control message
*
* @return thrust auto:0, manual:1
*/
static inline uint8_t mavlink_msg_manual_control_get_thrust_manual(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 20);
}
/**
* @brief Decode a manual_control message into a struct
*
* @param msg The message to decode
* @param manual_control C-struct to decode the message contents into
*/
static inline void mavlink_msg_manual_control_decode(const mavlink_message_t *msg, mavlink_manual_control_t *manual_control)
{
#if MAVLINK_NEED_BYTE_SWAP
manual_control->roll = mavlink_msg_manual_control_get_roll(msg);
manual_control->pitch = mavlink_msg_manual_control_get_pitch(msg);
manual_control->yaw = mavlink_msg_manual_control_get_yaw(msg);
manual_control->thrust = mavlink_msg_manual_control_get_thrust(msg);
manual_control->target = mavlink_msg_manual_control_get_target(msg);
manual_control->roll_manual = mavlink_msg_manual_control_get_roll_manual(msg);
manual_control->pitch_manual = mavlink_msg_manual_control_get_pitch_manual(msg);
manual_control->yaw_manual = mavlink_msg_manual_control_get_yaw_manual(msg);
manual_control->thrust_manual = mavlink_msg_manual_control_get_thrust_manual(msg);
#else
memcpy(manual_control, _MAV_PAYLOAD(msg), 21);
#endif
}

View File

@ -0,0 +1,205 @@
// MESSAGE MEMORY_VECT PACKING
#define MAVLINK_MSG_ID_MEMORY_VECT 249
typedef struct __mavlink_memory_vect_t {
uint16_t address; ///< Starting address of the debug variables
uint8_t ver; ///< Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below
uint8_t type; ///< Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14
int8_t value[32]; ///< Memory contents at specified address
} mavlink_memory_vect_t;
#define MAVLINK_MSG_ID_MEMORY_VECT_LEN 36
#define MAVLINK_MSG_ID_249_LEN 36
#define MAVLINK_MSG_MEMORY_VECT_FIELD_VALUE_LEN 32
#define MAVLINK_MESSAGE_INFO_MEMORY_VECT \
{ \
"MEMORY_VECT", \
4, \
{ \
{ "address", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_memory_vect_t, address) }, \
{ "ver", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_memory_vect_t, ver) }, \
{ "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_memory_vect_t, type) }, \
{ "value", NULL, MAVLINK_TYPE_INT8_T, 32, 4, offsetof(mavlink_memory_vect_t, value) }, \
} \
}
/**
* @brief Pack a memory_vect message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param address Starting address of the debug variables
* @param ver Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below
* @param type Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14
* @param value Memory contents at specified address
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_memory_vect_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint16_t address, uint8_t ver, uint8_t type, const int8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[36];
_mav_put_uint16_t(buf, 0, address);
_mav_put_uint8_t(buf, 2, ver);
_mav_put_uint8_t(buf, 3, type);
_mav_put_int8_t_array(buf, 4, value, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 36);
#else
mavlink_memory_vect_t packet;
packet.address = address;
packet.ver = ver;
packet.type = type;
mav_array_memcpy(packet.value, value, sizeof(int8_t) * 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 36);
#endif
msg->msgid = MAVLINK_MSG_ID_MEMORY_VECT;
return mavlink_finalize_message(msg, system_id, component_id, 36, 204);
}
/**
* @brief Pack a memory_vect message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param address Starting address of the debug variables
* @param ver Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below
* @param type Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14
* @param value Memory contents at specified address
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_memory_vect_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint16_t address, uint8_t ver, uint8_t type, const int8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[36];
_mav_put_uint16_t(buf, 0, address);
_mav_put_uint8_t(buf, 2, ver);
_mav_put_uint8_t(buf, 3, type);
_mav_put_int8_t_array(buf, 4, value, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 36);
#else
mavlink_memory_vect_t packet;
packet.address = address;
packet.ver = ver;
packet.type = type;
mav_array_memcpy(packet.value, value, sizeof(int8_t) * 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 36);
#endif
msg->msgid = MAVLINK_MSG_ID_MEMORY_VECT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 36, 204);
}
/**
* @brief Encode a memory_vect struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param memory_vect C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_memory_vect_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_memory_vect_t *memory_vect)
{
return mavlink_msg_memory_vect_pack(system_id, component_id, msg, memory_vect->address, memory_vect->ver, memory_vect->type, memory_vect->value);
}
/**
* @brief Send a memory_vect message
* @param chan MAVLink channel to send the message
*
* @param address Starting address of the debug variables
* @param ver Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below
* @param type Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14
* @param value Memory contents at specified address
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_memory_vect_send(mavlink_channel_t chan, uint16_t address, uint8_t ver, uint8_t type, const int8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[36];
_mav_put_uint16_t(buf, 0, address);
_mav_put_uint8_t(buf, 2, ver);
_mav_put_uint8_t(buf, 3, type);
_mav_put_int8_t_array(buf, 4, value, 32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, buf, 36, 204);
#else
mavlink_memory_vect_t packet;
packet.address = address;
packet.ver = ver;
packet.type = type;
mav_array_memcpy(packet.value, value, sizeof(int8_t) * 32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, (const char *)&packet, 36, 204);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE MEMORY_VECT UNPACKING
/**
* @brief Get field address from memory_vect message
*
* @return Starting address of the debug variables
*/
static inline uint16_t mavlink_msg_memory_vect_get_address(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
* @brief Get field ver from memory_vect message
*
* @return Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below
*/
static inline uint8_t mavlink_msg_memory_vect_get_ver(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field type from memory_vect message
*
* @return Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14
*/
static inline uint8_t mavlink_msg_memory_vect_get_type(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
/**
* @brief Get field value from memory_vect message
*
* @return Memory contents at specified address
*/
static inline uint16_t mavlink_msg_memory_vect_get_value(const mavlink_message_t *msg, int8_t *value)
{
return _MAV_RETURN_int8_t_array(msg, value, 32, 4);
}
/**
* @brief Decode a memory_vect message into a struct
*
* @param msg The message to decode
* @param memory_vect C-struct to decode the message contents into
*/
static inline void mavlink_msg_memory_vect_decode(const mavlink_message_t *msg, mavlink_memory_vect_t *memory_vect)
{
#if MAVLINK_NEED_BYTE_SWAP
memory_vect->address = mavlink_msg_memory_vect_get_address(msg);
memory_vect->ver = mavlink_msg_memory_vect_get_ver(msg);
memory_vect->type = mavlink_msg_memory_vect_get_type(msg);
mavlink_msg_memory_vect_get_value(msg, memory_vect->value);
#else
memcpy(memory_vect, _MAV_PAYLOAD(msg), 36);
#endif
}

View File

@ -0,0 +1,188 @@
// MESSAGE MISSION_ACK PACKING
#define MAVLINK_MSG_ID_MISSION_ACK 47
typedef struct __mavlink_mission_ack_t {
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
uint8_t type; ///< See MAV_MISSION_RESULT enum
} mavlink_mission_ack_t;
#define MAVLINK_MSG_ID_MISSION_ACK_LEN 3
#define MAVLINK_MSG_ID_47_LEN 3
#define MAVLINK_MESSAGE_INFO_MISSION_ACK \
{ \
"MISSION_ACK", \
3, \
{ \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_mission_ack_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_mission_ack_t, target_component) }, \
{ "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_ack_t, type) }, \
} \
}
/**
* @brief Pack a mission_ack message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param type See MAV_MISSION_RESULT enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component, uint8_t type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
#else
mavlink_mission_ack_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.type = type;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_ACK;
return mavlink_finalize_message(msg, system_id, component_id, 3, 153);
}
/**
* @brief Pack a mission_ack message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param type See MAV_MISSION_RESULT enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component, uint8_t type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
#else
mavlink_mission_ack_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.type = type;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_ACK;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 153);
}
/**
* @brief Encode a mission_ack struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_ack C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_mission_ack_t *mission_ack)
{
return mavlink_msg_mission_ack_pack(system_id, component_id, msg, mission_ack->target_system, mission_ack->target_component, mission_ack->type);
}
/**
* @brief Send a mission_ack message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param type See MAV_MISSION_RESULT enum
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_mission_ack_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, type);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, buf, 3, 153);
#else
mavlink_mission_ack_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.type = type;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, (const char *)&packet, 3, 153);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE MISSION_ACK UNPACKING
/**
* @brief Get field target_system from mission_ack message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_ack_get_target_system(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from mission_ack message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_ack_get_target_component(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field type from mission_ack message
*
* @return See MAV_MISSION_RESULT enum
*/
static inline uint8_t mavlink_msg_mission_ack_get_type(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Decode a mission_ack message into a struct
*
* @param msg The message to decode
* @param mission_ack C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_ack_decode(const mavlink_message_t *msg, mavlink_mission_ack_t *mission_ack)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_ack->target_system = mavlink_msg_mission_ack_get_target_system(msg);
mission_ack->target_component = mavlink_msg_mission_ack_get_target_component(msg);
mission_ack->type = mavlink_msg_mission_ack_get_type(msg);
#else
memcpy(mission_ack, _MAV_PAYLOAD(msg), 3);
#endif
}

View File

@ -0,0 +1,166 @@
// MESSAGE MISSION_CLEAR_ALL PACKING
#define MAVLINK_MSG_ID_MISSION_CLEAR_ALL 45
typedef struct __mavlink_mission_clear_all_t {
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_mission_clear_all_t;
#define MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN 2
#define MAVLINK_MSG_ID_45_LEN 2
#define MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL \
{ \
"MISSION_CLEAR_ALL", \
2, \
{ \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_mission_clear_all_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_mission_clear_all_t, target_component) }, \
} \
}
/**
* @brief Pack a mission_clear_all message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_clear_all_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_clear_all_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
return mavlink_finalize_message(msg, system_id, component_id, 2, 232);
}
/**
* @brief Pack a mission_clear_all message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_clear_all_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_clear_all_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 232);
}
/**
* @brief Encode a mission_clear_all struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_clear_all C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_clear_all_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_mission_clear_all_t *mission_clear_all)
{
return mavlink_msg_mission_clear_all_pack(system_id, component_id, msg, mission_clear_all->target_system, mission_clear_all->target_component);
}
/**
* @brief Send a mission_clear_all message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_mission_clear_all_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, buf, 2, 232);
#else
mavlink_mission_clear_all_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, (const char *)&packet, 2, 232);
#endif
}
#endif
// MESSAGE MISSION_CLEAR_ALL UNPACKING
/**
* @brief Get field target_system from mission_clear_all message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_clear_all_get_target_system(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from mission_clear_all message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_clear_all_get_target_component(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a mission_clear_all message into a struct
*
* @param msg The message to decode
* @param mission_clear_all C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_clear_all_decode(const mavlink_message_t *msg, mavlink_mission_clear_all_t *mission_clear_all)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_clear_all->target_system = mavlink_msg_mission_clear_all_get_target_system(msg);
mission_clear_all->target_component = mavlink_msg_mission_clear_all_get_target_component(msg);
#else
memcpy(mission_clear_all, _MAV_PAYLOAD(msg), 2);
#endif
}

View File

@ -0,0 +1,188 @@
// MESSAGE MISSION_COUNT PACKING
#define MAVLINK_MSG_ID_MISSION_COUNT 44
typedef struct __mavlink_mission_count_t {
uint16_t count; ///< Number of mission items in the sequence
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_mission_count_t;
#define MAVLINK_MSG_ID_MISSION_COUNT_LEN 4
#define MAVLINK_MSG_ID_44_LEN 4
#define MAVLINK_MESSAGE_INFO_MISSION_COUNT \
{ \
"MISSION_COUNT", \
3, \
{ \
{ "count", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_count_t, count) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_count_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_mission_count_t, target_component) }, \
} \
}
/**
* @brief Pack a mission_count message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param count Number of mission items in the sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_count_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component, uint16_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, count);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_mission_count_t packet;
packet.count = count;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_COUNT;
return mavlink_finalize_message(msg, system_id, component_id, 4, 221);
}
/**
* @brief Pack a mission_count message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param count Number of mission items in the sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_count_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component, uint16_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, count);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_mission_count_t packet;
packet.count = count;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_COUNT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 221);
}
/**
* @brief Encode a mission_count struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_count C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_count_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_mission_count_t *mission_count)
{
return mavlink_msg_mission_count_pack(system_id, component_id, msg, mission_count->target_system, mission_count->target_component, mission_count->count);
}
/**
* @brief Send a mission_count message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param count Number of mission items in the sequence
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_mission_count_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, count);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, buf, 4, 221);
#else
mavlink_mission_count_t packet;
packet.count = count;
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, (const char *)&packet, 4, 221);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE MISSION_COUNT UNPACKING
/**
* @brief Get field target_system from mission_count message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_count_get_target_system(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field target_component from mission_count message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_count_get_target_component(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
/**
* @brief Get field count from mission_count message
*
* @return Number of mission items in the sequence
*/
static inline uint16_t mavlink_msg_mission_count_get_count(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
* @brief Decode a mission_count message into a struct
*
* @param msg The message to decode
* @param mission_count C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_count_decode(const mavlink_message_t *msg, mavlink_mission_count_t *mission_count)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_count->count = mavlink_msg_mission_count_get_count(msg);
mission_count->target_system = mavlink_msg_mission_count_get_target_system(msg);
mission_count->target_component = mavlink_msg_mission_count_get_target_component(msg);
#else
memcpy(mission_count, _MAV_PAYLOAD(msg), 4);
#endif
}

View File

@ -0,0 +1,144 @@
// MESSAGE MISSION_CURRENT PACKING
#define MAVLINK_MSG_ID_MISSION_CURRENT 42
typedef struct __mavlink_mission_current_t {
uint16_t seq; ///< Sequence
} mavlink_mission_current_t;
#define MAVLINK_MSG_ID_MISSION_CURRENT_LEN 2
#define MAVLINK_MSG_ID_42_LEN 2
#define MAVLINK_MESSAGE_INFO_MISSION_CURRENT \
{ \
"MISSION_CURRENT", \
1, \
{ \
{ "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_current_t, seq) }, \
} \
}
/**
* @brief Pack a mission_current message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_current_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint16_t(buf, 0, seq);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_current_t packet;
packet.seq = seq;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
return mavlink_finalize_message(msg, system_id, component_id, 2, 28);
}
/**
* @brief Pack a mission_current message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_current_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint16_t(buf, 0, seq);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_current_t packet;
packet.seq = seq;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 28);
}
/**
* @brief Encode a mission_current struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_current C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_current_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_mission_current_t *mission_current)
{
return mavlink_msg_mission_current_pack(system_id, component_id, msg, mission_current->seq);
}
/**
* @brief Send a mission_current message
* @param chan MAVLink channel to send the message
*
* @param seq Sequence
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_mission_current_send(mavlink_channel_t chan, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint16_t(buf, 0, seq);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, buf, 2, 28);
#else
mavlink_mission_current_t packet;
packet.seq = seq;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, (const char *)&packet, 2, 28);
#endif
}
#endif
// MESSAGE MISSION_CURRENT UNPACKING
/**
* @brief Get field seq from mission_current message
*
* @return Sequence
*/
static inline uint16_t mavlink_msg_mission_current_get_seq(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
* @brief Decode a mission_current message into a struct
*
* @param msg The message to decode
* @param mission_current C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_current_decode(const mavlink_message_t *msg, mavlink_mission_current_t *mission_current)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_current->seq = mavlink_msg_mission_current_get_seq(msg);
#else
memcpy(mission_current, _MAV_PAYLOAD(msg), 2);
#endif
}

View File

@ -0,0 +1,430 @@
// MESSAGE MISSION_ITEM PACKING
#define MAVLINK_MSG_ID_MISSION_ITEM 39
typedef struct __mavlink_mission_item_t {
float param1; ///< PARAM1 / For NAV command MISSIONs: Radius in which the MISSION is accepted as reached, in meters
float param2; ///< PARAM2 / For NAV command MISSIONs: Time that the MAV should stay inside the PARAM1 radius before advancing, in milliseconds
float param3; ///< PARAM3 / For LOITER command MISSIONs: Orbit to circle around the MISSION, in meters. If positive the orbit direction should be clockwise, if negative the orbit direction should be counter-clockwise.
float param4; ///< PARAM4 / For NAV and LOITER command MISSIONs: Yaw orientation in degrees, [0..360] 0 = NORTH
float x; ///< PARAM5 / local: x position, global: latitude
float y; ///< PARAM6 / y position: global: longitude
float z; ///< PARAM7 / z position: global: altitude
uint16_t seq; ///< Sequence
uint16_t command; ///< The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
uint8_t frame; ///< The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
uint8_t current; ///< false:0, true:1
uint8_t autocontinue; ///< autocontinue to next wp
} mavlink_mission_item_t;
#define MAVLINK_MSG_ID_MISSION_ITEM_LEN 37
#define MAVLINK_MSG_ID_39_LEN 37
#define MAVLINK_MESSAGE_INFO_MISSION_ITEM \
{ \
"MISSION_ITEM", \
14, \
{ \
{ "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mission_item_t, param1) }, \
{ "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mission_item_t, param2) }, \
{ "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mission_item_t, param3) }, \
{ "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_mission_item_t, param4) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_mission_item_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_mission_item_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_mission_item_t, z) }, \
{ "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_mission_item_t, seq) }, \
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_mission_item_t, command) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_mission_item_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_mission_item_t, target_component) }, \
{ "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_mission_item_t, frame) }, \
{ "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_mission_item_t, current) }, \
{ "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_mission_item_t, autocontinue) }, \
} \
}
/**
* @brief Pack a mission_item message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
* @param frame The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
* @param command The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
* @param current false:0, true:1
* @param autocontinue autocontinue to next wp
* @param param1 PARAM1 / For NAV command MISSIONs: Radius in which the MISSION is accepted as reached, in meters
* @param param2 PARAM2 / For NAV command MISSIONs: Time that the MAV should stay inside the PARAM1 radius before advancing, in milliseconds
* @param param3 PARAM3 / For LOITER command MISSIONs: Orbit to circle around the MISSION, in meters. If positive the orbit direction should be clockwise, if negative the orbit direction should be counter-clockwise.
* @param param4 PARAM4 / For NAV and LOITER command MISSIONs: Yaw orientation in degrees, [0..360] 0 = NORTH
* @param x PARAM5 / local: x position, global: latitude
* @param y PARAM6 / y position: global: longitude
* @param z PARAM7 / z position: global: altitude
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_item_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[37];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
_mav_put_float(buf, 12, param4);
_mav_put_float(buf, 16, x);
_mav_put_float(buf, 20, y);
_mav_put_float(buf, 24, z);
_mav_put_uint16_t(buf, 28, seq);
_mav_put_uint16_t(buf, 30, command);
_mav_put_uint8_t(buf, 32, target_system);
_mav_put_uint8_t(buf, 33, target_component);
_mav_put_uint8_t(buf, 34, frame);
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 37);
#else
mavlink_mission_item_t packet;
packet.param1 = param1;
packet.param2 = param2;
packet.param3 = param3;
packet.param4 = param4;
packet.x = x;
packet.y = y;
packet.z = z;
packet.seq = seq;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.frame = frame;
packet.current = current;
packet.autocontinue = autocontinue;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 37);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM;
return mavlink_finalize_message(msg, system_id, component_id, 37, 254);
}
/**
* @brief Pack a mission_item message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
* @param frame The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
* @param command The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
* @param current false:0, true:1
* @param autocontinue autocontinue to next wp
* @param param1 PARAM1 / For NAV command MISSIONs: Radius in which the MISSION is accepted as reached, in meters
* @param param2 PARAM2 / For NAV command MISSIONs: Time that the MAV should stay inside the PARAM1 radius before advancing, in milliseconds
* @param param3 PARAM3 / For LOITER command MISSIONs: Orbit to circle around the MISSION, in meters. If positive the orbit direction should be clockwise, if negative the orbit direction should be counter-clockwise.
* @param param4 PARAM4 / For NAV and LOITER command MISSIONs: Yaw orientation in degrees, [0..360] 0 = NORTH
* @param x PARAM5 / local: x position, global: latitude
* @param y PARAM6 / y position: global: longitude
* @param z PARAM7 / z position: global: altitude
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_item_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[37];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
_mav_put_float(buf, 12, param4);
_mav_put_float(buf, 16, x);
_mav_put_float(buf, 20, y);
_mav_put_float(buf, 24, z);
_mav_put_uint16_t(buf, 28, seq);
_mav_put_uint16_t(buf, 30, command);
_mav_put_uint8_t(buf, 32, target_system);
_mav_put_uint8_t(buf, 33, target_component);
_mav_put_uint8_t(buf, 34, frame);
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 37);
#else
mavlink_mission_item_t packet;
packet.param1 = param1;
packet.param2 = param2;
packet.param3 = param3;
packet.param4 = param4;
packet.x = x;
packet.y = y;
packet.z = z;
packet.seq = seq;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.frame = frame;
packet.current = current;
packet.autocontinue = autocontinue;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 37);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 37, 254);
}
/**
* @brief Encode a mission_item struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_item C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_item_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_mission_item_t *mission_item)
{
return mavlink_msg_mission_item_pack(system_id, component_id, msg, mission_item->target_system, mission_item->target_component, mission_item->seq, mission_item->frame, mission_item->command, mission_item->current, mission_item->autocontinue, mission_item->param1, mission_item->param2, mission_item->param3, mission_item->param4, mission_item->x, mission_item->y, mission_item->z);
}
/**
* @brief Send a mission_item message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
* @param frame The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
* @param command The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
* @param current false:0, true:1
* @param autocontinue autocontinue to next wp
* @param param1 PARAM1 / For NAV command MISSIONs: Radius in which the MISSION is accepted as reached, in meters
* @param param2 PARAM2 / For NAV command MISSIONs: Time that the MAV should stay inside the PARAM1 radius before advancing, in milliseconds
* @param param3 PARAM3 / For LOITER command MISSIONs: Orbit to circle around the MISSION, in meters. If positive the orbit direction should be clockwise, if negative the orbit direction should be counter-clockwise.
* @param param4 PARAM4 / For NAV and LOITER command MISSIONs: Yaw orientation in degrees, [0..360] 0 = NORTH
* @param x PARAM5 / local: x position, global: latitude
* @param y PARAM6 / y position: global: longitude
* @param z PARAM7 / z position: global: altitude
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_mission_item_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[37];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
_mav_put_float(buf, 12, param4);
_mav_put_float(buf, 16, x);
_mav_put_float(buf, 20, y);
_mav_put_float(buf, 24, z);
_mav_put_uint16_t(buf, 28, seq);
_mav_put_uint16_t(buf, 30, command);
_mav_put_uint8_t(buf, 32, target_system);
_mav_put_uint8_t(buf, 33, target_component);
_mav_put_uint8_t(buf, 34, frame);
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM, buf, 37, 254);
#else
mavlink_mission_item_t packet;
packet.param1 = param1;
packet.param2 = param2;
packet.param3 = param3;
packet.param4 = param4;
packet.x = x;
packet.y = y;
packet.z = z;
packet.seq = seq;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.frame = frame;
packet.current = current;
packet.autocontinue = autocontinue;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM, (const char *)&packet, 37, 254);
#endif // if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE MISSION_ITEM UNPACKING
/**
* @brief Get field target_system from mission_item message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_item_get_target_system(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 32);
}
/**
* @brief Get field target_component from mission_item message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_item_get_target_component(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 33);
}
/**
* @brief Get field seq from mission_item message
*
* @return Sequence
*/
static inline uint16_t mavlink_msg_mission_item_get_seq(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 28);
}
/**
* @brief Get field frame from mission_item message
*
* @return The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
*/
static inline uint8_t mavlink_msg_mission_item_get_frame(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 34);
}
/**
* @brief Get field command from mission_item message
*
* @return The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
*/
static inline uint16_t mavlink_msg_mission_item_get_command(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 30);
}
/**
* @brief Get field current from mission_item message
*
* @return false:0, true:1
*/
static inline uint8_t mavlink_msg_mission_item_get_current(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 35);
}
/**
* @brief Get field autocontinue from mission_item message
*
* @return autocontinue to next wp
*/
static inline uint8_t mavlink_msg_mission_item_get_autocontinue(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 36);
}
/**
* @brief Get field param1 from mission_item message
*
* @return PARAM1 / For NAV command MISSIONs: Radius in which the MISSION is accepted as reached, in meters
*/
static inline float mavlink_msg_mission_item_get_param1(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field param2 from mission_item message
*
* @return PARAM2 / For NAV command MISSIONs: Time that the MAV should stay inside the PARAM1 radius before advancing, in milliseconds
*/
static inline float mavlink_msg_mission_item_get_param2(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field param3 from mission_item message
*
* @return PARAM3 / For LOITER command MISSIONs: Orbit to circle around the MISSION, in meters. If positive the orbit direction should be clockwise, if negative the orbit direction should be counter-clockwise.
*/
static inline float mavlink_msg_mission_item_get_param3(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field param4 from mission_item message
*
* @return PARAM4 / For NAV and LOITER command MISSIONs: Yaw orientation in degrees, [0..360] 0 = NORTH
*/
static inline float mavlink_msg_mission_item_get_param4(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field x from mission_item message
*
* @return PARAM5 / local: x position, global: latitude
*/
static inline float mavlink_msg_mission_item_get_x(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field y from mission_item message
*
* @return PARAM6 / y position: global: longitude
*/
static inline float mavlink_msg_mission_item_get_y(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field z from mission_item message
*
* @return PARAM7 / z position: global: altitude
*/
static inline float mavlink_msg_mission_item_get_z(const mavlink_message_t *msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Decode a mission_item message into a struct
*
* @param msg The message to decode
* @param mission_item C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_item_decode(const mavlink_message_t *msg, mavlink_mission_item_t *mission_item)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_item->param1 = mavlink_msg_mission_item_get_param1(msg);
mission_item->param2 = mavlink_msg_mission_item_get_param2(msg);
mission_item->param3 = mavlink_msg_mission_item_get_param3(msg);
mission_item->param4 = mavlink_msg_mission_item_get_param4(msg);
mission_item->x = mavlink_msg_mission_item_get_x(msg);
mission_item->y = mavlink_msg_mission_item_get_y(msg);
mission_item->z = mavlink_msg_mission_item_get_z(msg);
mission_item->seq = mavlink_msg_mission_item_get_seq(msg);
mission_item->command = mavlink_msg_mission_item_get_command(msg);
mission_item->target_system = mavlink_msg_mission_item_get_target_system(msg);
mission_item->target_component = mavlink_msg_mission_item_get_target_component(msg);
mission_item->frame = mavlink_msg_mission_item_get_frame(msg);
mission_item->current = mavlink_msg_mission_item_get_current(msg);
mission_item->autocontinue = mavlink_msg_mission_item_get_autocontinue(msg);
#else
memcpy(mission_item, _MAV_PAYLOAD(msg), 37);
#endif
}

View File

@ -0,0 +1,144 @@
// MESSAGE MISSION_ITEM_REACHED PACKING
#define MAVLINK_MSG_ID_MISSION_ITEM_REACHED 46
typedef struct __mavlink_mission_item_reached_t {
uint16_t seq; ///< Sequence
} mavlink_mission_item_reached_t;
#define MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN 2
#define MAVLINK_MSG_ID_46_LEN 2
#define MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED \
{ \
"MISSION_ITEM_REACHED", \
1, \
{ \
{ "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_item_reached_t, seq) }, \
} \
}
/**
* @brief Pack a mission_item_reached message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_item_reached_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint16_t(buf, 0, seq);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_item_reached_t packet;
packet.seq = seq;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED;
return mavlink_finalize_message(msg, system_id, component_id, 2, 11);
}
/**
* @brief Pack a mission_item_reached message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_item_reached_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint16_t(buf, 0, seq);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_item_reached_t packet;
packet.seq = seq;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 11);
}
/**
* @brief Encode a mission_item_reached struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_item_reached C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_item_reached_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_mission_item_reached_t *mission_item_reached)
{
return mavlink_msg_mission_item_reached_pack(system_id, component_id, msg, mission_item_reached->seq);
}
/**
* @brief Send a mission_item_reached message
* @param chan MAVLink channel to send the message
*
* @param seq Sequence
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_mission_item_reached_send(mavlink_channel_t chan, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint16_t(buf, 0, seq);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_REACHED, buf, 2, 11);
#else
mavlink_mission_item_reached_t packet;
packet.seq = seq;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_REACHED, (const char *)&packet, 2, 11);
#endif
}
#endif
// MESSAGE MISSION_ITEM_REACHED UNPACKING
/**
* @brief Get field seq from mission_item_reached message
*
* @return Sequence
*/
static inline uint16_t mavlink_msg_mission_item_reached_get_seq(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
* @brief Decode a mission_item_reached message into a struct
*
* @param msg The message to decode
* @param mission_item_reached C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_item_reached_decode(const mavlink_message_t *msg, mavlink_mission_item_reached_t *mission_item_reached)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_item_reached->seq = mavlink_msg_mission_item_reached_get_seq(msg);
#else
memcpy(mission_item_reached, _MAV_PAYLOAD(msg), 2);
#endif
}

View File

@ -0,0 +1,188 @@
// MESSAGE MISSION_REQUEST PACKING
#define MAVLINK_MSG_ID_MISSION_REQUEST 40
typedef struct __mavlink_mission_request_t {
uint16_t seq; ///< Sequence
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_mission_request_t;
#define MAVLINK_MSG_ID_MISSION_REQUEST_LEN 4
#define MAVLINK_MSG_ID_40_LEN 4
#define MAVLINK_MESSAGE_INFO_MISSION_REQUEST \
{ \
"MISSION_REQUEST", \
3, \
{ \
{ "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_request_t, seq) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_request_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_mission_request_t, target_component) }, \
} \
}
/**
* @brief Pack a mission_request message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_request_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_mission_request_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST;
return mavlink_finalize_message(msg, system_id, component_id, 4, 230);
}
/**
* @brief Pack a mission_request message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_mission_request_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 230);
}
/**
* @brief Encode a mission_request struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_request C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_mission_request_t *mission_request)
{
return mavlink_msg_mission_request_pack(system_id, component_id, msg, mission_request->target_system, mission_request->target_component, mission_request->seq);
}
/**
* @brief Send a mission_request message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_mission_request_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST, buf, 4, 230);
#else
mavlink_mission_request_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST, (const char *)&packet, 4, 230);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE MISSION_REQUEST UNPACKING
/**
* @brief Get field target_system from mission_request message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_request_get_target_system(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field target_component from mission_request message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_request_get_target_component(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
/**
* @brief Get field seq from mission_request message
*
* @return Sequence
*/
static inline uint16_t mavlink_msg_mission_request_get_seq(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
* @brief Decode a mission_request message into a struct
*
* @param msg The message to decode
* @param mission_request C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_request_decode(const mavlink_message_t *msg, mavlink_mission_request_t *mission_request)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_request->seq = mavlink_msg_mission_request_get_seq(msg);
mission_request->target_system = mavlink_msg_mission_request_get_target_system(msg);
mission_request->target_component = mavlink_msg_mission_request_get_target_component(msg);
#else
memcpy(mission_request, _MAV_PAYLOAD(msg), 4);
#endif
}

View File

@ -0,0 +1,166 @@
// MESSAGE MISSION_REQUEST_LIST PACKING
#define MAVLINK_MSG_ID_MISSION_REQUEST_LIST 43
typedef struct __mavlink_mission_request_list_t {
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_mission_request_list_t;
#define MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN 2
#define MAVLINK_MSG_ID_43_LEN 2
#define MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST \
{ \
"MISSION_REQUEST_LIST", \
2, \
{ \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_mission_request_list_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_mission_request_list_t, target_component) }, \
} \
}
/**
* @brief Pack a mission_request_list message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_request_list_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST_LIST;
return mavlink_finalize_message(msg, system_id, component_id, 2, 132);
}
/**
* @brief Pack a mission_request_list message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_request_list_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST_LIST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 132);
}
/**
* @brief Encode a mission_request_list struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_request_list C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_request_list_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_mission_request_list_t *mission_request_list)
{
return mavlink_msg_mission_request_list_pack(system_id, component_id, msg, mission_request_list->target_system, mission_request_list->target_component);
}
/**
* @brief Send a mission_request_list message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_mission_request_list_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_LIST, buf, 2, 132);
#else
mavlink_mission_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_LIST, (const char *)&packet, 2, 132);
#endif
}
#endif
// MESSAGE MISSION_REQUEST_LIST UNPACKING
/**
* @brief Get field target_system from mission_request_list message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_request_list_get_target_system(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from mission_request_list message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_request_list_get_target_component(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a mission_request_list message into a struct
*
* @param msg The message to decode
* @param mission_request_list C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_request_list_decode(const mavlink_message_t *msg, mavlink_mission_request_list_t *mission_request_list)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_request_list->target_system = mavlink_msg_mission_request_list_get_target_system(msg);
mission_request_list->target_component = mavlink_msg_mission_request_list_get_target_component(msg);
#else
memcpy(mission_request_list, _MAV_PAYLOAD(msg), 2);
#endif
}

View File

@ -0,0 +1,210 @@
// MESSAGE MISSION_REQUEST_PARTIAL_LIST PACKING
#define MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST 37
typedef struct __mavlink_mission_request_partial_list_t {
int16_t start_index; ///< Start index, 0 by default
int16_t end_index; ///< End index, -1 by default (-1: send list to end). Else a valid index of the list
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_mission_request_partial_list_t;
#define MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN 6
#define MAVLINK_MSG_ID_37_LEN 6
#define MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST \
{ \
"MISSION_REQUEST_PARTIAL_LIST", \
4, \
{ \
{ "start_index", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_mission_request_partial_list_t, start_index) }, \
{ "end_index", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_mission_request_partial_list_t, end_index) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_mission_request_partial_list_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_mission_request_partial_list_t, target_component) }, \
} \
}
/**
* @brief Pack a mission_request_partial_list message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param start_index Start index, 0 by default
* @param end_index End index, -1 by default (-1: send list to end). Else a valid index of the list
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_request_partial_list_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component, int16_t start_index, int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
#else
mavlink_mission_request_partial_list_t packet;
packet.start_index = start_index;
packet.end_index = end_index;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST;
return mavlink_finalize_message(msg, system_id, component_id, 6, 212);
}
/**
* @brief Pack a mission_request_partial_list message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param start_index Start index, 0 by default
* @param end_index End index, -1 by default (-1: send list to end). Else a valid index of the list
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_request_partial_list_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t *msg,
uint8_t target_system, uint8_t target_component, int16_t start_index, int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
#else
mavlink_mission_request_partial_list_t packet;
packet.start_index = start_index;
packet.end_index = end_index;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 6, 212);
}
/**
* @brief Encode a mission_request_partial_list struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_request_partial_list C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_request_partial_list_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_mission_request_partial_list_t *mission_request_partial_list)
{
return mavlink_msg_mission_request_partial_list_pack(system_id, component_id, msg, mission_request_partial_list->target_system, mission_request_partial_list->target_component, mission_request_partial_list->start_index, mission_request_partial_list->end_index);
}
/**
* @brief Send a mission_request_partial_list message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param start_index Start index, 0 by default
* @param end_index End index, -1 by default (-1: send list to end). Else a valid index of the list
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_mission_request_partial_list_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t start_index, int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST, buf, 6, 212);
#else
mavlink_mission_request_partial_list_t packet;
packet.start_index = start_index;
packet.end_index = end_index;
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST, (const char *)&packet, 6, 212);
#endif
}
#endif // ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
// MESSAGE MISSION_REQUEST_PARTIAL_LIST UNPACKING
/**
* @brief Get field target_system from mission_request_partial_list message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_request_partial_list_get_target_system(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
/**
* @brief Get field target_component from mission_request_partial_list message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_request_partial_list_get_target_component(const mavlink_message_t *msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
/**
* @brief Get field start_index from mission_request_partial_list message
*
* @return Start index, 0 by default
*/
static inline int16_t mavlink_msg_mission_request_partial_list_get_start_index(const mavlink_message_t *msg)
{
return _MAV_RETURN_int16_t(msg, 0);
}
/**
* @brief Get field end_index from mission_request_partial_list message
*
* @return End index, -1 by default (-1: send list to end). Else a valid index of the list
*/
static inline int16_t mavlink_msg_mission_request_partial_list_get_end_index(const mavlink_message_t *msg)
{
return _MAV_RETURN_int16_t(msg, 2);
}
/**
* @brief Decode a mission_request_partial_list message into a struct
*
* @param msg The message to decode
* @param mission_request_partial_list C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_request_partial_list_decode(const mavlink_message_t *msg, mavlink_mission_request_partial_list_t *mission_request_partial_list)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_request_partial_list->start_index = mavlink_msg_mission_request_partial_list_get_start_index(msg);
mission_request_partial_list->end_index = mavlink_msg_mission_request_partial_list_get_end_index(msg);
mission_request_partial_list->target_system = mavlink_msg_mission_request_partial_list_get_target_system(msg);
mission_request_partial_list->target_component = mavlink_msg_mission_request_partial_list_get_target_component(msg);
#else
memcpy(mission_request_partial_list, _MAV_PAYLOAD(msg), 6);
#endif
}

Some files were not shown because too many files have changed in this diff Show More