Wayline Management

2024-11-06
No Rating

Event

Dock Task Preparation Exception Notification

This interface supports reporting during the preparation phase of both flight route tasks and live flight controls.

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: flight_setup_exception_notify

Data:

ColumnNameTypeconstraintDescription
snDock SNtext{"length":""}
timeout_timeTime for the exception timeoutint{"max":"10","min":"2","step":"2","unit_name":"Minute / min"}
timestampCurrent UTC timedouble
flight_typeTask typeint{"max":"2","min":"1","step":"","unit_name":null}1 represents the flight route task. 2 represents the live flight controls task.

Example:

{
	"bid": "34bb18e0-ecbc-45c5-89a8-0d4b1689f499",
	"data": {
		"flight_id": "c7f17df6-e7cc-4465-a252-d9587c6bbb37",
		"flight_type": 1,
		"sn": "xxxxxxxx",
		"timeout_time": 6,
		"timestamp": 1724126480015
	},
	"gateway": "xxxxxxxx",
	"method": "flight_setup_exception_notify",
	"need_reply": 1,
	"tid": "d6503c74-65ad-448a-b9f5-916dc1b00acb",
	"timestamp": 1724126480015
}

Topic: thing/product/{gateway_sn}/events_reply

Direction: down

Method:flight_setup_exception_notify

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": "flight_setup_exception_notify"
}

Device notification of Return to Home Exit State

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: device_exit_homing_notify

Data:

ColumnNameTypeconstraintDescription
snDock SNtext{}
actionExit return notification message typeenum_int{"0":"Exit Return to Home Exit State","1":"Enter Return to Home Exit State"}Enter Return to Home Exit State indicating that the dock exits the return to home process due to the reason displayed in the reason field. Similarly, exiting the Return to Home Exit State refers to the dock stopping the exit from the return to home process.
reasonExit return reasonenum_int{"0":"Throttle added to the joystick","1":"Joystick interval added","2":"Behavior tree initialization failed","3":"Surrounded by obstacles","4":"Triggered flight restriction","5":"Obstacle too close","6":"No GPS signal","7":"GPS and VIO position output flags are false","8":"Large position error between GPS and VIO fusion","9":"Short-distance backtracking","10":"Return triggered at close range"}

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"action": 1,
		"reason": "0",
		"sn": "Dock SN"
	},
	"need_reply": 1,
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Report mission progress

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: flighttask_progress

Data:

