4#define MAVLINK_MSG_ID_LOCAL_POSITION_NED 32
15} mavlink_local_position_ned_t;
17#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN 28
18#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_MIN_LEN 28
19#define MAVLINK_MSG_ID_32_LEN 28
20#define MAVLINK_MSG_ID_32_MIN_LEN 28
22#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC 185
23#define MAVLINK_MSG_ID_32_CRC 185
27#if MAVLINK_COMMAND_24BIT
28#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED {
32 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 0
, offsetof(mavlink_local_position_ned_t, time_boot_ms) },
33 { "x", NULL, MAVLINK_TYPE_FLOAT, 0
, 4
, offsetof(mavlink_local_position_ned_t, x) },
34 { "y", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_local_position_ned_t, y) },
35 { "z", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_local_position_ned_t, z) },
36 { "vx", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_local_position_ned_t, vx) },
37 { "vy", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_local_position_ned_t, vy) },
38 { "vz", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_local_position_ned_t, vz) },
40}
42#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED {
45 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 0
, offsetof(mavlink_local_position_ned_t, time_boot_ms) },
46 { "x", NULL, MAVLINK_TYPE_FLOAT, 0
, 4
, offsetof(mavlink_local_position_ned_t, x) },
47 { "y", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_local_position_ned_t, y) },
48 { "z", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_local_position_ned_t, z) },
49 { "vx", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_local_position_ned_t, vx) },
50 { "vy", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_local_position_ned_t, vy) },
51 { "vz", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_local_position_ned_t, vz) },
53}
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71static inline uint16_t mavlink_msg_local_position_ned_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
72 uint32_t time_boot_ms,
float x,
float y,
float z,
float vx,
float vy,
float vz)
74#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
76 _mav_put_uint32_t(buf, 0, time_boot_ms);
77 _mav_put_float(buf, 4, x);
78 _mav_put_float(buf, 8, y);
79 _mav_put_float(buf, 12, z);
80 _mav_put_float(buf, 16, vx);
81 _mav_put_float(buf, 20, vy);
82 _mav_put_float(buf, 24, vz);
86 mavlink_local_position_ned_t packet;
87 packet.time_boot_ms = time_boot_ms;
95 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118static inline uint16_t mavlink_msg_local_position_ned_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
119 uint32_t time_boot_ms,
float x,
float y,
float z,
float vx,
float vy,
float vz)
121#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
123 _mav_put_uint32_t(buf, 0, time_boot_ms);
124 _mav_put_float(buf, 4, x);
125 _mav_put_float(buf, 8, y);
126 _mav_put_float(buf, 12, z);
127 _mav_put_float(buf, 16, vx);
128 _mav_put_float(buf, 20, vy);
129 _mav_put_float(buf, 24, vz);
133 mavlink_local_position_ned_t packet;
134 packet.time_boot_ms = time_boot_ms;
142 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
147 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_LOCAL_POSITION_NED_MIN_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC);
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168static inline uint16_t mavlink_msg_local_position_ned_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
169 mavlink_message_t* msg,
170 uint32_t time_boot_ms,
float x,
float y,
float z,
float vx,
float vy,
float vz)
172#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
174 _mav_put_uint32_t(buf, 0, time_boot_ms);
175 _mav_put_float(buf, 4, x);
176 _mav_put_float(buf, 8, y);
177 _mav_put_float(buf, 12, z);
178 _mav_put_float(buf, 16, vx);
179 _mav_put_float(buf, 20, vy);
180 _mav_put_float(buf, 24, vz);
184 mavlink_local_position_ned_t packet;
185 packet.time_boot_ms = time_boot_ms;
193 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
201
202
203
204
205
206
207
208static inline uint16_t mavlink_msg_local_position_ned_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_local_position_ned_t* local_position_ned)
210 return mavlink_msg_local_position_ned_pack(system_id, component_id, msg, local_position_ned->time_boot_ms, local_position_ned->x, local_position_ned->y, local_position_ned->z, local_position_ned->vx, local_position_ned->vy, local_position_ned->vz);
214
215
216
217
218
219
220
221
222static inline uint16_t mavlink_msg_local_position_ned_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_local_position_ned_t* local_position_ned)
224 return mavlink_msg_local_position_ned_pack_chan(system_id, component_id, chan, msg, local_position_ned->time_boot_ms, local_position_ned->x, local_position_ned->y, local_position_ned->z, local_position_ned->vx, local_position_ned->vy, local_position_ned->vz);
228
229
230
231
232
233
234
235
236static inline uint16_t mavlink_msg_local_position_ned_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_local_position_ned_t* local_position_ned)
238 return mavlink_msg_local_position_ned_pack_status(system_id, component_id, _status, msg, local_position_ned->time_boot_ms, local_position_ned->x, local_position_ned->y, local_position_ned->z, local_position_ned->vx, local_position_ned->vy, local_position_ned->vz);
242
243
244
245
246
247
248
249
250
251
252
253#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
255static inline void mavlink_msg_local_position_ned_send(mavlink_channel_t chan, uint32_t time_boot_ms,
float x,
float y,
float z,
float vx,
float vy,
float vz)
257#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
258 char buf[MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN];
259 _mav_put_uint32_t(buf, 0, time_boot_ms);
260 _mav_put_float(buf, 4, x);
261 _mav_put_float(buf, 8, y);
262 _mav_put_float(buf, 12, z);
263 _mav_put_float(buf, 16, vx);
264 _mav_put_float(buf, 20, vy);
265 _mav_put_float(buf, 24, vz);
267 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_MIN_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC);
269 mavlink_local_position_ned_t packet;
270 packet.time_boot_ms = time_boot_ms;
278 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, (
const char *)&packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_MIN_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC);
283
284
285
286
287static inline void mavlink_msg_local_position_ned_send_struct(mavlink_channel_t chan,
const mavlink_local_position_ned_t* local_position_ned)
289#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
290 mavlink_msg_local_position_ned_send(chan, local_position_ned->time_boot_ms, local_position_ned->x, local_position_ned->y, local_position_ned->z, local_position_ned->vx, local_position_ned->vy, local_position_ned->vz);
292 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, (
const char *)local_position_ned, MAVLINK_MSG_ID_LOCAL_POSITION_NED_MIN_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC);
296#if MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN <= MAVLINK_MAX_PAYLOAD_LEN
298
299
300
301
302
303
304static inline void mavlink_msg_local_position_ned_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms,
float x,
float y,
float z,
float vx,
float vy,
float vz)
306#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
307 char *buf = (
char *)msgbuf;
308 _mav_put_uint32_t(buf, 0, time_boot_ms);
309 _mav_put_float(buf, 4, x);
310 _mav_put_float(buf, 8, y);
311 _mav_put_float(buf, 12, z);
312 _mav_put_float(buf, 16, vx);
313 _mav_put_float(buf, 20, vy);
314 _mav_put_float(buf, 24, vz);
316 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_MIN_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC);
318 mavlink_local_position_ned_t *packet = (mavlink_local_position_ned_t *)msgbuf;
319 packet->time_boot_ms = time_boot_ms;
327 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, (
const char *)packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_MIN_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC);
338
339
340
341
342static inline uint32_t mavlink_msg_local_position_ned_get_time_boot_ms(
const mavlink_message_t* msg)
344 return _MAV_RETURN_uint32_t(msg, 0);
348
349
350
351
352static inline float mavlink_msg_local_position_ned_get_x(
const mavlink_message_t* msg)
354 return _MAV_RETURN_float(msg, 4);
358
359
360
361
362static inline float mavlink_msg_local_position_ned_get_y(
const mavlink_message_t* msg)
364 return _MAV_RETURN_float(msg, 8);
368
369
370
371
372static inline float mavlink_msg_local_position_ned_get_z(
const mavlink_message_t* msg)
374 return _MAV_RETURN_float(msg, 12);
378
379
380
381
382static inline float mavlink_msg_local_position_ned_get_vx(
const mavlink_message_t* msg)
384 return _MAV_RETURN_float(msg, 16);
388
389
390
391
392static inline float mavlink_msg_local_position_ned_get_vy(
const mavlink_message_t* msg)
394 return _MAV_RETURN_float(msg, 20);
398
399
400
401
402static inline float mavlink_msg_local_position_ned_get_vz(
const mavlink_message_t* msg)
404 return _MAV_RETURN_float(msg, 24);
408
409
410
411
412
413static inline void mavlink_msg_local_position_ned_decode(
const mavlink_message_t* msg, mavlink_local_position_ned_t* local_position_ned)
415#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
416 local_position_ned->time_boot_ms = mavlink_msg_local_position_ned_get_time_boot_ms(msg);
417 local_position_ned->x = mavlink_msg_local_position_ned_get_x(msg);
418 local_position_ned->y = mavlink_msg_local_position_ned_get_y(msg);
419 local_position_ned->z = mavlink_msg_local_position_ned_get_z(msg);
420 local_position_ned->vx = mavlink_msg_local_position_ned_get_vx(msg);
421 local_position_ned->vy = mavlink_msg_local_position_ned_get_vy(msg);
422 local_position_ned->vz = mavlink_msg_local_position_ned_get_vz(msg);
424 uint8_t len = msg->len < MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN? msg->len : MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN;
425 memset(local_position_ned, 0, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
426 memcpy(local_position_ned, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN
Definition: mavlink_msg_local_position_ned.h:17
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED
Definition: mavlink_msg_local_position_ned.h:4
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_MIN_LEN
Definition: mavlink_msg_local_position_ned.h:18
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC
Definition: mavlink_msg_local_position_ned.h:22
Definition: mavlink_msg_local_position_ned.h:7
float vz
Definition: mavlink_msg_local_position_ned.h:14
float vy
Definition: mavlink_msg_local_position_ned.h:13
float vx
Definition: mavlink_msg_local_position_ned.h:12
float y
Definition: mavlink_msg_local_position_ned.h:10
float x
Definition: mavlink_msg_local_position_ned.h:9
uint32_t time_boot_ms
Definition: mavlink_msg_local_position_ned.h:8
float z
Definition: mavlink_msg_local_position_ned.h:11