Merge pull request #10476 from radiolinkW/RADIOLINKF722
[inav.git] / lib / main / MAVLink / common / mavlink_msg_camera_tracking_geo_status.h
blobf4e22b98f964d151deb3769a45a30ccce3d32ca6
1 #pragma once
2 // MESSAGE CAMERA_TRACKING_GEO_STATUS PACKING
4 #define MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS 276
7 typedef struct __mavlink_camera_tracking_geo_status_t {
8 int32_t lat; /*< [degE7] Latitude of tracked object*/
9 int32_t lon; /*< [degE7] Longitude of tracked object*/
10 float alt; /*< [m] Altitude of tracked object(AMSL, WGS84)*/
11 float h_acc; /*< [m] Horizontal accuracy. NAN if unknown*/
12 float v_acc; /*< [m] Vertical accuracy. NAN if unknown*/
13 float vel_n; /*< [m/s] North velocity of tracked object. NAN if unknown*/
14 float vel_e; /*< [m/s] East velocity of tracked object. NAN if unknown*/
15 float vel_d; /*< [m/s] Down velocity of tracked object. NAN if unknown*/
16 float vel_acc; /*< [m/s] Velocity accuracy. NAN if unknown*/
17 float dist; /*< [m] Distance between camera and tracked object. NAN if unknown*/
18 float hdg; /*< [rad] Heading in radians, in NED. NAN if unknown*/
19 float hdg_acc; /*< [rad] Accuracy of heading, in NED. NAN if unknown*/
20 uint8_t tracking_status; /*< Current tracking status*/
21 } mavlink_camera_tracking_geo_status_t;
23 #define MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN 49
24 #define MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_MIN_LEN 49
25 #define MAVLINK_MSG_ID_276_LEN 49
26 #define MAVLINK_MSG_ID_276_MIN_LEN 49
28 #define MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_CRC 18
29 #define MAVLINK_MSG_ID_276_CRC 18
33 #if MAVLINK_COMMAND_24BIT
34 #define MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS { \
35 276, \
36 "CAMERA_TRACKING_GEO_STATUS", \
37 13, \
38 { { "tracking_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 48, offsetof(mavlink_camera_tracking_geo_status_t, tracking_status) }, \
39 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_camera_tracking_geo_status_t, lat) }, \
40 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_camera_tracking_geo_status_t, lon) }, \
41 { "alt", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_camera_tracking_geo_status_t, alt) }, \
42 { "h_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_camera_tracking_geo_status_t, h_acc) }, \
43 { "v_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_camera_tracking_geo_status_t, v_acc) }, \
44 { "vel_n", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_camera_tracking_geo_status_t, vel_n) }, \
45 { "vel_e", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_camera_tracking_geo_status_t, vel_e) }, \
46 { "vel_d", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_camera_tracking_geo_status_t, vel_d) }, \
47 { "vel_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_camera_tracking_geo_status_t, vel_acc) }, \
48 { "dist", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_camera_tracking_geo_status_t, dist) }, \
49 { "hdg", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_camera_tracking_geo_status_t, hdg) }, \
50 { "hdg_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_camera_tracking_geo_status_t, hdg_acc) }, \
51 } \
53 #else
54 #define MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS { \
55 "CAMERA_TRACKING_GEO_STATUS", \
56 13, \
57 { { "tracking_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 48, offsetof(mavlink_camera_tracking_geo_status_t, tracking_status) }, \
58 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_camera_tracking_geo_status_t, lat) }, \
59 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_camera_tracking_geo_status_t, lon) }, \
60 { "alt", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_camera_tracking_geo_status_t, alt) }, \
61 { "h_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_camera_tracking_geo_status_t, h_acc) }, \
62 { "v_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_camera_tracking_geo_status_t, v_acc) }, \
63 { "vel_n", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_camera_tracking_geo_status_t, vel_n) }, \
64 { "vel_e", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_camera_tracking_geo_status_t, vel_e) }, \
65 { "vel_d", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_camera_tracking_geo_status_t, vel_d) }, \
66 { "vel_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_camera_tracking_geo_status_t, vel_acc) }, \
67 { "dist", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_camera_tracking_geo_status_t, dist) }, \
68 { "hdg", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_camera_tracking_geo_status_t, hdg) }, \
69 { "hdg_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_camera_tracking_geo_status_t, hdg_acc) }, \
70 } \
72 #endif
74 /**
75 * @brief Pack a camera_tracking_geo_status message
76 * @param system_id ID of this system
77 * @param component_id ID of this component (e.g. 200 for IMU)
78 * @param msg The MAVLink message to compress the data into
80 * @param tracking_status Current tracking status
81 * @param lat [degE7] Latitude of tracked object
82 * @param lon [degE7] Longitude of tracked object
83 * @param alt [m] Altitude of tracked object(AMSL, WGS84)
84 * @param h_acc [m] Horizontal accuracy. NAN if unknown
85 * @param v_acc [m] Vertical accuracy. NAN if unknown
86 * @param vel_n [m/s] North velocity of tracked object. NAN if unknown
87 * @param vel_e [m/s] East velocity of tracked object. NAN if unknown
88 * @param vel_d [m/s] Down velocity of tracked object. NAN if unknown
89 * @param vel_acc [m/s] Velocity accuracy. NAN if unknown
90 * @param dist [m] Distance between camera and tracked object. NAN if unknown
91 * @param hdg [rad] Heading in radians, in NED. NAN if unknown
92 * @param hdg_acc [rad] Accuracy of heading, in NED. NAN if unknown
93 * @return length of the message in bytes (excluding serial stream start sign)
95 static inline uint16_t mavlink_msg_camera_tracking_geo_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
96 uint8_t tracking_status, int32_t lat, int32_t lon, float alt, float h_acc, float v_acc, float vel_n, float vel_e, float vel_d, float vel_acc, float dist, float hdg, float hdg_acc)
98 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
99 char buf[MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN];
100 _mav_put_int32_t(buf, 0, lat);
101 _mav_put_int32_t(buf, 4, lon);
102 _mav_put_float(buf, 8, alt);
103 _mav_put_float(buf, 12, h_acc);
104 _mav_put_float(buf, 16, v_acc);
105 _mav_put_float(buf, 20, vel_n);
106 _mav_put_float(buf, 24, vel_e);
107 _mav_put_float(buf, 28, vel_d);
108 _mav_put_float(buf, 32, vel_acc);
109 _mav_put_float(buf, 36, dist);
110 _mav_put_float(buf, 40, hdg);
111 _mav_put_float(buf, 44, hdg_acc);
112 _mav_put_uint8_t(buf, 48, tracking_status);
114 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN);
115 #else
116 mavlink_camera_tracking_geo_status_t packet;
117 packet.lat = lat;
118 packet.lon = lon;
119 packet.alt = alt;
120 packet.h_acc = h_acc;
121 packet.v_acc = v_acc;
122 packet.vel_n = vel_n;
123 packet.vel_e = vel_e;
124 packet.vel_d = vel_d;
125 packet.vel_acc = vel_acc;
126 packet.dist = dist;
127 packet.hdg = hdg;
128 packet.hdg_acc = hdg_acc;
129 packet.tracking_status = tracking_status;
131 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN);
132 #endif
134 msg->msgid = MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS;
135 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_CRC);
139 * @brief Pack a camera_tracking_geo_status message on a channel
140 * @param system_id ID of this system
141 * @param component_id ID of this component (e.g. 200 for IMU)
142 * @param chan The MAVLink channel this message will be sent over
143 * @param msg The MAVLink message to compress the data into
144 * @param tracking_status Current tracking status
145 * @param lat [degE7] Latitude of tracked object
146 * @param lon [degE7] Longitude of tracked object
147 * @param alt [m] Altitude of tracked object(AMSL, WGS84)
148 * @param h_acc [m] Horizontal accuracy. NAN if unknown
149 * @param v_acc [m] Vertical accuracy. NAN if unknown
150 * @param vel_n [m/s] North velocity of tracked object. NAN if unknown
151 * @param vel_e [m/s] East velocity of tracked object. NAN if unknown
152 * @param vel_d [m/s] Down velocity of tracked object. NAN if unknown
153 * @param vel_acc [m/s] Velocity accuracy. NAN if unknown
154 * @param dist [m] Distance between camera and tracked object. NAN if unknown
155 * @param hdg [rad] Heading in radians, in NED. NAN if unknown
156 * @param hdg_acc [rad] Accuracy of heading, in NED. NAN if unknown
157 * @return length of the message in bytes (excluding serial stream start sign)
159 static inline uint16_t mavlink_msg_camera_tracking_geo_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
160 mavlink_message_t* msg,
161 uint8_t tracking_status,int32_t lat,int32_t lon,float alt,float h_acc,float v_acc,float vel_n,float vel_e,float vel_d,float vel_acc,float dist,float hdg,float hdg_acc)
163 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
164 char buf[MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN];
165 _mav_put_int32_t(buf, 0, lat);
166 _mav_put_int32_t(buf, 4, lon);
167 _mav_put_float(buf, 8, alt);
168 _mav_put_float(buf, 12, h_acc);
169 _mav_put_float(buf, 16, v_acc);
170 _mav_put_float(buf, 20, vel_n);
171 _mav_put_float(buf, 24, vel_e);
172 _mav_put_float(buf, 28, vel_d);
173 _mav_put_float(buf, 32, vel_acc);
174 _mav_put_float(buf, 36, dist);
175 _mav_put_float(buf, 40, hdg);
176 _mav_put_float(buf, 44, hdg_acc);
177 _mav_put_uint8_t(buf, 48, tracking_status);
179 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN);
180 #else
181 mavlink_camera_tracking_geo_status_t packet;
182 packet.lat = lat;
183 packet.lon = lon;
184 packet.alt = alt;
185 packet.h_acc = h_acc;
186 packet.v_acc = v_acc;
187 packet.vel_n = vel_n;
188 packet.vel_e = vel_e;
189 packet.vel_d = vel_d;
190 packet.vel_acc = vel_acc;
191 packet.dist = dist;
192 packet.hdg = hdg;
193 packet.hdg_acc = hdg_acc;
194 packet.tracking_status = tracking_status;
196 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN);
197 #endif
199 msg->msgid = MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS;
200 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_CRC);
204 * @brief Encode a camera_tracking_geo_status struct
206 * @param system_id ID of this system
207 * @param component_id ID of this component (e.g. 200 for IMU)
208 * @param msg The MAVLink message to compress the data into
209 * @param camera_tracking_geo_status C-struct to read the message contents from
211 static inline uint16_t mavlink_msg_camera_tracking_geo_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_camera_tracking_geo_status_t* camera_tracking_geo_status)
213 return mavlink_msg_camera_tracking_geo_status_pack(system_id, component_id, msg, camera_tracking_geo_status->tracking_status, camera_tracking_geo_status->lat, camera_tracking_geo_status->lon, camera_tracking_geo_status->alt, camera_tracking_geo_status->h_acc, camera_tracking_geo_status->v_acc, camera_tracking_geo_status->vel_n, camera_tracking_geo_status->vel_e, camera_tracking_geo_status->vel_d, camera_tracking_geo_status->vel_acc, camera_tracking_geo_status->dist, camera_tracking_geo_status->hdg, camera_tracking_geo_status->hdg_acc);
217 * @brief Encode a camera_tracking_geo_status struct on a channel
219 * @param system_id ID of this system
220 * @param component_id ID of this component (e.g. 200 for IMU)
221 * @param chan The MAVLink channel this message will be sent over
222 * @param msg The MAVLink message to compress the data into
223 * @param camera_tracking_geo_status C-struct to read the message contents from
225 static inline uint16_t mavlink_msg_camera_tracking_geo_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_camera_tracking_geo_status_t* camera_tracking_geo_status)
227 return mavlink_msg_camera_tracking_geo_status_pack_chan(system_id, component_id, chan, msg, camera_tracking_geo_status->tracking_status, camera_tracking_geo_status->lat, camera_tracking_geo_status->lon, camera_tracking_geo_status->alt, camera_tracking_geo_status->h_acc, camera_tracking_geo_status->v_acc, camera_tracking_geo_status->vel_n, camera_tracking_geo_status->vel_e, camera_tracking_geo_status->vel_d, camera_tracking_geo_status->vel_acc, camera_tracking_geo_status->dist, camera_tracking_geo_status->hdg, camera_tracking_geo_status->hdg_acc);
231 * @brief Send a camera_tracking_geo_status message
232 * @param chan MAVLink channel to send the message
234 * @param tracking_status Current tracking status
235 * @param lat [degE7] Latitude of tracked object
236 * @param lon [degE7] Longitude of tracked object
237 * @param alt [m] Altitude of tracked object(AMSL, WGS84)
238 * @param h_acc [m] Horizontal accuracy. NAN if unknown
239 * @param v_acc [m] Vertical accuracy. NAN if unknown
240 * @param vel_n [m/s] North velocity of tracked object. NAN if unknown
241 * @param vel_e [m/s] East velocity of tracked object. NAN if unknown
242 * @param vel_d [m/s] Down velocity of tracked object. NAN if unknown
243 * @param vel_acc [m/s] Velocity accuracy. NAN if unknown
244 * @param dist [m] Distance between camera and tracked object. NAN if unknown
245 * @param hdg [rad] Heading in radians, in NED. NAN if unknown
246 * @param hdg_acc [rad] Accuracy of heading, in NED. NAN if unknown
248 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
250 static inline void mavlink_msg_camera_tracking_geo_status_send(mavlink_channel_t chan, uint8_t tracking_status, int32_t lat, int32_t lon, float alt, float h_acc, float v_acc, float vel_n, float vel_e, float vel_d, float vel_acc, float dist, float hdg, float hdg_acc)
252 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
253 char buf[MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN];
254 _mav_put_int32_t(buf, 0, lat);
255 _mav_put_int32_t(buf, 4, lon);
256 _mav_put_float(buf, 8, alt);
257 _mav_put_float(buf, 12, h_acc);
258 _mav_put_float(buf, 16, v_acc);
259 _mav_put_float(buf, 20, vel_n);
260 _mav_put_float(buf, 24, vel_e);
261 _mav_put_float(buf, 28, vel_d);
262 _mav_put_float(buf, 32, vel_acc);
263 _mav_put_float(buf, 36, dist);
264 _mav_put_float(buf, 40, hdg);
265 _mav_put_float(buf, 44, hdg_acc);
266 _mav_put_uint8_t(buf, 48, tracking_status);
268 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS, buf, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_CRC);
269 #else
270 mavlink_camera_tracking_geo_status_t packet;
271 packet.lat = lat;
272 packet.lon = lon;
273 packet.alt = alt;
274 packet.h_acc = h_acc;
275 packet.v_acc = v_acc;
276 packet.vel_n = vel_n;
277 packet.vel_e = vel_e;
278 packet.vel_d = vel_d;
279 packet.vel_acc = vel_acc;
280 packet.dist = dist;
281 packet.hdg = hdg;
282 packet.hdg_acc = hdg_acc;
283 packet.tracking_status = tracking_status;
285 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS, (const char *)&packet, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_CRC);
286 #endif
290 * @brief Send a camera_tracking_geo_status message
291 * @param chan MAVLink channel to send the message
292 * @param struct The MAVLink struct to serialize
294 static inline void mavlink_msg_camera_tracking_geo_status_send_struct(mavlink_channel_t chan, const mavlink_camera_tracking_geo_status_t* camera_tracking_geo_status)
296 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
297 mavlink_msg_camera_tracking_geo_status_send(chan, camera_tracking_geo_status->tracking_status, camera_tracking_geo_status->lat, camera_tracking_geo_status->lon, camera_tracking_geo_status->alt, camera_tracking_geo_status->h_acc, camera_tracking_geo_status->v_acc, camera_tracking_geo_status->vel_n, camera_tracking_geo_status->vel_e, camera_tracking_geo_status->vel_d, camera_tracking_geo_status->vel_acc, camera_tracking_geo_status->dist, camera_tracking_geo_status->hdg, camera_tracking_geo_status->hdg_acc);
298 #else
299 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS, (const char *)camera_tracking_geo_status, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_CRC);
300 #endif
303 #if MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
305 This varient of _send() can be used to save stack space by re-using
306 memory from the receive buffer. The caller provides a
307 mavlink_message_t which is the size of a full mavlink message. This
308 is usually the receive buffer for the channel, and allows a reply to an
309 incoming message with minimum stack space usage.
311 static inline void mavlink_msg_camera_tracking_geo_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t tracking_status, int32_t lat, int32_t lon, float alt, float h_acc, float v_acc, float vel_n, float vel_e, float vel_d, float vel_acc, float dist, float hdg, float hdg_acc)
313 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
314 char *buf = (char *)msgbuf;
315 _mav_put_int32_t(buf, 0, lat);
316 _mav_put_int32_t(buf, 4, lon);
317 _mav_put_float(buf, 8, alt);
318 _mav_put_float(buf, 12, h_acc);
319 _mav_put_float(buf, 16, v_acc);
320 _mav_put_float(buf, 20, vel_n);
321 _mav_put_float(buf, 24, vel_e);
322 _mav_put_float(buf, 28, vel_d);
323 _mav_put_float(buf, 32, vel_acc);
324 _mav_put_float(buf, 36, dist);
325 _mav_put_float(buf, 40, hdg);
326 _mav_put_float(buf, 44, hdg_acc);
327 _mav_put_uint8_t(buf, 48, tracking_status);
329 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS, buf, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_CRC);
330 #else
331 mavlink_camera_tracking_geo_status_t *packet = (mavlink_camera_tracking_geo_status_t *)msgbuf;
332 packet->lat = lat;
333 packet->lon = lon;
334 packet->alt = alt;
335 packet->h_acc = h_acc;
336 packet->v_acc = v_acc;
337 packet->vel_n = vel_n;
338 packet->vel_e = vel_e;
339 packet->vel_d = vel_d;
340 packet->vel_acc = vel_acc;
341 packet->dist = dist;
342 packet->hdg = hdg;
343 packet->hdg_acc = hdg_acc;
344 packet->tracking_status = tracking_status;
346 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS, (const char *)packet, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_CRC);
347 #endif
349 #endif
351 #endif
353 // MESSAGE CAMERA_TRACKING_GEO_STATUS UNPACKING
357 * @brief Get field tracking_status from camera_tracking_geo_status message
359 * @return Current tracking status
361 static inline uint8_t mavlink_msg_camera_tracking_geo_status_get_tracking_status(const mavlink_message_t* msg)
363 return _MAV_RETURN_uint8_t(msg, 48);
367 * @brief Get field lat from camera_tracking_geo_status message
369 * @return [degE7] Latitude of tracked object
371 static inline int32_t mavlink_msg_camera_tracking_geo_status_get_lat(const mavlink_message_t* msg)
373 return _MAV_RETURN_int32_t(msg, 0);
377 * @brief Get field lon from camera_tracking_geo_status message
379 * @return [degE7] Longitude of tracked object
381 static inline int32_t mavlink_msg_camera_tracking_geo_status_get_lon(const mavlink_message_t* msg)
383 return _MAV_RETURN_int32_t(msg, 4);
387 * @brief Get field alt from camera_tracking_geo_status message
389 * @return [m] Altitude of tracked object(AMSL, WGS84)
391 static inline float mavlink_msg_camera_tracking_geo_status_get_alt(const mavlink_message_t* msg)
393 return _MAV_RETURN_float(msg, 8);
397 * @brief Get field h_acc from camera_tracking_geo_status message
399 * @return [m] Horizontal accuracy. NAN if unknown
401 static inline float mavlink_msg_camera_tracking_geo_status_get_h_acc(const mavlink_message_t* msg)
403 return _MAV_RETURN_float(msg, 12);
407 * @brief Get field v_acc from camera_tracking_geo_status message
409 * @return [m] Vertical accuracy. NAN if unknown
411 static inline float mavlink_msg_camera_tracking_geo_status_get_v_acc(const mavlink_message_t* msg)
413 return _MAV_RETURN_float(msg, 16);
417 * @brief Get field vel_n from camera_tracking_geo_status message
419 * @return [m/s] North velocity of tracked object. NAN if unknown
421 static inline float mavlink_msg_camera_tracking_geo_status_get_vel_n(const mavlink_message_t* msg)
423 return _MAV_RETURN_float(msg, 20);
427 * @brief Get field vel_e from camera_tracking_geo_status message
429 * @return [m/s] East velocity of tracked object. NAN if unknown
431 static inline float mavlink_msg_camera_tracking_geo_status_get_vel_e(const mavlink_message_t* msg)
433 return _MAV_RETURN_float(msg, 24);
437 * @brief Get field vel_d from camera_tracking_geo_status message
439 * @return [m/s] Down velocity of tracked object. NAN if unknown
441 static inline float mavlink_msg_camera_tracking_geo_status_get_vel_d(const mavlink_message_t* msg)
443 return _MAV_RETURN_float(msg, 28);
447 * @brief Get field vel_acc from camera_tracking_geo_status message
449 * @return [m/s] Velocity accuracy. NAN if unknown
451 static inline float mavlink_msg_camera_tracking_geo_status_get_vel_acc(const mavlink_message_t* msg)
453 return _MAV_RETURN_float(msg, 32);
457 * @brief Get field dist from camera_tracking_geo_status message
459 * @return [m] Distance between camera and tracked object. NAN if unknown
461 static inline float mavlink_msg_camera_tracking_geo_status_get_dist(const mavlink_message_t* msg)
463 return _MAV_RETURN_float(msg, 36);
467 * @brief Get field hdg from camera_tracking_geo_status message
469 * @return [rad] Heading in radians, in NED. NAN if unknown
471 static inline float mavlink_msg_camera_tracking_geo_status_get_hdg(const mavlink_message_t* msg)
473 return _MAV_RETURN_float(msg, 40);
477 * @brief Get field hdg_acc from camera_tracking_geo_status message
479 * @return [rad] Accuracy of heading, in NED. NAN if unknown
481 static inline float mavlink_msg_camera_tracking_geo_status_get_hdg_acc(const mavlink_message_t* msg)
483 return _MAV_RETURN_float(msg, 44);
487 * @brief Decode a camera_tracking_geo_status message into a struct
489 * @param msg The message to decode
490 * @param camera_tracking_geo_status C-struct to decode the message contents into
492 static inline void mavlink_msg_camera_tracking_geo_status_decode(const mavlink_message_t* msg, mavlink_camera_tracking_geo_status_t* camera_tracking_geo_status)
494 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
495 camera_tracking_geo_status->lat = mavlink_msg_camera_tracking_geo_status_get_lat(msg);
496 camera_tracking_geo_status->lon = mavlink_msg_camera_tracking_geo_status_get_lon(msg);
497 camera_tracking_geo_status->alt = mavlink_msg_camera_tracking_geo_status_get_alt(msg);
498 camera_tracking_geo_status->h_acc = mavlink_msg_camera_tracking_geo_status_get_h_acc(msg);
499 camera_tracking_geo_status->v_acc = mavlink_msg_camera_tracking_geo_status_get_v_acc(msg);
500 camera_tracking_geo_status->vel_n = mavlink_msg_camera_tracking_geo_status_get_vel_n(msg);
501 camera_tracking_geo_status->vel_e = mavlink_msg_camera_tracking_geo_status_get_vel_e(msg);
502 camera_tracking_geo_status->vel_d = mavlink_msg_camera_tracking_geo_status_get_vel_d(msg);
503 camera_tracking_geo_status->vel_acc = mavlink_msg_camera_tracking_geo_status_get_vel_acc(msg);
504 camera_tracking_geo_status->dist = mavlink_msg_camera_tracking_geo_status_get_dist(msg);
505 camera_tracking_geo_status->hdg = mavlink_msg_camera_tracking_geo_status_get_hdg(msg);
506 camera_tracking_geo_status->hdg_acc = mavlink_msg_camera_tracking_geo_status_get_hdg_acc(msg);
507 camera_tracking_geo_status->tracking_status = mavlink_msg_camera_tracking_geo_status_get_tracking_status(msg);
508 #else
509 uint8_t len = msg->len < MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN? msg->len : MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN;
510 memset(camera_tracking_geo_status, 0, MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS_LEN);
511 memcpy(camera_tracking_geo_status, _MAV_PAYLOAD(msg), len);
512 #endif