ColumnNameTypeconstraintDescription
extExtended contentstruct
»current_waypoint_indexNumber of waypoints currently executedint
»wayline_mission_stateWayline mission stateenum_int{"0":"Disconnected","1":"This waypoint is not supported","2":"Wayline preparation state. It can upload files and execute existing files","3":"Wayline file uploading","4":"Trigger start command. The aircraft triggers logic such as reading the wayline. The mission has not started yet and it's in a preparation state","5":"Entering the wayline, heading to the first waypoint","6":"Wayline execution","7":"Wayline interrupted. Triggered conditions are 1 for User actively pauses and 2 for Flight control abnormality","8":"Wayline recovery","9":"Wayline completed"}
»media_countNumber of media files generated during the current flight missionint
»track_idTrack IDtext
»flight_idMission IDtext
»break_pointWayline breakpoint informationstructOptional field to inform the cloud of the breakpoint information for this wayline mission.
»»indexBreakpoint numberint
»»stateBreakpoint stateenum_int{"0":"On segment","1":"On waypoint"}
»»progressCurrent segment progressfloat{"max":"1.0","min":"0"}
»»wayline_idWayline IDint
»»break_reasonBreak reasonenum_int{"0":"No abnormalities","1":"Mission ID does not exist. The wayline mission has not been executed.","2":"Uncommon error, please contact technical support","4":"Error loading wayline file when requesting to start/resume the wayline mission, please try uploading the file again or contact technical support","5":"Failed to query breakpoint file when requesting breakpoint information. Failed to parse breakpoint type when requesting to resume the wayline mission","6":"Incorrect cmd parameter when requesting to start/end the wayline mission, incorrect protocol command in the request. Failed to parse breakpoint type when requesting to resume the wayline mission","7":"Timeout parsing the WPMZ file when requesting to start/resume the wayline mission, please retry","257":"Wayline has already started, cannot start again","258":"Unable to interrupt the wayline in this state, only allowed to pause the wayline in the executing state","259":"Wayline has not started, cannot end the wayline","261":"Flight mission conflict, unable to obtain control of the aircraft, not allowed to start the wayline during landing and return","262":"Unable to resume wayline in this state, only allowed when the wayline is paused","513":"Aircraft exceeded the maximum altitude limit","514":"Aircraft exceeded the maximum distance limit","516":"Aircraft triggered altitude limit","517":"Aircraft triggered obstacle sensing","518":"Poor RTK signal","519":"Approaching the boundary of Restricted Zone","521":"Exceeded the dock's GEO zone altitude limit","522":"Failed to request takeoff for the wayline","523":"Takeoff mission execution failed","524":"Failed to request wayline mission","526":"Failed to request wayline RTK fixing mission","527":"Wayline RTK fixing mission failed to run","528":"Approach the boundary of custom flight area","769":"Weak GPS signal","770":"Remote controller not in N mode, unable to start the task","771":"Home point not refreshed","772":"Unable to start the mission due to low current battery level","773":"Wayline interrupted due to low battery causing return to home","775":"Disconnection between the remote controller and the aircraft","778":"Aircraft is on the ground with propellers spinning, not allowed to start the wayline","779":"Abnormal visual status (for example, too bright, too dark, inconsistent brightness on both sides) during real-time terrain follow","780":"Real-time terrain-following altitude set by the user is invalid (greater than 200m or less than 30m)","781":"Global map calculation error during real-time terrain follow","784":"Wayline interrupted due to strong winds causing return to home","1281":"User exit","1282":"User interruption","1283":"User triggered return to home","1539":"Incorrect start information (waypoint index or progress)","1540":"Using an unsupported coordinate system","1541":"Using an unsupported altitude mode","1542":"Using an unsupported transitional wayline mode","1543":"Using an unsupported yaw mode","1544":"Using an unsupported yaw direction reversal mode","1545":"Using an unsupported waypoint type","1546":"Coordinated turning type cannot be used for the start and end points","1547":"Wayline global speed exceeds a reasonable range","1548":"Waypoint number abnormal","1549":"Abnormal latitude and longitude data","1550":"Abnormal turning intercept","1551":"Maximum speed of wayline segment exceeds a reasonable range","1552":"Wayline segment target speed exceeds a reasonable range","1553":"Waypoint yaw angle exceeds a reasonable range","1555":"Input mission_id of resuming from breakpoint is wrong","1556":"Progress information of resuming from breakpoint input error","1557":"Mission state of resuming from breakpoint is abnormal","1558":"Waypoint index information of resuming from breakpoint input error","1559":"Incorrect latitude and longitude information for resuming from breakpoint","1560":"Yaw input error for waypoints during resuming from breakpoint","1561":"Incorrect flag setting for resuming from breakpoint","1563":"Wayline generation failed","1564":"Wayline execution failed","1565":"Emergency stop due to wayline obstacle sensing","1588":"Unrecognized action type","1595":"Action ID of same action group can not be the same","1598":"Action ID value cannot be 65535","1602":"Number of action groups exceeds a reasonable range","1603":"Error in action group effective range","1606":"Action index exceeds a reasonable range during resuming from breakpoint","1608":"Trigger running result of breakpoint information is abnormal","1609":"Action group ID information can not be duplicated during resume from breakpoint","1610":"Action group positions cannot be repeated during resuming from breakpoint","1611":"Action group positions exceed a reasonable range during resuming from breakpoint","1612":"Action ID is not in the breakpoint information during resuming","1613":"Cannot modify the action state to interrupt during resuming","1614":"Resume failure due to incorrect breakpoint information","1634":"Unrecognized action type","1649":"Unrecognized trigger type","65534":"Unknown error","65535":"Unknown error"}
»»latitudeLatitude of the breakpointfloat{"max":"90","min":"-90","unit_name":"Degrees / °"}
»»longitudeLongitude of the breakpointfloat{"max":"180","min":"-180","unit_name":"Degrees / °"}
»»heightBreakpoint relative to the Earth ellipsoid heightfloat{"unit_name":"Meters / m"}
»»attitude_headBreakpoint yaw axis anglefloatYaw axis angle with true north angle (longitude). Positive values from 0 to 6 o'clock direction, negative values from 6 to 12 o'clock direction.
»wayline_idCurrent working Wayline IDintIncluding the transition phase of entering the wayline, for example, 0 means the aircraft is entering or has executed the first wayline
statusTask stateenum_string{"canceled":"Cancelled or terminated","failed":"Failed","in_progress":"Executing","ok":"Executed successfully","partially_done":"Partially completed","paused":"Paused","rejected":"Rejected","sent":"Issued","timeout":"Timeout"}
progressProgressstruct
»current_stepExecution Stepenum_int{"0":"Initial State","1":"Pre-start Check: Is the Aircraft Executing the Route","2":"Pre-start Check: Has the Dock Exited Work Mode","3":"Pre-start Check: Route Execution in Progress","4":"Pre-start Check: Returning Home","5":"Route Execution Entering Preparation State, Waiting for Task Assignment","6":"Dock Entering Work Mode","7":"Entering Pre-flight Check and Cover Opening Preparation","8":"Waiting for Flight System to be Ready, Establishing Push Connection","9":"Waiting for RTK Source to Report Values","10":"Check if RTK Source is Dock Source, Reset if Not","11":"Waiting for Flight Control Notification","12":"Dock Lacks Control, Seizing Aircraft Control","13":"Custom Flight Zone Consistency Check","14":"Offline Map Consistency Check","15":"Fetching Latest KMZ URL","16":"Downloading KMZ","17":"KMZ Upload in Progress","18":"Color Configuration","19":"Setting Aircraft Takeoff Parameters, Alternate Landing Point, Takeoff Height, and Color","20":"Setting Aircraft Flyto Takeoff Parameters","21":"Setting Home Point","22":"Triggering Route Execution","23":"Route Execution in Progress","24":"Entering Return Home Check Preparation","25":"Aircraft Landing at Dock","26":"Post-landing Cover Closing","27":"Dock Exiting Work Mode","28":"Dock Exception Recovery","29":"Dock Uploading Flight System Logs","30":"Camera Recording Status Check","31":"Fetching Media File Count","32":"Dock Takeoff Cover Opening Exception Recovery","33":"Notifying Task Result","34":"Task Execution Complete, Configured for Active Log Retrieval","35":"Log List Retrieval - Aircraft List","36":"Log List Retrieval - Dock List","37":"Log List Retrieval - Uploading Log List Result","38":"Log Retrieval - Fetching Aircraft Logs","39":"Log Retrieval - Fetching Dock Logs","40":"Log Retrieval - Compressing Aircraft Logs","41":"Log Retrieval - Compressing Dock Logs","42":"Log Retrieval - Uploading Aircraft Logs","43":"Log Retrieval - Uploading Dock Logs","44":"Log Retrieval - Notifying Result","45":"Custom Flight Zone File Update Preparation","46":"Custom Flight Zone Updating","47":"Offline Map Update Preparation","48":"Offline Map Updating","65533":"Waiting for Service Response After Completion","65534":"No Specific State","65535":"UNKNOWN"}
»percentProgress valueint{"max":"100","min":"0","step":"1"}

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"output": {
			"ext": {
				"break_point": {
					"attitude_head": 30,
					"break_reason": 1,
					"height": 100.23,
					"index": 1,
					"latitude": 23.4,
					"longitude": 113.99,
					"progress": 0.34,
					"state": 0,
					"wayline_id": 0
				},
				"current_waypoint_index": 3,
				"flight_id": "flight_id",
				"media_count": 6,
				"track_id": "track_id",
				"wayline_id": 0,
				"wayline_mission_state": 9
			},
			"progress": {
				"current_step": 19,
				"percent": 100
			},
			"status": "ok"
		},
		"result": 0
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Mission readiness notification

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: flighttask_ready

