This part is about Groundstation related functions(Waypoint, Hotpoint and Follow Me), which has been introduced briefly in the OPEN Protocol.
For the detailed function logic, please refer to the Ground Station Programming Guide.
CMD Set | CMD Group | CMD ID | Description |
---|---|---|---|
0x03 | Waypoint | 0x10 | upload waypoint mission settings |
0x11 | upload waypoint data | ||
0x12 | start/stop waypoint mission | ||
0x13 | pause/resume waypoint mission | ||
0x14 | read waypoint init status (available in upcoming 3.2 release) | ||
0x15 | read single waypoint status (available in upcoming 3.2 release) | ||
0x16 | set waypoint mission idle velocity | ||
0x17 | get waypoint mission idle velocity | ||
Hotpoint | 0x20 | upload hotpoint data and start the mission | |
0x21 | stop hotpoint mission | ||
0x22 | pause/resume hotpoint mission | ||
0x23 | set hotpoint mission idle velocity | ||
0x24 | set hotpoint mission radius | ||
0x25 | reset yaw of hotpoint mission | ||
0x26 | read hotpoint info from flight controller | ||
0x27 | enable auto-radius mode (not available) | ||
Follow me | 0x30 | upload follow me data and start the mission | |
0x31 | stop follow me mission | ||
0x32 | pause/resume follow me mission | ||
0x33 | update target position | ||
0x02 | Mission Status Push Info | 0x03 | current mission status |
0x02 | Waypoint Mission Event Push Info | 0x04 | mission event |
Note: All reserved bytes in ground station structs should be set as 0, otherwise your commands may fail.
Request:
typedef struct { |
ACK: uint8_t
Note: The ACK of task upload is always 0. Developers should check the task parameter by themselves, otherwise error code 0xEA will appear when trying to upload waypoints' data.
Request:
typedef struct { |
ACK:
typedef struct{ |
There are totally six kinds of actions as follows, which should be set in commandList
.
Commands | Commands value | Command param | Description |
---|---|---|---|
WP_ACTION_STAY | 0 | Hover time unit: millisecond | Just hover |
WP_ACTION_SIMPLE_SHOT | 1 | N/A | Take a photo |
WP_ACTION_VIDEO_START | 2 | N/A | Start record |
WP_ACTION_VIDEO_STOP | 3 | N/A | Stop record |
WP_ACTION_CRAFT_YAW | 4 | YAW (-180~180) | Adjust the aircraft toward |
WP_ACTION_GIMBAL_PITCH | 5 | PITCH | Adjust gimbal pitch 0: head -90: look down |
Note: The controller will valid all waypoints' data together after the last one uploaded, which means if there exist at least one invalid waypoint information, the waypoint upload ACK of the last one will be with a error code.
Request:
uint8_t start;//0-> start, 1-> cancel |
ACK: uint8_t
Request:
uint8_t pause;//0-> pause, 1-> resume |
ACK: uint8_t
Request:
uint8_t
with arbitrary value.
ACK:
typedef struct{ |
Request:
uint8_t index; |
ACK:
typedef struct{ |
Request:
float32_t idleVeloctity; |
ACK:
typedef struct{ |
Request:
uint8_t
with arbitrary value
ACK:
typedef struct{ |
Request:
typedef struct{ |
ACK:
typedef struct{ |
Request:
uint8_t
with arbitrary value
ACK: uint8_t
Request:
uint8_t pause; //0->pause, 1->resume |
ACK: uint8_t
typedef struct{ |
ACK: uint8_t
Request:
float32_t radius; |
ACK: uint8_t
Requset:
uint8_t
with arbitrary value
ACK: uint8_t
Request:
uint8_t
with arbitrary value
ACK:
typedef struct{ |
Request:
struct hotpoint_auto_radius { |
ACK: uint8_t
Request:
typedef struct{ |
typedef struct TargetData{ |
ACK: uint8_t
Request:
uint8_t
with arbitrary value
ACK: uint8_t
Request:
uint8_t pause; //0->pause, 1->resume |
ACK: uint8_t
Request:
typedef struct TargetData{ |
NO ACK
The following CMD SET/ID are not API but broadcast data protocol, by which developers can check the current mission status and events like how flight data works.
Note: Developers should select the Ground Station Status
checkbox in DJI Assistant.
There are four kinds of mission status with the same struct size.
Developers can separate them by their first bytes, i.e. mission_type
.
The 'mission_type' is defined with the following enum.
typedef enum |
waypoint mission push information
typedef struct{ |
hotpoint mission push information
typedef struct{ |
follow me mission push information
typedef struct{ |
the other two status(NAVI_MODE_ATTI & NAVI_MISSION_IOC)
typedef struct{ |
There are three kinds of waypoint mission events with the same struct size.
Developers can separate them by their first bytes, i.e. incident_type
.
The 'incident_type' is defined with the following enum.
typedef enum |
waypoint mission upload event push information
typedef struct{ |
waypoint mission finish event push information
typedef struct{ |
waypoint reached event push information
typedef struct{ |
Common ACK | |||
---|---|---|---|
0x00 | Success | 0xD0 | mode bar not in F |
0xD1 | not in Navi Mode | 0xD2 | IOC enabled |
0xD3 | mission not init | 0xD4 | mission not running |
0xD5 | mission running | 0xD6 | flight duration not satisfied |
0xD7 | mission with higher priority is running | 0xD8 | GPS health not satisfied |
0xD9 | low battery | 0xDA | drone not in air when init |
0xDB | invalid mission parameter | 0xDC | execution condition not satisfied |
0xDD | mission will fly through no-fly zone | 0xDE | HOME point not recorded |
0xDF | drone in no-fly zone | 0xC0 | altitude higher than max |
0xC1 | altitude lower than min | 0xC7 | too far |
0xC8 | drone does not support groundstation functions | 0xC9 | too far from the hotpoint/first waypoint |
0xCA | drone in beginner mode | 0xF0 | drone is taking off |
0xF1 | drone is landing | 0xF2 | drone is coming back to home |
0xF3 | drone is arming | 0xF4 | invalid command |
0xFF | unknown command/td> | ||
Follow me ACK | |||
0xB0 | drone too far from mobile | 0xB1 | disconnect time too long |
0xB2 | gimbal pitch too large | ||
Hotpoint ACK | |||
0xC2 | invalid radius | 0xC3 | velocity too large |
0xC4 | invalid start point | 0xC5 | invalid yaw mode |
0xC6 | too far to go back to route | 0xA2 | invalid float number |
0xA3 | invalid latitude/longitude | 0xA6 | invalid direction |
0xA9 | hotpoint already paused | 0xAA | hotpoint not paused |
Waypoint ACK | |||
0xE0 | invalid mission data | 0xE1 | invalid waypoint data |
0xE2 | planned route too long | 0xE3 | flight route too long |
0xE4 | index larger than max number | 0xE5 | neighboring waypoints too close |
0xE6 | neighboring waypoints too far | 0xE7 | damping checking failed |
0xE8 | invalid action parameter | 0xE9 | waypoint upload not finished |
0xEA | waypoint task not uploaded | 0xEB | not all waypoint uploaded |
0xEC | request is running | 0xED | cannot pause because not running |
IOC ACK | |||
0xA0 | too close to HOME point | 0xA1 | IOC type error |