sync with mavlink externalsetpoint branch

0d55cc7e88
This commit is contained in:
Thomas Gubler 2014-07-02 15:40:28 +02:00
parent 038f4f6203
commit 8f7fc27c5b
19 changed files with 1335 additions and 201 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Jun 23 10:13:03 2014"
#define MAVLINK_BUILD_DATE "Wed Jul 2 15:36:07 2014"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Jun 23 10:13:13 2014"
#define MAVLINK_BUILD_DATE "Wed Jul 2 15:36:18 2014"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255

File diff suppressed because one or more lines are too long

View File

@ -11,10 +11,10 @@ typedef struct __mavlink_global_position_setpoint_external_int_t
float vx; ///< X velocity in NED frame in meter / s
float vy; ///< Y velocity in NED frame in meter / s
float vz; ///< Z velocity in NED frame in meter / s
float ax; ///< X acceleration in NED frame in meter / s^2
float ay; ///< Y acceleration in NED frame in meter / s^2
float az; ///< Z acceleration in NED frame in meter / s^2
uint16_t ignore_mask; ///< Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates it should follow the commanded attitude and rate and none of the setpoint dimensions should be ignored. Mapping: bit 1: lat, bit 2: lon, bit 3: alt, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az
float afx; ///< X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
float afy; ///< Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
float afz; ///< Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
uint16_t type_mask; ///< Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_global_position_setpoint_external_int_t;
@ -22,8 +22,8 @@ typedef struct __mavlink_global_position_setpoint_external_int_t
#define MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_EXTERNAL_INT_LEN 44
#define MAVLINK_MSG_ID_84_LEN 44
#define MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_EXTERNAL_INT_CRC 172
#define MAVLINK_MSG_ID_84_CRC 172
#define MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_EXTERNAL_INT_CRC 198
#define MAVLINK_MSG_ID_84_CRC 198
@ -37,10 +37,10 @@ typedef struct __mavlink_global_position_setpoint_external_int_t
{ "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_global_position_setpoint_external_int_t, vx) }, \
{ "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_global_position_setpoint_external_int_t, vy) }, \
{ "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_global_position_setpoint_external_int_t, vz) }, \
{ "ax", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_global_position_setpoint_external_int_t, ax) }, \
{ "ay", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_global_position_setpoint_external_int_t, ay) }, \
{ "az", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_global_position_setpoint_external_int_t, az) }, \
{ "ignore_mask", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_global_position_setpoint_external_int_t, ignore_mask) }, \
{ "afx", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_global_position_setpoint_external_int_t, afx) }, \
{ "afy", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_global_position_setpoint_external_int_t, afy) }, \
{ "afz", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_global_position_setpoint_external_int_t, afz) }, \
{ "type_mask", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_global_position_setpoint_external_int_t, type_mask) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_global_position_setpoint_external_int_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_global_position_setpoint_external_int_t, target_component) }, \
} \
@ -56,20 +56,20 @@ typedef struct __mavlink_global_position_setpoint_external_int_t
* @param time_boot_ms Timestamp in milliseconds since system boot. The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency.
* @param target_system System ID
* @param target_component Component ID
* @param ignore_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates it should follow the commanded attitude and rate and none of the setpoint dimensions should be ignored. Mapping: bit 1: lat, bit 2: lon, bit 3: alt, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az
* @param type_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint
* @param lat_int X Position in WGS84 frame in 1e7 * meters
* @param lon_int Y Position in WGS84 frame in 1e7 * meters
* @param alt Altitude in WGS84, not AMSL
* @param vx X velocity in NED frame in meter / s
* @param vy Y velocity in NED frame in meter / s
* @param vz Z velocity in NED frame in meter / s
* @param ax X acceleration in NED frame in meter / s^2
* @param ay Y acceleration in NED frame in meter / s^2
* @param az Z acceleration in NED frame in meter / s^2
* @param afx X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @param afy Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @param afz Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_position_setpoint_external_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint16_t ignore_mask, int32_t lat_int, int32_t lon_int, float alt, float vx, float vy, float vz, float ax, float ay, float az)
uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint16_t type_mask, int32_t lat_int, int32_t lon_int, float alt, float vx, float vy, float vz, float afx, float afy, float afz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_EXTERNAL_INT_LEN];
@ -80,10 +80,10 @@ static inline uint16_t mavlink_msg_global_position_setpoint_external_int_pack(ui
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
_mav_put_float(buf, 28, ax);
_mav_put_float(buf, 32, ay);
_mav_put_float(buf, 36, az);
_mav_put_uint16_t(buf, 40, ignore_mask);
_mav_put_float(buf, 28, afx);
_mav_put_float(buf, 32, afy);
_mav_put_float(buf, 36, afz);
_mav_put_uint16_t(buf, 40, type_mask);
_mav_put_uint8_t(buf, 42, target_system);
_mav_put_uint8_t(buf, 43, target_component);
@ -97,10 +97,10 @@ static inline uint16_t mavlink_msg_global_position_setpoint_external_int_pack(ui
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.ax = ax;
packet.ay = ay;
packet.az = az;
packet.ignore_mask = ignore_mask;
packet.afx = afx;
packet.afy = afy;
packet.afz = afz;
packet.type_mask = type_mask;
packet.target_system = target_system;
packet.target_component = target_component;
@ -124,21 +124,21 @@ static inline uint16_t mavlink_msg_global_position_setpoint_external_int_pack(ui
* @param time_boot_ms Timestamp in milliseconds since system boot. The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency.
* @param target_system System ID
* @param target_component Component ID
* @param ignore_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates it should follow the commanded attitude and rate and none of the setpoint dimensions should be ignored. Mapping: bit 1: lat, bit 2: lon, bit 3: alt, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az
* @param type_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint
* @param lat_int X Position in WGS84 frame in 1e7 * meters
* @param lon_int Y Position in WGS84 frame in 1e7 * meters
* @param alt Altitude in WGS84, not AMSL
* @param vx X velocity in NED frame in meter / s
* @param vy Y velocity in NED frame in meter / s
* @param vz Z velocity in NED frame in meter / s
* @param ax X acceleration in NED frame in meter / s^2
* @param ay Y acceleration in NED frame in meter / s^2
* @param az Z acceleration in NED frame in meter / s^2
* @param afx X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @param afy Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @param afz Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_position_setpoint_external_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,uint8_t target_system,uint8_t target_component,uint16_t ignore_mask,int32_t lat_int,int32_t lon_int,float alt,float vx,float vy,float vz,float ax,float ay,float az)
uint32_t time_boot_ms,uint8_t target_system,uint8_t target_component,uint16_t type_mask,int32_t lat_int,int32_t lon_int,float alt,float vx,float vy,float vz,float afx,float afy,float afz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_EXTERNAL_INT_LEN];
@ -149,10 +149,10 @@ static inline uint16_t mavlink_msg_global_position_setpoint_external_int_pack_ch
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
_mav_put_float(buf, 28, ax);
_mav_put_float(buf, 32, ay);
_mav_put_float(buf, 36, az);
_mav_put_uint16_t(buf, 40, ignore_mask);
_mav_put_float(buf, 28, afx);
_mav_put_float(buf, 32, afy);
_mav_put_float(buf, 36, afz);
_mav_put_uint16_t(buf, 40, type_mask);
_mav_put_uint8_t(buf, 42, target_system);
_mav_put_uint8_t(buf, 43, target_component);
@ -166,10 +166,10 @@ static inline uint16_t mavlink_msg_global_position_setpoint_external_int_pack_ch
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.ax = ax;
packet.ay = ay;
packet.az = az;
packet.ignore_mask = ignore_mask;
packet.afx = afx;
packet.afy = afy;
packet.afz = afz;
packet.type_mask = type_mask;
packet.target_system = target_system;
packet.target_component = target_component;
@ -194,7 +194,7 @@ static inline uint16_t mavlink_msg_global_position_setpoint_external_int_pack_ch
*/
static inline uint16_t mavlink_msg_global_position_setpoint_external_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_global_position_setpoint_external_int_t* global_position_setpoint_external_int)
{
return mavlink_msg_global_position_setpoint_external_int_pack(system_id, component_id, msg, global_position_setpoint_external_int->time_boot_ms, global_position_setpoint_external_int->target_system, global_position_setpoint_external_int->target_component, global_position_setpoint_external_int->ignore_mask, global_position_setpoint_external_int->lat_int, global_position_setpoint_external_int->lon_int, global_position_setpoint_external_int->alt, global_position_setpoint_external_int->vx, global_position_setpoint_external_int->vy, global_position_setpoint_external_int->vz, global_position_setpoint_external_int->ax, global_position_setpoint_external_int->ay, global_position_setpoint_external_int->az);
return mavlink_msg_global_position_setpoint_external_int_pack(system_id, component_id, msg, global_position_setpoint_external_int->time_boot_ms, global_position_setpoint_external_int->target_system, global_position_setpoint_external_int->target_component, global_position_setpoint_external_int->type_mask, global_position_setpoint_external_int->lat_int, global_position_setpoint_external_int->lon_int, global_position_setpoint_external_int->alt, global_position_setpoint_external_int->vx, global_position_setpoint_external_int->vy, global_position_setpoint_external_int->vz, global_position_setpoint_external_int->afx, global_position_setpoint_external_int->afy, global_position_setpoint_external_int->afz);
}
/**
@ -208,7 +208,7 @@ static inline uint16_t mavlink_msg_global_position_setpoint_external_int_encode(
*/
static inline uint16_t mavlink_msg_global_position_setpoint_external_int_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_global_position_setpoint_external_int_t* global_position_setpoint_external_int)
{
return mavlink_msg_global_position_setpoint_external_int_pack_chan(system_id, component_id, chan, msg, global_position_setpoint_external_int->time_boot_ms, global_position_setpoint_external_int->target_system, global_position_setpoint_external_int->target_component, global_position_setpoint_external_int->ignore_mask, global_position_setpoint_external_int->lat_int, global_position_setpoint_external_int->lon_int, global_position_setpoint_external_int->alt, global_position_setpoint_external_int->vx, global_position_setpoint_external_int->vy, global_position_setpoint_external_int->vz, global_position_setpoint_external_int->ax, global_position_setpoint_external_int->ay, global_position_setpoint_external_int->az);
return mavlink_msg_global_position_setpoint_external_int_pack_chan(system_id, component_id, chan, msg, global_position_setpoint_external_int->time_boot_ms, global_position_setpoint_external_int->target_system, global_position_setpoint_external_int->target_component, global_position_setpoint_external_int->type_mask, global_position_setpoint_external_int->lat_int, global_position_setpoint_external_int->lon_int, global_position_setpoint_external_int->alt, global_position_setpoint_external_int->vx, global_position_setpoint_external_int->vy, global_position_setpoint_external_int->vz, global_position_setpoint_external_int->afx, global_position_setpoint_external_int->afy, global_position_setpoint_external_int->afz);
}
/**
@ -218,20 +218,20 @@ static inline uint16_t mavlink_msg_global_position_setpoint_external_int_encode_
* @param time_boot_ms Timestamp in milliseconds since system boot. The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency.
* @param target_system System ID
* @param target_component Component ID
* @param ignore_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates it should follow the commanded attitude and rate and none of the setpoint dimensions should be ignored. Mapping: bit 1: lat, bit 2: lon, bit 3: alt, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az
* @param type_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint
* @param lat_int X Position in WGS84 frame in 1e7 * meters
* @param lon_int Y Position in WGS84 frame in 1e7 * meters
* @param alt Altitude in WGS84, not AMSL
* @param vx X velocity in NED frame in meter / s
* @param vy Y velocity in NED frame in meter / s
* @param vz Z velocity in NED frame in meter / s
* @param ax X acceleration in NED frame in meter / s^2
* @param ay Y acceleration in NED frame in meter / s^2
* @param az Z acceleration in NED frame in meter / s^2
* @param afx X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @param afy Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @param afz Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_global_position_setpoint_external_int_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint16_t ignore_mask, int32_t lat_int, int32_t lon_int, float alt, float vx, float vy, float vz, float ax, float ay, float az)
static inline void mavlink_msg_global_position_setpoint_external_int_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint16_t type_mask, int32_t lat_int, int32_t lon_int, float alt, float vx, float vy, float vz, float afx, float afy, float afz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_EXTERNAL_INT_LEN];
@ -242,10 +242,10 @@ static inline void mavlink_msg_global_position_setpoint_external_int_send(mavlin
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
_mav_put_float(buf, 28, ax);
_mav_put_float(buf, 32, ay);
_mav_put_float(buf, 36, az);
_mav_put_uint16_t(buf, 40, ignore_mask);
_mav_put_float(buf, 28, afx);
_mav_put_float(buf, 32, afy);
_mav_put_float(buf, 36, afz);
_mav_put_uint16_t(buf, 40, type_mask);
_mav_put_uint8_t(buf, 42, target_system);
_mav_put_uint8_t(buf, 43, target_component);
@ -263,10 +263,10 @@ static inline void mavlink_msg_global_position_setpoint_external_int_send(mavlin
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.ax = ax;
packet.ay = ay;
packet.az = az;
packet.ignore_mask = ignore_mask;
packet.afx = afx;
packet.afy = afy;
packet.afz = afz;
packet.type_mask = type_mask;
packet.target_system = target_system;
packet.target_component = target_component;
@ -286,7 +286,7 @@ static inline void mavlink_msg_global_position_setpoint_external_int_send(mavlin
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_global_position_setpoint_external_int_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint16_t ignore_mask, int32_t lat_int, int32_t lon_int, float alt, float vx, float vy, float vz, float ax, float ay, float az)
static inline void mavlink_msg_global_position_setpoint_external_int_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint16_t type_mask, int32_t lat_int, int32_t lon_int, float alt, float vx, float vy, float vz, float afx, float afy, float afz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
@ -297,10 +297,10 @@ static inline void mavlink_msg_global_position_setpoint_external_int_send_buf(ma
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
_mav_put_float(buf, 28, ax);
_mav_put_float(buf, 32, ay);
_mav_put_float(buf, 36, az);
_mav_put_uint16_t(buf, 40, ignore_mask);
_mav_put_float(buf, 28, afx);
_mav_put_float(buf, 32, afy);
_mav_put_float(buf, 36, afz);
_mav_put_uint16_t(buf, 40, type_mask);
_mav_put_uint8_t(buf, 42, target_system);
_mav_put_uint8_t(buf, 43, target_component);
@ -318,10 +318,10 @@ static inline void mavlink_msg_global_position_setpoint_external_int_send_buf(ma
packet->vx = vx;
packet->vy = vy;
packet->vz = vz;
packet->ax = ax;
packet->ay = ay;
packet->az = az;
packet->ignore_mask = ignore_mask;
packet->afx = afx;
packet->afy = afy;
packet->afz = afz;
packet->type_mask = type_mask;
packet->target_system = target_system;
packet->target_component = target_component;
@ -370,11 +370,11 @@ static inline uint8_t mavlink_msg_global_position_setpoint_external_int_get_targ
}
/**
* @brief Get field ignore_mask from global_position_setpoint_external_int message
* @brief Get field type_mask from global_position_setpoint_external_int message
*
* @return Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates it should follow the commanded attitude and rate and none of the setpoint dimensions should be ignored. Mapping: bit 1: lat, bit 2: lon, bit 3: alt, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az
* @return Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint
*/
static inline uint16_t mavlink_msg_global_position_setpoint_external_int_get_ignore_mask(const mavlink_message_t* msg)
static inline uint16_t mavlink_msg_global_position_setpoint_external_int_get_type_mask(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 40);
}
@ -440,31 +440,31 @@ static inline float mavlink_msg_global_position_setpoint_external_int_get_vz(con
}
/**
* @brief Get field ax from global_position_setpoint_external_int message
* @brief Get field afx from global_position_setpoint_external_int message
*
* @return X acceleration in NED frame in meter / s^2
* @return X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
*/
static inline float mavlink_msg_global_position_setpoint_external_int_get_ax(const mavlink_message_t* msg)
static inline float mavlink_msg_global_position_setpoint_external_int_get_afx(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 28);
}
/**
* @brief Get field ay from global_position_setpoint_external_int message
* @brief Get field afy from global_position_setpoint_external_int message
*
* @return Y acceleration in NED frame in meter / s^2
* @return Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
*/
static inline float mavlink_msg_global_position_setpoint_external_int_get_ay(const mavlink_message_t* msg)
static inline float mavlink_msg_global_position_setpoint_external_int_get_afy(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 32);
}
/**
* @brief Get field az from global_position_setpoint_external_int message
* @brief Get field afz from global_position_setpoint_external_int message
*
* @return Z acceleration in NED frame in meter / s^2
* @return Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
*/
static inline float mavlink_msg_global_position_setpoint_external_int_get_az(const mavlink_message_t* msg)
static inline float mavlink_msg_global_position_setpoint_external_int_get_afz(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 36);
}
@ -485,10 +485,10 @@ static inline void mavlink_msg_global_position_setpoint_external_int_decode(cons
global_position_setpoint_external_int->vx = mavlink_msg_global_position_setpoint_external_int_get_vx(msg);
global_position_setpoint_external_int->vy = mavlink_msg_global_position_setpoint_external_int_get_vy(msg);
global_position_setpoint_external_int->vz = mavlink_msg_global_position_setpoint_external_int_get_vz(msg);
global_position_setpoint_external_int->ax = mavlink_msg_global_position_setpoint_external_int_get_ax(msg);
global_position_setpoint_external_int->ay = mavlink_msg_global_position_setpoint_external_int_get_ay(msg);
global_position_setpoint_external_int->az = mavlink_msg_global_position_setpoint_external_int_get_az(msg);
global_position_setpoint_external_int->ignore_mask = mavlink_msg_global_position_setpoint_external_int_get_ignore_mask(msg);
global_position_setpoint_external_int->afx = mavlink_msg_global_position_setpoint_external_int_get_afx(msg);
global_position_setpoint_external_int->afy = mavlink_msg_global_position_setpoint_external_int_get_afy(msg);
global_position_setpoint_external_int->afz = mavlink_msg_global_position_setpoint_external_int_get_afz(msg);
global_position_setpoint_external_int->type_mask = mavlink_msg_global_position_setpoint_external_int_get_type_mask(msg);
global_position_setpoint_external_int->target_system = mavlink_msg_global_position_setpoint_external_int_get_target_system(msg);
global_position_setpoint_external_int->target_component = mavlink_msg_global_position_setpoint_external_int_get_target_component(msg);
#else

View File

@ -13,7 +13,7 @@ typedef struct __mavlink_gps2_raw_t
uint16_t epv; ///< GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
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 fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS fix, 5: RTK 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
uint8_t dgps_numch; ///< Number of DGPS satellites
} mavlink_gps2_raw_t;
@ -52,7 +52,7 @@ typedef struct __mavlink_gps2_raw_t
* @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 fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS fix, 5: RTK 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 (WGS84), in degrees * 1E7
* @param lon Longitude (WGS84), in degrees * 1E7
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
@ -117,7 +117,7 @@ static inline uint16_t mavlink_msg_gps2_raw_pack(uint8_t system_id, uint8_t comp
* @param chan The MAVLink channel this message will be 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 fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS fix, 5: RTK 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 (WGS84), in degrees * 1E7
* @param lon Longitude (WGS84), in degrees * 1E7
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
@ -208,7 +208,7 @@ static inline uint16_t mavlink_msg_gps2_raw_encode_chan(uint8_t system_id, uint8
* @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 fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS fix, 5: RTK 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 (WGS84), in degrees * 1E7
* @param lon Longitude (WGS84), in degrees * 1E7
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
@ -339,7 +339,7 @@ static inline uint64_t mavlink_msg_gps2_raw_get_time_usec(const mavlink_message_
/**
* @brief Get field fix_type from gps2_raw 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.
* @return 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS fix, 5: RTK 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_gps2_raw_get_fix_type(const mavlink_message_t* msg)
{

View File

@ -0,0 +1,497 @@
// MESSAGE GPS2_RTK PACKING
#define MAVLINK_MSG_ID_GPS2_RTK 128
typedef struct __mavlink_gps2_rtk_t
{
uint32_t time_last_baseline_ms; ///< Time since boot of last baseline message received in ms.
uint32_t tow; ///< GPS Time of Week of last baseline
int32_t baseline_a_mm; ///< Current baseline in ECEF x or NED north component in mm.
int32_t baseline_b_mm; ///< Current baseline in ECEF y or NED east component in mm.
int32_t baseline_c_mm; ///< Current baseline in ECEF z or NED down component in mm.
uint32_t accuracy; ///< Current estimate of baseline accuracy.
int32_t iar_num_hypotheses; ///< Current number of integer ambiguity hypotheses.
uint16_t wn; ///< GPS Week Number of last baseline
uint8_t rtk_receiver_id; ///< Identification of connected RTK receiver.
uint8_t rtk_health; ///< GPS-specific health report for RTK data.
uint8_t rtk_rate; ///< Rate of baseline messages being received by GPS, in HZ
uint8_t nsats; ///< Current number of sats used for RTK calculation.
uint8_t baseline_coords_type; ///< Coordinate system of baseline. 0 == ECEF, 1 == NED
} mavlink_gps2_rtk_t;
#define MAVLINK_MSG_ID_GPS2_RTK_LEN 35
#define MAVLINK_MSG_ID_128_LEN 35
#define MAVLINK_MSG_ID_GPS2_RTK_CRC 226
#define MAVLINK_MSG_ID_128_CRC 226
#define MAVLINK_MESSAGE_INFO_GPS2_RTK { \
"GPS2_RTK", \
13, \
{ { "time_last_baseline_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gps2_rtk_t, time_last_baseline_ms) }, \
{ "tow", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_gps2_rtk_t, tow) }, \
{ "baseline_a_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps2_rtk_t, baseline_a_mm) }, \
{ "baseline_b_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps2_rtk_t, baseline_b_mm) }, \
{ "baseline_c_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_gps2_rtk_t, baseline_c_mm) }, \
{ "accuracy", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_gps2_rtk_t, accuracy) }, \
{ "iar_num_hypotheses", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_gps2_rtk_t, iar_num_hypotheses) }, \
{ "wn", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_gps2_rtk_t, wn) }, \
{ "rtk_receiver_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_gps2_rtk_t, rtk_receiver_id) }, \
{ "rtk_health", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_gps2_rtk_t, rtk_health) }, \
{ "rtk_rate", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_gps2_rtk_t, rtk_rate) }, \
{ "nsats", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_gps2_rtk_t, nsats) }, \
{ "baseline_coords_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_gps2_rtk_t, baseline_coords_type) }, \
} \
}
/**
* @brief Pack a gps2_rtk 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_last_baseline_ms Time since boot of last baseline message received in ms.
* @param rtk_receiver_id Identification of connected RTK receiver.
* @param wn GPS Week Number of last baseline
* @param tow GPS Time of Week of last baseline
* @param rtk_health GPS-specific health report for RTK data.
* @param rtk_rate Rate of baseline messages being received by GPS, in HZ
* @param nsats Current number of sats used for RTK calculation.
* @param baseline_coords_type Coordinate system of baseline. 0 == ECEF, 1 == NED
* @param baseline_a_mm Current baseline in ECEF x or NED north component in mm.
* @param baseline_b_mm Current baseline in ECEF y or NED east component in mm.
* @param baseline_c_mm Current baseline in ECEF z or NED down component in mm.
* @param accuracy Current estimate of baseline accuracy.
* @param iar_num_hypotheses Current number of integer ambiguity hypotheses.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps2_rtk_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_last_baseline_ms, uint8_t rtk_receiver_id, uint16_t wn, uint32_t tow, uint8_t rtk_health, uint8_t rtk_rate, uint8_t nsats, uint8_t baseline_coords_type, int32_t baseline_a_mm, int32_t baseline_b_mm, int32_t baseline_c_mm, uint32_t accuracy, int32_t iar_num_hypotheses)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GPS2_RTK_LEN];
_mav_put_uint32_t(buf, 0, time_last_baseline_ms);
_mav_put_uint32_t(buf, 4, tow);
_mav_put_int32_t(buf, 8, baseline_a_mm);
_mav_put_int32_t(buf, 12, baseline_b_mm);
_mav_put_int32_t(buf, 16, baseline_c_mm);
_mav_put_uint32_t(buf, 20, accuracy);
_mav_put_int32_t(buf, 24, iar_num_hypotheses);
_mav_put_uint16_t(buf, 28, wn);
_mav_put_uint8_t(buf, 30, rtk_receiver_id);
_mav_put_uint8_t(buf, 31, rtk_health);
_mav_put_uint8_t(buf, 32, rtk_rate);
_mav_put_uint8_t(buf, 33, nsats);
_mav_put_uint8_t(buf, 34, baseline_coords_type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS2_RTK_LEN);
#else
mavlink_gps2_rtk_t packet;
packet.time_last_baseline_ms = time_last_baseline_ms;
packet.tow = tow;
packet.baseline_a_mm = baseline_a_mm;
packet.baseline_b_mm = baseline_b_mm;
packet.baseline_c_mm = baseline_c_mm;
packet.accuracy = accuracy;
packet.iar_num_hypotheses = iar_num_hypotheses;
packet.wn = wn;
packet.rtk_receiver_id = rtk_receiver_id;
packet.rtk_health = rtk_health;
packet.rtk_rate = rtk_rate;
packet.nsats = nsats;
packet.baseline_coords_type = baseline_coords_type;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS2_RTK_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS2_RTK;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS2_RTK_LEN);
#endif
}
/**
* @brief Pack a gps2_rtk 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param time_last_baseline_ms Time since boot of last baseline message received in ms.
* @param rtk_receiver_id Identification of connected RTK receiver.
* @param wn GPS Week Number of last baseline
* @param tow GPS Time of Week of last baseline
* @param rtk_health GPS-specific health report for RTK data.
* @param rtk_rate Rate of baseline messages being received by GPS, in HZ
* @param nsats Current number of sats used for RTK calculation.
* @param baseline_coords_type Coordinate system of baseline. 0 == ECEF, 1 == NED
* @param baseline_a_mm Current baseline in ECEF x or NED north component in mm.
* @param baseline_b_mm Current baseline in ECEF y or NED east component in mm.
* @param baseline_c_mm Current baseline in ECEF z or NED down component in mm.
* @param accuracy Current estimate of baseline accuracy.
* @param iar_num_hypotheses Current number of integer ambiguity hypotheses.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps2_rtk_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_last_baseline_ms,uint8_t rtk_receiver_id,uint16_t wn,uint32_t tow,uint8_t rtk_health,uint8_t rtk_rate,uint8_t nsats,uint8_t baseline_coords_type,int32_t baseline_a_mm,int32_t baseline_b_mm,int32_t baseline_c_mm,uint32_t accuracy,int32_t iar_num_hypotheses)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GPS2_RTK_LEN];
_mav_put_uint32_t(buf, 0, time_last_baseline_ms);
_mav_put_uint32_t(buf, 4, tow);
_mav_put_int32_t(buf, 8, baseline_a_mm);
_mav_put_int32_t(buf, 12, baseline_b_mm);
_mav_put_int32_t(buf, 16, baseline_c_mm);
_mav_put_uint32_t(buf, 20, accuracy);
_mav_put_int32_t(buf, 24, iar_num_hypotheses);
_mav_put_uint16_t(buf, 28, wn);
_mav_put_uint8_t(buf, 30, rtk_receiver_id);
_mav_put_uint8_t(buf, 31, rtk_health);
_mav_put_uint8_t(buf, 32, rtk_rate);
_mav_put_uint8_t(buf, 33, nsats);
_mav_put_uint8_t(buf, 34, baseline_coords_type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS2_RTK_LEN);
#else
mavlink_gps2_rtk_t packet;
packet.time_last_baseline_ms = time_last_baseline_ms;
packet.tow = tow;
packet.baseline_a_mm = baseline_a_mm;
packet.baseline_b_mm = baseline_b_mm;
packet.baseline_c_mm = baseline_c_mm;
packet.accuracy = accuracy;
packet.iar_num_hypotheses = iar_num_hypotheses;
packet.wn = wn;
packet.rtk_receiver_id = rtk_receiver_id;
packet.rtk_health = rtk_health;
packet.rtk_rate = rtk_rate;
packet.nsats = nsats;
packet.baseline_coords_type = baseline_coords_type;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS2_RTK_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS2_RTK;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS2_RTK_LEN);
#endif
}
/**
* @brief Encode a gps2_rtk struct
*
* @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 gps2_rtk C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gps2_rtk_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps2_rtk_t* gps2_rtk)
{
return mavlink_msg_gps2_rtk_pack(system_id, component_id, msg, gps2_rtk->time_last_baseline_ms, gps2_rtk->rtk_receiver_id, gps2_rtk->wn, gps2_rtk->tow, gps2_rtk->rtk_health, gps2_rtk->rtk_rate, gps2_rtk->nsats, gps2_rtk->baseline_coords_type, gps2_rtk->baseline_a_mm, gps2_rtk->baseline_b_mm, gps2_rtk->baseline_c_mm, gps2_rtk->accuracy, gps2_rtk->iar_num_hypotheses);
}
/**
* @brief Encode a gps2_rtk struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param gps2_rtk C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gps2_rtk_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gps2_rtk_t* gps2_rtk)
{
return mavlink_msg_gps2_rtk_pack_chan(system_id, component_id, chan, msg, gps2_rtk->time_last_baseline_ms, gps2_rtk->rtk_receiver_id, gps2_rtk->wn, gps2_rtk->tow, gps2_rtk->rtk_health, gps2_rtk->rtk_rate, gps2_rtk->nsats, gps2_rtk->baseline_coords_type, gps2_rtk->baseline_a_mm, gps2_rtk->baseline_b_mm, gps2_rtk->baseline_c_mm, gps2_rtk->accuracy, gps2_rtk->iar_num_hypotheses);
}
/**
* @brief Send a gps2_rtk message
* @param chan MAVLink channel to send the message
*
* @param time_last_baseline_ms Time since boot of last baseline message received in ms.
* @param rtk_receiver_id Identification of connected RTK receiver.
* @param wn GPS Week Number of last baseline
* @param tow GPS Time of Week of last baseline
* @param rtk_health GPS-specific health report for RTK data.
* @param rtk_rate Rate of baseline messages being received by GPS, in HZ
* @param nsats Current number of sats used for RTK calculation.
* @param baseline_coords_type Coordinate system of baseline. 0 == ECEF, 1 == NED
* @param baseline_a_mm Current baseline in ECEF x or NED north component in mm.
* @param baseline_b_mm Current baseline in ECEF y or NED east component in mm.
* @param baseline_c_mm Current baseline in ECEF z or NED down component in mm.
* @param accuracy Current estimate of baseline accuracy.
* @param iar_num_hypotheses Current number of integer ambiguity hypotheses.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gps2_rtk_send(mavlink_channel_t chan, uint32_t time_last_baseline_ms, uint8_t rtk_receiver_id, uint16_t wn, uint32_t tow, uint8_t rtk_health, uint8_t rtk_rate, uint8_t nsats, uint8_t baseline_coords_type, int32_t baseline_a_mm, int32_t baseline_b_mm, int32_t baseline_c_mm, uint32_t accuracy, int32_t iar_num_hypotheses)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GPS2_RTK_LEN];
_mav_put_uint32_t(buf, 0, time_last_baseline_ms);
_mav_put_uint32_t(buf, 4, tow);
_mav_put_int32_t(buf, 8, baseline_a_mm);
_mav_put_int32_t(buf, 12, baseline_b_mm);
_mav_put_int32_t(buf, 16, baseline_c_mm);
_mav_put_uint32_t(buf, 20, accuracy);
_mav_put_int32_t(buf, 24, iar_num_hypotheses);
_mav_put_uint16_t(buf, 28, wn);
_mav_put_uint8_t(buf, 30, rtk_receiver_id);
_mav_put_uint8_t(buf, 31, rtk_health);
_mav_put_uint8_t(buf, 32, rtk_rate);
_mav_put_uint8_t(buf, 33, nsats);
_mav_put_uint8_t(buf, 34, baseline_coords_type);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, buf, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, buf, MAVLINK_MSG_ID_GPS2_RTK_LEN);
#endif
#else
mavlink_gps2_rtk_t packet;
packet.time_last_baseline_ms = time_last_baseline_ms;
packet.tow = tow;
packet.baseline_a_mm = baseline_a_mm;
packet.baseline_b_mm = baseline_b_mm;
packet.baseline_c_mm = baseline_c_mm;
packet.accuracy = accuracy;
packet.iar_num_hypotheses = iar_num_hypotheses;
packet.wn = wn;
packet.rtk_receiver_id = rtk_receiver_id;
packet.rtk_health = rtk_health;
packet.rtk_rate = rtk_rate;
packet.nsats = nsats;
packet.baseline_coords_type = baseline_coords_type;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, (const char *)&packet, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, (const char *)&packet, MAVLINK_MSG_ID_GPS2_RTK_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GPS2_RTK_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gps2_rtk_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_last_baseline_ms, uint8_t rtk_receiver_id, uint16_t wn, uint32_t tow, uint8_t rtk_health, uint8_t rtk_rate, uint8_t nsats, uint8_t baseline_coords_type, int32_t baseline_a_mm, int32_t baseline_b_mm, int32_t baseline_c_mm, uint32_t accuracy, int32_t iar_num_hypotheses)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, time_last_baseline_ms);
_mav_put_uint32_t(buf, 4, tow);
_mav_put_int32_t(buf, 8, baseline_a_mm);
_mav_put_int32_t(buf, 12, baseline_b_mm);
_mav_put_int32_t(buf, 16, baseline_c_mm);
_mav_put_uint32_t(buf, 20, accuracy);
_mav_put_int32_t(buf, 24, iar_num_hypotheses);
_mav_put_uint16_t(buf, 28, wn);
_mav_put_uint8_t(buf, 30, rtk_receiver_id);
_mav_put_uint8_t(buf, 31, rtk_health);
_mav_put_uint8_t(buf, 32, rtk_rate);
_mav_put_uint8_t(buf, 33, nsats);
_mav_put_uint8_t(buf, 34, baseline_coords_type);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, buf, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, buf, MAVLINK_MSG_ID_GPS2_RTK_LEN);
#endif
#else
mavlink_gps2_rtk_t *packet = (mavlink_gps2_rtk_t *)msgbuf;
packet->time_last_baseline_ms = time_last_baseline_ms;
packet->tow = tow;
packet->baseline_a_mm = baseline_a_mm;
packet->baseline_b_mm = baseline_b_mm;
packet->baseline_c_mm = baseline_c_mm;
packet->accuracy = accuracy;
packet->iar_num_hypotheses = iar_num_hypotheses;
packet->wn = wn;
packet->rtk_receiver_id = rtk_receiver_id;
packet->rtk_health = rtk_health;
packet->rtk_rate = rtk_rate;
packet->nsats = nsats;
packet->baseline_coords_type = baseline_coords_type;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, (const char *)packet, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, (const char *)packet, MAVLINK_MSG_ID_GPS2_RTK_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GPS2_RTK UNPACKING
/**
* @brief Get field time_last_baseline_ms from gps2_rtk message
*
* @return Time since boot of last baseline message received in ms.
*/
static inline uint32_t mavlink_msg_gps2_rtk_get_time_last_baseline_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field rtk_receiver_id from gps2_rtk message
*
* @return Identification of connected RTK receiver.
*/
static inline uint8_t mavlink_msg_gps2_rtk_get_rtk_receiver_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 30);
}
/**
* @brief Get field wn from gps2_rtk message
*
* @return GPS Week Number of last baseline
*/
static inline uint16_t mavlink_msg_gps2_rtk_get_wn(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 28);
}
/**
* @brief Get field tow from gps2_rtk message
*
* @return GPS Time of Week of last baseline
*/
static inline uint32_t mavlink_msg_gps2_rtk_get_tow(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 4);
}
/**
* @brief Get field rtk_health from gps2_rtk message
*
* @return GPS-specific health report for RTK data.
*/
static inline uint8_t mavlink_msg_gps2_rtk_get_rtk_health(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 31);
}
/**
* @brief Get field rtk_rate from gps2_rtk message
*
* @return Rate of baseline messages being received by GPS, in HZ
*/
static inline uint8_t mavlink_msg_gps2_rtk_get_rtk_rate(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 32);
}
/**
* @brief Get field nsats from gps2_rtk message
*
* @return Current number of sats used for RTK calculation.
*/
static inline uint8_t mavlink_msg_gps2_rtk_get_nsats(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 33);
}
/**
* @brief Get field baseline_coords_type from gps2_rtk message
*
* @return Coordinate system of baseline. 0 == ECEF, 1 == NED
*/
static inline uint8_t mavlink_msg_gps2_rtk_get_baseline_coords_type(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 34);
}
/**
* @brief Get field baseline_a_mm from gps2_rtk message
*
* @return Current baseline in ECEF x or NED north component in mm.
*/
static inline int32_t mavlink_msg_gps2_rtk_get_baseline_a_mm(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
/**
* @brief Get field baseline_b_mm from gps2_rtk message
*
* @return Current baseline in ECEF y or NED east component in mm.
*/
static inline int32_t mavlink_msg_gps2_rtk_get_baseline_b_mm(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 12);
}
/**
* @brief Get field baseline_c_mm from gps2_rtk message
*
* @return Current baseline in ECEF z or NED down component in mm.
*/
static inline int32_t mavlink_msg_gps2_rtk_get_baseline_c_mm(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 16);
}
/**
* @brief Get field accuracy from gps2_rtk message
*
* @return Current estimate of baseline accuracy.
*/
static inline uint32_t mavlink_msg_gps2_rtk_get_accuracy(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 20);
}
/**
* @brief Get field iar_num_hypotheses from gps2_rtk message
*
* @return Current number of integer ambiguity hypotheses.
*/
static inline int32_t mavlink_msg_gps2_rtk_get_iar_num_hypotheses(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 24);
}
/**
* @brief Decode a gps2_rtk message into a struct
*
* @param msg The message to decode
* @param gps2_rtk C-struct to decode the message contents into
*/
static inline void mavlink_msg_gps2_rtk_decode(const mavlink_message_t* msg, mavlink_gps2_rtk_t* gps2_rtk)
{
#if MAVLINK_NEED_BYTE_SWAP
gps2_rtk->time_last_baseline_ms = mavlink_msg_gps2_rtk_get_time_last_baseline_ms(msg);
gps2_rtk->tow = mavlink_msg_gps2_rtk_get_tow(msg);
gps2_rtk->baseline_a_mm = mavlink_msg_gps2_rtk_get_baseline_a_mm(msg);
gps2_rtk->baseline_b_mm = mavlink_msg_gps2_rtk_get_baseline_b_mm(msg);
gps2_rtk->baseline_c_mm = mavlink_msg_gps2_rtk_get_baseline_c_mm(msg);
gps2_rtk->accuracy = mavlink_msg_gps2_rtk_get_accuracy(msg);
gps2_rtk->iar_num_hypotheses = mavlink_msg_gps2_rtk_get_iar_num_hypotheses(msg);
gps2_rtk->wn = mavlink_msg_gps2_rtk_get_wn(msg);
gps2_rtk->rtk_receiver_id = mavlink_msg_gps2_rtk_get_rtk_receiver_id(msg);
gps2_rtk->rtk_health = mavlink_msg_gps2_rtk_get_rtk_health(msg);
gps2_rtk->rtk_rate = mavlink_msg_gps2_rtk_get_rtk_rate(msg);
gps2_rtk->nsats = mavlink_msg_gps2_rtk_get_nsats(msg);
gps2_rtk->baseline_coords_type = mavlink_msg_gps2_rtk_get_baseline_coords_type(msg);
#else
memcpy(gps2_rtk, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GPS2_RTK_LEN);
#endif
}