Data:

ColumnNameTypeconstraintDescription
flight_idsPlan IDarray{"size": -, "item_type": text}Collection of task IDs currently meeting the conditions for mission readiness

Example:

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

Return home information

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: return_home_info

Data:

ColumnNameTypeconstraintDescription
planned_path_pointsList of planned trajectory pointsarray{"size": -, "item_type": struct}Real-time planned return wayline of the aircraft, each array represents a complete return wayline, and each push is a full update
»latitudeLatitude of the trajectory point (angle value)double{"max":90,"min":-90}Latitude of the trajectory point, angle value, negative for south latitude, positive for north latitude, accurate to 6 decimal places.
»longitudeLongitude of the trajectory point (angle value)double{"max":180,"min":-180}Longitude of the trajectory point, angle value, east longitude is positive, west longitude is negative, precision to 6 decimal places.
»heightTrajectory point heightfloat{"step":0.1,"unit_name":"Meters / m"}Trajectory point height, ellipsoid height
last_point_typeThe type of the last point in the return path.enum_int{"0":"The last point of the trajectory is above the return point.","1":"The last point of the trajectory is not above the return point."}The type of the last point in the planned_path_points trajectory. This field can be used to determine the display method of the last point in the trajectory. 0 means the last point of the trajectory is above the ground at the return point. The terminal can display a line from the last point of the trajectory to the return point. 1 means the last point of the trajectory is not the return point. The terminal should not display a line from the last point of the trajectory to the return point. The reason for not reaching the return point might be the return point is in Restricted Zones or within obstacles.
flight_idMission IDtextID of the currently executing mission

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"flight_id": "abc",
		"last_point_type": 0,
		"planned_path_points": [
			{
				"height": 123.234,
				"latitude": 13.23,
				"longitude": 123.234
			}
		]
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Service

