DJI Payload SDK  1.4.0
psdk_cmdset_precise_survey.h
Go to the documentation of this file.
1 /**
2  ******************************************************************************
3  * @file psdk_cmdset_precise_survey.h
4  * @version V1.4.0
5  * @date 2018/10/25
6  * @brief This file defines the precise surveying 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_PRECISE_SURVEY_H
29 #define PSDK_CMDSET_PRECISE_SURVEY_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /* Includes ------------------------------------------------------------------*/
36 #include <psdk_typedef.h>
37 
38 /** @addtogroup PSDK
39  * @{
40  */
41 
42 /** @addtogroup PSDK_Precise_Survey
43  * @{
44  */
45 
46 /* Exported constants --------------------------------------------------------*/
47 /* Exported macros -----------------------------------------------------------*/
48 /* Exported types ------------------------------------------------------------*/
49 /** @defgroup P_Survey_Exported_Types Exported Types
50  * @{
51  */
52 
53 /** @defgroup P_Survey_Command_Related Command Related
54  * @{
55  */
56 
57 /**
58  * @brief Precise Survey Command Set Command ID
59  */
60 typedef enum {
61  PSDK_PCESURVEY_CMD_ID_GET_PARA = 0x01, /*!< get precise surveying parameters command */
62  PSDK_PCESURVEY_CMD_ID_GET_LOAD_PARA = 0x02, /*!< get payload parameters command */
63  PSDK_PCESURVEY_CMD_ID_UTC_PUSH = 0x03, /*!< UTC time push command */
64  PSDK_PCESURVEY_CMD_ID_POS_ACQUISITION = 0x04, /*!< precise position acquisition command */
65  PSDK_PCESURVEY_CMD_ID_PPK_OFFSET_PUSH = 0x05, /*!< PPK offset push command */
66  PSDK_PCESURVEY_CMD_ID_SUPPORT_STATE = 0xFF, /*!< get precise surveying support state command */
68 
69 /**
70  * @}
71  */
72 
73 /** @defgroup P_Survey_Related Precise Survey Related
74  * @{
75  */
76 
77 /**
78  * @brief Precise survey mode.
79  */
80 typedef enum {
81  PSDK_PCESURVEY_MODE_RTK = 0, /*!< RTK mode, payload get the precise position of any point in payload
82  corresponding to a UTC time. */
83  PSDK_PCESURVEY_MODE_PPK = 1, /*!< PPK mode, push offset between GPS antenna and gimbal interface to payload,
84  using RTCM data and above offset data to survey or map precisely. */
86 
87 /**
88  * @brief Event timestamp generating mode.
89  */
90 typedef enum {
91  PSDK_PCESURVEY_TIMEGEN_MODE_SELF = 0, /*!< Self-generating, payload generate the event timestamp by PPS
92  signal and UTC time pair. */
93  PSDK_PCESURVEY_TIMEGEN_MODE_HOTSHOE = 1, /*!< Hot-Shoe generating, payload trigger a high level pulse in
94  Hot-Shoe signal wire, and Skyport Adapter generates the event
95  timestamp corresponding to rising edge. When in PPK mode,
96  Skyport Adapter will send the event timestamp to payload. */
98 
99 /**
100  * @brief Payload gimbal type.
101  */
102 typedef enum {
103  PSDK_PCESURVEY_LOAD_GIM_TYPE_NO_GIM = 0, /*!< No gimbal. */
104  PSDK_PCESURVEY_LOAD_GIM_TYPE_STD_GIM = 1, /*!< Standard gimbal, pitch-axis and roll-axis are coplanar. */
106 
107 /**
108  * @brief RTK position solution state.
109  */
110 typedef enum {
111  PSDK_PCESURVEY_POS_NOT_AVL_SOLUTION = 15, /*!< Position solution is not available. */
112  PSDK_PCESURVEY_POS_SINGLE_PNT_SOLUTION = 16, /*!< Single point position solution. */
113  PSDK_PCESURVEY_POS_FLOAT_SOLUTION = 34, /*!< Float position solution. */
114  PSDK_PCESURVEY_POS_FIX_PNT_SOLUTION = 50, /*!< Fixed point position solution. */
116 
117 /**
118  * @brief Precise survey support state.
119  */
120 typedef enum {
121  PSDK_PCESURVEY_NOT_SUPPORT = 0, /*!< Not support precise surveying function. */
122  PSDK_PCESURVEY_SUPPORT = 1, /*!< Support precise surveying function. */
124 
125 /**
126  * @}
127  */
128 
129 /** @addgroup P_Survey_Command_Related
130  * @{
131  */
132 
133 #pragma pack(1)
134 
135 /**
136  * @brief Get precise survey parameters command request data structure.
137  */
138 typedef struct {
139  PSDK_EMPTY_STRUCT
141 
142 /**
143  * @brief Get precise survey parameters command ack data structure.
144  */
145 typedef struct {
146  uint8_t ackCode; /*!< Specifies PSDK command ack code.
147  This parameter can be any value of ::E_PsdkCmdAckCode */
148  uint8_t surveyMode : 1; /*!< Specifies precise survey mode.
149  This parameter can be any value of ::E_PsdkPceSurveyMode. */
150  uint8_t timestampGenMode : 1; /*!< Specifies event timestamp generating mode.
151  This parameter can be any value of ::E_PsdkPceSurveyTimeGenMode. */
152  uint8_t reserved : 6;
154 
155 /**
156  * @brief Get precise survey payload parameters command request data structure.
157  */
158 typedef struct {
159  PSDK_EMPTY_STRUCT
161 
162 /**
163  * @brief Get payload parameters command ack data structure.
164  */
165 typedef struct {
166  uint8_t ackCode; /*!< Specifies PSDK command ack code.
167  This parameter can be any value of ::E_PsdkCmdAckCode */
168  uint8_t gimType; /*!< Specifies payload gimbal type.
169  This parameter can be any value of ::E_PsdkPceSurveyLoadGimType. */
170  union {
171  struct {
172  int16_t xOffsetTrgtSkyport; /*!< Specifies offset between target point of payload and center of Skyport Adapter
173  in X axis of payload body coordinate system, unit: mm. */
174  int16_t yOffsetTrgtSkyport; /*!< Specifies offset between target point of payload and center of Skyport Adapter
175  in Y axis of payload body coordinate system, unit: mm. */
176  int16_t zOffsetTrgtSkyport; /*!< Specifies offset between target point of payload and center of Skyport Adapter
177  in Z axis of payload body coordinate system, unit: mm. */
178  } noGim;
179  struct {
180  int16_t xOffsetTrgtGimC; /*!< Specifies offset between target point of payload and center of gimbal
181  in X axis of payload body coordinate system, unit: mm. */
182  int16_t yOffsetTrgtGimC; /*!< Specifies offset between target point of payload and center of gimbal
183  in Y axis of payload body coordinate system, unit: mm. */
184  int16_t zOffsetTrgtGimC; /*!< Specifies offset between target point of payload and center of gimbal
185  in Z axis of payload body coordinate system, unit: mm. */
186  int16_t xOffsetGimcSkyport; /*!< Specifies offset between center of gimbal and center of Skyport Adapter
187  in X axis of payload body coordinate system, unit: mm. */
188  int16_t yOffsetGimcSkyport; /*!< Specifies offset between center of gimbal and center of Skyport Adapter
189  in Y axis of payload body coordinate system, unit: mm. */
190  int16_t zOffsetGimcSkyport; /*!< Specifies offset between center of gimbal and center of Skyport Adapter
191  in Z axis of payload body coordinate system, unit: mm. */
192  int16_t tiltAng; /*!< Specifies pitch-axis angle of payload during precise surveying, -90 degree
193  when payload is facing directly below, 0 degree when payload is horizontal
194  relatively to ground, unit: 0.01 degree. */
195  } stdGim;
196  } trgtPntPara;
198 
199 /**
200  * @brief UTC time data package structure.
201  */
202 typedef struct {
203  int32_t year; /*!< Specifies year. */
204  int32_t month; /*!< Specifies month. */
205  int32_t day; /*!< Specifies day. */
206  int32_t hour; /*!< Specifies hour. */
207  int32_t minute; /*!< Specifies minute. */
208  int32_t second; /*!< Specifies second. */
209  int32_t nanosecond; /*!< Specifies nanosecond. */
211 
212 /**
213  * @brief Precise position acquisition command req data structure.
214  */
215 typedef struct {
216  int32_t year; /*!< Specifies year. */
217  int32_t month; /*!< Specifies month. */
218  int32_t day; /*!< Specifies day. */
219  int32_t hour; /*!< Specifies hour. */
220  int32_t minute; /*!< Specifies minute. */
221  int32_t second; /*!< Specifies second. */
222  int32_t nanosecond; /*!< Specifies nanosecond. */
224 
225 /**
226  * @brief Precise position acquisition command ack data structure.
227  */
228 typedef struct {
229  uint8_t ackCode; /*!< Specifies PSDK command ack code.
230  This parameter can be any value of ::E_PsdkCmdAckCode. */
231  uint8_t rtkState; /*!< Specifies RTK state,
232  and this parameter can be any value of ::E_PsdkPceSurveyPosSolutionSt. */
233  int32_t year; /*!< Specifies year. */
234  int32_t month; /*!< Specifies month. */
235  int32_t day; /*!< Specifies day. */
236  int32_t hour; /*!< Specifies hour. */
237  int32_t minute; /*!< Specifies minute. */
238  int32_t second; /*!< Specifies second. */
239  int32_t nanosecond; /*!< Specifies nanosecond. */
240  double longitude; /*!< Specifies longitude of target point of payload, unit: deg. */
241  double latitude; /*!< Specifies latitude of target point of payload, unit: deg. */
242  double height; /*!< Specifies height above sea level of target point of payload, unit: m. */
243  float longStdDevi; /*!< Specifies longitude standard deviation. */
244  float latStdDevi; /*!< Specifies latitude standard deviation. */
245  float hgtStdDevi; /*!< Specifies height standard deviation. */
246  int16_t longDevi; /*!< Specifies longitude deviation. */
247  int16_t latDevi; /*!< Specifies latitude deviation. */
248  int16_t hgtDevi; /*!< Specifies height deviation. */
250 
251 /**
252  * @brief PPK offset data package structure.
253  */
254 typedef struct {
255  int32_t year; /*!< Specifies year. */
256  int32_t month; /*!< Specifies month. */
257  int32_t day; /*!< Specifies day. */
258  int32_t hour; /*!< Specifies hour. */
259  int32_t minute; /*!< Specifies minute. */
260  int32_t second; /*!< Specifies second. */
261  int32_t nanosecond; /*!< Specifies nanosecond. */
262  double xUavOffset; /*!< Specifies offset between GPS antenna and gimbal interface in X axis of NED coordinate
263  system. */
264  double yUavOffset; /*!< Specifies offset between GPS antenna and gimbal interface in Y axis of NED coordinate
265  system. */
266  double zUavOffset; /*!< Specifies offset between GPS antenna and gimbal interface in Z axis of NED coordinate
267  system. */
269 
270 /**
271  * @brief Precise surveying support state req package structure.
272  */
273 typedef struct {
274  PSDK_EMPTY_STRUCT
276 
277 /**
278  * @brief Precise surveying support state ack package structure.
279  */
280 typedef struct {
281  uint8_t ackCode; /*!< Specifies PSDK command ack code.
282  This parameter can be any value of ::E_PsdkCmdAckCode. */
283  uint8_t supportState; /*!< Specifies if precise surveying function is supported. */
285 
286 #pragma pack()
287 
288 /**
289  * @}
290  */
291 
292 /**
293  * @}
294  */
295 
296 /* Exported variables --------------------------------------------------------*/
297 /* Exported functions --------------------------------------------------------*/
298 /* Private constants ---------------------------------------------------------*/
299 /* Private macros ------------------------------------------------------------*/
300 /* Private types -------------------------------------------------------------*/
301 /* Private variables ---------------------------------------------------------*/
302 /* Private functions ---------------------------------------------------------*/
303 
304 /**
305  * @}
306  */
307 
308 /**
309  * @}
310  */
311 
312 #ifdef __cplusplus
313 }
314 #endif
315 
316 #endif //PSDK_CMDSET_PRECISE_SURVEY_H
317 
318 /****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/
int16_t tiltAng
Definition: psdk_cmdset_precise_survey.h:192
int32_t minute
Definition: psdk_cmdset_precise_survey.h:237
int32_t hour
Definition: psdk_cmdset_precise_survey.h:236
uint8_t supportState
Definition: psdk_cmdset_precise_survey.h:283
int32_t year
Definition: psdk_cmdset_precise_survey.h:216
int32_t day
Definition: psdk_cmdset_precise_survey.h:235
int16_t yOffsetGimcSkyport
Definition: psdk_cmdset_precise_survey.h:188
uint8_t ackCode
Definition: psdk_cmdset_precise_survey.h:166
int16_t longDevi
Definition: psdk_cmdset_precise_survey.h:246
uint8_t surveyMode
Definition: psdk_cmdset_precise_survey.h:148
int32_t hour
Definition: psdk_cmdset_precise_survey.h:258
int32_t month
Definition: psdk_cmdset_precise_survey.h:256
int32_t minute
Definition: psdk_cmdset_precise_survey.h:259
uint8_t ackCode
Definition: psdk_cmdset_precise_survey.h:146
PPK offset data package structure.
Definition: psdk_cmdset_precise_survey.h:254
uint8_t ackCode
Definition: psdk_cmdset_precise_survey.h:229
float hgtStdDevi
Definition: psdk_cmdset_precise_survey.h:245
int32_t day
Definition: psdk_cmdset_precise_survey.h:218
double xUavOffset
Definition: psdk_cmdset_precise_survey.h:262
int32_t year
Definition: psdk_cmdset_precise_survey.h:233
int32_t nanosecond
Definition: psdk_cmdset_precise_survey.h:209
double latitude
Definition: psdk_cmdset_precise_survey.h:241
int16_t xOffsetTrgtSkyport
Definition: psdk_cmdset_precise_survey.h:172
Precise surveying support state req package structure.
Definition: psdk_cmdset_precise_survey.h:273
Precise position acquisition command req data structure.
Definition: psdk_cmdset_precise_survey.h:215
Get precise survey payload parameters command request data structure.
Definition: psdk_cmdset_precise_survey.h:158
int16_t yOffsetTrgtSkyport
Definition: psdk_cmdset_precise_survey.h:174
Get precise survey parameters command ack data structure.
Definition: psdk_cmdset_precise_survey.h:145
int32_t month
Definition: psdk_cmdset_precise_survey.h:217
int32_t minute
Definition: psdk_cmdset_precise_survey.h:207
UTC time data package structure.
Definition: psdk_cmdset_precise_survey.h:202
int16_t hgtDevi
Definition: psdk_cmdset_precise_survey.h:248
int32_t nanosecond
Definition: psdk_cmdset_precise_survey.h:261
int16_t xOffsetTrgtGimC
Definition: psdk_cmdset_precise_survey.h:180
int32_t day
Definition: psdk_cmdset_precise_survey.h:205
int32_t hour
Definition: psdk_cmdset_precise_survey.h:206
uint8_t rtkState
Definition: psdk_cmdset_precise_survey.h:231
int16_t zOffsetTrgtGimC
Definition: psdk_cmdset_precise_survey.h:184
int32_t second
Definition: psdk_cmdset_precise_survey.h:238
double height
Definition: psdk_cmdset_precise_survey.h:242
int16_t zOffsetTrgtSkyport
Definition: psdk_cmdset_precise_survey.h:176
int32_t year
Definition: psdk_cmdset_precise_survey.h:255
float latStdDevi
Definition: psdk_cmdset_precise_survey.h:244
double longitude
Definition: psdk_cmdset_precise_survey.h:240
int32_t second
Definition: psdk_cmdset_precise_survey.h:221
Get payload parameters command ack data structure.
Definition: psdk_cmdset_precise_survey.h:165
int32_t nanosecond
Definition: psdk_cmdset_precise_survey.h:222
Get precise survey parameters command request data structure.
Definition: psdk_cmdset_precise_survey.h:138
int32_t nanosecond
Definition: psdk_cmdset_precise_survey.h:239
int32_t hour
Definition: psdk_cmdset_precise_survey.h:219
int32_t day
Definition: psdk_cmdset_precise_survey.h:257
int32_t minute
Definition: psdk_cmdset_precise_survey.h:220
int32_t month
Definition: psdk_cmdset_precise_survey.h:204
int16_t xOffsetGimcSkyport
Definition: psdk_cmdset_precise_survey.h:186
int16_t yOffsetTrgtGimC
Definition: psdk_cmdset_precise_survey.h:182
float longStdDevi
Definition: psdk_cmdset_precise_survey.h:243
int16_t zOffsetGimcSkyport
Definition: psdk_cmdset_precise_survey.h:190
Precise surveying support state ack package structure.
Definition: psdk_cmdset_precise_survey.h:280
Precise position acquisition command ack data structure.
Definition: psdk_cmdset_precise_survey.h:228
int32_t second
Definition: psdk_cmdset_precise_survey.h:208
uint8_t timestampGenMode
Definition: psdk_cmdset_precise_survey.h:150
double yUavOffset
Definition: psdk_cmdset_precise_survey.h:264
uint8_t ackCode
Definition: psdk_cmdset_precise_survey.h:281
int16_t latDevi
Definition: psdk_cmdset_precise_survey.h:247
double zUavOffset
Definition: psdk_cmdset_precise_survey.h:266
int32_t year
Definition: psdk_cmdset_precise_survey.h:203
int32_t second
Definition: psdk_cmdset_precise_survey.h:260
uint8_t gimType
Definition: psdk_cmdset_precise_survey.h:168
int32_t month
Definition: psdk_cmdset_precise_survey.h:234