DJI flight tasks
A flight task is a WPML-KMZ waypoint mission dispatched to a DJI dock. ARGUS generates the KMZ from your drone mission plan, uploads it to S3, registers a DJI wayline, and drives the dock through prepare → execute → in-flight progress → complete.
Dispatching a task
- Open a drone mission plan in the planner.
- Make sure it’s assigned to a dock (Assignment → pick a dock).
- Click Dispatch. ARGUS:
- Converts the plan to DJI WPML KMZ via
kmz-generator.ts. EmbedsglobalHeight,executeHeight,takeOffSecurityHeight,payloadLensIndex, etc. per DJI spec. - Uploads via 10-minute presigned S3 PUT.
- Creates a
dji_flight_tasks/{id}doc. - Writes a
dji_commandsdoc of typeflight_task_prepare. - argus-dji picks it up and publishes MQTT
flighttask_preparewith the wayline + dock + metadata.
- Converts the plan to DJI WPML KMZ via
- Dock ACKs. Prepares — cover opens, aircraft power-on, GPS lock, pre-flight checks.
- Once DJI reports ready, ARGUS automatically follows up with
flighttask_execute. Aircraft takes off.
You don’t have to manually fire “execute” after “prepare” — it’s chained for you.
Following progress
During execution you see:
- Drone stream tile — live video + HUD.
- Flight log — every waypoint-reached, mode-change, HMS alert.
- Mission progress panel (from the fleet tile) —
- Waypoint index / total.
- Percent distance covered.
- Estimated time remaining.
current_stepfrom DJI.step_keyfor substate within a step.
Break-point snapshots (the dock-side “where was the drone when it paused” state) are persisted so a resumed flight picks up correctly.
Controlling a running task
The mission progress panel exposes:
- Pause — aircraft hovers at current waypoint. The dock ACKs before the UI flips state — no optimistic UI.
- Resume — unpause.
- Stop — return to home immediately (aborts remaining waypoints).
- Abort setup — only during preparation; cancels before takeoff.
- Return home — explicit RTH.
- Return to specific home — RTH but to a non-default point (supplied lat/lng/alt).
- Deliver in-flight wayline — replace the active wayline with a new KMZ while flying. Used by multi-dock relay for handoffs.
- Stop in-flight wayline — stop the delivered wayline but keep the aircraft flying.
- Cancel in-flight wayline — cancel + start RTH.
- Recover in-flight wayline — re-dispatch from last break-point.
Each button maps to a dji_commands doc type and goes through
argus-dji → dock.
Service-reply handling
Every MQTT command the dock receives gets an ACK (service-reply). ARGUS distinguishes:
- Pre-execution failures — prepare / pre-takeoff fail → task goes FAILED, dock released.
- In-flight failures — execute / pause / resume / stop fail during a flight → ARGUS reverts the optimistic state but keeps the task alive and reports the error with a DJI error code translated via our 448-code dictionary.
The UI surfaces the error code + description via the master-caution strip.
Flight-task statuses
SENT— command sent, awaiting dock ACK.CANCELLED— explicitly cancelled by operator.REJECTED— dock rejected (dock-side error).TIMEOUT— ACK didn’t arrive in time.PARTIAL_DONE— some waypoints completed, then aborted.SUCCESS— full success.FAILED— ran but failed to complete.
Timeline + report integration
Every task transition writes to the mission timeline + the flight-log. Completed tasks also auto-feed into the mission report.
Known limitations
- No in-flight waypoint insert. You can deliver a fresh KMZ but can’t add a single waypoint to an already-running one.
- No in-flight RTH-altitude change — that’s fixed at dispatch time.
- No scheduled dispatch from the task — use the scheduling on the mission itself for delayed-start flights.
Related
- Drone mission planner — where you author the plan.
- WPML KMZ export — the serialisation format.
- Multi-dock relay — how deliver-in-flight powers long-range missions.
- DRC — manual control, alternative to auto-flight.