DJI Payload SDK  1.5.3
psdk_cmdset_msg_push.h
Go to the documentation of this file.
1 /**
2  ******************************************************************************
3  * @file psdk_cmdset_msg_push.h
4  * @version V1.5.0
5  * @date 2019/07/31
6  * @brief This file defines the message push command set.
7  *
8  * @copyright (c) 2017-2018 DJI. All rights reserved.
9  *
10  * All information contained herein is, and remains, the property of DJI.
11  * The intellectual and technical concepts contained herein are proprietary
12  * to DJI and may be covered by U.S. and foreign patents, patents in process,
13  * and protected by trade secret or copyright law. Dissemination of this
14  * information, including but not limited to data and other proprietary
15  * material(s) incorporated within the information, in any form, is strictly
16  * prohibited without the express written consent of DJI.
17  *
18  * If you receive this source code without DJI’s authorization, you may not
19  * further disseminate the information, and you must immediately remove the
20  * source code and notify DJI of its removal. DJI reserves the right to pursue
21  * legal actions against you for any loss(es) or damage(s) caused by your
22  * failure to do so.
23  *
24  ******************************************************************************
25  */
26 
27 /* Define to prevent recursive inclusion -------------------------------------*/
28 #ifndef PSDK_CMDSET_MSG_PUSH_H
29 #define PSDK_CMDSET_MSG_PUSH_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /* Includes ------------------------------------------------------------------*/
36 #include <psdk_typedef.h>
37 #include <psdk_core.h>
38 
39 /** @addtogroup PSDK
40  * @{
41  */
42 
43 /** @addtogroup PSDK_Message_Push
44  * @{
45  */
46 
47 /* Exported constants --------------------------------------------------------*/
48 
49 /** @defgroup M_Push_Exported_Constants Exported Constants
50  * @{
51  */
52 
53 /** @defgroup E_Constants_Psdk_UAV_Type Psdk UAV Type
54  * @{
55  */
56 
57 #define PSDK_UAV_TYPE_UNKNOWN 0 /*!< Specifies unknown UAV type. */
58 #define PSDK_UAV_TYPE_M200 1 /*!< Specifies M200 UAV. */
59 #define PSDK_UAV_TYPE_M210 2 /*!< Specifies M210 UAV. */
60 #define PSDK_UAV_TYPE_M210RTK 3 /*!< Specifies M210 RTK UAV. */
61 #define PSDK_UAV_TYPE_M600 4 /*!< Specifies M600 UAV. */
62 #define PSDK_UAV_TYPE_M600PRO 5 /*!< Specifies M600 PRO UAV. */
63 #define PSDK_UAV_TYPE_M200_V2 6 /*!< Specifies M200 V2 UAV. */
64 #define PSDK_UAV_TYPE_M210_V2 7 /*!< Specifies M210 V2 UAV. */
65 #define PSDK_UAV_TYPE_M210RTK_V2 8 /*!< Specifies M210 RTK V2 UAV. */
66 #define PSDK_UAV_TYPE_M300_RTK 9 /*!< Specifies M300 RTK UAV. */
67 
68 /**
69  * @}
70  */
71 
72 /** @defgroup E_Constants_Psdk_BaseBandState Psdk BaseBandState
73  * @{
74  */
75 
76 #define PSDK_BASE_BAND_STATE_LINK 1 /*!< Specifies base band state is normal. */
77 #define PSDK_BASE_BAND_STATE_UNLINK 0 /*!< Specifies base band state is abnormal. */
78 
79 /**
80  * @}
81  */
82 
83 /** @defgroup E_Constants_Psdk_BatteryPowerState Psdk BatteryPowerState
84  * @{
85  */
86 
87 #define PSDK_BATTERY_POWER_ON 0 /*!< Specifies battery power is normal. */
88 #define PSDK_BATTERY_POWER_OFF 1 /*!< Specifies battery is to be power off. */
89 
90 /**
91  * @}
92  */
93 
94 /** @defgroup E_Constants_Psdk_PayloadPowerOffReadyState Psdk PayloadPowerOffReadyState
95  * @{
96  */
97 
98 #define PSDK_PAYLOAD_POWER_OFF_NOT_READY 0 /*!< Specifies payload is not ready for power off. */
99 #define PSDK_PAYLOAD_POWER_OFF_READY 1 /*!< Specifies payload is ready for power off. */
100 
101 /**
102  * @}
103  */
104 
105 /** @defgroup E_Constants_Psdk_MsgPushLinkState Psdk MsgPushLinkState
106  * @{
107  */
108 
109 #define PSDK_MSG_PUSH_LINK_STATE_LINK 1 /*!< Specifies link state is normal. */
110 #define PSDK_MSG_PUSH_LINK_STATE_UNLINK 0 /*!< Specifies link state is abnormal. */
111 
112 /**
113  * @}
114  */
115 
116 /** @defgroup E_Constants_Psdk_MsgPushLinkBusyState Psdk MsgPushLinkBusyState
117  * @{
118  */
119 
120 #define PSDK_MSG_PUSH_LINKBUSY_STATE_BUSY 1 /*!< Specifies data bandwidth is less than limit. */
121 #define PSDK_MSG_PUSH_LINKBUSY_STATE_NOTBUSY 0 /*!< Specifies data bandwidth is beyond limit. */
122 
123 /**
124  * @}
125  */
126 
127 /** @defgroup E_Constants_Psdk_AppConnectionState Psdk AppConnectionState
128  * @{
129  */
130 
131 #define PSDK_APP_CONNECTION_STATE_LINK 1 /*!< Specifies app link state is normal. */
132 #define PSDK_APP_CONNECTION_STATE_UNLINK 0 /*!< Specifies app link state is abnormal. */
133 
134 /**
135  * @}
136  */
137 
138 /** @defgroup E_Constants_Psdk_GPS_State Psdk GPS State
139  * @{
140  */
141 
142 #define PSDK_GPS_STATE_NO_SIGNAL 0 /*!< Specifies GPS has no signal at all. */
143 #define PSDK_GPS_STATE_WEAK_SIGNAL 1 /*!< Specifies GPS signal is very weak. */
144 #define PSDK_GPS_STATE_MEDIUM_SIGNAL 2 /*!< Specifies GPS signal is in medium strength. */
145 #define PSDK_GPS_STATE_GOOD_SIGNAL 3 /*!< Specifies GPS signal is very strong. */
146 
147 /**
148  * @}
149  */
150 
151 /** @defgroup E_Constants_Psdk_Compass_State Psdk Compass State
152  * @{
153  */
154 
155 #define PSDK_COMPASS_STATE_NORMAL 0 /*!< Specifies compass state is normal. */
156 #define PSDK_COMPASS_STATE_ABNORMAL 1 /*!< Specifies compass state is abnormal. */
157 
158 /**
159  * @}
160  */
161 
162 /** @defgroup E_Constants_Psdk_Motor_State Psdk Motor State
163  * @{
164  */
165 
166 #define PSDK_MOTOR_STATE_ROTATING 1 /*!< Specifies motor is rotating. */
167 #define PSDK_MOTOR_STATE_UNROTATING 0 /*!< Specifies motor is not rotating. */
168 
169 /**
170  * @}
171  */
172 
173 /** @defgroup E_Constants_Psdk_Land_State Psdk Land State
174  * @{
175  */
176 
177 #define PSDK_LAND_STATE_UNKNOWN 0 /*!< Specifies UAV land state is unknown. */
178 #define PSDK_LAND_STATE_LANDED 1 /*!< Specifies UAV has landed. */
179 #define PSDK_LAND_STATE_UNLANDED 2 /*!< Specifies UAV is in the sky. */
180 
181 /**
182  * @}
183  */
184 
185 /**
186  * @}
187  */
188 
189 /* Exported macros -----------------------------------------------------------*/
190 
191 /** @defgroup M_Push_Exported_Macros Exported Macros
192  * @{
193  */
194 
195 /** @defgroup E_Macros_Psdk_UAV_Type Psdk UAV Type
196  * @{
197  */
198 
199 ///Judge whether input value is UAV type.
200 #define IS_PSDK_UAV_TYPE(UAV_TYPE) (((UAV_TYPE) == PSDK_UAV_TYPE_UNKNOWN) || \
201  ((UAV_TYPE) == PSDK_UAV_TYPE_M200) || \
202  ((UAV_TYPE) == PSDK_UAV_TYPE_M210) || \
203  ((UAV_TYPE) == PSDK_UAV_TYPE_M210RTK) || \
204  ((UAV_TYPE) == PSDK_UAV_TYPE_M600) || \
205  ((UAV_TYPE) == PSDK_UAV_TYPE_M600PRO)) || \
206  ((UAV_TYPE) == PSDK_UAV_TYPE_M200_V2) || \
207  ((UAV_TYPE) == PSDK_UAV_TYPE_M210_V2) || \
208  ((UAV_TYPE) == PSDK_UAV_TYPE_M210RTK_V2))
209 
210 /**
211  * @}
212  */
213 
214 /** @defgroup E_Macros_Psdk_BaseBandState Psdk BaseBandState
215  * @{
216  */
217 
218 ///Judge whether input value is base band state.
219 #define IS_PSDK_BASE_BAND_STATE(STATE) (((STATE) == PSDK_BASE_BAND_STATE_LINK) || \
220  ((STATE) == PSDK_BASE_BAND_STATE_UNLINK))
221 
222 /**
223  * @}
224  */
225 
226 /** @defgroup E_Macros_Psdk_BatteryPowerState Psdk BatteryPowerState
227  * @{
228  */
229 
230 ///Judge whether input value is battery power state.
231 #define IS_PSDK_BATTERY_POWER_STATE(STATE) (((STATE) == PSDK_BATTERY_POWER_ON) || \
232  ((STATE) == PSDK_BATTERY_POWER_OFF))
233 
234 /**
235  * @}
236  */
237 
238 /** @defgroup E_Macros_Psdk_PayloadPowerOffReadyState Psdk PayloadPowerOffReadyState
239  * @{
240  */
241 
242 ///Judge whether input value is payload power off ready state.
243 #define IS_PSDK_PAYLOAD_POWER_OFF_READY_STATE(STATE) (((STATE) == PSDK_PAYLOAD_POWER_OFF_NOT_READY) || \
244  ((STATE) == PSDK_PAYLOAD_POWER_OFF_READY))
245 
246 /**
247  * @}
248  */
249 
250 /** @defgroup E_Macros_Psdk_MsgPushLinkState Psdk MsgPushLinkState
251  * @{
252  */
253 
254 ///Judge whether input value is link connection state.
255 #define IS_PSDK_MSGPUSH_LINK_STATE(STATE) (((STATE) == PSDK_MSG_PUSH_LINK_STATE_LINK) || \
256  ((STATE) == PSDK_MSG_PUSH_LINK_STATE_UNLINK))
257 
258 /**
259  * @}
260  */
261 
262 /** @defgroup E_Macros_Psdk_MsgPushLinkBusyState Psdk MsgPushLinkBusyState
263  * @{
264  */
265 
266 ///Judge whether input value is link busy state.
267 #define IS_PSDK_MSGPUSH_LINKBUSY_STATE(STATE) (((STATE) == PSDK_MSG_PUSH_LINKBUSY_STATE_BUSY) || \
268  ((STATE) == PSDK_MSG_PUSH_LINKBUSY_STATE_NOTBUSY))
269 
270 /**
271  * @}
272  */
273 
274 /** @defgroup E_Macros_Psdk_AppConnectionState Psdk AppConnectionState
275  * @{
276  */
277 
278 ///Judge whether input value is app connection state.
279 #define IS_PSDK_APP_CONNECTION_STATE(STATE) (((STATE) == PSDK_APP_CONNECTION_STATE_LINK) || \
280  ((STATE) == PSDK_APP_CONNECTION_STATE_UNLINK))
281 
282 /**
283  * @}
284  */
285 
286 /** @defgroup E_Macros_Psdk_GPS_State Psdk GPS State
287  * @{
288  */
289 
290 ///Judge whether input value is GPS signal state.
291 #define IS_PSDK_GPS_STATE(STATE) (((STATE) == PSDK_GPS_STATE_NO_SIGNAL) || \
292  ((STATE) == PSDK_GPS_STATE_WEAK_SIGNAL) || \
293  ((STATE) == PSDK_GPS_STATE_MEDIUM_SIGNAL) || \
294  ((STATE) == PSDK_GPS_STATE_GOOD_SIGNAL)
295 
296 /**
297  * @}
298  */
299 
300 /** @defgroup E_Macros_Psdk_Compass_State Psdk Compass State
301  * @{
302  */
303 
304 ///Judge whether input value is compass state.
305 #define IS_PSDK_COMPASS_STATE(STATE) (((STATE) == PSDK_COMPASS_STATE_NORMAL) || \
306  ((STATE) == PSDK_COMPASS_STATE_ABNORMAL))
307 
308 /**
309  * @}
310  */
311 
312 /** @defgroup E_Macros_Psdk_Motor_State Psdk Motor State
313  * @{
314  */
315 
316 ///Judge whether input value is motor rotating state.
317 #define IS_PSDK_MOTOR_STATE(STATE) (((STATE) == PSDK_MOTOR_STATE_ROTATING) || \
318  ((STATE) == PSDK_MOTOR_STATE_UNROTATING))
319 
320 /**
321  * @}
322  */
323 
324 /** @defgroup E_Macros_Psdk_Land_State Psdk Land State
325  * @{
326  */
327 
328 ///Judge whether input value is UAV land state.
329 #define IS_PSDK_LAND_STATE(STATE) (((STATE) == PSDK_LAND_STATE_UNKNOWN) || \
330  ((STATE) == PSDK_LAND_STATE_LANDED) || \
331  ((STATE) == PSDK_LAND_STATE_UNLANDED))
332 
333 /**
334  * @}
335  */
336 
337 /**
338  * @}
339  */
340 
341 /* Exported types ------------------------------------------------------------*/
342 
343 /** @defgroup M_Push_Exported_Types Exported Types
344  * @{
345  */
346 
347 /** @defgroup M_Push_Command_Related Command Related
348  * @{
349  */
350 
351 /**
352  * @brief Data Push Command ID
353  */
354 typedef enum {
355  PSDK_DATAPUSH_CMD_ID_PUSH_BANDWIDTH = 0x01, /*!< data transmission bandwidth push command */
356  PSDK_DATAPUSH_CMD_ID_PUSH_ATTITUDE = 0x02, /*!< UAV attitude push command */
357  PSDK_DATAPUSH_CMD_ID_PUSH_BATTERY_INFO = 0x03, /*!< battery information push command */
358  PSDK_DATAPUSH_CMD_ID_PUSH_GPS_INFO = 0x04, /*!< GPS data push command */
359  PSDK_DATAPUSH_CMD_ID_PUSH_UAV_STATE = 0x05, /*!< UAV state push command */
360  PSDK_DATAPUSH_CMD_ID_PUSH_APP_DATETIME = 0x06, /*!< APP time and date push command */
361  PSDK_DATAPUSH_CMD_ID_PUSH_BARO_HEIGHT_DATA = 0x07, /*!< baro pressure altitude push command */
362  PSDK_DATAPUSH_CMD_ID_PUSH_GPS_RAW_DATA = 0x08, /*!< GPS raw data push command */
363  PSDK_DATAPUSH_CMD_ID_PUSH_RTK_RAW_DATA = 0x09, /*!< RTK raw data push command */
364  PSDK_DATAPUSH_CMD_ID_PUSH_UTC_TIMESTAMP = 0x0A, /*!< UTC timestamp push command */
365  PSDK_DATAPUSH_CMD_ID_PUSH_OTHER_PAYLOAD_TYPE = 0x0B,/*!< type of other payload mounted on UAV push command */
366  PSDK_DATAPUSH_CMD_ID_PUSH_OTHER_PAYLOAD_FOCAL_LENGTH = 0x0C, /*!< focal length of other payload mounted on UAV push
367  command */
369 
370 /**
371  * @}
372  */
373 
374 /** @defgroup M_Push_Msg_Related Message Related
375  * @{
376  */
377 
378 typedef enum {
379  PSDK_DATAPUSH_PAYLOAD_TYPE_UNKNOWN = 0, /*!< Specifies unknown payload type. */
380  PSDK_DATAPUSH_PAYLOAD_TYPE_X5S = 1, /*!< Specifies X5S payload type. */
381  PSDK_DATAPUSH_PAYLOAD_TYPE_Z30 = 2, /*!< Specifies Z30 payload type. */
383 
384 /**
385  * @}
386  */
387 
388 /** @addtogroup M_Push_Command_Related
389  * @{
390  */
391 
392 #pragma pack(1)
393 
394 // PSDK_DATAPUSH_CMD_ID_PUSH_BANDWIDTH
395 /**
396  * @brief The structure defining Data Transmission Bandwidth Push contents.
397  */
398 typedef struct {
399  uint8_t baseBandState; /*!< Specifies the image link base band state of wireless image transmission.
400  This parameter can be any value of @ref E_Constants_Psdk_BaseBandState. */
401  uint8_t maxBandWidth; /*!< Specifies image transmission max bandwidth, unit: Mbps. */
402  uint8_t reserved;
403 
404  uint8_t remoteControlLinkState :1; /*!< Specifies remote control connection state.
405  This parameter can be any value of @ref E_Constants_Psdk_MsgPushLinkState. */
406  uint8_t downVideoLinkState :1; /*!< Specifies downlink image transmission link connection state.
407  This parameter can be any value of @ref E_Constants_Psdk_MsgPushLinkState. */
408  uint8_t downDataCmdLinkState :1; /*!< Specifies downlink data transmission link connection state.
409  This parameter can be any value of @ref E_Constants_Psdk_MsgPushLinkState. */
410  uint8_t AppLinkState :1; /*!< Specifies APP connection state.
411  This parameter can be any value of @ref E_Constants_Psdk_AppConnectionState. */
412  uint8_t linkStateReserveBit :4;
413 
414  uint32_t maxUpComPortBandWidth; /*!< Specifies uplink (from MSDK to PSDK) max bandwidth, unit: Byte/s. */
415  uint32_t maxDownComPortBandWidth; /*!< Specifies downlink (from PSDK to MSDK) max bandwidth, unit: Bytes/s. */
416  uint32_t maxDownNetPortBandWidth; /*!< Specifies net port max bandwidth, unit:Kb/s.
417  @note Net port bandwidth includes video stream bandwidth and data stream bandwidth. */
418 
419  uint8_t isUpComPortOverrun : 1; /*!< Specifies uplink (from MSDK to PSDK) busy state.
420  This value will be set to 1 when uplink bandwidth is beyond T_BandWidthMsg::maxUpComPortBandWidth. */
421  uint8_t isDownComPortOverrun : 1; /*!< Specifies downlink (from PSDK to MSDK) busy state.
422  This value will be set to 1 when downlink bandwidth is beyond T_BandWidthMsg::maxDownComPortBandWidth. */
423  uint8_t isDownNetPortOverrun : 1; /*!< Specifies net port link busy state.
424  This value will be set to 1 when net port data bandwidth is beyond T_BandWidthMsg::maxDownNetPortBandWidth. */
425  uint8_t overrunReserveBit : 5;
426 
427  uint32_t upComPortBandWidth; /*!< Specifies uplink (from MSDK to PSDK) realtime bandwidth, unit:Byte/s. */
428  uint32_t downComPortBandWidth; /*!< Specifies downlink (from PSDK to MSDK) realtime bandwidth, unit:Bytes/s. */
429  uint32_t downVideoStreamBandWidth; /*!< Specifies net port video stream realtime bandwidth, unit:Kbps. */
430  uint32_t downDataStreamBandWidth; /*!< Specifies net port data stream realtime bandwidth, unit:Kbps. */
431 
432  uint32_t maxOsdkUpChannBw; /*!< Specifies uplink (from PSDK to OSDK) max bandwidth, unit: Byte/s. */
433  uint8_t isOsdkUpChannOverrun : 1; /*!< Specifies uplink (from PSDK to OSDK) busy state.
434  This value will be set to 1 when uplink (from PSDK to OSDK) bandwidth is beyond T_OsdkBandWidthMsg::maxUpComPortBandWidth. */
435  uint8_t overrunReserveBit2 : 7;
436  uint32_t osdkUpChannBw; /*!< Specifies uplink (from PSDK to OSDK) realtime bandwidth, unit:Byte/s. */
438 
439 // PSDK_DATAPUSH_CMD_ID_PUSH_ATTITUDE
440 /**
441  * @brief The structure defining UAV Attitude Push contents.
442  */
443 typedef struct {
444  //q = q0 + q1*i + q2*j + q3*k
445  psdk_f32_t q0;
446  psdk_f32_t q1;
447  psdk_f32_t q2;
448  psdk_f32_t q3;
450 
451 // PSDK_DATAPUSH_CMD_ID_PUSH_BATTERY_INFO
452 /**
453  * @brief The structure defining Battery Information Push contents.
454  */
455 typedef struct {
456  uint8_t capacityPercent; /*!< Specifies percentage of battery power, between 0 and 100. */
457  uint8_t powerOffNotice; /*!< Specifies battery power-off state,
458  This parameter can be any value of @ref E_Constants_Psdk_BatteryPowerState,
459  and please refer to @ref E_Constants_Psdk_BatteryPowerState for details. */
461 
462 /**
463  * @brief The structure defining ack of Battery Information Push Command.
464  * @note When battery power is normal, the ack is to be ignored.
465  */
466 typedef struct {
467  uint8_t ackCode; /*!< Specifies PSDK command ack code.
468  This parameter can be any value of ::E_PsdkCmdAckCode */
469  uint8_t powerOffReady; /*!< Specifies payload power-off ready state,
470  This parameter can be any value of @ref E_Constants_Psdk_PayloadPowerOffReadyState,
471  and please refer to @ref E_Constants_Psdk_PayloadPowerOffReadyState for details. */
473 
474 // PSDK_DATAPUSH_CMD_ID_PUSH_GPS_INFO
475 /**
476  * @brief The structure defining GPS Information Push contents.
477  */
478 typedef struct {
479  psdk_f64_t longitude; /*!< GPS longitude, unit: rad. */
480  psdk_f64_t latitude; /*!< GPS latitude, unit: rad. */
481  int16_t refHeight; /*!< Relative takeoff height, unit: 0.1m. */
482  uint8_t sateNum; /*!< Specifies number of satellites. */
483  uint8_t gpsState; /*!< This parameter can be any value of @ref E_Constants_Psdk_GPS_State,
484  Please refer to @ref E_Constants_Psdk_GPS_State for details. */
485 } T_GPSInfoMsg;
486 
487 // PSDK_DATAPUSH_CMD_ID_PUSH_BARO_HEIGHT_INFO
488 /**
489  * @brief The structure defining Baro Height Data Push contents.
490  */
491 typedef struct {
492  psdk_f32_t baroHeight; /*!< The absolute height measured by barometer, unit: m. */
494 
495 // PSDK_DATAPUSH_CMD_ID_PUSH_GPS_RAW_DATA_INFO
496 /**
497  * @brief The structure defining GPS Raw Data Push contents.
498  */
499 typedef struct {
500  uint32_t date; /*!< Specifies a integer indicating a GMT date, format: yyyymmdd
501  (E.g. 20150205 = February 5th, 2015). */
502  uint32_t time; /*!< Specifies a integer indicating a GMT time in a 24-hour clock,
503  format: hhmmss (E.g. 90209 = 09:02:09). */
504  int32_t posLongitude; /*!< Specifies the longitude measured by GPS, unit: E-7 deg. */
505  int32_t posLatitude; /*!< Specifies the latitude measured by GPS, unit: E-7 deg. */
506  int32_t posHeight; /*!< Specifies the height above sea level measured by GPS, unit: mm. */
507  psdk_f32_t velocityNorth; /*!< Specifies the velocity to the North measured by GPS, unit: cm/s. */
508  psdk_f32_t velocityEast; /*!< Specifies the velocity to the East measured by GPS, unit: cm/s. */
509  psdk_f32_t velocityDownward; /*!< Specifies the downward velocity measured by GPS, unit: cm/s. */
510  psdk_f32_t hdop; /*!< Specifies horizontal dilution of precision,
511  <1:ideal, 1-2:excellent, 2-5:good, 5-10:moderate, 10-20 fair, >20:poor. */
512  psdk_f32_t pdop; /*!< Specifies position dilution of precision,
513  <1:ideal, 1-2:excellent, 2-5:good, 5-10:moderate, 10-20 fair, >20:poor. */
514  psdk_f32_t gpsFixState; /*!< Specifies the state of GPS fix, three indicating 3D data. */
515  psdk_f32_t vacc; /*!< Specifies vertical position accuracy; the smaller, the better. */
516  psdk_f32_t hacc; /*!< Specifies horizontal position accuracy; the smaller, the better.
517  The value indicates the possible error of the measured position, unit: mm. */
518  psdk_f32_t sacc; /*!< Specifies the speed accuracy; the smaller, the better, unit: cm/s. */
519  uint32_t gpsUsed; /*!< Specifies the number of GPS satellites used for position fix. */
520  uint32_t glonassUsed; /*!< Specifies the number of GLONASS satellites used for position fix. */
521  uint16_t totalNumUsed; /*!< Specifies the total number of satellites used for position fix. */
522  uint16_t gpsState; /*!< Specifies the times of sending GPS data. When the counter > 65535,
523  it will turn 0 and continue increase every time GPS data is sent. */
525 
526 /**
527  * @brief The structure defining RTK Raw Data Push contents.
528  */
529 typedef struct {
530  psdk_f64_t lon_p; /*!< Specifies the longitude measured by RTK, unit: deg */
531  psdk_f64_t lat_p; /*!< Specifies the latitude measured by RTK, unit: deg */
532  psdk_f32_t hmsl_p; /*!< Specifies the height above sea level measured by RTK, unit: m */
533  psdk_f32_t vel_N; /*!< Specifies the velocity to the North measured by RTK, unit: cm/s */
534  psdk_f32_t vel_E; /*!< Specifies the velocity to the East measured by RTK, unit: cm/s */
535  psdk_f32_t vel_D; /*!< Specifies the downward velocity measured by RTK, unit: cm/s */
536  int16_t yaw; /*!< Specifies the azimuth measured by RTK */
537  uint8_t pos_health; /*!< Specifies the type of RTK positioning, indicating different solutions for calculating the position.
538  <1:ideal, 1-2:excellent, 2-5:good, 5-10:moderate, 10-20 fair, >20:poor */
539  uint8_t yaw_health; /*!< Specifies the type of RTK orientation, indicating different solutions for calculating the orientation.
540  <1:ideal, 1-2:excellent, 2-5:good, 5-10:moderate, 10-20 fair, >20:poor */
542 
543 // PSDK_DATAPUSH_CMD_ID_PUSH_UAV_STATE
544 /**
545  * @brief The structure defining UAV State Push contents.
546  */
547 typedef struct {
548  struct {
549  uint8_t compassState : 1; /*!< Specifies UAV compass state.
550  This parameter can be any value of @ref E_Constants_Psdk_Compass_State. */
551  uint8_t motorState : 1; /*!< Specifies UAV motor state.
552  This parameter can be any value of @ref E_Constants_Psdk_Motor_State. */
553  uint8_t landState : 2; /*!< Specifies UAV land state.
554  This parameter can be any value of @ref E_Constants_Psdk_Land_State. */
555  uint8_t reserved : 4;
556  } uavState;
557  uint16_t flightTime; /*!< Specifies UAV flying duration, unit: 0.1s. */
558  uint8_t uavType; /*!< Specifies uav type.
559  This parameter can be any value of @ref E_Constants_Psdk_UAV_Type. */
560 } T_UavStateMsg;
561 
562 // PSDK_DATAPUSH_CMD_ID_PUSH_APP_DATETIME
563 /**
564  * @brief The structure defining APP Time and Date Push contents.
565  */
566 typedef struct {
567  uint16_t year; /*!< year, @note LSB is at the front and MSB is the back. */
568  uint8_t month; /*!< month */
569  uint8_t day; /*!< day */
570  uint8_t hour; /*!< hour */
571  uint8_t minute; /*!< minute */
572  uint8_t second; /*!< second */
574 
575 // PSDK_DATAPUSH_CMD_ID_PUSH_UTC_TIMESTAMP
576 /**
577  * @brief The structure defining UTC timestamp Push contents.
578  */
579 typedef struct {
580  uint16_t year; /*!< Specifies year. */
581  uint8_t month; /*!< Specifies month. */
582  uint8_t day; /*!< Specifies day. */
583  uint8_t hour; /*!< Specifies hour. */
584  uint8_t minute; /*!< Specifies minute. */
585  uint8_t second; /*!< Specifies second. */
586  uint32_t microsecond; /*!< Specifies microsecond. */
588 
589 // PSDK_DATAPUSH_CMD_ID_PUSH_OTHER_PAYLOAD_TYPE
590 /**
591  * @brief The structure defining Other Payload Type Push contents.
592  */
593 typedef struct {
594  uint8_t mainPayloadType; /*!< Specifies type of payload mounted on main gimbal interface of UAV.
595  This parameter can be any value of ::E_PsdkDataPushPayloadType. */
597 
598 //PSDK_DATAPUSH_CMD_ID_PUSH_OTHER_PAYLOAD_FOCAL_LENGTH
599 /**
600  * @brief The structure defining Other Payload Focal Length Push contents.
601  */
602 typedef struct {
603  uint16_t mainPayloadFocalLength; /*!< Specifies focal length of payload mounted on main gimbal interface of UAV,
604  unit: 0.1mm. */
606 
607 #pragma pack()
608 
609 /**
610  * @}
611  */
612 
613 /**
614  * @}
615  */
616 
617 /* Exported variables --------------------------------------------------------*/
618 /* Exported functions --------------------------------------------------------*/
619 /* Private constants ---------------------------------------------------------*/
620 /* Private macros ------------------------------------------------------------*/
621 /* Private types -------------------------------------------------------------*/
622 /* Private variables ---------------------------------------------------------*/
623 /* Private functions ---------------------------------------------------------*/
624 
625 /**
626  * @}
627  */
628 
629 /**
630  * @}
631  */
632 
633 #ifdef __cplusplus
634 }
635 #endif
636 
637 #endif //PSDK_CMDSET_MSG_PUSH_H
638 
639 /************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
uint8_t day
Definition: psdk_cmdset_msg_push.h:569
psdk_f32_t vel_D
Definition: psdk_cmdset_msg_push.h:535
psdk_f32_t vel_E
Definition: psdk_cmdset_msg_push.h:534
uint16_t mainPayloadFocalLength
Definition: psdk_cmdset_msg_push.h:603
uint16_t year
Definition: psdk_cmdset_msg_push.h:567
uint8_t hour
Definition: psdk_cmdset_msg_push.h:570
uint8_t ackCode
Definition: psdk_cmdset_msg_push.h:467
uint8_t baseBandState
Definition: psdk_cmdset_msg_push.h:399
uint8_t compassState
Definition: psdk_cmdset_msg_push.h:549
uint16_t totalNumUsed
Definition: psdk_cmdset_msg_push.h:521
uint8_t AppLinkState
Definition: psdk_cmdset_msg_push.h:410
The structure defining APP Time and Date Push contents.
Definition: psdk_cmdset_msg_push.h:566
uint8_t gpsState
Definition: psdk_cmdset_msg_push.h:483
uint8_t month
Definition: psdk_cmdset_msg_push.h:581
uint16_t year
Definition: psdk_cmdset_msg_push.h:580
uint8_t day
Definition: psdk_cmdset_msg_push.h:582
uint8_t downVideoLinkState
Definition: psdk_cmdset_msg_push.h:406
int32_t posLongitude
Definition: psdk_cmdset_msg_push.h:504
uint32_t glonassUsed
Definition: psdk_cmdset_msg_push.h:520
uint32_t osdkUpChannBw
Definition: psdk_cmdset_msg_push.h:436
uint8_t second
Definition: psdk_cmdset_msg_push.h:572
The structure defining UTC timestamp Push contents.
Definition: psdk_cmdset_msg_push.h:579
uint8_t pos_health
Definition: psdk_cmdset_msg_push.h:537
uint8_t minute
Definition: psdk_cmdset_msg_push.h:584
uint8_t motorState
Definition: psdk_cmdset_msg_push.h:551
uint32_t gpsUsed
Definition: psdk_cmdset_msg_push.h:519
uint16_t flightTime
Definition: psdk_cmdset_msg_push.h:557
The structure defining Baro Height Data Push contents.
Definition: psdk_cmdset_msg_push.h:491
uint32_t microsecond
Definition: psdk_cmdset_msg_push.h:586
uint8_t powerOffReady
Definition: psdk_cmdset_msg_push.h:469
int32_t posHeight
Definition: psdk_cmdset_msg_push.h:506
psdk_f32_t velocityDownward
Definition: psdk_cmdset_msg_push.h:509
uint32_t downComPortBandWidth
Definition: psdk_cmdset_msg_push.h:428
psdk_f64_t lat_p
Definition: psdk_cmdset_msg_push.h:531
psdk_f32_t velocityEast
Definition: psdk_cmdset_msg_push.h:508
uint8_t second
Definition: psdk_cmdset_msg_push.h:585
uint32_t downDataStreamBandWidth
Definition: psdk_cmdset_msg_push.h:430
The structure defining UAV Attitude Push contents.
Definition: psdk_cmdset_msg_push.h:443
uint8_t yaw_health
Definition: psdk_cmdset_msg_push.h:539
uint8_t landState
Definition: psdk_cmdset_msg_push.h:553
uint32_t maxOsdkUpChannBw
Definition: psdk_cmdset_msg_push.h:432
The structure defining Other Payload Focal Length Push contents.
Definition: psdk_cmdset_msg_push.h:602
uint8_t mainPayloadType
Definition: psdk_cmdset_msg_push.h:594
psdk_f32_t sacc
Definition: psdk_cmdset_msg_push.h:518
uint32_t maxDownComPortBandWidth
Definition: psdk_cmdset_msg_push.h:415
psdk_f32_t velocityNorth
Definition: psdk_cmdset_msg_push.h:507
The structure defining Data Transmission Bandwidth Push contents.
Definition: psdk_cmdset_msg_push.h:398
uint8_t hour
Definition: psdk_cmdset_msg_push.h:583
uint8_t isOsdkUpChannOverrun
Definition: psdk_cmdset_msg_push.h:433
uint8_t isDownComPortOverrun
Definition: psdk_cmdset_msg_push.h:421
uint32_t upComPortBandWidth
Definition: psdk_cmdset_msg_push.h:427
psdk_f32_t vel_N
Definition: psdk_cmdset_msg_push.h:533
psdk_f64_t longitude
Definition: psdk_cmdset_msg_push.h:479
psdk_f32_t vacc
Definition: psdk_cmdset_msg_push.h:515
int16_t refHeight
Definition: psdk_cmdset_msg_push.h:481
uint8_t minute
Definition: psdk_cmdset_msg_push.h:571
psdk_f32_t pdop
Definition: psdk_cmdset_msg_push.h:512
PSDK core include file.
The structure defining Battery Information Push contents.
Definition: psdk_cmdset_msg_push.h:455
uint8_t sateNum
Definition: psdk_cmdset_msg_push.h:482
uint32_t date
Definition: psdk_cmdset_msg_push.h:500
The structure defining GPS Raw Data Push contents.
Definition: psdk_cmdset_msg_push.h:499
uint32_t maxDownNetPortBandWidth
Definition: psdk_cmdset_msg_push.h:416
uint32_t time
Definition: psdk_cmdset_msg_push.h:502
int32_t posLatitude
Definition: psdk_cmdset_msg_push.h:505
psdk_f32_t hmsl_p
Definition: psdk_cmdset_msg_push.h:532
psdk_f32_t hdop
Definition: psdk_cmdset_msg_push.h:510
psdk_f32_t baroHeight
Definition: psdk_cmdset_msg_push.h:492
The structure defining GPS Information Push contents.
Definition: psdk_cmdset_msg_push.h:478
uint32_t maxUpComPortBandWidth
Definition: psdk_cmdset_msg_push.h:414
uint32_t downVideoStreamBandWidth
Definition: psdk_cmdset_msg_push.h:429
uint8_t remoteControlLinkState
Definition: psdk_cmdset_msg_push.h:404
uint8_t powerOffNotice
Definition: psdk_cmdset_msg_push.h:457
The structure defining RTK Raw Data Push contents.
Definition: psdk_cmdset_msg_push.h:529
The structure defining UAV State Push contents.
Definition: psdk_cmdset_msg_push.h:547
uint8_t maxBandWidth
Definition: psdk_cmdset_msg_push.h:401
psdk_f32_t gpsFixState
Definition: psdk_cmdset_msg_push.h:514
uint8_t capacityPercent
Definition: psdk_cmdset_msg_push.h:456
The structure defining Other Payload Type Push contents.
Definition: psdk_cmdset_msg_push.h:593
int16_t yaw
Definition: psdk_cmdset_msg_push.h:536
psdk_f32_t hacc
Definition: psdk_cmdset_msg_push.h:516
uint8_t isUpComPortOverrun
Definition: psdk_cmdset_msg_push.h:419
psdk_f64_t lon_p
Definition: psdk_cmdset_msg_push.h:530
uint8_t uavType
Definition: psdk_cmdset_msg_push.h:558
psdk_f64_t latitude
Definition: psdk_cmdset_msg_push.h:480
uint16_t gpsState
Definition: psdk_cmdset_msg_push.h:522
The structure defining ack of Battery Information Push Command.
Definition: psdk_cmdset_msg_push.h:466
uint8_t downDataCmdLinkState
Definition: psdk_cmdset_msg_push.h:408
uint8_t month
Definition: psdk_cmdset_msg_push.h:568
uint8_t isDownNetPortOverrun
Definition: psdk_cmdset_msg_push.h:423