Cancel Tasks in Preparation

This function only supports the cancellation of flight route tasks and live flight controls tasks during the preparation phase when the Home point is set (current_step is 21). This is called when the RTK data has not yet converged after the takeoff command is issued. The difference from flighttask_undo is that flighttask_undo only cancels tasks that have not started.

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: flight_setup_abort

Data: null

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: flight_setup_abort

Data:

ColumnNameTypeconstraintDescription
resultReturn codeint{"max":"","min":"","step":"","unit_name":null}0: Success. 326108: The current status does not support this action. 326109: Cancellation is not supported because the aircraft has already taken off. You can cancel through the return button.

Example:

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

Create a mission (deprecated)

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: flighttask_create

Data:

ColumnNameTypeconstraintDescription
flight_idPlan IDtext
typeMission typetext
fileWayline file objectstruct
»urlFile URLtext
»signFile MD5 signaturetext

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"file": {
			"sign": "xxxx",
			"url": "https://xxx.com/xxxx"
		},
		"flight_id": "xxxxxxx",
		"type": "wayline"
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: flighttask_create

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": 1654070968655
}

Issue a mission

If user's cloud service can not connect to the Internet (that is, the WAN), it is necessary to implement the update configuration function to send the URL of the NTP service which can be accessed by the cloud service to synchronize the clock. Otherwise, the wayline mission can not work properly.

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: flighttask_prepare

Data:

