跳到主要内容

waylines.wpml

File Introduction

waylines.wpml is a file directly executed by the aircraft, defining explicit instructions for drone flight and payload actions. These instructions are generated by route planning software and can also be edited and developed directly by developers. The waylines.wpml file consists of two parts:

  1. Mission Information: Primarily includes the <wpml:missionConfig> element, defining the global parameters of the flight mission.
  2. Wayline Information: Mainly comprises the <Folder> element, defining detailed information about the flight route (path definition, action definition, etc.). Each <Folder> represents an executable flight route. Specifically, when using the "Tilt Photography" template, five executable flight routes will be generated, corresponding to the five <Folder> elements within waylines.wpml.

Example File

waylines.wpmlHere is the example file:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns:wpml="http://www.autel.com/wpmz/1.0.0" xmlns="http://www.opengis.net/kml/2.2">
<Document>
<!-- Step 1: Setup Mission Configuration -->
<wpml:missionConfig>
<wpml:flyToWaylineMode>safely</wpml:flyToWaylineMode>
<wpml:finishAction>goHome</wpml:finishAction>
<wpml:exitOnRCLost>goContinue</wpml:exitOnRCLost>
<wpml:executeRCLostAction>hover</wpml:executeRCLostAction>
<wpml:takeOffSecurityHeight>20</wpml:takeOffSecurityHeight>
<wpml:globalTransitionalSpeed>10</wpml:globalTransitionalSpeed>
<!-- Declare drone model with M4T -->
<wpml:droneInfo>
<wpml:droneEnumValue>67</wpml:droneEnumValue>
<wpml:droneSubEnumValue>0</wpml:droneSubEnumValue>
</wpml:droneInfo>
<!-- Declare drone model with M4T -->
<wpml:payloadInfo>
<wpml:payloadEnumValue>52</wpml:payloadEnumValue>
<wpml:payloadSubEnumValue>0</wpml:payloadSubEnumValue>
<wpml:payloadPositionIndex>0</wpml:payloadPositionIndex>
</wpml:payloadInfo>
</wpml:missionConfig>

<!-- Step 2: Setup A Folder for Waypoint Template -->
<Folder>
<wpml:templateId>0</wpml:templateId>
<wpml:executeHeightMode>WGS84</wpml:executeHeightMode>
<wpml:waylineId>0</wpml:waylineId>
<wpml:autoFlightSpeed>10</wpml:autoFlightSpeed>
<Placemark>
<Point>
<coordinates>
longitude,latitude
</coordinates>
</Point>
<wpml:index>0</wpml:index>
<wpml:executeHeight>116.57</wpml:executeHeight>
<wpml:waypointSpeed>10</wpml:waypointSpeed>
<wpml:waypointHeadingParam>
<wpml:waypointHeadingMode>followWayline</wpml:waypointHeadingMode>
</wpml:waypointHeadingParam>
<wpml:waypointTurnParam>
<wpml:waypointTurnMode>toPointAndStopWithDiscontinuityCurvature</wpml:waypointTurnMode>
<wpml:waypointTurnDampingDist>0</wpml:waypointTurnDampingDist>
</wpml:waypointTurnParam>
</Placemark>
<Placemark>
<Point>
<coordinates>
longitude,latitude
</coordinates>
</Point>
<wpml:index>1</wpml:index>
<wpml:executeHeight>116.57</wpml:executeHeight>
<wpml:waypointSpeed>7</wpml:waypointSpeed>
<wpml:waypointHeadingParam>
<wpml:waypointHeadingMode>followWayline</wpml:waypointHeadingMode>
</wpml:waypointHeadingParam>
<wpml:waypointTurnParam>
<wpml:waypointTurnMode>toPointAndStopWithDiscontinuityCurvature</wpml:waypointTurnMode>
<wpml:waypointTurnDampingDist>0</wpml:waypointTurnDampingDist>
</wpml:waypointTurnParam>
<!-- Declare action group for waypoint 1# -->
<wpml:actionGroup>
<wpml:actionGroupId>0</wpml:actionGroupId>
<wpml:actionGroupStartIndex>1</wpml:actionGroupStartIndex>
<wpml:actionGroupEndIndex>1</wpml:actionGroupEndIndex>
<wpml:actionGroupMode>sequence</wpml:actionGroupMode>
<wpml:actionTrigger>
<wpml:actionTriggerType>reachPoint</wpml:actionTriggerType>
</wpml:actionTrigger>
<!-- Declare the 1st action: rotate gimbal -->
<wpml:action>
<wpml:actionId>0</wpml:actionId>
<wpml:actionActuatorFunc>gimbalRotate</wpml:actionActuatorFunc>
<wpml:actionActuatorFuncParam>
<wpml:gimbalRotateMode>absoluteAngle</wpml:gimbalRotateMode>
<wpml:gimbalPitchRotateEnable>0</wpml:gimbalPitchRotateEnable>
<wpml:gimbalPitchRotateAngle>0</wpml:gimbalPitchRotateAngle>
<wpml:gimbalRollRotateEnable>0</wpml:gimbalRollRotateEnable>
<wpml:gimbalRollRotateAngle>0</wpml:gimbalRollRotateAngle>
<wpml:gimbalYawRotateEnable>1</wpml:gimbalYawRotateEnable>
<wpml:gimbalYawRotateAngle>30</wpml:gimbalYawRotateAngle>
<wpml:gimbalRotateTimeEnable>0</wpml:gimbalRotateTimeEnable>
<wpml:gimbalRotateTime>0</wpml:gimbalRotateTime>
<wpml:payloadPositionIndex>0</wpml:payloadPositionIndex>
</wpml:actionActuatorFuncParam>
</wpml:action>
<!-- Declare the 2nd action: take photo -->
<wpml:action>
<wpml:actionId>1</wpml:actionId>
<wpml:actionActuatorFunc>takePhoto</wpml:actionActuatorFunc>
<wpml:actionActuatorFuncParam>
<wpml:fileSuffix>point1</wpml:fileSuffix>
<wpml:payloadPositionIndex>0</wpml:payloadPositionIndex>
</wpml:actionActuatorFuncParam>
</wpml:action>
</wpml:actionGroup>
</Placemark>
</Folder>

