Merge remote-tracking branch 'upstream/master' into abo_fw_alt_vel_control
[inav.git] / lib / main / MAVLink / common / mavlink_msg_camera_fov_status.h
blob6378e56aa8337e5af46caaf79323210d08e73da1
1 #pragma once
2 // MESSAGE CAMERA_FOV_STATUS PACKING
4 #define MAVLINK_MSG_ID_CAMERA_FOV_STATUS 271
7 typedef struct __mavlink_camera_fov_status_t {
8 uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/
9 int32_t lat_camera; /*< [degE7] Latitude of camera (INT32_MAX if unknown).*/
10 int32_t lon_camera; /*< [degE7] Longitude of camera (INT32_MAX if unknown).*/
11 int32_t alt_camera; /*< [mm] Altitude (MSL) of camera (INT32_MAX if unknown).*/
12 int32_t lat_image; /*< [degE7] Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).*/
13 int32_t lon_image; /*< [degE7] Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).*/
14 int32_t alt_image; /*< [mm] Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).*/
15 float q[4]; /*< Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)*/
16 float hfov; /*< [deg] Horizontal field of view (NaN if unknown).*/
17 float vfov; /*< [deg] Vertical field of view (NaN if unknown).*/
18 } mavlink_camera_fov_status_t;
20 #define MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN 52
21 #define MAVLINK_MSG_ID_CAMERA_FOV_STATUS_MIN_LEN 52
22 #define MAVLINK_MSG_ID_271_LEN 52
23 #define MAVLINK_MSG_ID_271_MIN_LEN 52
25 #define MAVLINK_MSG_ID_CAMERA_FOV_STATUS_CRC 22
26 #define MAVLINK_MSG_ID_271_CRC 22
28 #define MAVLINK_MSG_CAMERA_FOV_STATUS_FIELD_Q_LEN 4
30 #if MAVLINK_COMMAND_24BIT
31 #define MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS { \
32 271, \
33 "CAMERA_FOV_STATUS", \
34 10, \
35 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_camera_fov_status_t, time_boot_ms) }, \
36 { "lat_camera", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_camera_fov_status_t, lat_camera) }, \
37 { "lon_camera", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_camera_fov_status_t, lon_camera) }, \
38 { "alt_camera", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_camera_fov_status_t, alt_camera) }, \
39 { "lat_image", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_camera_fov_status_t, lat_image) }, \
40 { "lon_image", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_camera_fov_status_t, lon_image) }, \
41 { "alt_image", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_camera_fov_status_t, alt_image) }, \
42 { "q", NULL, MAVLINK_TYPE_FLOAT, 4, 28, offsetof(mavlink_camera_fov_status_t, q) }, \
43 { "hfov", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_camera_fov_status_t, hfov) }, \
44 { "vfov", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_camera_fov_status_t, vfov) }, \
45 } \
47 #else
48 #define MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS { \
49 "CAMERA_FOV_STATUS", \
50 10, \
51 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_camera_fov_status_t, time_boot_ms) }, \
52 { "lat_camera", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_camera_fov_status_t, lat_camera) }, \
53 { "lon_camera", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_camera_fov_status_t, lon_camera) }, \
54 { "alt_camera", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_camera_fov_status_t, alt_camera) }, \
55 { "lat_image", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_camera_fov_status_t, lat_image) }, \
56 { "lon_image", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_camera_fov_status_t, lon_image) }, \
57 { "alt_image", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_camera_fov_status_t, alt_image) }, \
58 { "q", NULL, MAVLINK_TYPE_FLOAT, 4, 28, offsetof(mavlink_camera_fov_status_t, q) }, \
59 { "hfov", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_camera_fov_status_t, hfov) }, \
60 { "vfov", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_camera_fov_status_t, vfov) }, \
61 } \
63 #endif
65 /**
66 * @brief Pack a camera_fov_status message
67 * @param system_id ID of this system
68 * @param component_id ID of this component (e.g. 200 for IMU)
69 * @param msg The MAVLink message to compress the data into
71 * @param time_boot_ms [ms] Timestamp (time since system boot).
72 * @param lat_camera [degE7] Latitude of camera (INT32_MAX if unknown).
73 * @param lon_camera [degE7] Longitude of camera (INT32_MAX if unknown).
74 * @param alt_camera [mm] Altitude (MSL) of camera (INT32_MAX if unknown).
75 * @param lat_image [degE7] Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).
76 * @param lon_image [degE7] Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).
77 * @param alt_image [mm] Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).
78 * @param q Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)
79 * @param hfov [deg] Horizontal field of view (NaN if unknown).
80 * @param vfov [deg] Vertical field of view (NaN if unknown).
81 * @return length of the message in bytes (excluding serial stream start sign)
83 static inline uint16_t mavlink_msg_camera_fov_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
84 uint32_t time_boot_ms, int32_t lat_camera, int32_t lon_camera, int32_t alt_camera, int32_t lat_image, int32_t lon_image, int32_t alt_image, const float *q, float hfov, float vfov)
86 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
87 char buf[MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN];
88 _mav_put_uint32_t(buf, 0, time_boot_ms);
89 _mav_put_int32_t(buf, 4, lat_camera);
90 _mav_put_int32_t(buf, 8, lon_camera);
91 _mav_put_int32_t(buf, 12, alt_camera);
92 _mav_put_int32_t(buf, 16, lat_image);
93 _mav_put_int32_t(buf, 20, lon_image);
94 _mav_put_int32_t(buf, 24, alt_image);
95 _mav_put_float(buf, 44, hfov);
96 _mav_put_float(buf, 48, vfov);
97 _mav_put_float_array(buf, 28, q, 4);
98 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN);
99 #else
100 mavlink_camera_fov_status_t packet;
101 packet.time_boot_ms = time_boot_ms;
102 packet.lat_camera = lat_camera;
103 packet.lon_camera = lon_camera;
104 packet.alt_camera = alt_camera;
105 packet.lat_image = lat_image;
106 packet.lon_image = lon_image;
107 packet.alt_image = alt_image;
108 packet.hfov = hfov;
109 packet.vfov = vfov;
110 mav_array_memcpy(packet.q, q, sizeof(float)*4);
111 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN);
112 #endif
114 msg->msgid = MAVLINK_MSG_ID_CAMERA_FOV_STATUS;
115 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_CRC);
119 * @brief Pack a camera_fov_status message on a channel
120 * @param system_id ID of this system
121 * @param component_id ID of this component (e.g. 200 for IMU)
122 * @param chan The MAVLink channel this message will be sent over
123 * @param msg The MAVLink message to compress the data into
124 * @param time_boot_ms [ms] Timestamp (time since system boot).
125 * @param lat_camera [degE7] Latitude of camera (INT32_MAX if unknown).
126 * @param lon_camera [degE7] Longitude of camera (INT32_MAX if unknown).
127 * @param alt_camera [mm] Altitude (MSL) of camera (INT32_MAX if unknown).
128 * @param lat_image [degE7] Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).
129 * @param lon_image [degE7] Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).
130 * @param alt_image [mm] Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).
131 * @param q Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)
132 * @param hfov [deg] Horizontal field of view (NaN if unknown).
133 * @param vfov [deg] Vertical field of view (NaN if unknown).
134 * @return length of the message in bytes (excluding serial stream start sign)
136 static inline uint16_t mavlink_msg_camera_fov_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
137 mavlink_message_t* msg,
138 uint32_t time_boot_ms,int32_t lat_camera,int32_t lon_camera,int32_t alt_camera,int32_t lat_image,int32_t lon_image,int32_t alt_image,const float *q,float hfov,float vfov)
140 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
141 char buf[MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN];
142 _mav_put_uint32_t(buf, 0, time_boot_ms);
143 _mav_put_int32_t(buf, 4, lat_camera);
144 _mav_put_int32_t(buf, 8, lon_camera);
145 _mav_put_int32_t(buf, 12, alt_camera);
146 _mav_put_int32_t(buf, 16, lat_image);
147 _mav_put_int32_t(buf, 20, lon_image);
148 _mav_put_int32_t(buf, 24, alt_image);
149 _mav_put_float(buf, 44, hfov);
150 _mav_put_float(buf, 48, vfov);
151 _mav_put_float_array(buf, 28, q, 4);
152 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN);
153 #else
154 mavlink_camera_fov_status_t packet;
155 packet.time_boot_ms = time_boot_ms;
156 packet.lat_camera = lat_camera;
157 packet.lon_camera = lon_camera;
158 packet.alt_camera = alt_camera;
159 packet.lat_image = lat_image;
160 packet.lon_image = lon_image;
161 packet.alt_image = alt_image;
162 packet.hfov = hfov;
163 packet.vfov = vfov;
164 mav_array_memcpy(packet.q, q, sizeof(float)*4);
165 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN);
166 #endif
168 msg->msgid = MAVLINK_MSG_ID_CAMERA_FOV_STATUS;
169 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_CRC);
173 * @brief Encode a camera_fov_status struct
175 * @param system_id ID of this system
176 * @param component_id ID of this component (e.g. 200 for IMU)
177 * @param msg The MAVLink message to compress the data into
178 * @param camera_fov_status C-struct to read the message contents from
180 static inline uint16_t mavlink_msg_camera_fov_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_camera_fov_status_t* camera_fov_status)
182 return mavlink_msg_camera_fov_status_pack(system_id, component_id, msg, camera_fov_status->time_boot_ms, camera_fov_status->lat_camera, camera_fov_status->lon_camera, camera_fov_status->alt_camera, camera_fov_status->lat_image, camera_fov_status->lon_image, camera_fov_status->alt_image, camera_fov_status->q, camera_fov_status->hfov, camera_fov_status->vfov);
186 * @brief Encode a camera_fov_status struct on a channel
188 * @param system_id ID of this system
189 * @param component_id ID of this component (e.g. 200 for IMU)
190 * @param chan The MAVLink channel this message will be sent over
191 * @param msg The MAVLink message to compress the data into
192 * @param camera_fov_status C-struct to read the message contents from
194 static inline uint16_t mavlink_msg_camera_fov_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_camera_fov_status_t* camera_fov_status)
196 return mavlink_msg_camera_fov_status_pack_chan(system_id, component_id, chan, msg, camera_fov_status->time_boot_ms, camera_fov_status->lat_camera, camera_fov_status->lon_camera, camera_fov_status->alt_camera, camera_fov_status->lat_image, camera_fov_status->lon_image, camera_fov_status->alt_image, camera_fov_status->q, camera_fov_status->hfov, camera_fov_status->vfov);
200 * @brief Send a camera_fov_status message
201 * @param chan MAVLink channel to send the message
203 * @param time_boot_ms [ms] Timestamp (time since system boot).
204 * @param lat_camera [degE7] Latitude of camera (INT32_MAX if unknown).
205 * @param lon_camera [degE7] Longitude of camera (INT32_MAX if unknown).
206 * @param alt_camera [mm] Altitude (MSL) of camera (INT32_MAX if unknown).
207 * @param lat_image [degE7] Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).
208 * @param lon_image [degE7] Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).
209 * @param alt_image [mm] Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).
210 * @param q Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)
211 * @param hfov [deg] Horizontal field of view (NaN if unknown).
212 * @param vfov [deg] Vertical field of view (NaN if unknown).
214 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
216 static inline void mavlink_msg_camera_fov_status_send(mavlink_channel_t chan, uint32_t time_boot_ms, int32_t lat_camera, int32_t lon_camera, int32_t alt_camera, int32_t lat_image, int32_t lon_image, int32_t alt_image, const float *q, float hfov, float vfov)
218 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
219 char buf[MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN];
220 _mav_put_uint32_t(buf, 0, time_boot_ms);
221 _mav_put_int32_t(buf, 4, lat_camera);
222 _mav_put_int32_t(buf, 8, lon_camera);
223 _mav_put_int32_t(buf, 12, alt_camera);
224 _mav_put_int32_t(buf, 16, lat_image);
225 _mav_put_int32_t(buf, 20, lon_image);
226 _mav_put_int32_t(buf, 24, alt_image);
227 _mav_put_float(buf, 44, hfov);
228 _mav_put_float(buf, 48, vfov);
229 _mav_put_float_array(buf, 28, q, 4);
230 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_FOV_STATUS, buf, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_CRC);
231 #else
232 mavlink_camera_fov_status_t packet;
233 packet.time_boot_ms = time_boot_ms;
234 packet.lat_camera = lat_camera;
235 packet.lon_camera = lon_camera;
236 packet.alt_camera = alt_camera;
237 packet.lat_image = lat_image;
238 packet.lon_image = lon_image;
239 packet.alt_image = alt_image;
240 packet.hfov = hfov;
241 packet.vfov = vfov;
242 mav_array_memcpy(packet.q, q, sizeof(float)*4);
243 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_FOV_STATUS, (const char *)&packet, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_CRC);
244 #endif
248 * @brief Send a camera_fov_status message
249 * @param chan MAVLink channel to send the message
250 * @param struct The MAVLink struct to serialize
252 static inline void mavlink_msg_camera_fov_status_send_struct(mavlink_channel_t chan, const mavlink_camera_fov_status_t* camera_fov_status)
254 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
255 mavlink_msg_camera_fov_status_send(chan, camera_fov_status->time_boot_ms, camera_fov_status->lat_camera, camera_fov_status->lon_camera, camera_fov_status->alt_camera, camera_fov_status->lat_image, camera_fov_status->lon_image, camera_fov_status->alt_image, camera_fov_status->q, camera_fov_status->hfov, camera_fov_status->vfov);
256 #else
257 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_FOV_STATUS, (const char *)camera_fov_status, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_CRC);
258 #endif
261 #if MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
263 This varient of _send() can be used to save stack space by re-using
264 memory from the receive buffer. The caller provides a
265 mavlink_message_t which is the size of a full mavlink message. This
266 is usually the receive buffer for the channel, and allows a reply to an
267 incoming message with minimum stack space usage.
269 static inline void mavlink_msg_camera_fov_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, int32_t lat_camera, int32_t lon_camera, int32_t alt_camera, int32_t lat_image, int32_t lon_image, int32_t alt_image, const float *q, float hfov, float vfov)
271 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
272 char *buf = (char *)msgbuf;
273 _mav_put_uint32_t(buf, 0, time_boot_ms);
274 _mav_put_int32_t(buf, 4, lat_camera);
275 _mav_put_int32_t(buf, 8, lon_camera);
276 _mav_put_int32_t(buf, 12, alt_camera);
277 _mav_put_int32_t(buf, 16, lat_image);
278 _mav_put_int32_t(buf, 20, lon_image);
279 _mav_put_int32_t(buf, 24, alt_image);
280 _mav_put_float(buf, 44, hfov);
281 _mav_put_float(buf, 48, vfov);
282 _mav_put_float_array(buf, 28, q, 4);
283 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_FOV_STATUS, buf, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_CRC);
284 #else
285 mavlink_camera_fov_status_t *packet = (mavlink_camera_fov_status_t *)msgbuf;
286 packet->time_boot_ms = time_boot_ms;
287 packet->lat_camera = lat_camera;
288 packet->lon_camera = lon_camera;
289 packet->alt_camera = alt_camera;
290 packet->lat_image = lat_image;
291 packet->lon_image = lon_image;
292 packet->alt_image = alt_image;
293 packet->hfov = hfov;
294 packet->vfov = vfov;
295 mav_array_memcpy(packet->q, q, sizeof(float)*4);
296 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_FOV_STATUS, (const char *)packet, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_CRC);
297 #endif
299 #endif
301 #endif
303 // MESSAGE CAMERA_FOV_STATUS UNPACKING
307 * @brief Get field time_boot_ms from camera_fov_status message
309 * @return [ms] Timestamp (time since system boot).
311 static inline uint32_t mavlink_msg_camera_fov_status_get_time_boot_ms(const mavlink_message_t* msg)
313 return _MAV_RETURN_uint32_t(msg, 0);
317 * @brief Get field lat_camera from camera_fov_status message
319 * @return [degE7] Latitude of camera (INT32_MAX if unknown).
321 static inline int32_t mavlink_msg_camera_fov_status_get_lat_camera(const mavlink_message_t* msg)
323 return _MAV_RETURN_int32_t(msg, 4);
327 * @brief Get field lon_camera from camera_fov_status message
329 * @return [degE7] Longitude of camera (INT32_MAX if unknown).
331 static inline int32_t mavlink_msg_camera_fov_status_get_lon_camera(const mavlink_message_t* msg)
333 return _MAV_RETURN_int32_t(msg, 8);
337 * @brief Get field alt_camera from camera_fov_status message
339 * @return [mm] Altitude (MSL) of camera (INT32_MAX if unknown).
341 static inline int32_t mavlink_msg_camera_fov_status_get_alt_camera(const mavlink_message_t* msg)
343 return _MAV_RETURN_int32_t(msg, 12);
347 * @brief Get field lat_image from camera_fov_status message
349 * @return [degE7] Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).
351 static inline int32_t mavlink_msg_camera_fov_status_get_lat_image(const mavlink_message_t* msg)
353 return _MAV_RETURN_int32_t(msg, 16);
357 * @brief Get field lon_image from camera_fov_status message
359 * @return [degE7] Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).
361 static inline int32_t mavlink_msg_camera_fov_status_get_lon_image(const mavlink_message_t* msg)
363 return _MAV_RETURN_int32_t(msg, 20);
367 * @brief Get field alt_image from camera_fov_status message
369 * @return [mm] Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon).
371 static inline int32_t mavlink_msg_camera_fov_status_get_alt_image(const mavlink_message_t* msg)
373 return _MAV_RETURN_int32_t(msg, 24);
377 * @brief Get field q from camera_fov_status message
379 * @return Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)
381 static inline uint16_t mavlink_msg_camera_fov_status_get_q(const mavlink_message_t* msg, float *q)
383 return _MAV_RETURN_float_array(msg, q, 4, 28);
387 * @brief Get field hfov from camera_fov_status message
389 * @return [deg] Horizontal field of view (NaN if unknown).
391 static inline float mavlink_msg_camera_fov_status_get_hfov(const mavlink_message_t* msg)
393 return _MAV_RETURN_float(msg, 44);
397 * @brief Get field vfov from camera_fov_status message
399 * @return [deg] Vertical field of view (NaN if unknown).
401 static inline float mavlink_msg_camera_fov_status_get_vfov(const mavlink_message_t* msg)
403 return _MAV_RETURN_float(msg, 48);
407 * @brief Decode a camera_fov_status message into a struct
409 * @param msg The message to decode
410 * @param camera_fov_status C-struct to decode the message contents into
412 static inline void mavlink_msg_camera_fov_status_decode(const mavlink_message_t* msg, mavlink_camera_fov_status_t* camera_fov_status)
414 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
415 camera_fov_status->time_boot_ms = mavlink_msg_camera_fov_status_get_time_boot_ms(msg);
416 camera_fov_status->lat_camera = mavlink_msg_camera_fov_status_get_lat_camera(msg);
417 camera_fov_status->lon_camera = mavlink_msg_camera_fov_status_get_lon_camera(msg);
418 camera_fov_status->alt_camera = mavlink_msg_camera_fov_status_get_alt_camera(msg);
419 camera_fov_status->lat_image = mavlink_msg_camera_fov_status_get_lat_image(msg);
420 camera_fov_status->lon_image = mavlink_msg_camera_fov_status_get_lon_image(msg);
421 camera_fov_status->alt_image = mavlink_msg_camera_fov_status_get_alt_image(msg);
422 mavlink_msg_camera_fov_status_get_q(msg, camera_fov_status->q);
423 camera_fov_status->hfov = mavlink_msg_camera_fov_status_get_hfov(msg);
424 camera_fov_status->vfov = mavlink_msg_camera_fov_status_get_vfov(msg);
425 #else
426 uint8_t len = msg->len < MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN? msg->len : MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN;
427 memset(camera_fov_status, 0, MAVLINK_MSG_ID_CAMERA_FOV_STATUS_LEN);
428 memcpy(camera_fov_status, _MAV_PAYLOAD(msg), len);
429 #endif