ColumnNameTypeconstraintDescription
flight_idPlan IDtext
execute_timeStart execution timeint{"length":13}Start time of the mission execution in milliseconds timestamp. Optional field. Required when task_type is 0 or 1, optional for 2.
task_typeMission typeenum_int{"0":"Immediate mission","1":"Timed mission","2":"Conditional mission"}Immediate missions and timed missions are both specified by execute_time for execution. Conditional missions support the ready_conditions field to specify mission readiness conditions. Missions can be executed when the device satisfies certain conditions within a specified time period. Immediate mission media upload has the highest priority, while timed missions and conditional mission media uploads have the same priority.
fileWayline file objectstruct
»urlFile URLtext
»fingerprintFile MD5 signaturetext
ready_conditionsMission readiness conditionsstructOptional field. Required for conditional missions (task_type is 2). Ignored for other types of missions. After sending a conditional mission, the device will periodically check whether all ready_conditions are met. If all conditions are met, a flighttask_ready event notification will be sent. Also, when the device receives the flighttask_execute command, it will check whether all ready_conditions for the mission are met.
»battery_capacityBattery capacityintThe percentage threshold of aircraft battery power for executable missions. The aircraft battery power must be greater than battery_capacity when the mission starts.
»begin_timeStart time of the mission's executable periodint{"length":13}Start time of the mission's executable period in milliseconds; the mission must start execution after the time specified in begin_time.
»end_timeEnd time of the mission execution periodint{"length":13}Deadline in milliseconds for the mission execution period, the execution time must be less than end_time.
executable_conditionsMission execution conditionsstructOptional field for adding pre-execution check conditions on the device side. The mission will fail if any of the conditions are not met.
»storage_capacityStorage capacityintThe minimum storage capacity of the dock or aircraft that can execute tasks. If the storage capacity of the dock or aircraft does not meet storage_capacity, the task execution fails.
break_pointWayline breakpoint informationstructOptional field for resuming from breakpoint. If specified, the wayline mission will resume from the specified breakpoint.
»indexBreakpoint numberint
»stateBreakpoint stateenum_int{"0":"On segment","1":"On waypoint"}
»progressCurrent segment progressfloat{"max":"1.0","min":"0"}
»wayline_idWayline IDint
rth_altitudeReturn home altitudeint{"max":1500,"min":20,"unit_name":"Meters / m"}
out_of_control_actionRemote controller lost control actionenum_int{"0":"Returning to home","1":"Hovering","2":"Landing"}Out-of-control action, the current fixed value is 0, which means return to home. Note that the enumeration definition is inconsistent between the flight control and the dock, and the dock side will perform conversion.
exit_wayline_when_rc_lostWayline lost control actionenum_int{"0":"Continue executing the wayline mission","1":"Exit wayline mission, execute remote controller lost control action"}Keep consistent with the KMZ file
simulate_missionWhether to execute the mission in the simulatorstructOptional field for simulating mission debugging indoors.
»is_enableWhether to enable the simulator missionenum_int{"0":"Do not enable","1":"Enable"}Open or close the simulator for this mission
»latitudeLatitudedouble{"max":"90.0","min":"-90.0"}
»longitudeLongitudedouble{"max":"180.0","min":"-180.0"}

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"break_point": {
			"index": 1,
			"progress": 0.34,
			"state": 0,
			"wayline_id": 0
		},
		"executable_conditions": {
			"storage_capacity": 1000
		},
		"execute_time": 1234567890123,
		"exit_wayline_when_rc_lost": 0,
		"file": {
			"fingerprint": "xxxx",
			"url": "https://xxx.com/xxxx"
		},
		"flight_id": "xxxxxxx",
		"out_of_control_action": 0,
		"ready_conditions": {
			"battery_capacity": 90,
			"begin_time": 1234567890123,
			"end_time": 1234567890123
		},
		"rth_altitude": 100,
		"simulate_mission": {
			"is_enable": 1,
			"latitude": 22.1223,
			"longitude": 113.2222
		},
		"task_type": 2
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1234567890123
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: flighttask_prepare

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
}

Execute a mission

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
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: flighttask_execute

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
}

Cancel mission

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
}

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
}

Pause the wayline

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: flighttask_pause

Data: null

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: flighttask_pause

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"result": 0
	},
	"need_reply": 1,
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Wayline recovery

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: flighttask_recovery

Data: null

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: flighttask_recovery

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"result": 0
	},
	"need_reply": 1,
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

One-key return

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 stateenum_string{"canceled":"Cancelled or terminated","failed":"Failed","in_progress":"Executing","ok":"Executed successfully","paused":"Paused","rejected":"Rejected","sent":"Issued","timeout":"Timeout"}

Cancel return

After returning home, the aircraft will exit the wayline mode. If return is canceled at this point, the aircraft will hover.

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: return_home_cancel

Data: null

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: return_home_cancel

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"result": 0
	},
	"need_reply": 1,
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Requests

Obtain mission resources

Topic: thing/product/{gateway_sn}/requests

Direction: up

Method: flighttask_resource_get

Data:

ColumnNameTypeconstraintDescription
flight_idPlan IDtext

Example:

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

Topic: thing/product/{gateway_sn}/requests_reply

Direction: down

Method: flighttask_resource_get

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error
outputOutputstruct
»fileWayline file objectstruct
»»urlFile URLtext
»»fingerprintFile MD5 signaturetext

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"output": {
			"file": {
				"fingerprint": "signxxxx",
				"url": "https://xx.oss-cn-hangzhou.aliyuncs.com/xx.kmz?Expires=xx&OSSAccessKeyId=xxx&Signature=xxx"
			}
		},
		"result": 0
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1234567890123
}
If you have any comments or confusion about our documentation, you can click here to give feedback and we will get back to you as soon as possible.