</Document>
</kml>

Element Description

Mission Information (Parent Element: <wpml:missionConfig>)

ElementNameTypeUnitValues and InterpretationRequired (Default Value)Supported Models
wpml:flyToWaylineModeFly to Wayline ModeEnum-string-safely: Safe mode. The aircraft takes off, ascends to the first waypoint altitude, and then flies horizontally to the first waypoint. If the altitude of the first waypoint is lower than the "safe takeoff height", the aircraft ascends to the "safe takeoff height" first and then descends to the top of the first waypoint. Note: "Safe takeoff height" only takes effect when the aircraft has not taken off.

pointToPoint: Tilt flight mode. The aircraft takes off to the "safe takeoff height", then tilts to climb to the first waypoint. If the altitude of the first waypoint is lower than the "safe takeoff height", it flies horizontally first and then descends.
Required ElementM4T/M4N
wpml:finishActionFinish ActionEnum-string-goHome: After completing the flight route task, the aircraft exits the route mode and returns home.
noAction: After completing the flight route task, the aircraft exits the route mode.
autoLand: After completing the flight route task, the aircraft exits the route mode and lands in place.
gotoFirstWaypoint: After completing the flight route task, the aircraft immediately flies to the starting point of the route, and exits the route mode upon arrival. * Note: During the execution of the above actions, if the aircraft exits the route mode and enters a lost control state, the lost control action will be executed first.
Required ElementM4T/M4N
wpml:exitOnRCLostContinue on Lost ControlEnum-string-goContinue: Continue the route execution.
executeLostAction: Exit the route and execute the lost control action.
Required ElementM4T/M4N
wpml:executeRCLostActionLost Control Action TypeEnum-string-goBack: Return home. The aircraft flies from the lost control position to the takeoff point.
landing: Land. The aircraft lands in place from the lost control position.
hover: Hover. The aircraft hovers from the lost control position.
Required when wpml:exitOnRCLost is executeLostActionM4T/M4N
wpml:takeOffSecurityHeightSafe Takeoff HeightFloatm[2, 1500] (Height mode: relative to takeoff point height)
* Note: After the aircraft takes off, it first climbs to this height, and then flies to the first waypoint according to the setting of "Fly to Wayline Mode". This element only takes effect when the aircraft has not taken off.
Required ElementM4T/M4N
wpml:globalTransitionalSpeedGlobal Wayline Transitional SpeedFloatm/s[1,15]
* Note: The speed at which the aircraft flies to each waypoint of the route. When the route task is interrupted, the aircraft resumes from the current position to the speed at the breakpoint.
Required ElementM4T/M4N
wpml:globalRTHHeightGlobal Return-to-Home HeightFloatm* Note: When the aircraft returns home, it first climbs to this height, and then returns home.Required ElementM4T/M4N
wpml:droneInfoAircraft Model Information--* Note: Please refer to the detailed information in the "Common Elements" section.-M4T/M4N
wpml:payloadInfoPayload Model Information--* Note: Please refer to the detailed information in the "Common Elements" section.-M4T/M4N
wpml:autoRerouteInfoRoute Rerouting-----

