3 #define MAVLINK_MSG_ID_TERRAIN_REQUEST 133
13 #define MAVLINK_MSG_ID_TERRAIN_REQUEST_LEN 18
14 #define MAVLINK_MSG_ID_133_LEN 18
16 #define MAVLINK_MSG_ID_TERRAIN_REQUEST_CRC 6
17 #define MAVLINK_MSG_ID_133_CRC 6
21 #define MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST { \
24 { { "mask", "0x%07x", MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_terrain_request_t, mask) }, \
25 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_terrain_request_t, lat) }, \
26 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_terrain_request_t, lon) }, \
27 { "grid_spacing", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_terrain_request_t, grid_spacing) }, \
44 static inline uint16_t mavlink_msg_terrain_request_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
45 int32_t lat, int32_t lon, uint16_t grid_spacing, uint64_t mask)
47 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
85 static inline uint16_t mavlink_msg_terrain_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
86 mavlink_message_t* msg,
87 int32_t lat,int32_t lon,uint16_t grid_spacing,uint64_t mask)
89 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
108 #if MAVLINK_CRC_EXTRA
123 static inline uint16_t mavlink_msg_terrain_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_terrain_request_t* terrain_request)
125 return mavlink_msg_terrain_request_pack(system_id, component_id, msg, terrain_request->
lat, terrain_request->
lon, terrain_request->
grid_spacing, terrain_request->
mask);
137 static inline uint16_t mavlink_msg_terrain_request_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_terrain_request_t* terrain_request)
139 return mavlink_msg_terrain_request_pack_chan(system_id, component_id, chan, msg, terrain_request->
lat, terrain_request->
lon, terrain_request->
grid_spacing, terrain_request->
mask);
151 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
153 static inline void mavlink_msg_terrain_request_send(
mavlink_channel_t chan, int32_t lat, int32_t lon, uint16_t grid_spacing, uint64_t mask)
155 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
162 #if MAVLINK_CRC_EXTRA
174 #if MAVLINK_CRC_EXTRA
182 #if MAVLINK_MSG_ID_TERRAIN_REQUEST_LEN <= MAVLINK_MAX_PAYLOAD_LEN
190 static inline void mavlink_msg_terrain_request_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, int32_t lat, int32_t lon, uint16_t grid_spacing, uint64_t mask)
192 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
193 char *buf = (
char *)msgbuf;
199 #if MAVLINK_CRC_EXTRA
211 #if MAVLINK_CRC_EXTRA
230 static inline int32_t mavlink_msg_terrain_request_get_lat(
const mavlink_message_t* msg)
232 return _MAV_RETURN_int32_t(msg, 8);
240 static inline int32_t mavlink_msg_terrain_request_get_lon(
const mavlink_message_t* msg)
242 return _MAV_RETURN_int32_t(msg, 12);
250 static inline uint16_t mavlink_msg_terrain_request_get_grid_spacing(
const mavlink_message_t* msg)
252 return _MAV_RETURN_uint16_t(msg, 16);
260 static inline uint64_t mavlink_msg_terrain_request_get_mask(
const mavlink_message_t* msg)
262 return _MAV_RETURN_uint64_t(msg, 0);
271 static inline void mavlink_msg_terrain_request_decode(
const mavlink_message_t* msg,
mavlink_terrain_request_t* terrain_request)
273 #if MAVLINK_NEED_BYTE_SWAP
274 terrain_request->
mask = mavlink_msg_terrain_request_get_mask(msg);
275 terrain_request->
lat = mavlink_msg_terrain_request_get_lat(msg);
276 terrain_request->
lon = mavlink_msg_terrain_request_get_lon(msg);
277 terrain_request->
grid_spacing = mavlink_msg_terrain_request_get_grid_spacing(msg);
#define MAVLINK_MSG_ID_TERRAIN_REQUEST_LEN
Definition: mavlink_msg_terrain_request.h:13
int32_t lon
Longitude of SW corner of first grid (in degrees *10^7)
Definition: mavlink_msg_terrain_request.h:9
MAVLINK_HELPER uint16_t mavlink_finalize_message(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t length)
Finalize a MAVLink message with MAVLINK_COMM_0 as default channel.
Definition: mavlink_helpers.h:105
int32_t lat
Latitude of SW corner of first grid (degrees *10^7)
Definition: mavlink_msg_terrain_request.h:8
#define MAVLINK_MSG_ID_TERRAIN_REQUEST_CRC
Definition: mavlink_msg_terrain_request.h:16
#define _mav_put_uint64_t(buf, wire_offset, b)
Definition: protocol.h:143
#define _mav_put_int32_t(buf, wire_offset, b)
Definition: protocol.h:142
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
#define MAVLINK_MSG_ID_TERRAIN_REQUEST
Definition: mavlink_msg_terrain_request.h:3
mavlink_channel_t
Definition: mavlink_types.h:178
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
struct __mavlink_terrain_request_t mavlink_terrain_request_t
uint64_t mask
Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)
Definition: mavlink_msg_terrain_request.h:7
Definition: mavlink_msg_terrain_request.h:5
#define _mav_put_uint16_t(buf, wire_offset, b)
Definition: protocol.h:139
MAVLINK_HELPER uint16_t mavlink_finalize_message_chan(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t chan, uint8_t length)
Finalize a MAVLink message with channel assignment.
Definition: mavlink_helpers.h:71
uint16_t grid_spacing
Grid spacing in meters.
Definition: mavlink_msg_terrain_request.h:10