DJI Payload SDK  1.4.2.1
psdk_cmdset_pce_pos.h
Go to the documentation of this file.
1 /**
2  ******************************************************************************
3  * @file psdk_cmdset_pce_pos.h
4  * @version V1.5.0
5  * @date 2019/07/31
6  * @brief This file defines the precise positioning 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_PCE_POS_H
29 #define PSDK_CMDSET_PCE_POS_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_Precise_Positioning
44  * @{
45  */
46 
47 /* Exported constants --------------------------------------------------------*/
48 
49 /** @defgroup P_Positioning_Exported_Constants Exported Constants
50  * @{
51  */
52 
53 /**
54  * @brief Max count of target points.
55  */
56 #define PCEPOS_TARGET_POINT_MAX_COUNT 5
57 
58 /**
59  * @}
60  */
61 
62 /* Exported macros -----------------------------------------------------------*/
63 /* Exported types ------------------------------------------------------------*/
64 /** @defgroup P_Positioning_Exported_Types Exported Types
65  * @{
66  */
67 
68 /** @defgroup P_Positioning_Command_Related Command Related
69  * @{
70  */
71 
72 /**
73  * @brief Precise Positioning Command Set Command ID
74  */
75 typedef enum {
76  PSDK_PCEPOS_CMD_ID_GET_POS = 0x01, /*!< get precise position command */
78 
79 /**
80  * @}
81  */
82 
83 /** @defgroup P_Positioning_Related Precise Positioning Related
84  * @{
85  */
86 
87 /**
88  * @brief RTK position solution property.
89  */
90 typedef enum {
91  PSDK_PCEPOS_POSITION_SOLUTION_PROPERTY_NOT_AVAILABLE = 0, /*!< Position solution is not available. */
92  PSDK_PCEPOS_POSITION_SOLUTION_PROPERTY_SINGLE_PNT_SOLUTION = 16, /*!< Single point position solution. */
93  PSDK_PCEPOS_POSITION_SOLUTION_PROPERTY_FLOAT_SOLUTION = 34, /*!< Float position solution. */
94  PSDK_PCEPOS_POSITION_SOLUTION_PROPERTY_NARROW_INT_SOLUTION = 50, /*!< Narrow fixed point position solution. */
96 
97 /**
98  * @}
99  */
100 
101 /** @addtogroup P_Positioning_Command_Related
102  * @{
103  */
104 
105 #pragma pack(1)
106 
107 /**
108  * @brief Time.
109  */
110 typedef struct {
111  uint16_t year; /*!< Specifies year. */
112  uint8_t month; /*!< Specifies month. */
113  uint8_t day; /*!< Specifies day. */
114  uint8_t hour; /*!< Specifies hour. */
115  uint8_t minute; /*!< Specifies minute. */
116  uint8_t second; /*!< Specifies second. */
118 
119 /**
120  * @brief Detail information of events what trigger position requesting.
121  */
122 typedef struct {
123  uint16_t eventId : 13; /*!< Specifies event index. */
124  uint16_t targetPointId : 3; /*!< Specifies index of target point of payload. */
125  uint32_t timeOfsUs; /*!< Specifies time offset between base timestamp and time of event, unit: us, range from 0 to 2000000. */
127 
128 /**
129  * @brief Attitude.
130  */
131 typedef struct {
132  int16_t pitchAttiAngle; /*!< Specifies attitude angle in pitch axis, range from -180 to 180, unit: degree. */
133  int16_t rollAttiAngle; /*!< Specifies attitude angle in roll axis, range from -180 to 180, unit: degree. */
134  int16_t yawAttiAngle; /*!< Specifies attitude angle in yaw axis, range from -180 to 180, unit: degree. */
136 
137 /**
138  * @brief Position offset.
139  */
140 typedef struct {
141  int16_t northOfs; /*!< Specifies position offset in N direction of NED coordinate system, unit: mm. */
142  int16_t earthOfs; /*!< Specifies position offset in E direction of NED coordinate system, unit: mm. */
143  int16_t downOfs; /*!< Specifies position offset in D direction of NED coordinate system, unit: mm. */
145 
146 /**
147  * @brief Position information.
148  */
149 typedef struct {
150  psdk_f64_t longitude; /*!< Specifies longitude, unit: degree. */
151  psdk_f64_t latitude; /*!< Specifies latitude, unit: degree. */
152  psdk_f64_t height; /*!< Specifies height above sea level, unit: m. */
154 
155 /**
156  * @brief Position value standard deviation.
157  */
158 typedef struct {
159  psdk_f32_t longStdDevi; /*!< Specifies longitude standard deviation. */
160  psdk_f32_t latStdDevi; /*!< Specifies latitude standard deviation. */
161  psdk_f32_t hgtStdDevi; /*!< Specifies height standard deviation. */
163 
164 /**
165  * @brief Detail position information.
166  */
167 typedef struct {
168  T_PsdkPcePosEventDetlInfo eventDetlInfo; /*!< Specifies detail information of events what trigger position requesting. */
169  uint8_t positionSolutionProperty; /*!< Specifies RTK positioning solution property, and this parameter can be any value of ::E_PsdkPcePosPositionSolutionProperty. */
170  T_PsdkPcePosAtti uavAtti; /*!< Specifies UAV attitude. */
171  T_PsdkPcePosPositionOfs mainAntTargetPointPosOfs; /*!< Specifies position offset from RTK main antenna to target points in NED coordinate system. */
172  T_PsdkPcePosPosition targetPointPos; /*!< Specifies position of target points. */
173  T_PsdkPcePosPositionStdDevi targetPointPosStdDev; /*!< Specifies position standard deviation of target points. */
175 
176 /**
177  * @brief Get precise position command req data structure..
178  */
179 typedef struct {
180  uint8_t targetPointCount; /*!< Specifies target point count. */
181  uint8_t taskId; /*!< Specifies task index. */
182  T_PsdkPcePosTime baseTimestamp; /*!< Specifies base timestamp. */
183  T_PsdkPcePosEventDetlInfo eventDetlInfo[PCEPOS_TARGET_POINT_MAX_COUNT]; /*!< Specifies detail event information. */
185 
186 /**
187 * @brief Get precise position command ack data structure..
188  */
189 typedef struct {
190  uint8_t ackCode; /*!< Specifies PSDK command ack code. This parameter can be any value of ::E_PsdkCmdAckCode. */
191  uint8_t targetPointCount; /*!< Specifies target point count. */
192  uint8_t taskId; /*!< Specifies task index. */
193  T_PsdkPcePosTime baseTimestamp; /*!< Specifies base timestamp. */
194  T_PsdkPcePosPositionDetlInfo posDetlInfo[PCEPOS_TARGET_POINT_MAX_COUNT]; /*!< Specifies detail position information. */
196 
197 #pragma pack()
198 
199 /**
200  * @}
201  */
202 
203 /**
204  * @}
205  */
206 
207 /* Exported variables --------------------------------------------------------*/
208 /* Exported functions --------------------------------------------------------*/
209 /* Private constants ---------------------------------------------------------*/
210 /* Private macros ------------------------------------------------------------*/
211 /* Private types -------------------------------------------------------------*/
212 /* Private variables ---------------------------------------------------------*/
213 /* Private functions ---------------------------------------------------------*/
214 
215 /**
216  * @}
217  */
218 
219 /**
220  * @}
221  */
222 
223 #ifdef __cplusplus
224 }
225 #endif
226 
227 #endif //PSDK_CMDSET_PCE_POS_H
228 
229 /****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/
int16_t yawAttiAngle
Definition: psdk_cmdset_pce_pos.h:134
T_PsdkPcePosTime baseTimestamp
Definition: psdk_cmdset_pce_pos.h:193
psdk_f32_t longStdDevi
Definition: psdk_cmdset_pce_pos.h:159
T_PsdkPcePosPosition targetPointPos
Definition: psdk_cmdset_pce_pos.h:172
uint8_t targetPointCount
Definition: psdk_cmdset_pce_pos.h:180
psdk_f64_t longitude
Definition: psdk_cmdset_pce_pos.h:150
uint16_t targetPointId
Definition: psdk_cmdset_pce_pos.h:124
uint8_t second
Definition: psdk_cmdset_pce_pos.h:116
uint16_t year
Definition: psdk_cmdset_pce_pos.h:111
#define PCEPOS_TARGET_POINT_MAX_COUNT
Max count of target points.
Definition: psdk_cmdset_pce_pos.h:56
uint8_t day
Definition: psdk_cmdset_pce_pos.h:113
int16_t downOfs
Definition: psdk_cmdset_pce_pos.h:143
uint8_t taskId
Definition: psdk_cmdset_pce_pos.h:181
psdk_f64_t height
Definition: psdk_cmdset_pce_pos.h:152
uint8_t positionSolutionProperty
Definition: psdk_cmdset_pce_pos.h:169
int16_t rollAttiAngle
Definition: psdk_cmdset_pce_pos.h:133
T_PsdkPcePosAtti uavAtti
Definition: psdk_cmdset_pce_pos.h:170
Position information.
Definition: psdk_cmdset_pce_pos.h:149
psdk_f32_t hgtStdDevi
Definition: psdk_cmdset_pce_pos.h:161
uint8_t hour
Definition: psdk_cmdset_pce_pos.h:114
Detail position information.
Definition: psdk_cmdset_pce_pos.h:167
T_PsdkPcePosTime baseTimestamp
Definition: psdk_cmdset_pce_pos.h:182
int16_t earthOfs
Definition: psdk_cmdset_pce_pos.h:142
Get precise position command req data structure..
Definition: psdk_cmdset_pce_pos.h:179
PSDK core include file.
int16_t pitchAttiAngle
Definition: psdk_cmdset_pce_pos.h:132
uint8_t month
Definition: psdk_cmdset_pce_pos.h:112
Attitude.
Definition: psdk_cmdset_pce_pos.h:131
uint8_t taskId
Definition: psdk_cmdset_pce_pos.h:192
psdk_f32_t latStdDevi
Definition: psdk_cmdset_pce_pos.h:160
uint8_t ackCode
Definition: psdk_cmdset_pce_pos.h:190
T_PsdkPcePosEventDetlInfo eventDetlInfo
Definition: psdk_cmdset_pce_pos.h:168
uint32_t timeOfsUs
Definition: psdk_cmdset_pce_pos.h:125
uint8_t targetPointCount
Definition: psdk_cmdset_pce_pos.h:191
Time.
Definition: psdk_cmdset_pce_pos.h:110
int16_t northOfs
Definition: psdk_cmdset_pce_pos.h:141
uint8_t minute
Definition: psdk_cmdset_pce_pos.h:115
Get precise position command ack data structure..
Definition: psdk_cmdset_pce_pos.h:189
uint16_t eventId
Definition: psdk_cmdset_pce_pos.h:123
psdk_f64_t latitude
Definition: psdk_cmdset_pce_pos.h:151
Detail information of events what trigger position requesting.
Definition: psdk_cmdset_pce_pos.h:122
Position value standard deviation.
Definition: psdk_cmdset_pce_pos.h:158
T_PsdkPcePosPositionOfs mainAntTargetPointPosOfs
Definition: psdk_cmdset_pce_pos.h:171
Position offset.
Definition: psdk_cmdset_pce_pos.h:140
T_PsdkPcePosPositionStdDevi targetPointPosStdDev
Definition: psdk_cmdset_pce_pos.h:173