View File

@ -12,7 +12,7 @@ typedef struct __mavlink_gps_raw_int_t
uint16_t epv; ///< GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
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 fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK. 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;
@ -48,7 +48,7 @@ typedef struct __mavlink_gps_raw_int_t
* @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 fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK. 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 (WGS84), in degrees * 1E7
* @param lon Longitude (WGS84), in degrees * 1E7
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
@ -107,7 +107,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t c
* @param chan The MAVLink channel this message will be 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 fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK. 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 (WGS84), in degrees * 1E7
* @param lon Longitude (WGS84), in degrees * 1E7
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
@ -192,7 +192,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_encode_chan(uint8_t system_id, ui
* @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 fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK. 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 (WGS84), in degrees * 1E7
* @param lon Longitude (WGS84), in degrees * 1E7
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
@ -313,7 +313,7 @@ static inline uint64_t mavlink_msg_gps_raw_int_get_time_usec(const mavlink_messa
/**
* @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.
* @return 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK. 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)
{

View File

@ -0,0 +1,497 @@
// MESSAGE GPS_RTK PACKING
#define MAVLINK_MSG_ID_GPS_RTK 127
typedef struct __mavlink_gps_rtk_t
{
uint32_t time_last_baseline_ms; ///< Time since boot of last baseline message received in ms.
uint32_t tow; ///< GPS Time of Week of last baseline
int32_t baseline_a_mm; ///< Current baseline in ECEF x or NED north component in mm.
int32_t baseline_b_mm; ///< Current baseline in ECEF y or NED east component in mm.
int32_t baseline_c_mm; ///< Current baseline in ECEF z or NED down component in mm.
uint32_t accuracy; ///< Current estimate of baseline accuracy.
int32_t iar_num_hypotheses; ///< Current number of integer ambiguity hypotheses.
uint16_t wn; ///< GPS Week Number of last baseline
uint8_t rtk_receiver_id; ///< Identification of connected RTK receiver.
uint8_t rtk_health; ///< GPS-specific health report for RTK data.
uint8_t rtk_rate; ///< Rate of baseline messages being received by GPS, in HZ
uint8_t nsats; ///< Current number of sats used for RTK calculation.
uint8_t baseline_coords_type; ///< Coordinate system of baseline. 0 == ECEF, 1 == NED
} mavlink_gps_rtk_t;
#define MAVLINK_MSG_ID_GPS_RTK_LEN 35
#define MAVLINK_MSG_ID_127_LEN 35
#define MAVLINK_MSG_ID_GPS_RTK_CRC 25
#define MAVLINK_MSG_ID_127_CRC 25
#define MAVLINK_MESSAGE_INFO_GPS_RTK { \
"GPS_RTK", \
13, \
{ { "time_last_baseline_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gps_rtk_t, time_last_baseline_ms) }, \
{ "tow", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_gps_rtk_t, tow) }, \
{ "baseline_a_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_rtk_t, baseline_a_mm) }, \
{ "baseline_b_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps_rtk_t, baseline_b_mm) }, \
{ "baseline_c_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_gps_rtk_t, baseline_c_mm) }, \
{ "accuracy", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_gps_rtk_t, accuracy) }, \
{ "iar_num_hypotheses", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_gps_rtk_t, iar_num_hypotheses) }, \
{ "wn", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_gps_rtk_t, wn) }, \
{ "rtk_receiver_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_gps_rtk_t, rtk_receiver_id) }, \
{ "rtk_health", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_gps_rtk_t, rtk_health) }, \
{ "rtk_rate", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_gps_rtk_t, rtk_rate) }, \
{ "nsats", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_gps_rtk_t, nsats) }, \
{ "baseline_coords_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_gps_rtk_t, baseline_coords_type) }, \
} \
}
/**
* @brief Pack a gps_rtk 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_last_baseline_ms Time since boot of last baseline message received in ms.
* @param rtk_receiver_id Identification of connected RTK receiver.
* @param wn GPS Week Number of last baseline
* @param tow GPS Time of Week of last baseline
* @param rtk_health GPS-specific health report for RTK data.
* @param rtk_rate Rate of baseline messages being received by GPS, in HZ
* @param nsats Current number of sats used for RTK calculation.
* @param baseline_coords_type Coordinate system of baseline. 0 == ECEF, 1 == NED
* @param baseline_a_mm Current baseline in ECEF x or NED north component in mm.
* @param baseline_b_mm Current baseline in ECEF y or NED east component in mm.
* @param baseline_c_mm Current baseline in ECEF z or NED down component in mm.
* @param accuracy Current estimate of baseline accuracy.
* @param iar_num_hypotheses Current number of integer ambiguity hypotheses.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_rtk_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_last_baseline_ms, uint8_t rtk_receiver_id, uint16_t wn, uint32_t tow, uint8_t rtk_health, uint8_t rtk_rate, uint8_t nsats, uint8_t baseline_coords_type, int32_t baseline_a_mm, int32_t baseline_b_mm, int32_t baseline_c_mm, uint32_t accuracy, int32_t iar_num_hypotheses)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GPS_RTK_LEN];
_mav_put_uint32_t(buf, 0, time_last_baseline_ms);
_mav_put_uint32_t(buf, 4, tow);
_mav_put_int32_t(buf, 8, baseline_a_mm);
_mav_put_int32_t(buf, 12, baseline_b_mm);
_mav_put_int32_t(buf, 16, baseline_c_mm);
_mav_put_uint32_t(buf, 20, accuracy);
_mav_put_int32_t(buf, 24, iar_num_hypotheses);
_mav_put_uint16_t(buf, 28, wn);
_mav_put_uint8_t(buf, 30, rtk_receiver_id);
_mav_put_uint8_t(buf, 31, rtk_health);
_mav_put_uint8_t(buf, 32, rtk_rate);
_mav_put_uint8_t(buf, 33, nsats);
_mav_put_uint8_t(buf, 34, baseline_coords_type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_RTK_LEN);
#else
mavlink_gps_rtk_t packet;
packet.time_last_baseline_ms = time_last_baseline_ms;
packet.tow = tow;
packet.baseline_a_mm = baseline_a_mm;
packet.baseline_b_mm = baseline_b_mm;
packet.baseline_c_mm = baseline_c_mm;
packet.accuracy = accuracy;
packet.iar_num_hypotheses = iar_num_hypotheses;
packet.wn = wn;
packet.rtk_receiver_id = rtk_receiver_id;
packet.rtk_health = rtk_health;
packet.rtk_rate = rtk_rate;
packet.nsats = nsats;
packet.baseline_coords_type = baseline_coords_type;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_RTK_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_RTK;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS_RTK_LEN, MAVLINK_MSG_ID_GPS_RTK_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS_RTK_LEN);
#endif
}
/**
* @brief Pack a gps_rtk 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param time_last_baseline_ms Time since boot of last baseline message received in ms.
* @param rtk_receiver_id Identification of connected RTK receiver.
* @param wn GPS Week Number of last baseline
* @param tow GPS Time of Week of last baseline
* @param rtk_health GPS-specific health report for RTK data.
* @param rtk_rate Rate of baseline messages being received by GPS, in HZ
* @param nsats Current number of sats used for RTK calculation.
* @param baseline_coords_type Coordinate system of baseline. 0 == ECEF, 1 == NED
* @param baseline_a_mm Current baseline in ECEF x or NED north component in mm.
* @param baseline_b_mm Current baseline in ECEF y or NED east component in mm.
* @param baseline_c_mm Current baseline in ECEF z or NED down component in mm.
* @param accuracy Current estimate of baseline accuracy.
* @param iar_num_hypotheses Current number of integer ambiguity hypotheses.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_rtk_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_last_baseline_ms,uint8_t rtk_receiver_id,uint16_t wn,uint32_t tow,uint8_t rtk_health,uint8_t rtk_rate,uint8_t nsats,uint8_t baseline_coords_type,int32_t baseline_a_mm,int32_t baseline_b_mm,int32_t baseline_c_mm,uint32_t accuracy,int32_t iar_num_hypotheses)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GPS_RTK_LEN];
_mav_put_uint32_t(buf, 0, time_last_baseline_ms);
_mav_put_uint32_t(buf, 4, tow);
_mav_put_int32_t(buf, 8, baseline_a_mm);
_mav_put_int32_t(buf, 12, baseline_b_mm);
_mav_put_int32_t(buf, 16, baseline_c_mm);
_mav_put_uint32_t(buf, 20, accuracy);
_mav_put_int32_t(buf, 24, iar_num_hypotheses);
_mav_put_uint16_t(buf, 28, wn);
_mav_put_uint8_t(buf, 30, rtk_receiver_id);
_mav_put_uint8_t(buf, 31, rtk_health);
_mav_put_uint8_t(buf, 32, rtk_rate);
_mav_put_uint8_t(buf, 33, nsats);
_mav_put_uint8_t(buf, 34, baseline_coords_type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_RTK_LEN);
#else
mavlink_gps_rtk_t packet;
packet.time_last_baseline_ms = time_last_baseline_ms;
packet.tow = tow;
packet.baseline_a_mm = baseline_a_mm;
packet.baseline_b_mm = baseline_b_mm;
packet.baseline_c_mm = baseline_c_mm;
packet.accuracy = accuracy;
packet.iar_num_hypotheses = iar_num_hypotheses;
packet.wn = wn;
packet.rtk_receiver_id = rtk_receiver_id;
packet.rtk_health = rtk_health;
packet.rtk_rate = rtk_rate;
packet.nsats = nsats;
packet.baseline_coords_type = baseline_coords_type;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_RTK_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_RTK;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS_RTK_LEN, MAVLINK_MSG_ID_GPS_RTK_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS_RTK_LEN);
#endif
}
/**
* @brief Encode a gps_rtk struct
*
* @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_rtk C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gps_rtk_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps_rtk_t* gps_rtk)
{
return mavlink_msg_gps_rtk_pack(system_id, component_id, msg, gps_rtk->time_last_baseline_ms, gps_rtk->rtk_receiver_id, gps_rtk->wn, gps_rtk->tow, gps_rtk->rtk_health, gps_rtk->rtk_rate, gps_rtk->nsats, gps_rtk->baseline_coords_type, gps_rtk->baseline_a_mm, gps_rtk->baseline_b_mm, gps_rtk->baseline_c_mm, gps_rtk->accuracy, gps_rtk->iar_num_hypotheses);
}
/**
* @brief Encode a gps_rtk struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param gps_rtk C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gps_rtk_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gps_rtk_t* gps_rtk)
{
return mavlink_msg_gps_rtk_pack_chan(system_id, component_id, chan, msg, gps_rtk->time_last_baseline_ms, gps_rtk->rtk_receiver_id, gps_rtk->wn, gps_rtk->tow, gps_rtk->rtk_health, gps_rtk->rtk_rate, gps_rtk->nsats, gps_rtk->baseline_coords_type, gps_rtk->baseline_a_mm, gps_rtk->baseline_b_mm, gps_rtk->baseline_c_mm, gps_rtk->accuracy, gps_rtk->iar_num_hypotheses);
}
/**
* @brief Send a gps_rtk message
* @param chan MAVLink channel to send the message
*
* @param time_last_baseline_ms Time since boot of last baseline message received in ms.
* @param rtk_receiver_id Identification of connected RTK receiver.
* @param wn GPS Week Number of last baseline
* @param tow GPS Time of Week of last baseline
* @param rtk_health GPS-specific health report for RTK data.
* @param rtk_rate Rate of baseline messages being received by GPS, in HZ
* @param nsats Current number of sats used for RTK calculation.
* @param baseline_coords_type Coordinate system of baseline. 0 == ECEF, 1 == NED
* @param baseline_a_mm Current baseline in ECEF x or NED north component in mm.
* @param baseline_b_mm Current baseline in ECEF y or NED east component in mm.
* @param baseline_c_mm Current baseline in ECEF z or NED down component in mm.
* @param accuracy Current estimate of baseline accuracy.
* @param iar_num_hypotheses Current number of integer ambiguity hypotheses.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gps_rtk_send(mavlink_channel_t chan, uint32_t time_last_baseline_ms, uint8_t rtk_receiver_id, uint16_t wn, uint32_t tow, uint8_t rtk_health, uint8_t rtk_rate, uint8_t nsats, uint8_t baseline_coords_type, int32_t baseline_a_mm, int32_t baseline_b_mm, int32_t baseline_c_mm, uint32_t accuracy, int32_t iar_num_hypotheses)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GPS_RTK_LEN];
_mav_put_uint32_t(buf, 0, time_last_baseline_ms);
_mav_put_uint32_t(buf, 4, tow);
_mav_put_int32_t(buf, 8, baseline_a_mm);
_mav_put_int32_t(buf, 12, baseline_b_mm);
_mav_put_int32_t(buf, 16, baseline_c_mm);
_mav_put_uint32_t(buf, 20, accuracy);
_mav_put_int32_t(buf, 24, iar_num_hypotheses);
_mav_put_uint16_t(buf, 28, wn);
_mav_put_uint8_t(buf, 30, rtk_receiver_id);
_mav_put_uint8_t(buf, 31, rtk_health);
_mav_put_uint8_t(buf, 32, rtk_rate);
_mav_put_uint8_t(buf, 33, nsats);
_mav_put_uint8_t(buf, 34, baseline_coords_type);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RTK, buf, MAVLINK_MSG_ID_GPS_RTK_LEN, MAVLINK_MSG_ID_GPS_RTK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RTK, buf, MAVLINK_MSG_ID_GPS_RTK_LEN);
#endif
#else
mavlink_gps_rtk_t packet;
packet.time_last_baseline_ms = time_last_baseline_ms;
packet.tow = tow;
packet.baseline_a_mm = baseline_a_mm;
packet.baseline_b_mm = baseline_b_mm;
packet.baseline_c_mm = baseline_c_mm;
packet.accuracy = accuracy;
packet.iar_num_hypotheses = iar_num_hypotheses;
packet.wn = wn;
packet.rtk_receiver_id = rtk_receiver_id;
packet.rtk_health = rtk_health;
packet.rtk_rate = rtk_rate;
packet.nsats = nsats;
packet.baseline_coords_type = baseline_coords_type;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RTK, (const char *)&packet, MAVLINK_MSG_ID_GPS_RTK_LEN, MAVLINK_MSG_ID_GPS_RTK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RTK, (const char *)&packet, MAVLINK_MSG_ID_GPS_RTK_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GPS_RTK_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gps_rtk_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_last_baseline_ms, uint8_t rtk_receiver_id, uint16_t wn, uint32_t tow, uint8_t rtk_health, uint8_t rtk_rate, uint8_t nsats, uint8_t baseline_coords_type, int32_t baseline_a_mm, int32_t baseline_b_mm, int32_t baseline_c_mm, uint32_t accuracy, int32_t iar_num_hypotheses)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, time_last_baseline_ms);
_mav_put_uint32_t(buf, 4, tow);
_mav_put_int32_t(buf, 8, baseline_a_mm);
_mav_put_int32_t(buf, 12, baseline_b_mm);
_mav_put_int32_t(buf, 16, baseline_c_mm);
_mav_put_uint32_t(buf, 20, accuracy);
_mav_put_int32_t(buf, 24, iar_num_hypotheses);
_mav_put_uint16_t(buf, 28, wn);
_mav_put_uint8_t(buf, 30, rtk_receiver_id);
_mav_put_uint8_t(buf, 31, rtk_health);
_mav_put_uint8_t(buf, 32, rtk_rate);
_mav_put_uint8_t(buf, 33, nsats);
_mav_put_uint8_t(buf, 34, baseline_coords_type);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RTK, buf, MAVLINK_MSG_ID_GPS_RTK_LEN, MAVLINK_MSG_ID_GPS_RTK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RTK, buf, MAVLINK_MSG_ID_GPS_RTK_LEN);
#endif
#else
mavlink_gps_rtk_t *packet = (mavlink_gps_rtk_t *)msgbuf;
packet->time_last_baseline_ms = time_last_baseline_ms;
packet->tow = tow;
packet->baseline_a_mm = baseline_a_mm;
packet->baseline_b_mm = baseline_b_mm;
packet->baseline_c_mm = baseline_c_mm;
packet->accuracy = accuracy;
packet->iar_num_hypotheses = iar_num_hypotheses;
packet->wn = wn;
packet->rtk_receiver_id = rtk_receiver_id;
packet->rtk_health = rtk_health;
packet->rtk_rate = rtk_rate;
packet->nsats = nsats;
packet->baseline_coords_type = baseline_coords_type;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RTK, (const char *)packet, MAVLINK_MSG_ID_GPS_RTK_LEN, MAVLINK_MSG_ID_GPS_RTK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RTK, (const char *)packet, MAVLINK_MSG_ID_GPS_RTK_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GPS_RTK UNPACKING
/**
* @brief Get field time_last_baseline_ms from gps_rtk message
*
* @return Time since boot of last baseline message received in ms.
*/
static inline uint32_t mavlink_msg_gps_rtk_get_time_last_baseline_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field rtk_receiver_id from gps_rtk message
*
* @return Identification of connected RTK receiver.
*/
static inline uint8_t mavlink_msg_gps_rtk_get_rtk_receiver_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 30);
}
/**
* @brief Get field wn from gps_rtk message
*
* @return GPS Week Number of last baseline
*/
static inline uint16_t mavlink_msg_gps_rtk_get_wn(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 28);
}
/**
* @brief Get field tow from gps_rtk message
*
* @return GPS Time of Week of last baseline
*/
static inline uint32_t mavlink_msg_gps_rtk_get_tow(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 4);
}
/**
* @brief Get field rtk_health from gps_rtk message
*
* @return GPS-specific health report for RTK data.
*/
static inline uint8_t mavlink_msg_gps_rtk_get_rtk_health(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 31);
}
/**
* @brief Get field rtk_rate from gps_rtk message
*
* @return Rate of baseline messages being received by GPS, in HZ
*/
static inline uint8_t mavlink_msg_gps_rtk_get_rtk_rate(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 32);
}
/**
* @brief Get field nsats from gps_rtk message
*
* @return Current number of sats used for RTK calculation.
*/
static inline uint8_t mavlink_msg_gps_rtk_get_nsats(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 33);
}
/**
* @brief Get field baseline_coords_type from gps_rtk message
*
* @return Coordinate system of baseline. 0 == ECEF, 1 == NED
*/
static inline uint8_t mavlink_msg_gps_rtk_get_baseline_coords_type(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 34);
}
/**
* @brief Get field baseline_a_mm from gps_rtk message
*
* @return Current baseline in ECEF x or NED north component in mm.
*/
static inline int32_t mavlink_msg_gps_rtk_get_baseline_a_mm(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
/**
* @brief Get field baseline_b_mm from gps_rtk message
*
* @return Current baseline in ECEF y or NED east component in mm.
*/
static inline int32_t mavlink_msg_gps_rtk_get_baseline_b_mm(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 12);
}
/**
* @brief Get field baseline_c_mm from gps_rtk message
*
* @return Current baseline in ECEF z or NED down component in mm.
*/
static inline int32_t mavlink_msg_gps_rtk_get_baseline_c_mm(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 16);
}
/**
* @brief Get field accuracy from gps_rtk message
*
* @return Current estimate of baseline accuracy.
*/
static inline uint32_t mavlink_msg_gps_rtk_get_accuracy(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 20);
}
/**
* @brief Get field iar_num_hypotheses from gps_rtk message
*
* @return Current number of integer ambiguity hypotheses.
*/
static inline int32_t mavlink_msg_gps_rtk_get_iar_num_hypotheses(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 24);
}
/**
* @brief Decode a gps_rtk message into a struct
*
* @param msg The message to decode
* @param gps_rtk C-struct to decode the message contents into
*/
static inline void mavlink_msg_gps_rtk_decode(const mavlink_message_t* msg, mavlink_gps_rtk_t* gps_rtk)
{
#if MAVLINK_NEED_BYTE_SWAP
gps_rtk->time_last_baseline_ms = mavlink_msg_gps_rtk_get_time_last_baseline_ms(msg);
gps_rtk->tow = mavlink_msg_gps_rtk_get_tow(msg);
gps_rtk->baseline_a_mm = mavlink_msg_gps_rtk_get_baseline_a_mm(msg);
gps_rtk->baseline_b_mm = mavlink_msg_gps_rtk_get_baseline_b_mm(msg);
gps_rtk->baseline_c_mm = mavlink_msg_gps_rtk_get_baseline_c_mm(msg);
gps_rtk->accuracy = mavlink_msg_gps_rtk_get_accuracy(msg);
gps_rtk->iar_num_hypotheses = mavlink_msg_gps_rtk_get_iar_num_hypotheses(msg);
gps_rtk->wn = mavlink_msg_gps_rtk_get_wn(msg);
gps_rtk->rtk_receiver_id = mavlink_msg_gps_rtk_get_rtk_receiver_id(msg);
gps_rtk->rtk_health = mavlink_msg_gps_rtk_get_rtk_health(msg);
gps_rtk->rtk_rate = mavlink_msg_gps_rtk_get_rtk_rate(msg);
gps_rtk->nsats = mavlink_msg_gps_rtk_get_nsats(msg);
gps_rtk->baseline_coords_type = mavlink_msg_gps_rtk_get_baseline_coords_type(msg);
#else
memcpy(gps_rtk, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GPS_RTK_LEN);
#endif
}

