waylines.wpml Explanation
File Introduction
waylines.wpml
is the file executed directly by the drone, defining specific drone flight and payload action instructions. These instructions are generated by flight path planning software but can also be directly edited and developed by developers. The waylines.wpml
file consists of two parts:
- Mission Information: Primarily contains the
wpml:missionConfig
element, which defines global parameters for the flight mission. - Flight Path Information: Primarily contains the
Folder
element, which defines detailed flight path information (path definitions, action definitions, etc.). EachFolder
represents an executable flight path. Specifically, when using the "Oblique Photography" template, five executable flight paths are generated, corresponding to the fiveFolder
elements withinwaylines.wpml
.
Example File
An example waylines.wpml
file is shown below:
<?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>1100</wpml:droneEnumValue>
<wpml:droneSubEnumValue>0</wpml:droneSubEnumValue>
</wpml:droneInfo>
<!-- Declare drone model with M4T -->
<wpml:payloadInfo>
<wpml:payloadEnumValue>10052</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>
)
Element | Name | Type | Unit | Description and Values | Required (Default) | Supported Models |
---|---|---|---|---|---|---|
wpml:flyToWaylineMode | Fly to First Waypoint Mode | Enum-string | - | safely: Safe Mode The drone takes off, ascends to the first waypoint altitude, then flies horizontally to the first waypoint. If the first waypoint is lower than the "safe takeoff altitude," it ascends to the "safe takeoff altitude" first, flies horizontally above the first waypoint, then descends. Note that the "safe takeoff altitude" only applies before the drone takes off. pointToPoint: Inclined Flight Mode The drone takes off to the "safe takeoff altitude," then ascends at an incline to the first waypoint. If the first waypoint altitude is lower than the "safe takeoff altitude," it flies horizontally first, then descends. | Required element | M4T/M4N |
wpml:finishAction | Finish Action | Enum-string | - | goHome: After completing the mission, the drone exits the flight path mode and returns home. noAction: After completing the mission, the drone exits the flight path mode. autoLand: After completing the mission, the drone exits the flight path mode and lands on the spot. gotoFirstWaypoint: After completing the mission, the drone immediately flies to the starting point of the flight path and exits the flight path mode upon arrival. * Note: If the drone exits flight path mode and enters a lost control state during these actions, it will prioritize executing the lost control action. | Required element | M4T/M4N |
wpml:exitOnRCLost | Continue Mission on Signal Loss | Enum-string | - | goContinue: Continue the mission executeLostAction: Exit the mission and execute the lost control action | Required element | M4T/M4N |
wpml:executeRCLostAction | Lost Control Action Type | Enum-string | - | goBack: Return home. The drone flies from the lost control position to the takeoff point. landing: Land. The drone lands on the spot from the lost control position. hover: Hover. The drone hovers at the lost control position. | Required when wpml:exitOnRCLost is executeLostAction | M4T/M4N |
wpml:takeOffSecurityHeight | Safe Takeoff Altitude | Float | m | [2, 1500] (Altitude mode: Relative to the takeoff point) * Note: After takeoff, the drone ascends to this altitude, then flies to the first waypoint according to the "Fly to First Waypoint Mode" setting. This element only applies before the drone takes off. | Required element | M4T/M4N |
wpml:globalTransitionalSpeed | Global Transition Speed | Float | m/s | [1, 15] * Note: This is the speed at which the drone flies to the first waypoint of each flight path. If the mission is interrupted, the drone resumes from its current position to the breakpoint at this speed. | Required element | M4T/M4N |
wpml:globalRTHHeight | Global Return-to-Home Altitude | Float | m | *Note: When returning home, the drone ascends to this altitude before proceeding with the return. | Required element | M4T/M4N |
wpml:droneInfo | Drone Model Information | - | - | *Note: Please refer to the Common Elements section for detailed information. | - | M4T/M4N |
wpml:payloadInfo | Payload Model Information | - | - | *Note: Please refer to the Common Elements section for detailed information. | - | M4T/M4N |
wpml:autoRerouteInfo | Auto Rerouting | - | - | - | - | - |
Wayline Information (Parent Element: <Folder>
)
Element | Name | Type | Unit | Values and Interpretation | Required (Default Value) | Supported Models |
---|---|---|---|---|---|---|
wpml:templateId | Template ID * Note: This ID must be unique within a kmz file. It is recommended to start from 0 and increase monotonically. In the template.kml and waylines.wpml files, this ID is used to associate the template with the generated executable flight path. | Integer | - | [0, 65535] | Required element | M4T/M4N |
wpml:waylineId | Wayline ID * Note: This ID must be unique within a flight path. It is recommended to start from 0 and increase monotonically. | Integer | - | [0, 65535] | Required element | M4T/M4N |
wpml:autoFlightSpeed | Global Flight Path Speed | Float | m/s | [1, 15] * Note: This element defines the target flight speed of the drone throughout the entire flight path generated by this template. If this element is additionally defined for a specific waypoint, the local definition will override the global definition. | Required element | M4T/M4N |
wpml:executeHeightMode | Execution Height Mode * Note: This element is only used in waylines.wpml. | Enum-string | - | WGS84: Ellipsoid height mode relativeToStartPoint: Relative to takeoff point height mode realTimeFollowSurface: Use real-time surface following mode (currently unsupported). | Required element | M4T/M4N |
Placemark(Point) | Waypoint Information (Includes waypoint latitude, longitude, altitude, etc.) | - | - | Please refer to the documentation: Flight Path File Format > template.kml Description > Placemark | - | M4T/M4N |
wpml:startActionGroup | Initial Action Group * Note: This element is used to plan a series of initial actions to be executed before starting the flight path. When the flight path is interrupted and resumes, the initial actions are executed first, followed by the waypoint actions. | - | - | Refer to the Common Elements section for details on <wpml:actionGroup> | - | M4T/M4N |
Waypoint Information (<Placemark>
)
Element | Name | Type | Unit | Values and Interpretation | Required (Default Value) | Supported Models |
---|---|---|---|---|---|---|
Point | Waypoint Latitude and Longitude <Longitude,Latitude> * Note: The format should be " <Point> <coordinates> longitude,latitude </coordinates> </Point> " | Float | °,° | [-90,90],[-180,180] | Required element | M4T/M4N |
wpml:index | Waypoint Index * Note: This ID must be unique within a single flight path. It must start from 0 and increase monotonically. | Integer | - | [0, 65535] | Required element | M4T/M4N |
wpml:executeHeight | Waypoint Execution Height * Note: This element is only used in waylines.wpml. The specific elevation reference plane is declared in "wpml." | Float | m | - | Required element | M4T/M4N |
wpml:waypointSpeed | Waypoint Flight Speed, the speed from the current waypoint to the next waypoint | Float | m/s | [1, 15] | Required Element * Note: Required only when "wpml:useGlobalSpeed" is "0" | M4T/M4N |
wpml:waypointHeadingParam | Heading Mode Parameter | - | - | - | Required Element * Note: Required only when "wpml:useGlobalHeadingParam" is "0" | |
wpml:waypointTurnParam | Waypoint Type (Waypoint Turn Mode) | - | - | - | Required Element * Note: Required only when "wpml:useGlobalTurnParam" is "0" | M4T/M4N |
wpml:useStraightLine | Whether the Flight Segment Should Fit a Straight Line | Boolean | - | 0: The flight path is curved throughout 1: The flight path tries to fit the line connecting 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:formationInfo | Flight Formation Information | * Note: Please refer to the Common Elements section for detailed information | - | M4T/M4N |