跳到主要内容

Wayline Management

Event

Report Wayline Mission Progress

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: flighttask_progress

Data:

ColumnNameTypeconstraintDescription
outputContentstruct
»extExtension contentstruct
»»current_waypoint_indexNumber of waypoints currently executedint
»»media_countNumber of media files generated during this wayline mission executionint
»»flight_idMission IDtext
»statusMission statusenum_string{"pending":"Execution started","canceled":"Canceled or terminated","failed":"Failed","in_progress":"In progress","ok":"Executed successfully","partially_done":"Partially completed","paused":"Paused","rejected":"Rejected","sent":"Sent","timeout":"Timed out"}
»progressProgressstruct
»»current_stepExecution stepenum_int{"0":"Initial state","1":"Pre-launch check, checking if the drone is executing the wayline","2":"Pre-launch check, verifying if the dock station has exited working mode","3":"Pre-launch check, wayline execution in progress","4":"Pre-launch check, returning to home","5":"Wayline execution entering preparation state, awaiting mission assignment","6":"Dock station entering working state","7":"Pre-launch checks and cover opening preparation","8":"Awaiting flight system readiness, establishing connection","9":"Waiting for RTK source listener to report","10":"Checking if RTK is ready","14":"Downloading mission file","15":"Mission file upload in progress","17":"Drone takeoff parameter setup, alternate landing point setup, takeoff altitude setup","18":"Drone flyto takeoff parameter setup","19":"Home point setup","20":"Triggering wayline execution","21":"Wayline execution in progress","22":"Return to home","23":"Drone landing at dock","24":"Post-landing cover closure","29":"Retrieving media file count","46":"Uploading images","47":"Mission completed","0xFFFD":"Waiting for service response after completion","0xFFFE":"No specific status","0xFFFFF":"UNKNOWN"}
»»percentProgress valueint{"max":"100","min":"0",}
resultResultintReturn 0 for success, non-zero for failure (see error codes for failure reasons)

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"output": {
"ext": {
"current_waypoint_index": 3,
"flight_id": "flight_id",
"media_count": 6,
},
"progress": {
"current_step": 19,
"percent": 100
},
"status": "ok"
},
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "flighttask_progress"
}

Issue Task

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: flighttask_prepare

Data:

ColumnNameTypeconstraintDescription
flight_idPlan IDtext
execute_timeStart execution timeint{"length":13}Task start execution time in milliseconds. Optional field. Required when task_type is 0 or 1, optional when it is 2.
task_typeTask typeenum_int{"0":"Immediate task","1":"Scheduled task"}Both immediate and scheduled tasks are executed at the specified execute_time. Conditional tasks support ready_conditions to specify when the task is ready. The task will be executed when conditions are met within a certain time frame. Immediate tasks have the highest media upload priority, while scheduled and conditional tasks have the same priority.
wayline_typeWayline typeenum_int{"0":"Standard waypoint wayline"}
fileWayline file objectstruct
»urlFile URLtext
»fingerprintFile MD5 signaturetext
rth_altitudeReturn altitudeint{"max":1500,"min":20,"unit_name":"meters / m"}
out_of_control_actionRemote control loss actionenum_int{"0":"Return to home","1":"Hover","2":"Land"}Action upon loss of control, currently fixed at 0 (return to home). Note: This value is not consistent with the definitions in the flight controller and nest; conversion will occur at the nest.
exit_wayline_when_rc_lostWayline loss of control actionenum_int{"0":"Continue executing wayline task","1":"Exit wayline task and perform remote control loss action"}Matches the behavior in the KMZ file.
wayline_precision_typeWayline precision typeenum_int{0:"GPS task", 1: ”High-precision RTK task“}
barrier_switch_stateObstacle avoidance switchenum_int{0:turn on OA, 1, turn off OA}
takeoff_altitudeTakeoff altitudeint
first_waypoint_speedSpeed to first waypointint
return_speedSpeed for returnint
media_upload_methodMedia file upload methodenum_int{0:upon landing, 1:during landing}
alternate_land_pointAlternate landing pointstruct
longitudeLongitudedouble
latitudeLatitudedouble
safe_land_heightSafe landing heightfloat
is_configuredIs alternate landing point setenum_int{0:N not set,1:set}

Example:

{
"timestamp" : "1715693761421",
"data" : {
"flight_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"execute_time" : "1715693761357",
"task_type" : 0,
"wayline_type" : 0,
"file" : {
"url" : "http://139.9.78.181:9000/autel-store/20240514/7dc350b0-33dc-4795-aac6-b0b9c88384b8-181153706728624128.aut",
"fingerprint" : "ebf5f3c1ee5228edd96943ade9dda33d"
},
"rth_altitude" : 100,
"exit_wayline_when_rc_lost" : 0,
"alternate_land_point" : {
"longitude" : 114.2304316,
"latitude" : 23.0358027,
"safe_land_height" : 10,
"is_configured" : 1
},
"wayline_precision_type" : 1,
"takeoff_altitude" : 100,
"first_waypoint_speed" : 10,
"return_speed" : 10,
"media_upload_method" : 0
},
"method" : "flighttask_prepare",
"tid" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"bid" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"gateway" : "NM1923371013"
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: flighttask_prepare

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero means error

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"gateway": "NM1923371013",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1715693761468,
"method": "flighttask_prepare"
}

Execute the task

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: flighttask_execute

Data:

ColumnNameTypeconstraintDescription
flight_idPlan IDtext

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"flight_id": "xxxxxxx"
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1234567890123,
"method": "flighttask_execute"
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: flighttask_execute

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero means error

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1234567890123,
"method": "flighttask_execute"
}

One-Click Return to Home

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: return_home

Data: null

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: return_home

Data:

ColumnNameTypeconstraintDescription
resultReturn CodeintNon-zero represents an error
outputOutputstruct
»statusTask Statusenum_string{"canceled":"Canceled or Terminated", "failed":"Failed", "in_progress":"In Progress", "ok":"Success", "paused":"Paused", "rejected":"Rejected", "sent":"Dispatched", "timeout":"Timeout"}

Wayline Pause

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: flighttask_pause

Data: null

Example:

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: flighttask_pause

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error

Wayline Resume

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: flighttask_recovery

Data: null

Example:

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: flighttask_recovery

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error

Cancel Task

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: flighttask_undo

Data:

ColumnNameTypeconstraintDescription
flight_idsPlan IDarray{"size": -, "item_type": text}

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"flight_ids": [
"aaaaaaa",
"bbbbbbb"
]
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1234567890123,
"method": "flighttask_undo"
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: flighttask_undo

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1234567890123,
"method": "flighttask_undo"
}

Cancel Return to Home

After returning to home, the drone will exit the wayline mode. At this point, if the return to home is canceled, the drone will hover.

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: return_home_cancel

Data: null

Example:

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: return_home_cancel

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error