Wayline Flights
Service
/dji/wayline/start
| Description | Start a wayline task. Returns as soon as the DJI Dock acknowledges the wayline request |
|---|---|
| Request | WaylineStart |
| Response | None |
| DJI Bindings | Service flighttask_prepare & flighttask_execute |
Telemetry
/dji/wayline/progress
| Description | Progress update on current wayline task |
|---|---|
| Push | Every ~2s when performing the task |
| Type | WaylineProgress |
| DJI Bindings | Event flighttask_progress |
/dji/wayline/result
| Description | Final result of the wayline task |
|---|---|
| Push | Once when the task is finished |
| Type | WaylineResult |
| DJI Bindings | Event flighttask_progress |
Schemas
WaylineStart
| Key | Type | Description | Required |
|---|---|---|---|
| flightId | string | Unique identifier of the wayline flight. | Yes |
| flightParams | WaylineFlightParams | Parameters for the wayline flight. | No |
| wpmlFile | WaylineFile | Wayline mission file to be executed. | Yes |
| customFlightAreas | WaylineFile | Custom flight areas file to be used during the wayline flight. | No |
| startBreakpoint | WaylineStartBreakPoint | Optional breakpoint to resume the wayline flight from. | No |
Sample
{
"flightId": "",
"flightParams": {
"rthHeight": 60,
"rcLostActionType": "rth",
"disableRcLostAction": false,
"disableRtkPrecision": false,
"disableAreasRefresh": true
},
"wpmlFile": {
"md5": "",
"data": "<?xml version=\"1.0\"..."
},
"customFlightAreas": {
"md5": "",
"data": "{\"type\":\"FeatureCollection\",..."
},
"startBreakpoint": {
"index": 0,
"state": "segment",
"progress": 0,
"waylineId": 0
}
}
WaylineFlightParams
| Key | Type | Description |
|---|---|---|
| rthHeight | int | Return-to-home height in meters. |
| rcLostActionType | string | Action to take when remote controller signal is lost. One of: "hover", "land", "rth". |
| disableRcLostAction | bool | If true, disables the RC lost action. |
| disableRtkPrecision | bool | If true, disables RTK precision mode during the flight. |
| disableAreasRefresh | bool | If true, disables refreshing custom flight areas before starting the flight. |
WaylineFile
info
One of md5 or data must be provided.
md5 is computed on the agent side so can only be provided from a /dji/wayline/info service call for an existing flight.
data is stringified raw WPML for a wayline file or GeoJSON for custom flight areas.
| Key | Type | Description |
|---|---|---|
| md5 | string | MD5 checksum of the file data. |
| data | string | Base64-encoded content of the file. |
WaylineProgress
| Key | Type | Description |
|---|---|---|
| flightId | string | Unique identifier of the wayline flight. |
| status | string | Current status of the wayline flight. One of: "sent", "in_progress", "partially_done", "ok", "paused", "rejected", "failed", "canceled", "timeout" or "unknown" |
| step | WaylineStep | Current step information of the wayline flight. |
| percent | int | Completion percentage of the wayline flight (0-100). |
| waypoint | int | Target waypoint index |
Sample
{
"flightId": "6812a48e1c1d0389017cc1c4",
"status": "in_progress",
"step": {
"code": 7,
"msg": "Entering startup check preparation and hatch opening preparation"
},
"percent": 10,
"waypoint": 0
}
WaylineStep
| Key | Type | Description |
|---|---|---|
| code | int | Numeric code representing the current step. |
| msg | string | Description of the current step. |
WaylineStartBreakPoint
| Key | Type | Description |
|---|---|---|
| index | int | Index of the waypoint or segment to resume from. |
| state | string | State type of the breakpoint. One of: "waypoint" or "segment". |
| progress | float | Progress within the segment (0.0 - 1.0). Only used if state is "segment". |
| waylineId | int | ID of the wayline mission. Usually 0 for single-wayline missions. |
WaylineResult
| Key | Type | Description |
|---|---|---|
| flightId | string | Unique identifier of the wayline flight. |
| code | int | Result code of the wayline flight. |
| msg | string | Description of the result. |
| mediaCount | int | Number of media files captured during the flight. |
| stopBreakpoint | WaylineStartBreakPoint | (Optional) Breakpoint information where the flight stopped. |
Sample
{
"flightId": "6812a5411c1d0389017cc1c5",
"code": 322283,
"msg": "RTH command sent by user; aircraft unable to complete task",
"mediaCount": 15,
"stopBreakpoint": {
"index": 0,
"state": "",
"progress": 0,
"waylineId": 0
}
}