dji_waypoint_v2_action.hpp
Go to the documentation of this file.
1 
29 #ifndef DJIOSDK_CORE_DJI_WAYPOINT_V2_ACTION_HPP
30 #define DJIOSDK_CORE_DJI_WAYPOINT_V2_ACTION_HPP
31 
32 #include "dji_mission_type.hpp"
33 namespace DJI {
34  namespace OSDK {
35 #pragma pack(1)
36 
39 typedef struct CGPoint {
43  float32_t x;
47  float32_t y;
48 } CGPoint;
49 
52 typedef struct DJIGimbalRotation {
53 
54  int16_t x;
55  int16_t y;
56  int16_t z;
57  uint8_t ctrl_mode:1;
58  uint8_t rollCmdIgnore:1;
59  uint8_t pitchCmdIgnore:1;
60  uint8_t yawCmdIgnore:1;
61  uint8_t absYawModeRef:1;
63  uint8_t reserved:3;
64  uint8_t duationTime;
66 
67 typedef struct DJIWaypointV2SampleReachPointTriggerParam {
72  uint16_t waypointIndex;
73 
74  uint16_t terminateNum;
75 
76 } DJIWaypointV2SampleReachPointTriggerParam;
77 
87 
91  uint8_t waitingTime;
92 
98 
106  uint16_t startIndex;
107 
111  uint16_t endIndex;
113 
122  uint16_t startIndex;
123 
140  uint16_t interval;
146 
148 
163 
169  uint8_t regionType;
170 
174  float32_t width;
175 
180  float32_t height;
181 
182  uint32_t reserve;
183 
187  uint8_t retryTimes = 1;
189 
204  uint16_t focalLength;
205 
206  uint8_t retryTimes = 1;
207 
209 
218  uint8_t isRelative:1;
219 
220  uint8_t reserved:7;
221 
225  float32_t yaw;
226 
228 
237  uint8_t isStartFlying:1;
238  uint8_t reserved:7;
240 
241 #pragma pack()
242 
243 typedef struct DJIWaypointV2Trigger
244 {
245  DJIWaypointV2Trigger(const DJIWaypointV2ActionTriggerType &type,const void *param)
246  {actionTriggerType = type;
247  switch (actionTriggerType) {
249  associateTriggerParam = *(DJIWaypointV2AssociateTriggerParam *)param;
250  break;
251  }
253  trajectoryTriggerParam = *(DJIWaypointV2TrajectoryTriggerParam *)param;
254  break;
255  }
257  intervalTriggerParam = *(DJIWaypointV2IntervalTriggerParam *)param;
258  break;
259  }
261  sampleReachPointTriggerParam = *(DJIWaypointV2SampleReachPointTriggerParam *)param;
262  break;
263  }
264  default:
265  DERROR("Invalid trigger type%d\n", actionTriggerType);
266  break;
267  }}
268  DJIWaypointV2ActionTriggerType actionTriggerType;
269  union {
270  DJIWaypointV2SampleReachPointTriggerParam sampleReachPointTriggerParam;
271  DJIWaypointV2AssociateTriggerParam associateTriggerParam;
272  DJIWaypointV2TrajectoryTriggerParam trajectoryTriggerParam;
273  DJIWaypointV2IntervalTriggerParam intervalTriggerParam;
274  };
275 }DJIWaypointV2Trigger;
276 
284 
285 
287  {
288  operationType =type;
289  switch (type) {
293  break;
294  }
297  break;
298  }
301  break;
302  }
303  default:
304  break;
305  }};
306 
313 
314  union {
322 
330  };
331 
333 
340 
342  {
343  operationType =type;
344  switch (type) {
346  rotation = *(DJIGimbalRotation*)param;
347  break;
348  default:
349  break;
350  }
351  };
358 
364 
372 
374  {
375  operationType =type;
376  switch (type) {
379  break;
380  }
383  break;
384  }
385  default:
386  break;
387  }
388  }
395 
396 union {
405 
414 };
415 
416 
418 
424 typedef struct DJIWaypointV2Actuator {
425 
426  DJIWaypointV2Actuator(const DJIWaypointV2ActionActuatorType &type, const uint8_t &index, void *param){
427  actuatorType = type;
428  actuatorIndex = index;
429 
430  switch (type) {
433  break;
434  }
435 
438  break;
439  }
440 
443  break;
444  }
445  default:
446  break;
447  }
448  };
449 
454 
460  uint8_t actuatorIndex;
461 
462  union
463  {
470 
477 
485  };
486  //void *actuatorParam;
488 
494 typedef struct DJIWaypointV2Action {
495 
496  DJIWaypointV2Action(const uint32_t id, const DJIWaypointV2Trigger &trigger, const DJIWaypointV2Actuator &actuator):actionId(id), trigger(trigger), actuator(actuator){};
497 
501  uint16_t actionId;
502 
506  DJIWaypointV2Trigger trigger;
507 
513  }
514 }
515 #endif //DJIOSDK_CORE_DJI_WAYPOINT_V2_ACTION_HPP
DJIWaypointV2ActionActuatorType
Definition: dji_mission_type.hpp:355
uint16_t actionId
Definition: dji_waypoint_v2_action.hpp:496
float32_t x
Definition: dji_waypoint_v2_action.hpp:43
struct DJI::OSDK::DJIWaypointV2CameraActuatorParam DJIWaypointV2CameraActuatorParam
Definition: dji_waypoint_v2_action.hpp:153
uint8_t waitingTime
Definition: dji_waypoint_v2_action.hpp:91
Definition: dji_waypoint_v2_action.hpp:494
Definition: dji_mission_type.hpp:331
float32_t width
Definition: dji_waypoint_v2_action.hpp:174
Definition: dji_mission_type.hpp:361
DJIWaypointV2ActionIntervalType actionIntervalType
Definition: dji_waypoint_v2_action.hpp:145
struct DJI::OSDK::DJIWaypointV2IntervalTriggerParam DJIWaypointV2IntervalTriggerParam
struct DJI::OSDK::DJIWaypointV2CameraFocusParam DJIWaypointV2CameraFocusParam
uint8_t isRelative
Definition: dji_waypoint_v2_action.hpp:218
CGPoint focusTarget
Definition: dji_waypoint_v2_action.hpp:162
DJIWaypointV2ActionActuatorCameraOperationType
Definition: dji_mission_type.hpp:409
DJIWaypointV2CameraActuatorParam cameraActuatorParam
Definition: dji_waypoint_v2_action.hpp:469
DJIWaypointV2TriggerAssociatedTimingType
Definition: dji_mission_type.hpp:275
DJIWaypointV2CameraFocusParam focusParam
Definition: dji_waypoint_v2_action.hpp:321
DJIWaypointV2CameraFocalLengthParam zoomParam
Definition: dji_waypoint_v2_action.hpp:329
struct DJI::OSDK::DJIWaypointV2AircraftControlParam DJIWaypointV2AircraftControlParam
Definition: dji_waypoint_v2_action.hpp:339
Definition: dji_waypoint_v2_action.hpp:283
DJIWaypointV2AircraftControlFlyingParam flyControlParam
Definition: dji_waypoint_v2_action.hpp:413
uint16_t actionIdAssociated
Definition: dji_waypoint_v2_action.hpp:96
struct DJI::OSDK::DJIWaypointV2GimbalActuatorParam DJIWaypointV2GimbalActuatorParam
uint8_t isStartFlying
Definition: dji_waypoint_v2_action.hpp:237
uint8_t reserved
Definition: dji_waypoint_v2_action.hpp:63
int16_t z
Definition: dji_waypoint_v2_action.hpp:56
struct DJI::OSDK::DJIGimbalRotation DJIGimbalRotation
struct DJI::OSDK::DJIWaypointV2AssociateTriggerParam DJIWaypointV2AssociateTriggerParam
uint8_t ctrl_mode
Definition: dji_waypoint_v2_action.hpp:57
uint8_t absYawModeRef
Definition: dji_waypoint_v2_action.hpp:61
struct DJI::OSDK::DJIWaypointV2CameraFocalLengthParam DJIWaypointV2CameraFocalLengthParam
uint16_t endIndex
Definition: dji_waypoint_v2_action.hpp:111
Definition: dji_waypoint_v2_action.hpp:39
float32_t yaw
Definition: dji_waypoint_v2_action.hpp:225
struct DJI::OSDK::DJIWaypointV2Action DJIWaypointV2Action
uint8_t yawCmdIgnore
Definition: dji_waypoint_v2_action.hpp:60
Definition: dji_waypoint_v2_action.hpp:213
DJIWaypointV2GimbalActuatorParam gimbalActuatorParam
Definition: dji_waypoint_v2_action.hpp:476
Definition: dji_waypoint_v2_action.hpp:82
DJIWaypointV2ActionActuatorGimbalOperationType
Definition: dji_mission_type.hpp:385
uint16_t focalLength
Definition: dji_waypoint_v2_action.hpp:204
Definition: dji_waypoint_v2_action.hpp:232
uint8_t regionType
Definition: dji_waypoint_v2_action.hpp:169
Mission related data struct for DJI OSDK library.
uint8_t actuatorIndex
Definition: dji_waypoint_v2_action.hpp:460
uint8_t pitchCmdIgnore
Definition: dji_waypoint_v2_action.hpp:59
DJIWaypointV2ActionTriggerType
Definition: dji_mission_type.hpp:320
DJIWaypointV2ActionIntervalType
Definition: dji_mission_type.hpp:298
Definition: dji_waypoint_v2_action.hpp:194
uint16_t interval
Definition: dji_waypoint_v2_action.hpp:140
DJIWaypointV2ActionActuatorAircraftControlOperationType operationType
Definition: dji_waypoint_v2_action.hpp:394
Definition: dji_waypoint_v2_action.hpp:102
uint8_t rollCmdIgnore
Definition: dji_waypoint_v2_action.hpp:58
float32_t height
Definition: dji_waypoint_v2_action.hpp:180
struct DJI::OSDK::DJIWaypointV2AircraftControlRotateHeadingParam DJIWaypointV2AircraftControlRotateHeadingParam
DJIWaypointV2Trigger trigger
Definition: dji_waypoint_v2_action.hpp:506
DJIWaypointV2AircraftControlRotateHeadingParam yawRotatingParam
Definition: dji_waypoint_v2_action.hpp:404
int16_t y
Definition: dji_waypoint_v2_action.hpp:55
Definition: dji_mission_type.hpp:337
DJIWaypointV2ActionActuatorGimbalOperationType operationType
Definition: dji_waypoint_v2_action.hpp:351
float32_t y
Definition: dji_waypoint_v2_action.hpp:47
DJIWaypointV2AircraftControlParam aircraftControlActuatorParam
Definition: dji_waypoint_v2_action.hpp:484
uint16_t startIndex
Definition: dji_waypoint_v2_action.hpp:106
Definition: dji_waypoint_v2_action.hpp:118
DJIGimbalRotation rotation
Definition: dji_waypoint_v2_action.hpp:362
Definition: dji_ack.cpp:38
struct DJI::OSDK::DJIWaypointV2Actuator DJIWaypointV2Actuator
DJIWaypointV2ActionActuatorType actuatorType
Definition: dji_waypoint_v2_action.hpp:448
DJIWaypointV2TriggerAssociatedTimingType actionAssociatedType
Definition: dji_waypoint_v2_action.hpp:86
DJIWaypointV2ActionActuatorCameraOperationType operationType
Definition: dji_waypoint_v2_action.hpp:305
struct DJI::OSDK::DJIWaypointV2AircraftControlFlyingParam DJIWaypointV2AircraftControlFlyingParam
Definition: dji_waypoint_v2_action.hpp:52
struct DJI::OSDK::DJIWaypointV2TrajectoryTriggerParam DJIWaypointV2TrajectoryTriggerParam
struct DJI::OSDK::CGPoint CGPoint
uint16_t startIndex
Definition: dji_waypoint_v2_action.hpp:122
Definition: dji_waypoint_v2_action.hpp:371
Definition: dji_waypoint_v2_action.hpp:424
Definition: dji_mission_type.hpp:367
DJIWaypointV2ActionActuatorAircraftControlOperationType
Definition: dji_mission_type.hpp:446
uint8_t retryTimes
Definition: dji_waypoint_v2_action.hpp:187
DJIWaypointV2Actuator actuator
Definition: dji_waypoint_v2_action.hpp:511