Wayline Information (Parent Element: <Folder>)

ElementNameTypeUnitValues and InterpretationRequired (Default Value)Supported Models
wpml:templateIdTemplate ID
* Note: Unique within a kmz file. It is recommended to start from 0 and increase monotonically. This ID will be used to associate the template with the generated executable waylines in the template.kml and waylines.wpml files.
Integer-[0, 65535]Required ElementM4T/M4N
wpml:waylineIdWayline ID
* Note: Unique within a wayline. It is recommended to start from 0 and increase monotonically.
Integer-[0, 65535]Required ElementM4T/M4N
wpml:autoFlightSpeedGlobal Wayline Flight SpeedFloatm/s[1,15]
* Note: This element defines the target flight speed of the aircraft in the entire segment of wayline generated by this template. If this element is additionally defined for a certain waypoint, the local definition will override the global definition.
Required ElementM4T/M4N
wpml:executeHeightModeExecution Height Mode
* Note: This element is only used in waylines.wpml.
Enum-string-WGS84: Ellipsoidal height mode
relativeToStartPoint: Relative to the takeoff point height mode
realTimeFollowSurface: Use real-time follow-ground mode, Not supported yet.
Required ElementM4T/M4N
Placemark(Point)Waypoint Information (including waypoint longitude, latitude, and altitude)--Please refer to the document content, Wayline File Format > template.kml Description > Placemark-M4T/M4N
wpml:startActionGroupInitial Wayline Action
* Note: This element is used to plan a series of initial actions to be executed before the wayline starts. When the wayline is interrupted and resumed, the initial actions are executed first, followed by the waypoint actions.
--Further Reading: <wpml:actionGroup> in Common Elements Information-M4T/M4N

Waypoint Information (<Placemark>)

ElementNameTypeUnitValues and InterpretationRequired (Default Value)Supported Models
PointWaypoint Longitude and Latitude
* Note: The format here is like <Point><coordinates>longitude,latitude</coordinates></Point>
Float°,°[-90,90],[-180,180]Required ElementM4T/M4N
wpml:indexWaypoint Index
* Note: Unique within a wayline. The index must start from 0 and increase monotonically.
Integer-[0, 65535]Required ElementM4T/M4N
wpml:executeHeightWaypoint Execution Height
* Note: This element is only used in waylines.wpml. The specific elevation reference plane is declared in "wpml:executeHeightMode".
Floatm-Required ElementM4T/M4N
wpml:waypointSpeedWaypoint Flight Speed, the speed from the current waypoint to the next waypointFloatm/s[1, 15]Required Element
* Note: Required only when "wpml:useGlobalSpeed" is "0"
M4T/M4N
wpml:waypointHeadingParamYaw Angle Mode Parameter---Required Element
* Note: Required only when "wpml:useGlobalHeadingParam" is "0"
M4T/M4N
wpml:waypointTurnParamWaypoint Type (Waypoint Turn Mode)---Required Element
* Note: Required only when "wpml:useGlobalTurnParam" is "0"
M4T/M4N
wpml:useStraightLineWhether the Waypoint Segment Fits a Straight LineBoolean-0: The segment trajectory is a curve
1: The segment trajectory attempts to fit the line connecting the two points
Required Element
* Note: Required only when "wpml:waypointTurnParam" inside "waypointTurnMode" is set to "toPointAndStopWithContinuityCurvature" or "toPointAndPassWithContinuityCurvature". If this element is set, the local definition will override the global definition.
M4T/M4N
wpml:formationInfoWaypoint Formation Information--Note: Please refer to the detailed information in the Common Elements section-M4T/M4N