View File

@ -11,10 +11,10 @@ typedef struct __mavlink_local_ned_position_setpoint_external_t
float vx; ///< X velocity in NED frame in meter / s
float vy; ///< Y velocity in NED frame in meter / s
float vz; ///< Z velocity in NED frame in meter / s
float ax; ///< X acceleration in NED frame in meter / s^2
float ay; ///< Y acceleration in NED frame in meter / s^2
float az; ///< Z acceleration in NED frame in meter / s^2
uint16_t ignore_mask; ///< Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates it should follow the commanded attitude and rate and none of the setpoint dimensions should be ignored. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az
float afx; ///< X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
float afy; ///< Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
float afz; ///< Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
uint16_t type_mask; ///< Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
uint8_t coordinate_frame; ///< Valid options are: MAV_FRAME_LOCAL_NED, MAV_FRAME_LOCAL_OFFSET_NED = 5, MAV_FRAME_BODY_NED = 6, MAV_FRAME_BODY_OFFSET_NED = 7
@ -23,8 +23,8 @@ typedef struct __mavlink_local_ned_position_setpoint_external_t
#define MAVLINK_MSG_ID_LOCAL_NED_POSITION_SETPOINT_EXTERNAL_LEN 45
#define MAVLINK_MSG_ID_83_LEN 45
#define MAVLINK_MSG_ID_LOCAL_NED_POSITION_SETPOINT_EXTERNAL_CRC 121
#define MAVLINK_MSG_ID_83_CRC 121
#define MAVLINK_MSG_ID_LOCAL_NED_POSITION_SETPOINT_EXTERNAL_CRC 211
#define MAVLINK_MSG_ID_83_CRC 211
@ -38,10 +38,10 @@ typedef struct __mavlink_local_ned_position_setpoint_external_t
{ "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_local_ned_position_setpoint_external_t, vx) }, \
{ "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_local_ned_position_setpoint_external_t, vy) }, \
{ "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_local_ned_position_setpoint_external_t, vz) }, \
{ "ax", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_local_ned_position_setpoint_external_t, ax) }, \
{ "ay", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_local_ned_position_setpoint_external_t, ay) }, \
{ "az", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_local_ned_position_setpoint_external_t, az) }, \
{ "ignore_mask", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_local_ned_position_setpoint_external_t, ignore_mask) }, \
{ "afx", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_local_ned_position_setpoint_external_t, afx) }, \
{ "afy", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_local_ned_position_setpoint_external_t, afy) }, \
{ "afz", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_local_ned_position_setpoint_external_t, afz) }, \
{ "type_mask", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_local_ned_position_setpoint_external_t, type_mask) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_local_ned_position_setpoint_external_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_local_ned_position_setpoint_external_t, target_component) }, \
{ "coordinate_frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_local_ned_position_setpoint_external_t, coordinate_frame) }, \
@ -59,20 +59,20 @@ typedef struct __mavlink_local_ned_position_setpoint_external_t
* @param target_system System ID
* @param target_component Component ID
* @param coordinate_frame Valid options are: MAV_FRAME_LOCAL_NED, MAV_FRAME_LOCAL_OFFSET_NED = 5, MAV_FRAME_BODY_NED = 6, MAV_FRAME_BODY_OFFSET_NED = 7
* @param ignore_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates it should follow the commanded attitude and rate and none of the setpoint dimensions should be ignored. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az
* @param type_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint
* @param x X Position in NED frame in meters
* @param y Y Position in NED frame in meters
* @param z Z Position in NED frame in meters (note, altitude is negative in NED)
* @param vx X velocity in NED frame in meter / s
* @param vy Y velocity in NED frame in meter / s
* @param vz Z velocity in NED frame in meter / s
* @param ax X acceleration in NED frame in meter / s^2
* @param ay Y acceleration in NED frame in meter / s^2
* @param az Z acceleration in NED frame in meter / s^2
* @param afx X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @param afy Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @param afz Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t coordinate_frame, uint16_t ignore_mask, float x, float y, float z, float vx, float vy, float vz, float ax, float ay, float az)
uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t coordinate_frame, uint16_t type_mask, float x, float y, float z, float vx, float vy, float vz, float afx, float afy, float afz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_LOCAL_NED_POSITION_SETPOINT_EXTERNAL_LEN];
@ -83,10 +83,10 @@ static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_pack(uin
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
_mav_put_float(buf, 28, ax);
_mav_put_float(buf, 32, ay);
_mav_put_float(buf, 36, az);
_mav_put_uint16_t(buf, 40, ignore_mask);
_mav_put_float(buf, 28, afx);
_mav_put_float(buf, 32, afy);
_mav_put_float(buf, 36, afz);
_mav_put_uint16_t(buf, 40, type_mask);
_mav_put_uint8_t(buf, 42, target_system);
_mav_put_uint8_t(buf, 43, target_component);
_mav_put_uint8_t(buf, 44, coordinate_frame);
@ -101,10 +101,10 @@ static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_pack(uin
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.ax = ax;
packet.ay = ay;
packet.az = az;
packet.ignore_mask = ignore_mask;
packet.afx = afx;
packet.afy = afy;
packet.afz = afz;
packet.type_mask = type_mask;
packet.target_system = target_system;
packet.target_component = target_component;
packet.coordinate_frame = coordinate_frame;
@ -130,21 +130,21 @@ static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_pack(uin
* @param target_system System ID
* @param target_component Component ID
* @param coordinate_frame Valid options are: MAV_FRAME_LOCAL_NED, MAV_FRAME_LOCAL_OFFSET_NED = 5, MAV_FRAME_BODY_NED = 6, MAV_FRAME_BODY_OFFSET_NED = 7
* @param ignore_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates it should follow the commanded attitude and rate and none of the setpoint dimensions should be ignored. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az
* @param type_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint
* @param x X Position in NED frame in meters
* @param y Y Position in NED frame in meters
* @param z Z Position in NED frame in meters (note, altitude is negative in NED)
* @param vx X velocity in NED frame in meter / s
* @param vy Y velocity in NED frame in meter / s
* @param vz Z velocity in NED frame in meter / s
* @param ax X acceleration in NED frame in meter / s^2
* @param ay Y acceleration in NED frame in meter / s^2
* @param az Z acceleration in NED frame in meter / s^2
* @param afx X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @param afy Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @param afz Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,uint8_t target_system,uint8_t target_component,uint8_t coordinate_frame,uint16_t ignore_mask,float x,float y,float z,float vx,float vy,float vz,float ax,float ay,float az)
uint32_t time_boot_ms,uint8_t target_system,uint8_t target_component,uint8_t coordinate_frame,uint16_t type_mask,float x,float y,float z,float vx,float vy,float vz,float afx,float afy,float afz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_LOCAL_NED_POSITION_SETPOINT_EXTERNAL_LEN];
@ -155,10 +155,10 @@ static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_pack_cha
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
_mav_put_float(buf, 28, ax);
_mav_put_float(buf, 32, ay);
_mav_put_float(buf, 36, az);
_mav_put_uint16_t(buf, 40, ignore_mask);
_mav_put_float(buf, 28, afx);
_mav_put_float(buf, 32, afy);
_mav_put_float(buf, 36, afz);
_mav_put_uint16_t(buf, 40, type_mask);
_mav_put_uint8_t(buf, 42, target_system);
_mav_put_uint8_t(buf, 43, target_component);
_mav_put_uint8_t(buf, 44, coordinate_frame);
@ -173,10 +173,10 @@ static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_pack_cha
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.ax = ax;
packet.ay = ay;
packet.az = az;
packet.ignore_mask = ignore_mask;
packet.afx = afx;
packet.afy = afy;
packet.afz = afz;
packet.type_mask = type_mask;
packet.target_system = target_system;
packet.target_component = target_component;
packet.coordinate_frame = coordinate_frame;
@ -202,7 +202,7 @@ static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_pack_cha
*/
static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_local_ned_position_setpoint_external_t* local_ned_position_setpoint_external)
{
return mavlink_msg_local_ned_position_setpoint_external_pack(system_id, component_id, msg, local_ned_position_setpoint_external->time_boot_ms, local_ned_position_setpoint_external->target_system, local_ned_position_setpoint_external->target_component, local_ned_position_setpoint_external->coordinate_frame, local_ned_position_setpoint_external->ignore_mask, local_ned_position_setpoint_external->x, local_ned_position_setpoint_external->y, local_ned_position_setpoint_external->z, local_ned_position_setpoint_external->vx, local_ned_position_setpoint_external->vy, local_ned_position_setpoint_external->vz, local_ned_position_setpoint_external->ax, local_ned_position_setpoint_external->ay, local_ned_position_setpoint_external->az);
return mavlink_msg_local_ned_position_setpoint_external_pack(system_id, component_id, msg, local_ned_position_setpoint_external->time_boot_ms, local_ned_position_setpoint_external->target_system, local_ned_position_setpoint_external->target_component, local_ned_position_setpoint_external->coordinate_frame, local_ned_position_setpoint_external->type_mask, local_ned_position_setpoint_external->x, local_ned_position_setpoint_external->y, local_ned_position_setpoint_external->z, local_ned_position_setpoint_external->vx, local_ned_position_setpoint_external->vy, local_ned_position_setpoint_external->vz, local_ned_position_setpoint_external->afx, local_ned_position_setpoint_external->afy, local_ned_position_setpoint_external->afz);
}
/**
@ -216,7 +216,7 @@ static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_encode(u
*/
static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_local_ned_position_setpoint_external_t* local_ned_position_setpoint_external)
{
return mavlink_msg_local_ned_position_setpoint_external_pack_chan(system_id, component_id, chan, msg, local_ned_position_setpoint_external->time_boot_ms, local_ned_position_setpoint_external->target_system, local_ned_position_setpoint_external->target_component, local_ned_position_setpoint_external->coordinate_frame, local_ned_position_setpoint_external->ignore_mask, local_ned_position_setpoint_external->x, local_ned_position_setpoint_external->y, local_ned_position_setpoint_external->z, local_ned_position_setpoint_external->vx, local_ned_position_setpoint_external->vy, local_ned_position_setpoint_external->vz, local_ned_position_setpoint_external->ax, local_ned_position_setpoint_external->ay, local_ned_position_setpoint_external->az);
return mavlink_msg_local_ned_position_setpoint_external_pack_chan(system_id, component_id, chan, msg, local_ned_position_setpoint_external->time_boot_ms, local_ned_position_setpoint_external->target_system, local_ned_position_setpoint_external->target_component, local_ned_position_setpoint_external->coordinate_frame, local_ned_position_setpoint_external->type_mask, local_ned_position_setpoint_external->x, local_ned_position_setpoint_external->y, local_ned_position_setpoint_external->z, local_ned_position_setpoint_external->vx, local_ned_position_setpoint_external->vy, local_ned_position_setpoint_external->vz, local_ned_position_setpoint_external->afx, local_ned_position_setpoint_external->afy, local_ned_position_setpoint_external->afz);
}
/**
@ -227,20 +227,20 @@ static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_encode_c
* @param target_system System ID
* @param target_component Component ID
* @param coordinate_frame Valid options are: MAV_FRAME_LOCAL_NED, MAV_FRAME_LOCAL_OFFSET_NED = 5, MAV_FRAME_BODY_NED = 6, MAV_FRAME_BODY_OFFSET_NED = 7
* @param ignore_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates it should follow the commanded attitude and rate and none of the setpoint dimensions should be ignored. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az
* @param type_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint
* @param x X Position in NED frame in meters
* @param y Y Position in NED frame in meters
* @param z Z Position in NED frame in meters (note, altitude is negative in NED)
* @param vx X velocity in NED frame in meter / s
* @param vy Y velocity in NED frame in meter / s
* @param vz Z velocity in NED frame in meter / s
* @param ax X acceleration in NED frame in meter / s^2
* @param ay Y acceleration in NED frame in meter / s^2
* @param az Z acceleration in NED frame in meter / s^2
* @param afx X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @param afy Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
* @param afz Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_local_ned_position_setpoint_external_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t coordinate_frame, uint16_t ignore_mask, float x, float y, float z, float vx, float vy, float vz, float ax, float ay, float az)
static inline void mavlink_msg_local_ned_position_setpoint_external_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t coordinate_frame, uint16_t type_mask, float x, float y, float z, float vx, float vy, float vz, float afx, float afy, float afz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_LOCAL_NED_POSITION_SETPOINT_EXTERNAL_LEN];
@ -251,10 +251,10 @@ static inline void mavlink_msg_local_ned_position_setpoint_external_send(mavlink
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
_mav_put_float(buf, 28, ax);
_mav_put_float(buf, 32, ay);
_mav_put_float(buf, 36, az);
_mav_put_uint16_t(buf, 40, ignore_mask);
_mav_put_float(buf, 28, afx);
_mav_put_float(buf, 32, afy);
_mav_put_float(buf, 36, afz);
_mav_put_uint16_t(buf, 40, type_mask);
_mav_put_uint8_t(buf, 42, target_system);
_mav_put_uint8_t(buf, 43, target_component);
_mav_put_uint8_t(buf, 44, coordinate_frame);
@ -273,10 +273,10 @@ static inline void mavlink_msg_local_ned_position_setpoint_external_send(mavlink
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.ax = ax;
packet.ay = ay;
packet.az = az;
packet.ignore_mask = ignore_mask;
packet.afx = afx;
packet.afy = afy;
packet.afz = afz;
packet.type_mask = type_mask;
packet.target_system = target_system;
packet.target_component = target_component;
packet.coordinate_frame = coordinate_frame;
@ -297,7 +297,7 @@ static inline void mavlink_msg_local_ned_position_setpoint_external_send(mavlink
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_local_ned_position_setpoint_external_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t coordinate_frame, uint16_t ignore_mask, float x, float y, float z, float vx, float vy, float vz, float ax, float ay, float az)
static inline void mavlink_msg_local_ned_position_setpoint_external_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t coordinate_frame, uint16_t type_mask, float x, float y, float z, float vx, float vy, float vz, float afx, float afy, float afz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
@ -308,10 +308,10 @@ static inline void mavlink_msg_local_ned_position_setpoint_external_send_buf(mav
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
_mav_put_float(buf, 28, ax);
_mav_put_float(buf, 32, ay);
_mav_put_float(buf, 36, az);
_mav_put_uint16_t(buf, 40, ignore_mask);
_mav_put_float(buf, 28, afx);
_mav_put_float(buf, 32, afy);
_mav_put_float(buf, 36, afz);
_mav_put_uint16_t(buf, 40, type_mask);
_mav_put_uint8_t(buf, 42, target_system);
_mav_put_uint8_t(buf, 43, target_component);
_mav_put_uint8_t(buf, 44, coordinate_frame);
@ -330,10 +330,10 @@ static inline void mavlink_msg_local_ned_position_setpoint_external_send_buf(mav
packet->vx = vx;
packet->vy = vy;
packet->vz = vz;
packet->ax = ax;
packet->ay = ay;
packet->az = az;
packet->ignore_mask = ignore_mask;
packet->afx = afx;
packet->afy = afy;
packet->afz = afz;
packet->type_mask = type_mask;
packet->target_system = target_system;
packet->target_component = target_component;
packet->coordinate_frame = coordinate_frame;
@ -393,11 +393,11 @@ static inline uint8_t mavlink_msg_local_ned_position_setpoint_external_get_coord
}
/**
* @brief Get field ignore_mask from local_ned_position_setpoint_external message
* @brief Get field type_mask from local_ned_position_setpoint_external message
*
* @return Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates it should follow the commanded attitude and rate and none of the setpoint dimensions should be ignored. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az
* @return Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint
*/
static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_get_ignore_mask(const mavlink_message_t* msg)
static inline uint16_t mavlink_msg_local_ned_position_setpoint_external_get_type_mask(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 40);
}
@ -463,31 +463,31 @@ static inline float mavlink_msg_local_ned_position_setpoint_external_get_vz(cons
}
/**
* @brief Get field ax from local_ned_position_setpoint_external message
* @brief Get field afx from local_ned_position_setpoint_external message
*
* @return X acceleration in NED frame in meter / s^2
* @return X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
*/
static inline float mavlink_msg_local_ned_position_setpoint_external_get_ax(const mavlink_message_t* msg)
static inline float mavlink_msg_local_ned_position_setpoint_external_get_afx(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 28);
}
/**
* @brief Get field ay from local_ned_position_setpoint_external message
* @brief Get field afy from local_ned_position_setpoint_external message
*
* @return Y acceleration in NED frame in meter / s^2
* @return Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
*/
static inline float mavlink_msg_local_ned_position_setpoint_external_get_ay(const mavlink_message_t* msg)
static inline float mavlink_msg_local_ned_position_setpoint_external_get_afy(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 32);
}
/**
* @brief Get field az from local_ned_position_setpoint_external message
* @brief Get field afz from local_ned_position_setpoint_external message
*
* @return Z acceleration in NED frame in meter / s^2
* @return Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
*/
static inline float mavlink_msg_local_ned_position_setpoint_external_get_az(const mavlink_message_t* msg)
static inline float mavlink_msg_local_ned_position_setpoint_external_get_afz(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 36);
}
@ -508,10 +508,10 @@ static inline void mavlink_msg_local_ned_position_setpoint_external_decode(const
local_ned_position_setpoint_external->vx = mavlink_msg_local_ned_position_setpoint_external_get_vx(msg);
local_ned_position_setpoint_external->vy = mavlink_msg_local_ned_position_setpoint_external_get_vy(msg);
local_ned_position_setpoint_external->vz = mavlink_msg_local_ned_position_setpoint_external_get_vz(msg);
local_ned_position_setpoint_external->ax = mavlink_msg_local_ned_position_setpoint_external_get_ax(msg);
local_ned_position_setpoint_external->ay = mavlink_msg_local_ned_position_setpoint_external_get_ay(msg);
local_ned_position_setpoint_external->az = mavlink_msg_local_ned_position_setpoint_external_get_az(msg);
local_ned_position_setpoint_external->ignore_mask = mavlink_msg_local_ned_position_setpoint_external_get_ignore_mask(msg);
local_ned_position_setpoint_external->afx = mavlink_msg_local_ned_position_setpoint_external_get_afx(msg);
local_ned_position_setpoint_external->afy = mavlink_msg_local_ned_position_setpoint_external_get_afy(msg);
local_ned_position_setpoint_external->afz = mavlink_msg_local_ned_position_setpoint_external_get_afz(msg);
local_ned_position_setpoint_external->type_mask = mavlink_msg_local_ned_position_setpoint_external_get_type_mask(msg);
local_ned_position_setpoint_external->target_system = mavlink_msg_local_ned_position_setpoint_external_get_target_system(msg);
local_ned_position_setpoint_external->target_component = mavlink_msg_local_ned_position_setpoint_external_get_target_component(msg);
local_ned_position_setpoint_external->coordinate_frame = mavlink_msg_local_ned_position_setpoint_external_get_coordinate_frame(msg);

View File

@ -3456,10 +3456,10 @@ static void mavlink_test_local_ned_position_setpoint_external(uint8_t system_id,
packet1.vx = packet_in.vx;
packet1.vy = packet_in.vy;
packet1.vz = packet_in.vz;
packet1.ax = packet_in.ax;
packet1.ay = packet_in.ay;
packet1.az = packet_in.az;
packet1.ignore_mask = packet_in.ignore_mask;
packet1.afx = packet_in.afx;
packet1.afy = packet_in.afy;
packet1.afz = packet_in.afz;
packet1.type_mask = packet_in.type_mask;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.coordinate_frame = packet_in.coordinate_frame;
@ -3472,12 +3472,12 @@ static void mavlink_test_local_ned_position_setpoint_external(uint8_t system_id,
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_ned_position_setpoint_external_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.ignore_mask , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.ax , packet1.ay , packet1.az );
mavlink_msg_local_ned_position_setpoint_external_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.type_mask , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz );
mavlink_msg_local_ned_position_setpoint_external_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_ned_position_setpoint_external_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.ignore_mask , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.ax , packet1.ay , packet1.az );
mavlink_msg_local_ned_position_setpoint_external_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.type_mask , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz );
mavlink_msg_local_ned_position_setpoint_external_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
@ -3490,7 +3490,7 @@ static void mavlink_test_local_ned_position_setpoint_external(uint8_t system_id,
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_ned_position_setpoint_external_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.ignore_mask , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.ax , packet1.ay , packet1.az );
mavlink_msg_local_ned_position_setpoint_external_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.type_mask , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz );
mavlink_msg_local_ned_position_setpoint_external_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
@ -3524,10 +3524,10 @@ static void mavlink_test_global_position_setpoint_external_int(uint8_t system_id
packet1.vx = packet_in.vx;
packet1.vy = packet_in.vy;
packet1.vz = packet_in.vz;
packet1.ax = packet_in.ax;
packet1.ay = packet_in.ay;
packet1.az = packet_in.az;
packet1.ignore_mask = packet_in.ignore_mask;
packet1.afx = packet_in.afx;
packet1.afy = packet_in.afy;
packet1.afz = packet_in.afz;
packet1.type_mask = packet_in.type_mask;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
@ -3539,12 +3539,12 @@ static void mavlink_test_global_position_setpoint_external_int(uint8_t system_id
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_position_setpoint_external_int_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.ignore_mask , packet1.lat_int , packet1.lon_int , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.ax , packet1.ay , packet1.az );
mavlink_msg_global_position_setpoint_external_int_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.type_mask , packet1.lat_int , packet1.lon_int , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz );
mavlink_msg_global_position_setpoint_external_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_position_setpoint_external_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.ignore_mask , packet1.lat_int , packet1.lon_int , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.ax , packet1.ay , packet1.az );
mavlink_msg_global_position_setpoint_external_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.type_mask , packet1.lat_int , packet1.lon_int , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz );
mavlink_msg_global_position_setpoint_external_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
@ -3557,7 +3557,7 @@ static void mavlink_test_global_position_setpoint_external_int(uint8_t system_id
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_position_setpoint_external_int_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.ignore_mask , packet1.lat_int , packet1.lon_int , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.ax , packet1.ay , packet1.az );
mavlink_msg_global_position_setpoint_external_int_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.type_mask , packet1.lat_int , packet1.lon_int , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz );
mavlink_msg_global_position_setpoint_external_int_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
@ -5331,6 +5331,140 @@ static void mavlink_test_serial_control(uint8_t system_id, uint8_t component_id,
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gps_rtk(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gps_rtk_t packet_in = {
963497464,
}963497672,
}963497880,
}963498088,
}963498296,
}963498504,
}963498712,
}18691,
}223,
}34,
}101,
}168,
}235,
};
mavlink_gps_rtk_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_last_baseline_ms = packet_in.time_last_baseline_ms;
packet1.tow = packet_in.tow;
packet1.baseline_a_mm = packet_in.baseline_a_mm;
packet1.baseline_b_mm = packet_in.baseline_b_mm;
packet1.baseline_c_mm = packet_in.baseline_c_mm;
packet1.accuracy = packet_in.accuracy;
packet1.iar_num_hypotheses = packet_in.iar_num_hypotheses;
packet1.wn = packet_in.wn;
packet1.rtk_receiver_id = packet_in.rtk_receiver_id;
packet1.rtk_health = packet_in.rtk_health;
packet1.rtk_rate = packet_in.rtk_rate;
packet1.nsats = packet_in.nsats;
packet1.baseline_coords_type = packet_in.baseline_coords_type;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_rtk_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gps_rtk_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_rtk_pack(system_id, component_id, &msg , packet1.time_last_baseline_ms , packet1.rtk_receiver_id , packet1.wn , packet1.tow , packet1.rtk_health , packet1.rtk_rate , packet1.nsats , packet1.baseline_coords_type , packet1.baseline_a_mm , packet1.baseline_b_mm , packet1.baseline_c_mm , packet1.accuracy , packet1.iar_num_hypotheses );
mavlink_msg_gps_rtk_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_rtk_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_last_baseline_ms , packet1.rtk_receiver_id , packet1.wn , packet1.tow , packet1.rtk_health , packet1.rtk_rate , packet1.nsats , packet1.baseline_coords_type , packet1.baseline_a_mm , packet1.baseline_b_mm , packet1.baseline_c_mm , packet1.accuracy , packet1.iar_num_hypotheses );
mavlink_msg_gps_rtk_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gps_rtk_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_rtk_send(MAVLINK_COMM_1 , packet1.time_last_baseline_ms , packet1.rtk_receiver_id , packet1.wn , packet1.tow , packet1.rtk_health , packet1.rtk_rate , packet1.nsats , packet1.baseline_coords_type , packet1.baseline_a_mm , packet1.baseline_b_mm , packet1.baseline_c_mm , packet1.accuracy , packet1.iar_num_hypotheses );
mavlink_msg_gps_rtk_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gps2_rtk(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gps2_rtk_t packet_in = {
963497464,
}963497672,
}963497880,
}963498088,
}963498296,
}963498504,
}963498712,
}18691,
}223,
}34,
}101,
}168,
}235,
};
mavlink_gps2_rtk_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_last_baseline_ms = packet_in.time_last_baseline_ms;
packet1.tow = packet_in.tow;
packet1.baseline_a_mm = packet_in.baseline_a_mm;
packet1.baseline_b_mm = packet_in.baseline_b_mm;
packet1.baseline_c_mm = packet_in.baseline_c_mm;
packet1.accuracy = packet_in.accuracy;
packet1.iar_num_hypotheses = packet_in.iar_num_hypotheses;
packet1.wn = packet_in.wn;
packet1.rtk_receiver_id = packet_in.rtk_receiver_id;
packet1.rtk_health = packet_in.rtk_health;
packet1.rtk_rate = packet_in.rtk_rate;
packet1.nsats = packet_in.nsats;
packet1.baseline_coords_type = packet_in.baseline_coords_type;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps2_rtk_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gps2_rtk_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps2_rtk_pack(system_id, component_id, &msg , packet1.time_last_baseline_ms , packet1.rtk_receiver_id , packet1.wn , packet1.tow , packet1.rtk_health , packet1.rtk_rate , packet1.nsats , packet1.baseline_coords_type , packet1.baseline_a_mm , packet1.baseline_b_mm , packet1.baseline_c_mm , packet1.accuracy , packet1.iar_num_hypotheses );
mavlink_msg_gps2_rtk_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps2_rtk_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_last_baseline_ms , packet1.rtk_receiver_id , packet1.wn , packet1.tow , packet1.rtk_health , packet1.rtk_rate , packet1.nsats , packet1.baseline_coords_type , packet1.baseline_a_mm , packet1.baseline_b_mm , packet1.baseline_c_mm , packet1.accuracy , packet1.iar_num_hypotheses );
mavlink_msg_gps2_rtk_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gps2_rtk_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps2_rtk_send(MAVLINK_COMM_1 , packet1.time_last_baseline_ms , packet1.rtk_receiver_id , packet1.wn , packet1.tow , packet1.rtk_health , packet1.rtk_rate , packet1.nsats , packet1.baseline_coords_type , packet1.baseline_a_mm , packet1.baseline_b_mm , packet1.baseline_c_mm , packet1.accuracy , packet1.iar_num_hypotheses );
mavlink_msg_gps2_rtk_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_data_transmission_handshake(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
@ -6050,6 +6184,8 @@ static void mavlink_test_common(uint8_t system_id, uint8_t component_id, mavlink
mavlink_test_gps2_raw(system_id, component_id, last_msg);
mavlink_test_power_status(system_id, component_id, last_msg);
mavlink_test_serial_control(system_id, component_id, last_msg);
mavlink_test_gps_rtk(system_id, component_id, last_msg);
mavlink_test_gps2_rtk(system_id, component_id, last_msg);
mavlink_test_data_transmission_handshake(system_id, component_id, last_msg);
mavlink_test_encapsulated_data(system_id, component_id, last_msg);
mavlink_test_distance_sensor(system_id, component_id, last_msg);

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Jun 23 10:14:06 2014"
#define MAVLINK_BUILD_DATE "Wed Jul 2 15:37:14 2014"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Jun 23 10:13:29 2014"
#define MAVLINK_BUILD_DATE "Wed Jul 2 15:36:38 2014"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Jun 23 10:13:53 2014"
#define MAVLINK_BUILD_DATE "Wed Jul 2 15:36:54 2014"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Jun 23 10:13:41 2014"
#define MAVLINK_BUILD_DATE "Wed Jul 2 15:37:03 2014"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255