2 // MESSAGE ORBIT_EXECUTION_STATUS PACKING
4 #define MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS 360
7 typedef struct __mavlink_orbit_execution_status_t
{
8 uint64_t time_usec
; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/
9 float radius
; /*< [m] Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise.*/
10 int32_t x
; /*< X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7.*/
11 int32_t y
; /*< Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7.*/
12 float z
; /*< [m] Altitude of center point. Coordinate system depends on frame field.*/
13 uint8_t frame
; /*< The coordinate system of the fields: x, y, z.*/
14 } mavlink_orbit_execution_status_t
;
16 #define MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN 25
17 #define MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN 25
18 #define MAVLINK_MSG_ID_360_LEN 25
19 #define MAVLINK_MSG_ID_360_MIN_LEN 25
21 #define MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC 11
22 #define MAVLINK_MSG_ID_360_CRC 11
26 #if MAVLINK_COMMAND_24BIT
27 #define MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS { \
29 "ORBIT_EXECUTION_STATUS", \
31 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_orbit_execution_status_t, time_usec) }, \
32 { "radius", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_orbit_execution_status_t, radius) }, \
33 { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_orbit_execution_status_t, frame) }, \
34 { "x", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_orbit_execution_status_t, x) }, \
35 { "y", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_orbit_execution_status_t, y) }, \
36 { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_orbit_execution_status_t, z) }, \
40 #define MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS { \
41 "ORBIT_EXECUTION_STATUS", \
43 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_orbit_execution_status_t, time_usec) }, \
44 { "radius", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_orbit_execution_status_t, radius) }, \
45 { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_orbit_execution_status_t, frame) }, \
46 { "x", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_orbit_execution_status_t, x) }, \
47 { "y", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_orbit_execution_status_t, y) }, \
48 { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_orbit_execution_status_t, z) }, \
54 * @brief Pack a orbit_execution_status message
55 * @param system_id ID of this system
56 * @param component_id ID of this component (e.g. 200 for IMU)
57 * @param msg The MAVLink message to compress the data into
59 * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
60 * @param radius [m] Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise.
61 * @param frame The coordinate system of the fields: x, y, z.
62 * @param x X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7.
63 * @param y Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7.
64 * @param z [m] Altitude of center point. Coordinate system depends on frame field.
65 * @return length of the message in bytes (excluding serial stream start sign)
67 static inline uint16_t mavlink_msg_orbit_execution_status_pack(uint8_t system_id
, uint8_t component_id
, mavlink_message_t
* msg
,
68 uint64_t time_usec
, float radius
, uint8_t frame
, int32_t x
, int32_t y
, float z
)
70 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
71 char buf
[MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
];
72 _mav_put_uint64_t(buf
, 0, time_usec
);
73 _mav_put_float(buf
, 8, radius
);
74 _mav_put_int32_t(buf
, 12, x
);
75 _mav_put_int32_t(buf
, 16, y
);
76 _mav_put_float(buf
, 20, z
);
77 _mav_put_uint8_t(buf
, 24, frame
);
79 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), buf
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
);
81 mavlink_orbit_execution_status_t packet
;
82 packet
.time_usec
= time_usec
;
83 packet
.radius
= radius
;
89 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), &packet
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
);
92 msg
->msgid
= MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS
;
93 return mavlink_finalize_message(msg
, system_id
, component_id
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC
);
97 * @brief Pack a orbit_execution_status message on a channel
98 * @param system_id ID of this system
99 * @param component_id ID of this component (e.g. 200 for IMU)
100 * @param chan The MAVLink channel this message will be sent over
101 * @param msg The MAVLink message to compress the data into
102 * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
103 * @param radius [m] Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise.
104 * @param frame The coordinate system of the fields: x, y, z.
105 * @param x X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7.
106 * @param y Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7.
107 * @param z [m] Altitude of center point. Coordinate system depends on frame field.
108 * @return length of the message in bytes (excluding serial stream start sign)
110 static inline uint16_t mavlink_msg_orbit_execution_status_pack_chan(uint8_t system_id
, uint8_t component_id
, uint8_t chan
,
111 mavlink_message_t
* msg
,
112 uint64_t time_usec
,float radius
,uint8_t frame
,int32_t x
,int32_t y
,float z
)
114 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
115 char buf
[MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
];
116 _mav_put_uint64_t(buf
, 0, time_usec
);
117 _mav_put_float(buf
, 8, radius
);
118 _mav_put_int32_t(buf
, 12, x
);
119 _mav_put_int32_t(buf
, 16, y
);
120 _mav_put_float(buf
, 20, z
);
121 _mav_put_uint8_t(buf
, 24, frame
);
123 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), buf
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
);
125 mavlink_orbit_execution_status_t packet
;
126 packet
.time_usec
= time_usec
;
127 packet
.radius
= radius
;
131 packet
.frame
= frame
;
133 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), &packet
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
);
136 msg
->msgid
= MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS
;
137 return mavlink_finalize_message_chan(msg
, system_id
, component_id
, chan
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC
);
141 * @brief Encode a orbit_execution_status struct
143 * @param system_id ID of this system
144 * @param component_id ID of this component (e.g. 200 for IMU)
145 * @param msg The MAVLink message to compress the data into
146 * @param orbit_execution_status C-struct to read the message contents from
148 static inline uint16_t mavlink_msg_orbit_execution_status_encode(uint8_t system_id
, uint8_t component_id
, mavlink_message_t
* msg
, const mavlink_orbit_execution_status_t
* orbit_execution_status
)
150 return mavlink_msg_orbit_execution_status_pack(system_id
, component_id
, msg
, orbit_execution_status
->time_usec
, orbit_execution_status
->radius
, orbit_execution_status
->frame
, orbit_execution_status
->x
, orbit_execution_status
->y
, orbit_execution_status
->z
);
154 * @brief Encode a orbit_execution_status struct on a channel
156 * @param system_id ID of this system
157 * @param component_id ID of this component (e.g. 200 for IMU)
158 * @param chan The MAVLink channel this message will be sent over
159 * @param msg The MAVLink message to compress the data into
160 * @param orbit_execution_status C-struct to read the message contents from
162 static inline uint16_t mavlink_msg_orbit_execution_status_encode_chan(uint8_t system_id
, uint8_t component_id
, uint8_t chan
, mavlink_message_t
* msg
, const mavlink_orbit_execution_status_t
* orbit_execution_status
)
164 return mavlink_msg_orbit_execution_status_pack_chan(system_id
, component_id
, chan
, msg
, orbit_execution_status
->time_usec
, orbit_execution_status
->radius
, orbit_execution_status
->frame
, orbit_execution_status
->x
, orbit_execution_status
->y
, orbit_execution_status
->z
);
168 * @brief Send a orbit_execution_status message
169 * @param chan MAVLink channel to send the message
171 * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
172 * @param radius [m] Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise.
173 * @param frame The coordinate system of the fields: x, y, z.
174 * @param x X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7.
175 * @param y Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7.
176 * @param z [m] Altitude of center point. Coordinate system depends on frame field.
178 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
180 static inline void mavlink_msg_orbit_execution_status_send(mavlink_channel_t chan
, uint64_t time_usec
, float radius
, uint8_t frame
, int32_t x
, int32_t y
, float z
)
182 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
183 char buf
[MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
];
184 _mav_put_uint64_t(buf
, 0, time_usec
);
185 _mav_put_float(buf
, 8, radius
);
186 _mav_put_int32_t(buf
, 12, x
);
187 _mav_put_int32_t(buf
, 16, y
);
188 _mav_put_float(buf
, 20, z
);
189 _mav_put_uint8_t(buf
, 24, frame
);
191 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS
, buf
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC
);
193 mavlink_orbit_execution_status_t packet
;
194 packet
.time_usec
= time_usec
;
195 packet
.radius
= radius
;
199 packet
.frame
= frame
;
201 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS
, (const char *)&packet
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC
);
206 * @brief Send a orbit_execution_status message
207 * @param chan MAVLink channel to send the message
208 * @param struct The MAVLink struct to serialize
210 static inline void mavlink_msg_orbit_execution_status_send_struct(mavlink_channel_t chan
, const mavlink_orbit_execution_status_t
* orbit_execution_status
)
212 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
213 mavlink_msg_orbit_execution_status_send(chan
, orbit_execution_status
->time_usec
, orbit_execution_status
->radius
, orbit_execution_status
->frame
, orbit_execution_status
->x
, orbit_execution_status
->y
, orbit_execution_status
->z
);
215 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS
, (const char *)orbit_execution_status
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC
);
219 #if MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
221 This varient of _send() can be used to save stack space by re-using
222 memory from the receive buffer. The caller provides a
223 mavlink_message_t which is the size of a full mavlink message. This
224 is usually the receive buffer for the channel, and allows a reply to an
225 incoming message with minimum stack space usage.
227 static inline void mavlink_msg_orbit_execution_status_send_buf(mavlink_message_t
*msgbuf
, mavlink_channel_t chan
, uint64_t time_usec
, float radius
, uint8_t frame
, int32_t x
, int32_t y
, float z
)
229 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
230 char *buf
= (char *)msgbuf
;
231 _mav_put_uint64_t(buf
, 0, time_usec
);
232 _mav_put_float(buf
, 8, radius
);
233 _mav_put_int32_t(buf
, 12, x
);
234 _mav_put_int32_t(buf
, 16, y
);
235 _mav_put_float(buf
, 20, z
);
236 _mav_put_uint8_t(buf
, 24, frame
);
238 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS
, buf
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC
);
240 mavlink_orbit_execution_status_t
*packet
= (mavlink_orbit_execution_status_t
*)msgbuf
;
241 packet
->time_usec
= time_usec
;
242 packet
->radius
= radius
;
246 packet
->frame
= frame
;
248 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS
, (const char *)packet
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC
);
255 // MESSAGE ORBIT_EXECUTION_STATUS UNPACKING
259 * @brief Get field time_usec from orbit_execution_status message
261 * @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
263 static inline uint64_t mavlink_msg_orbit_execution_status_get_time_usec(const mavlink_message_t
* msg
)
265 return _MAV_RETURN_uint64_t(msg
, 0);
269 * @brief Get field radius from orbit_execution_status message
271 * @return [m] Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise.
273 static inline float mavlink_msg_orbit_execution_status_get_radius(const mavlink_message_t
* msg
)
275 return _MAV_RETURN_float(msg
, 8);
279 * @brief Get field frame from orbit_execution_status message
281 * @return The coordinate system of the fields: x, y, z.
283 static inline uint8_t mavlink_msg_orbit_execution_status_get_frame(const mavlink_message_t
* msg
)
285 return _MAV_RETURN_uint8_t(msg
, 24);
289 * @brief Get field x from orbit_execution_status message
291 * @return X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7.
293 static inline int32_t mavlink_msg_orbit_execution_status_get_x(const mavlink_message_t
* msg
)
295 return _MAV_RETURN_int32_t(msg
, 12);
299 * @brief Get field y from orbit_execution_status message
301 * @return Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7.
303 static inline int32_t mavlink_msg_orbit_execution_status_get_y(const mavlink_message_t
* msg
)
305 return _MAV_RETURN_int32_t(msg
, 16);
309 * @brief Get field z from orbit_execution_status message
311 * @return [m] Altitude of center point. Coordinate system depends on frame field.
313 static inline float mavlink_msg_orbit_execution_status_get_z(const mavlink_message_t
* msg
)
315 return _MAV_RETURN_float(msg
, 20);
319 * @brief Decode a orbit_execution_status message into a struct
321 * @param msg The message to decode
322 * @param orbit_execution_status C-struct to decode the message contents into
324 static inline void mavlink_msg_orbit_execution_status_decode(const mavlink_message_t
* msg
, mavlink_orbit_execution_status_t
* orbit_execution_status
)
326 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
327 orbit_execution_status
->time_usec
= mavlink_msg_orbit_execution_status_get_time_usec(msg
);
328 orbit_execution_status
->radius
= mavlink_msg_orbit_execution_status_get_radius(msg
);
329 orbit_execution_status
->x
= mavlink_msg_orbit_execution_status_get_x(msg
);
330 orbit_execution_status
->y
= mavlink_msg_orbit_execution_status_get_y(msg
);
331 orbit_execution_status
->z
= mavlink_msg_orbit_execution_status_get_z(msg
);
332 orbit_execution_status
->frame
= mavlink_msg_orbit_execution_status_get_frame(msg
);
334 uint8_t len
= msg
->len
< MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
? msg
->len
: MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
;
335 memset(orbit_execution_status
, 0, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN
);
336 memcpy(orbit_execution_status
, _MAV_PAYLOAD(msg
), len
);