3 #define MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT 154
14 #define MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN 17
15 #define MAVLINK_MSG_ID_154_LEN 17
17 #define MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_CRC 223
18 #define MAVLINK_MSG_ID_154_CRC 223
22 #define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_SETPOINT { \
23 "LOCAL_POSITION_SETPOINT", \
25 { { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_local_position_setpoint_t, x) }, \
26 { "y", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_local_position_setpoint_t, y) }, \
27 { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_local_position_setpoint_t, z) }, \
28 { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_local_position_setpoint_t, yaw) }, \
29 { "coordinate_frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_local_position_setpoint_t, coordinate_frame) }, \
47 static inline uint16_t mavlink_msg_local_position_setpoint_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
48 uint8_t coordinate_frame,
float x,
float y,
float z,
float yaw)
50 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
51 char buf[MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN];
52 _mav_put_float(buf, 0, x);
53 _mav_put_float(buf, 4, y);
54 _mav_put_float(buf, 8, z);
55 _mav_put_float(buf, 12, yaw);
56 _mav_put_uint8_t(buf, 16, coordinate_frame);
58 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
67 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
70 msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT;
72 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_CRC);
74 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
91 static inline uint16_t mavlink_msg_local_position_setpoint_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
92 mavlink_message_t* msg,
93 uint8_t coordinate_frame,
float x,
float y,
float z,
float yaw)
95 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
96 char buf[MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN];
97 _mav_put_float(buf, 0, x);
98 _mav_put_float(buf, 4, y);
99 _mav_put_float(buf, 8, z);
100 _mav_put_float(buf, 12, yaw);
101 _mav_put_uint8_t(buf, 16, coordinate_frame);
103 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
112 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
115 msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT;
116 #if MAVLINK_CRC_EXTRA
117 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_CRC);
119 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
131 static inline uint16_t mavlink_msg_local_position_setpoint_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_local_position_setpoint_t* local_position_setpoint)
133 return mavlink_msg_local_position_setpoint_pack(system_id, component_id, msg, local_position_setpoint->
coordinate_frame, local_position_setpoint->
x, local_position_setpoint->
y, local_position_setpoint->
z, local_position_setpoint->
yaw);
145 static inline uint16_t mavlink_msg_local_position_setpoint_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_local_position_setpoint_t* local_position_setpoint)
147 return mavlink_msg_local_position_setpoint_pack_chan(system_id, component_id, chan, msg, local_position_setpoint->
coordinate_frame, local_position_setpoint->
x, local_position_setpoint->
y, local_position_setpoint->
z, local_position_setpoint->
yaw);
160 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
162 static inline void mavlink_msg_local_position_setpoint_send(mavlink_channel_t chan, uint8_t coordinate_frame,
float x,
float y,
float z,
float yaw)
164 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
165 char buf[MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN];
166 _mav_put_float(buf, 0, x);
167 _mav_put_float(buf, 4, y);
168 _mav_put_float(buf, 8, z);
169 _mav_put_float(buf, 12, yaw);
170 _mav_put_uint8_t(buf, 16, coordinate_frame);
172 #if MAVLINK_CRC_EXTRA
173 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, buf, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_CRC);
175 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, buf, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
185 #if MAVLINK_CRC_EXTRA
186 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, (
const char *)&packet, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_CRC);
188 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, (
const char *)&packet, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
193 #if MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
201 static inline void mavlink_msg_local_position_setpoint_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t coordinate_frame,
float x,
float y,
float z,
float yaw)
203 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
204 char *buf = (
char *)msgbuf;
205 _mav_put_float(buf, 0, x);
206 _mav_put_float(buf, 4, y);
207 _mav_put_float(buf, 8, z);
208 _mav_put_float(buf, 12, yaw);
209 _mav_put_uint8_t(buf, 16, coordinate_frame);
211 #if MAVLINK_CRC_EXTRA
212 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, buf, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_CRC);
214 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, buf, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
224 #if MAVLINK_CRC_EXTRA
225 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, (
const char *)packet, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_CRC);
227 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, (
const char *)packet, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
243 static inline uint8_t mavlink_msg_local_position_setpoint_get_coordinate_frame(
const mavlink_message_t* msg)
245 return _MAV_RETURN_uint8_t(msg, 16);
253 static inline float mavlink_msg_local_position_setpoint_get_x(
const mavlink_message_t* msg)
255 return _MAV_RETURN_float(msg, 0);
263 static inline float mavlink_msg_local_position_setpoint_get_y(
const mavlink_message_t* msg)
265 return _MAV_RETURN_float(msg, 4);
273 static inline float mavlink_msg_local_position_setpoint_get_z(
const mavlink_message_t* msg)
275 return _MAV_RETURN_float(msg, 8);
283 static inline float mavlink_msg_local_position_setpoint_get_yaw(
const mavlink_message_t* msg)
285 return _MAV_RETURN_float(msg, 12);
296 #if MAVLINK_NEED_BYTE_SWAP
297 local_position_setpoint->
x = mavlink_msg_local_position_setpoint_get_x(msg);
298 local_position_setpoint->
y = mavlink_msg_local_position_setpoint_get_y(msg);
299 local_position_setpoint->
z = mavlink_msg_local_position_setpoint_get_z(msg);
300 local_position_setpoint->
yaw = mavlink_msg_local_position_setpoint_get_yaw(msg);
301 local_position_setpoint->
coordinate_frame = mavlink_msg_local_position_setpoint_get_coordinate_frame(msg);
303 memcpy(local_position_setpoint, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
float yaw
Desired yaw angle.
Definition: mavlink_msg_local_position_setpoint.h:10
float x
x position
Definition: mavlink_msg_local_position_setpoint.h:7
float z
z position
Definition: mavlink_msg_local_position_setpoint.h:9
uint8_t coordinate_frame
Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU.
Definition: mavlink_msg_local_position_setpoint.h:11
float y
y position
Definition: mavlink_msg_local_position_setpoint.h:8
Definition: mavlink_msg_local_position_setpoint.h:5