Commit ecd3c754 authored by PX4BuildBot's avatar PX4BuildBot

autogenerated headers for rev...

autogenerated headers for rev https://github.com/mavlink/mavlink/tree/6a0f0a0cd0e8a0dc594b8abafd952b37979bd1d6
parent 8eb54fe8
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H #ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H #define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Thu Jun 15 2017" #define MAVLINK_BUILD_DATE "Fri Jun 16 2017"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H #ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H #define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Thu Jun 15 2017" #define MAVLINK_BUILD_DATE "Fri Jun 16 2017"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H #ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H #define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Thu Jun 15 2017" #define MAVLINK_BUILD_DATE "Fri Jun 16 2017"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
...@@ -8,11 +8,12 @@ typedef struct __mavlink_gps_global_origin_t { ...@@ -8,11 +8,12 @@ typedef struct __mavlink_gps_global_origin_t {
int32_t latitude; /*< Latitude (WGS84), in degrees * 1E7*/ int32_t latitude; /*< Latitude (WGS84), in degrees * 1E7*/
int32_t longitude; /*< Longitude (WGS84), in degrees * 1E7*/ int32_t longitude; /*< Longitude (WGS84), in degrees * 1E7*/
int32_t altitude; /*< Altitude (AMSL), in meters * 1000 (positive for up)*/ int32_t altitude; /*< Altitude (AMSL), in meters * 1000 (positive for up)*/
uint64_t time_usec; /*< Timestamp (microseconds since UNIX epoch or microseconds since system boot)*/
}) mavlink_gps_global_origin_t; }) mavlink_gps_global_origin_t;
#define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN 12 #define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN 20
#define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_MIN_LEN 12 #define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_MIN_LEN 12
#define MAVLINK_MSG_ID_49_LEN 12 #define MAVLINK_MSG_ID_49_LEN 20
#define MAVLINK_MSG_ID_49_MIN_LEN 12 #define MAVLINK_MSG_ID_49_MIN_LEN 12
#define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC 39 #define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC 39
...@@ -24,19 +25,21 @@ typedef struct __mavlink_gps_global_origin_t { ...@@ -24,19 +25,21 @@ typedef struct __mavlink_gps_global_origin_t {
#define MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN { \ #define MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN { \
49, \ 49, \
"GPS_GLOBAL_ORIGIN", \ "GPS_GLOBAL_ORIGIN", \
3, \ 4, \
{ { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_gps_global_origin_t, latitude) }, \ { { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_gps_global_origin_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_gps_global_origin_t, longitude) }, \ { "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_gps_global_origin_t, longitude) }, \
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_global_origin_t, altitude) }, \ { "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_global_origin_t, altitude) }, \
{ "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 12, offsetof(mavlink_gps_global_origin_t, time_usec) }, \
} \ } \
} }
#else #else
#define MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN { \ #define MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN { \
"GPS_GLOBAL_ORIGIN", \ "GPS_GLOBAL_ORIGIN", \
3, \ 4, \
{ { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_gps_global_origin_t, latitude) }, \ { { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_gps_global_origin_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_gps_global_origin_t, longitude) }, \ { "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_gps_global_origin_t, longitude) }, \
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_global_origin_t, altitude) }, \ { "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_global_origin_t, altitude) }, \
{ "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 12, offsetof(mavlink_gps_global_origin_t, time_usec) }, \
} \ } \
} }
#endif #endif
...@@ -50,16 +53,18 @@ typedef struct __mavlink_gps_global_origin_t { ...@@ -50,16 +53,18 @@ typedef struct __mavlink_gps_global_origin_t {
* @param latitude Latitude (WGS84), in degrees * 1E7 * @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84), in degrees * 1E7 * @param longitude Longitude (WGS84), in degrees * 1E7
* @param altitude Altitude (AMSL), in meters * 1000 (positive for up) * @param altitude Altitude (AMSL), in meters * 1000 (positive for up)
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @return length of the message in bytes (excluding serial stream start sign) * @return length of the message in bytes (excluding serial stream start sign)
*/ */
static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
int32_t latitude, int32_t longitude, int32_t altitude) int32_t latitude, int32_t longitude, int32_t altitude, uint64_t time_usec)
{ {
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN]; char buf[MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN];
_mav_put_int32_t(buf, 0, latitude); _mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude); _mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude); _mav_put_int32_t(buf, 8, altitude);
_mav_put_uint64_t(buf, 12, time_usec);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#else #else
...@@ -67,6 +72,7 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uin ...@@ -67,6 +72,7 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uin
packet.latitude = latitude; packet.latitude = latitude;
packet.longitude = longitude; packet.longitude = longitude;
packet.altitude = altitude; packet.altitude = altitude;
packet.time_usec = time_usec;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#endif #endif
...@@ -84,17 +90,19 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uin ...@@ -84,17 +90,19 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uin
* @param latitude Latitude (WGS84), in degrees * 1E7 * @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84), in degrees * 1E7 * @param longitude Longitude (WGS84), in degrees * 1E7
* @param altitude Altitude (AMSL), in meters * 1000 (positive for up) * @param altitude Altitude (AMSL), in meters * 1000 (positive for up)
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @return length of the message in bytes (excluding serial stream start sign) * @return length of the message in bytes (excluding serial stream start sign)
*/ */
static inline uint16_t mavlink_msg_gps_global_origin_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, static inline uint16_t mavlink_msg_gps_global_origin_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg, mavlink_message_t* msg,
int32_t latitude,int32_t longitude,int32_t altitude) int32_t latitude,int32_t longitude,int32_t altitude,uint64_t time_usec)
{ {
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN]; char buf[MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN];
_mav_put_int32_t(buf, 0, latitude); _mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude); _mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude); _mav_put_int32_t(buf, 8, altitude);
_mav_put_uint64_t(buf, 12, time_usec);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#else #else
...@@ -102,6 +110,7 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack_chan(uint8_t system_id ...@@ -102,6 +110,7 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack_chan(uint8_t system_id
packet.latitude = latitude; packet.latitude = latitude;
packet.longitude = longitude; packet.longitude = longitude;
packet.altitude = altitude; packet.altitude = altitude;
packet.time_usec = time_usec;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#endif #endif
...@@ -120,7 +129,7 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack_chan(uint8_t system_id ...@@ -120,7 +129,7 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack_chan(uint8_t system_id
*/ */
static inline uint16_t mavlink_msg_gps_global_origin_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps_global_origin_t* gps_global_origin) static inline uint16_t mavlink_msg_gps_global_origin_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps_global_origin_t* gps_global_origin)
{ {
return mavlink_msg_gps_global_origin_pack(system_id, component_id, msg, gps_global_origin->latitude, gps_global_origin->longitude, gps_global_origin->altitude); return mavlink_msg_gps_global_origin_pack(system_id, component_id, msg, gps_global_origin->latitude, gps_global_origin->longitude, gps_global_origin->altitude, gps_global_origin->time_usec);
} }
/** /**
...@@ -134,7 +143,7 @@ static inline uint16_t mavlink_msg_gps_global_origin_encode(uint8_t system_id, u ...@@ -134,7 +143,7 @@ static inline uint16_t mavlink_msg_gps_global_origin_encode(uint8_t system_id, u
*/ */
static inline uint16_t mavlink_msg_gps_global_origin_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gps_global_origin_t* gps_global_origin) static inline uint16_t mavlink_msg_gps_global_origin_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gps_global_origin_t* gps_global_origin)
{ {
return mavlink_msg_gps_global_origin_pack_chan(system_id, component_id, chan, msg, gps_global_origin->latitude, gps_global_origin->longitude, gps_global_origin->altitude); return mavlink_msg_gps_global_origin_pack_chan(system_id, component_id, chan, msg, gps_global_origin->latitude, gps_global_origin->longitude, gps_global_origin->altitude, gps_global_origin->time_usec);
} }
/** /**
...@@ -144,16 +153,18 @@ static inline uint16_t mavlink_msg_gps_global_origin_encode_chan(uint8_t system_ ...@@ -144,16 +153,18 @@ static inline uint16_t mavlink_msg_gps_global_origin_encode_chan(uint8_t system_
* @param latitude Latitude (WGS84), in degrees * 1E7 * @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84), in degrees * 1E7 * @param longitude Longitude (WGS84), in degrees * 1E7
* @param altitude Altitude (AMSL), in meters * 1000 (positive for up) * @param altitude Altitude (AMSL), in meters * 1000 (positive for up)
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/ */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gps_global_origin_send(mavlink_channel_t chan, int32_t latitude, int32_t longitude, int32_t altitude) static inline void mavlink_msg_gps_global_origin_send(mavlink_channel_t chan, int32_t latitude, int32_t longitude, int32_t altitude, uint64_t time_usec)
{ {
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN]; char buf[MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN];
_mav_put_int32_t(buf, 0, latitude); _mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude); _mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude); _mav_put_int32_t(buf, 8, altitude);
_mav_put_uint64_t(buf, 12, time_usec);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, buf, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, buf, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC);
#else #else
...@@ -161,6 +172,7 @@ static inline void mavlink_msg_gps_global_origin_send(mavlink_channel_t chan, in ...@@ -161,6 +172,7 @@ static inline void mavlink_msg_gps_global_origin_send(mavlink_channel_t chan, in
packet.latitude = latitude; packet.latitude = latitude;
packet.longitude = longitude; packet.longitude = longitude;
packet.altitude = altitude; packet.altitude = altitude;
packet.time_usec = time_usec;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, (const char *)&packet, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, (const char *)&packet, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC);
#endif #endif
...@@ -174,7 +186,7 @@ static inline void mavlink_msg_gps_global_origin_send(mavlink_channel_t chan, in ...@@ -174,7 +186,7 @@ static inline void mavlink_msg_gps_global_origin_send(mavlink_channel_t chan, in
static inline void mavlink_msg_gps_global_origin_send_struct(mavlink_channel_t chan, const mavlink_gps_global_origin_t* gps_global_origin) static inline void mavlink_msg_gps_global_origin_send_struct(mavlink_channel_t chan, const mavlink_gps_global_origin_t* gps_global_origin)
{ {
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_gps_global_origin_send(chan, gps_global_origin->latitude, gps_global_origin->longitude, gps_global_origin->altitude); mavlink_msg_gps_global_origin_send(chan, gps_global_origin->latitude, gps_global_origin->longitude, gps_global_origin->altitude, gps_global_origin->time_usec);
#else #else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, (const char *)gps_global_origin, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, (const char *)gps_global_origin, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC);
#endif #endif
...@@ -188,13 +200,14 @@ static inline void mavlink_msg_gps_global_origin_send_struct(mavlink_channel_t c ...@@ -188,13 +200,14 @@ static inline void mavlink_msg_gps_global_origin_send_struct(mavlink_channel_t c
is usually the receive buffer for the channel, and allows a reply to an is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage. incoming message with minimum stack space usage.
*/ */
static inline void mavlink_msg_gps_global_origin_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, int32_t latitude, int32_t longitude, int32_t altitude) static inline void mavlink_msg_gps_global_origin_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, int32_t latitude, int32_t longitude, int32_t altitude, uint64_t time_usec)
{ {
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf; char *buf = (char *)msgbuf;
_mav_put_int32_t(buf, 0, latitude); _mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude); _mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude); _mav_put_int32_t(buf, 8, altitude);
_mav_put_uint64_t(buf, 12, time_usec);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, buf, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, buf, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC);
#else #else
...@@ -202,6 +215,7 @@ static inline void mavlink_msg_gps_global_origin_send_buf(mavlink_message_t *msg ...@@ -202,6 +215,7 @@ static inline void mavlink_msg_gps_global_origin_send_buf(mavlink_message_t *msg
packet->latitude = latitude; packet->latitude = latitude;
packet->longitude = longitude; packet->longitude = longitude;
packet->altitude = altitude; packet->altitude = altitude;
packet->time_usec = time_usec;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, (const char *)packet, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, (const char *)packet, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC);
#endif #endif
...@@ -243,6 +257,16 @@ static inline int32_t mavlink_msg_gps_global_origin_get_altitude(const mavlink_m ...@@ -243,6 +257,16 @@ static inline int32_t mavlink_msg_gps_global_origin_get_altitude(const mavlink_m
return _MAV_RETURN_int32_t(msg, 8); return _MAV_RETURN_int32_t(msg, 8);
} }
/**
* @brief Get field time_usec from gps_global_origin message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_gps_global_origin_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 12);
}
/** /**
* @brief Decode a gps_global_origin message into a struct * @brief Decode a gps_global_origin message into a struct
* *
...@@ -255,6 +279,7 @@ static inline void mavlink_msg_gps_global_origin_decode(const mavlink_message_t* ...@@ -255,6 +279,7 @@ static inline void mavlink_msg_gps_global_origin_decode(const mavlink_message_t*
gps_global_origin->latitude = mavlink_msg_gps_global_origin_get_latitude(msg); gps_global_origin->latitude = mavlink_msg_gps_global_origin_get_latitude(msg);
gps_global_origin->longitude = mavlink_msg_gps_global_origin_get_longitude(msg); gps_global_origin->longitude = mavlink_msg_gps_global_origin_get_longitude(msg);
gps_global_origin->altitude = mavlink_msg_gps_global_origin_get_altitude(msg); gps_global_origin->altitude = mavlink_msg_gps_global_origin_get_altitude(msg);
gps_global_origin->time_usec = mavlink_msg_gps_global_origin_get_time_usec(msg);
#else #else
uint8_t len = msg->len < MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN? msg->len : MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN; uint8_t len = msg->len < MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN? msg->len : MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN;
memset(gps_global_origin, 0, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN); memset(gps_global_origin, 0, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
......
...@@ -9,11 +9,12 @@ typedef struct __mavlink_set_gps_global_origin_t { ...@@ -9,11 +9,12 @@ typedef struct __mavlink_set_gps_global_origin_t {
int32_t longitude; /*< Longitude (WGS84, in degrees * 1E7*/ int32_t longitude; /*< Longitude (WGS84, in degrees * 1E7*/
int32_t altitude; /*< Altitude (AMSL), in meters * 1000 (positive for up)*/ int32_t altitude; /*< Altitude (AMSL), in meters * 1000 (positive for up)*/
uint8_t target_system; /*< System ID*/ uint8_t target_system; /*< System ID*/
uint64_t time_usec; /*< Timestamp (microseconds since UNIX epoch or microseconds since system boot)*/
}) mavlink_set_gps_global_origin_t; }) mavlink_set_gps_global_origin_t;
#define MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN 13 #define MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN 21
#define MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_MIN_LEN 13 #define MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_MIN_LEN 13
#define MAVLINK_MSG_ID_48_LEN 13 #define MAVLINK_MSG_ID_48_LEN 21
#define MAVLINK_MSG_ID_48_MIN_LEN 13 #define MAVLINK_MSG_ID_48_MIN_LEN 13
#define MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC 41 #define MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC 41
...@@ -25,21 +26,23 @@ typedef struct __mavlink_set_gps_global_origin_t { ...@@ -25,21 +26,23 @@ typedef struct __mavlink_set_gps_global_origin_t {
#define MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN { \ #define MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN { \
48, \ 48, \
"SET_GPS_GLOBAL_ORIGIN", \ "SET_GPS_GLOBAL_ORIGIN", \
4, \ 5, \
{ { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_set_gps_global_origin_t, latitude) }, \ { { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_set_gps_global_origin_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_set_gps_global_origin_t, longitude) }, \ { "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_set_gps_global_origin_t, longitude) }, \
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_set_gps_global_origin_t, altitude) }, \ { "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_set_gps_global_origin_t, altitude) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_set_gps_global_origin_t, target_system) }, \ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_set_gps_global_origin_t, target_system) }, \
{ "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 13, offsetof(mavlink_set_gps_global_origin_t, time_usec) }, \
} \ } \
} }
#else #else
#define MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN { \ #define MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN { \
"SET_GPS_GLOBAL_ORIGIN", \ "SET_GPS_GLOBAL_ORIGIN", \
4, \ 5, \
{ { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_set_gps_global_origin_t, latitude) }, \ { { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_set_gps_global_origin_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_set_gps_global_origin_t, longitude) }, \ { "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_set_gps_global_origin_t, longitude) }, \
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_set_gps_global_origin_t, altitude) }, \ { "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_set_gps_global_origin_t, altitude) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_set_gps_global_origin_t, target_system) }, \ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_set_gps_global_origin_t, target_system) }, \
{ "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 13, offsetof(mavlink_set_gps_global_origin_t, time_usec) }, \
} \ } \
} }
#endif #endif
...@@ -54,10 +57,11 @@ typedef struct __mavlink_set_gps_global_origin_t { ...@@ -54,10 +57,11 @@ typedef struct __mavlink_set_gps_global_origin_t {
* @param latitude Latitude (WGS84), in degrees * 1E7 * @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84, in degrees * 1E7 * @param longitude Longitude (WGS84, in degrees * 1E7
* @param altitude Altitude (AMSL), in meters * 1000 (positive for up) * @param altitude Altitude (AMSL), in meters * 1000 (positive for up)
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @return length of the message in bytes (excluding serial stream start sign) * @return length of the message in bytes (excluding serial stream start sign)
*/ */
static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude) uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude, uint64_t time_usec)
{ {
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN]; char buf[MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN];
...@@ -65,6 +69,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id, ...@@ -65,6 +69,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id,
_mav_put_int32_t(buf, 4, longitude); _mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude); _mav_put_int32_t(buf, 8, altitude);
_mav_put_uint8_t(buf, 12, target_system); _mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint64_t(buf, 13, time_usec);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#else #else
...@@ -73,6 +78,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id, ...@@ -73,6 +78,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id,
packet.longitude = longitude; packet.longitude = longitude;
packet.altitude = altitude; packet.altitude = altitude;
packet.target_system = target_system; packet.target_system = target_system;
packet.time_usec = time_usec;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#endif #endif
...@@ -91,11 +97,12 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id, ...@@ -91,11 +97,12 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id,
* @param latitude Latitude (WGS84), in degrees * 1E7 * @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84, in degrees * 1E7 * @param longitude Longitude (WGS84, in degrees * 1E7
* @param altitude Altitude (AMSL), in meters * 1000 (positive for up) * @param altitude Altitude (AMSL), in meters * 1000 (positive for up)
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @return length of the message in bytes (excluding serial stream start sign) * @return length of the message in bytes (excluding serial stream start sign)
*/ */
static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg, mavlink_message_t* msg,
uint8_t target_system,int32_t latitude,int32_t longitude,int32_t altitude) uint8_t target_system,int32_t latitude,int32_t longitude,int32_t altitude,uint64_t time_usec)
{ {
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN]; char buf[MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN];
...@@ -103,6 +110,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t syste ...@@ -103,6 +110,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t syste
_mav_put_int32_t(buf, 4, longitude); _mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude); _mav_put_int32_t(buf, 8, altitude);
_mav_put_uint8_t(buf, 12, target_system); _mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint64_t(buf, 13, time_usec);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#else #else
...@@ -111,6 +119,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t syste ...@@ -111,6 +119,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t syste
packet.longitude = longitude; packet.longitude = longitude;
packet.altitude = altitude; packet.altitude = altitude;
packet.target_system = target_system; packet.target_system = target_system;
packet.time_usec = time_usec;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#endif #endif
...@@ -129,7 +138,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t syste ...@@ -129,7 +138,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t syste
*/ */
static inline uint16_t mavlink_msg_set_gps_global_origin_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_gps_global_origin_t* set_gps_global_origin) static inline uint16_t mavlink_msg_set_gps_global_origin_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_gps_global_origin_t* set_gps_global_origin)
{ {
return mavlink_msg_set_gps_global_origin_pack(system_id, component_id, msg, set_gps_global_origin->target_system, set_gps_global_origin->latitude, set_gps_global_origin->longitude, set_gps_global_origin->altitude); return mavlink_msg_set_gps_global_origin_pack(system_id, component_id, msg, set_gps_global_origin->target_system, set_gps_global_origin->latitude, set_gps_global_origin->longitude, set_gps_global_origin->altitude, set_gps_global_origin->time_usec);
} }
/** /**
...@@ -143,7 +152,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_encode(uint8_t system_i ...@@ -143,7 +152,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_encode(uint8_t system_i
*/ */
static inline uint16_t mavlink_msg_set_gps_global_origin_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_set_gps_global_origin_t* set_gps_global_origin) static inline uint16_t mavlink_msg_set_gps_global_origin_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_set_gps_global_origin_t* set_gps_global_origin)
{ {
return mavlink_msg_set_gps_global_origin_pack_chan(system_id, component_id, chan, msg, set_gps_global_origin->target_system, set_gps_global_origin->latitude, set_gps_global_origin->longitude, set_gps_global_origin->altitude); return mavlink_msg_set_gps_global_origin_pack_chan(system_id, component_id, chan, msg, set_gps_global_origin->target_system, set_gps_global_origin->latitude, set_gps_global_origin->longitude, set_gps_global_origin->altitude, set_gps_global_origin->time_usec);
} }
/** /**
...@@ -154,10 +163,11 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_encode_chan(uint8_t sys ...@@ -154,10 +163,11 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_encode_chan(uint8_t sys
* @param latitude Latitude (WGS84), in degrees * 1E7 * @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84, in degrees * 1E7 * @param longitude Longitude (WGS84, in degrees * 1E7
* @param altitude Altitude (AMSL), in meters * 1000 (positive for up) * @param altitude Altitude (AMSL), in meters * 1000 (positive for up)
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/ */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_set_gps_global_origin_send(mavlink_channel_t chan, uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude) static inline void mavlink_msg_set_gps_global_origin_send(mavlink_channel_t chan, uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude, uint64_t time_usec)
{ {
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN]; char buf[MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN];
...@@ -165,6 +175,7 @@ static inline void mavlink_msg_set_gps_global_origin_send(mavlink_channel_t chan ...@@ -165,6 +175,7 @@ static inline void mavlink_msg_set_gps_global_origin_send(mavlink_channel_t chan
_mav_put_int32_t(buf, 4, longitude); _mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude); _mav_put_int32_t(buf, 8, altitude);
_mav_put_uint8_t(buf, 12, target_system); _mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint64_t(buf, 13, time_usec);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, buf, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, buf, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC);
#else #else
...@@ -173,6 +184,7 @@ static inline void mavlink_msg_set_gps_global_origin_send(mavlink_channel_t chan ...@@ -173,6 +184,7 @@ static inline void mavlink_msg_set_gps_global_origin_send(mavlink_channel_t chan
packet.longitude = longitude; packet.longitude = longitude;
packet.altitude = altitude; packet.altitude = altitude;
packet.target_system = target_system; packet.target_system = target_system;
packet.time_usec = time_usec;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, (const char *)&packet, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, (const char *)&packet, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC);
#endif #endif
...@@ -186,7 +198,7 @@ static inline void mavlink_msg_set_gps_global_origin_send(mavlink_channel_t chan ...@@ -186,7 +198,7 @@ static inline void mavlink_msg_set_gps_global_origin_send(mavlink_channel_t chan
static inline void mavlink_msg_set_gps_global_origin_send_struct(mavlink_channel_t chan, const mavlink_set_gps_global_origin_t* set_gps_global_origin) static inline void mavlink_msg_set_gps_global_origin_send_struct(mavlink_channel_t chan, const mavlink_set_gps_global_origin_t* set_gps_global_origin)
{ {
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_set_gps_global_origin_send(chan, set_gps_global_origin->target_system, set_gps_global_origin->latitude, set_gps_global_origin->longitude, set_gps_global_origin->altitude); mavlink_msg_set_gps_global_origin_send(chan, set_gps_global_origin->target_system, set_gps_global_origin->latitude, set_gps_global_origin->longitude, set_gps_global_origin->altitude, set_gps_global_origin->time_usec);
#else #else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, (const char *)set_gps_global_origin, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, (const char *)set_gps_global_origin, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC);
#endif #endif
...@@ -200,7 +212,7 @@ static inline void mavlink_msg_set_gps_global_origin_send_struct(mavlink_channel ...@@ -200,7 +212,7 @@ static inline void mavlink_msg_set_gps_global_origin_send_struct(mavlink_channel
is usually the receive buffer for the channel, and allows a reply to an is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage. incoming message with minimum stack space usage.
*/ */
static inline void mavlink_msg_set_gps_global_origin_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude) static inline void mavlink_msg_set_gps_global_origin_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude, uint64_t time_usec)
{ {
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf; char *buf = (char *)msgbuf;
...@@ -208,6 +220,7 @@ static inline void mavlink_msg_set_gps_global_origin_send_buf(mavlink_message_t ...@@ -208,6 +220,7 @@ static inline void mavlink_msg_set_gps_global_origin_send_buf(mavlink_message_t
_mav_put_int32_t(buf, 4, longitude); _mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude); _mav_put_int32_t(buf, 8, altitude);
_mav_put_uint8_t(buf, 12, target_system); _mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint64_t(buf, 13, time_usec);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, buf, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, buf, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC);
#else #else
...@@ -216,6 +229,7 @@ static inline void mavlink_msg_set_gps_global_origin_send_buf(mavlink_message_t ...@@ -216,6 +229,7 @@ static inline void mavlink_msg_set_gps_global_origin_send_buf(mavlink_message_t
packet->longitude = longitude; packet->longitude = longitude;
packet->altitude = altitude; packet->altitude = altitude;
packet->target_system = target_system; packet->target_system = target_system;
packet->time_usec = time_usec;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, (const char *)packet, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, (const char *)packet, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_MIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC);
#endif #endif
...@@ -267,6 +281,16 @@ static inline int32_t mavlink_msg_set_gps_global_origin_get_altitude(const mavli ...@@ -267,6 +281,16 @@ static inline int32_t mavlink_msg_set_gps_global_origin_get_altitude(const mavli
return _MAV_RETURN_int32_t(msg, 8); return _MAV_RETURN_int32_t(msg, 8);
} }
/**
* @brief Get field time_usec from set_gps_global_origin message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_set_gps_global_origin_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 13);
}
/** /**
* @brief Decode a set_gps_global_origin message into a struct * @brief Decode a set_gps_global_origin message into a struct
* *
...@@ -280,6 +304,7 @@ static inline void mavlink_msg_set_gps_global_origin_decode(const mavlink_messag ...@@ -280,6 +304,7 @@ static inline void mavlink_msg_set_gps_global_origin_decode(const mavlink_messag
set_gps_global_origin->longitude = mavlink_msg_set_gps_global_origin_get_longitude(msg); set_gps_global_origin->longitude = mavlink_msg_set_gps_global_origin_get_longitude(msg);
set_gps_global_origin->altitude = mavlink_msg_set_gps_global_origin_get_altitude(msg); set_gps_global_origin->altitude = mavlink_msg_set_gps_global_origin_get_altitude(msg);
set_gps_global_origin->target_system = mavlink_msg_set_gps_global_origin_get_target_system(msg); set_gps_global_origin->target_system = mavlink_msg_set_gps_global_origin_get_target_system(msg);
set_gps_global_origin->time_usec = mavlink_msg_set_gps_global_origin_get_time_usec(msg);
#else #else
uint8_t len = msg->len < MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN? msg->len : MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN; uint8_t len = msg->len < MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN? msg->len : MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN;
memset(set_gps_global_origin, 0, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN); memset(set_gps_global_origin, 0, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
......
...@@ -2161,7 +2161,7 @@ static void mavlink_test_set_gps_global_origin(uint8_t system_id, uint8_t compon ...@@ -2161,7 +2161,7 @@ static void mavlink_test_set_gps_global_origin(uint8_t system_id, uint8_t compon
uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i; uint16_t i;
mavlink_set_gps_global_origin_t packet_in = { mavlink_set_gps_global_origin_t packet_in = {
963497464,963497672,963497880,41 963497464,963497672,963497880,41,93372036854776626ULL
}; };
mavlink_set_gps_global_origin_t packet1, packet2; mavlink_set_gps_global_origin_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1)); memset(&packet1, 0, sizeof(packet1));
...@@ -2169,6 +2169,7 @@ static void mavlink_test_set_gps_global_origin(uint8_t system_id, uint8_t compon ...@@ -2169,6 +2169,7 @@ static void mavlink_test_set_gps_global_origin(uint8_t system_id, uint8_t compon
packet1.longitude = packet_in.longitude; packet1.longitude = packet_in.longitude;
packet1.altitude = packet_in.altitude; packet1.altitude = packet_in.altitude;
packet1.target_system = packet_in.target_system; packet1.target_system = packet_in.target_system;
packet1.time_usec = packet_in.time_usec;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
...@@ -2183,12 +2184,12 @@ static void mavlink_test_set_gps_global_origin(uint8_t system_id, uint8_t compon ...@@ -2183,12 +2184,12 @@ static void mavlink_test_set_gps_global_origin(uint8_t system_id, uint8_t compon
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2)); memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_gps_global_origin_pack(system_id, component_id, &msg , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude ); mavlink_msg_set_gps_global_origin_pack(system_id, component_id, &msg , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude , packet1.time_usec );
mavlink_msg_set_gps_global_origin_decode(&msg, &packet2); mavlink_msg_set_gps_global_origin_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2)); memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_gps_global_origin_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude ); mavlink_msg_set_gps_global_origin_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude , packet1.time_usec );
mavlink_msg_set_gps_global_origin_decode(&msg, &packet2); mavlink_msg_set_gps_global_origin_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
...@@ -2201,7 +2202,7 @@ static void mavlink_test_set_gps_global_origin(uint8_t system_id, uint8_t compon ...@@ -2201,7 +2202,7 @@ static void mavlink_test_set_gps_global_origin(uint8_t system_id, uint8_t compon
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2)); memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_gps_global_origin_send(MAVLINK_COMM_1 , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude ); mavlink_msg_set_gps_global_origin_send(MAVLINK_COMM_1 , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude , packet1.time_usec );
mavlink_msg_set_gps_global_origin_decode(last_msg, &packet2); mavlink_msg_set_gps_global_origin_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
} }
...@@ -2218,13 +2219,14 @@ static void mavlink_test_gps_global_origin(uint8_t system_id, uint8_t component_ ...@@ -2218,13 +2219,14 @@ static void mavlink_test_gps_global_origin(uint8_t system_id, uint8_t component_
uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i; uint16_t i;
mavlink_gps_global_origin_t packet_in = { mavlink_gps_global_origin_t packet_in = {
963497464,963497672,963497880 963497464,963497672,963497880,93372036854776563ULL
}; };
mavlink_gps_global_origin_t packet1, packet2; mavlink_gps_global_origin_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1)); memset(&packet1, 0, sizeof(packet1));
packet1.latitude = packet_in.latitude; packet1.latitude = packet_in.latitude;
packet1.longitude = packet_in.longitude; packet1.longitude = packet_in.longitude;
packet1.altitude = packet_in.altitude; packet1.altitude = packet_in.altitude;
packet1.time_usec = packet_in.time_usec;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
...@@ -2239,12 +2241,12 @@ static void mavlink_test_gps_global_origin(uint8_t system_id, uint8_t component_ ...@@ -2239,12 +2241,12 @@ static void mavlink_test_gps_global_origin(uint8_t system_id, uint8_t component_
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2)); memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_global_origin_pack(system_id, component_id, &msg , packet1.latitude , packet1.longitude , packet1.altitude ); mavlink_msg_gps_global_origin_pack(system_id, component_id, &msg , packet1.latitude , packet1.longitude , packet1.altitude , packet1.time_usec );
mavlink_msg_gps_global_origin_decode(&msg, &packet2); mavlink_msg_gps_global_origin_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2)); memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_global_origin_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.latitude , packet1.longitude , packet1.altitude ); mavlink_msg_gps_global_origin_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.latitude , packet1.longitude , packet1.altitude , packet1.time_usec );
mavlink_msg_gps_global_origin_decode(&msg, &packet2); mavlink_msg_gps_global_origin_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
...@@ -2257,7 +2259,7 @@ static void mavlink_test_gps_global_origin(uint8_t system_id, uint8_t component_ ...@@ -2257,7 +2259,7 @@ static void mavlink_test_gps_global_origin(uint8_t system_id, uint8_t component_
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2)); memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_global_origin_send(MAVLINK_COMM_1 , packet1.latitude , packet1.longitude , packet1.altitude ); mavlink_msg_gps_global_origin_send(MAVLINK_COMM_1 , packet1.latitude , packet1.longitude , packet1.altitude , packet1.time_usec );
mavlink_msg_gps_global_origin_decode(last_msg, &packet2); mavlink_msg_gps_global_origin_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H #ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H #define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Thu Jun 15 2017" #define MAVLINK_BUILD_DATE "Fri Jun 16 2017"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H #ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H #define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Thu Jun 15 2017" #define MAVLINK_BUILD_DATE "Fri Jun 16 2017"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
...@@ -2859,12 +2859,16 @@ ...@@ -2859,12 +2859,16 @@
<field type="int32_t" name="latitude" units="degE7">Latitude (WGS84), in degrees * 1E7</field> <field type="int32_t" name="latitude" units="degE7">Latitude (WGS84), in degrees * 1E7</field>
<field type="int32_t" name="longitude" units="degE7">Longitude (WGS84, in degrees * 1E7</field> <field type="int32_t" name="longitude" units="degE7">Longitude (WGS84, in degrees * 1E7</field>
<field type="int32_t" name="altitude" units="mm">Altitude (AMSL), in meters * 1000 (positive for up)</field> <field type="int32_t" name="altitude" units="mm">Altitude (AMSL), in meters * 1000 (positive for up)</field>
<extensions/>
<field type="uint64_t" name="time_usec" units="us">Timestamp (microseconds since UNIX epoch or microseconds since system boot)</field>
</message> </message>
<message id="49" name="GPS_GLOBAL_ORIGIN"> <message id="49" name="GPS_GLOBAL_ORIGIN">
<description>Once the MAV sets a new GPS-Local correspondence, this message announces the origin (0,0,0) position</description> <description>Once the MAV sets a new GPS-Local correspondence, this message announces the origin (0,0,0) position</description>
<field type="int32_t" name="latitude" units="degE7">Latitude (WGS84), in degrees * 1E7</field> <field type="int32_t" name="latitude" units="degE7">Latitude (WGS84), in degrees * 1E7</field>
<field type="int32_t" name="longitude" units="degE7">Longitude (WGS84), in degrees * 1E7</field> <field type="int32_t" name="longitude" units="degE7">Longitude (WGS84), in degrees * 1E7</field>
<field type="int32_t" name="altitude" units="mm">Altitude (AMSL), in meters * 1000 (positive for up)</field> <field type="int32_t" name="altitude" units="mm">Altitude (AMSL), in meters * 1000 (positive for up)</field>
<extensions/>
<field type="uint64_t" name="time_usec" units="us">Timestamp (microseconds since UNIX epoch or microseconds since system boot)</field>
</message> </message>
<message id="50" name="PARAM_MAP_RC"> <message id="50" name="PARAM_MAP_RC">
<description>Bind a RC channel to a parameter. The parameter should change accoding to the RC channel value.</description> <description>Bind a RC channel to a parameter. The parameter should change accoding to the RC channel value.</description>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H #ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H #define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Thu Jun 15 2017" #define MAVLINK_BUILD_DATE "Fri Jun 16 2017"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 9 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 9
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H #ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H #define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Thu Jun 15 2017" #define MAVLINK_BUILD_DATE "Fri Jun 16 2017"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H #ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H #define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Thu Jun 15 2017" #define MAVLINK_BUILD_DATE "Fri Jun 16 2017"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H #ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H #define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Thu Jun 15 2017" #define MAVLINK_BUILD_DATE "Fri Jun 16 2017"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 179 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 179
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H #ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H #define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Thu Jun 15 2017" #define MAVLINK_BUILD_DATE "Fri Jun 16 2017"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment