Waylines.wpml
Waylines.wpml Introduction
The waylines.wpml
file consists of two parts.
- Mission information: Contains mainly the
wpml:missionConfig
element, which defines the global parameters of the waylines mission, etc. - Waylines information: Contains mainly
Folder
elements, which define detailed waylines information (path definition, action definition, etc.). EachFolder
represents an executable route. In particular, when using the "mapping3d" template, 5 executable routes are generated, corresponding to the 5Folder
elements inwaylines.wpml
.
waylines.wpml
The sample file is as follows.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:wpml="http://www.dji.com/wpmz/1.0.0">
<Document>
<!-- Step 1: Setup Mission Configuration -->
<wpml:missionConfig>
<wpml:flyToWaylineMode>safely</wpml:flyToWaylineMode>
<wpml:finishAction>goHome</wpml:finishAction>
<wpml:exitOnRCLost>goContinue</wpml:exitOnRCLost>
<wpml:takeOffSecurityHeight>20</wpml:takeOffSecurityHeight>
<wpml:globalTransitionalSpeed>10</wpml:globalTransitionalSpeed>
<!-- Declare drone model with M30 -->
<wpml:droneInfo>
<wpml:droneEnumValue>67</wpml:droneEnumValue>
<wpml:droneSubEnumValue>0</wpml:droneSubEnumValue>
</wpml:droneInfo>
<!-- Declare drone model with M30 -->
<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>
Waylines.wpml Element Introduction
<wpml:missionConfig>
)
Mission Information(Parent Element:Element | Name | Type | unit | Value | Is it required (default) | Product Support |
---|---|---|---|---|---|---|
wpml:flyToWaylineMode | Fly to first point mode | enum | - | safely : (M300)The aircraft takes off, rises to the altitude of the first waypoint, and then flies level to the first waypoint. If the first waypoint is lower than the take-off point, after takeoff, it will level fly to the top of the first waypoint and then descend.(M30)The aircraft takes off, rises to the altitude of the first waypoint, and then flies level to the first waypoint. If the first waypoint is lower than the "safe take-off altitude", after taking off to the "safe take-off altitude", level flight to the first waypoint and then descend. Note that the "safe takeoff altitude" only takes effect when the aircraft is not taking off. pointToPoint (M300)After the aircraft takes off, it tilts to the first waypoint. (M30)The aircraft takes off to the "safe takeoff altitude", and then tilts to the first waypoint. If the altitude of the first waypoint is lower than the "safe take-off altitude", it will first level flight and then descend. | Yes | M300RTK, M30 Series |
wpml:finishAction | finish action | enum | - | goHome : After the aircraft completes the waylines mission, exit the waylines mode and go home.noAction : After the aircraft completes the waylines mission, exit the waylines mode.autoLand : After the aircraft completes the waylines mission, exit the waylines mode and land on the spot。gotoFirstWaypoint : After the aircraft completes the waylines mission, it immediately flies to the first point of the waylines, and exits the waylines mode when it arrives.Note: During the above actions, if the aircraft exits the waylines mode and enters the runaway state, the runaway action will be executed first. | Yes | M300RTK,M30 Series |
wpml:exitOnRCLost | Whether to continue the waylines if out of control | enum | - | goContinue executeLostAction : Exit the waylines mode and execute a runaway action. | Yes | M300RTK, M30 Series |
wpml:executeRCLostAction | Type of runaway action | enum | - | goBack : The aircraft flies from the out-of-control position to the take-off point.landing : The aircraft landed on the spot in an out-of-control position.hover : The aircraft is hovering in an out-of-control position. | goBack | M300RTK,M30 Series |
wpml:takeOffSecurityHeight | Safe take-off height | float | m | [1.5, 1500] (height mode: height relative to take-off point) Note: After take-off, the aircraft will ascend to this altitude and then fly to the first waypoint according to the "Fly to first waypoint mode" setting. This element is only valid when the aircraft is not taking off. | 1.5 | M30 Series |
wpml:globalTransitionalSpeed | global transitional speed | float | m/s | > 0 Note:The speed at which the drone flies to the first waypoint of each waylines. The speed at which the drone resumes from its current position to the break point when the waylines mission is interrupted. | Yes | M300RTK, M30 Series |
wpml:droneInfo | drone information | - | - | - | - | M300RTK,M30 Series |
wpml:payloadInfo | payload information | - | - | - | - | M300RTK,M30 Series |
<Folder>
)
Waylines Information(Parent Element:Element | Name | Type | unit | Value | Is it required (default) | Product Support |
---|---|---|---|---|---|---|
wpml:templateId | template id Note: The ID is unique within a kmz file. It is recommended to increment it monotonically and continuously from 0. This id will be used in the template.kml and waylines.wpml files to associate the template with the generated executable waylines. | int | - | [0, 65535] | Yes | M300RTK,M30 Series |
wpml:waylineId | waylines ID Note: The ID is unique within a kmz file. It is recommended to increment it monotonically and continuously from 0. | int | - | [0, 65535] | Yes | M300RTK,M30 Series |
wpml:autoFlightSpeed | Global waylines flight speed | float | m/s | (0, Maximum flight speed of the current drone] Note: The maximum flight speed of different drones is different. This element defines the target flight speed of the aircraft in the entire wayline generated by this template. If this element of a waypoint is additionally defined, the local definition overrides the global definition. | Yes | M300RTK,M30 Series |
wpml:executeHeightMode | Execute height mode Note:This element is only used in waylines.wpml. | enum | - | WGS84 : Ellipsoid height modelrelativeToStartPoint : Relative take-off point altitude model | Yes | M300RTK,M30 Series |
Placemark(Point) | Waypoint information (including waypoint latitude, longitude, altitude, etc.) | - | - | See《Placemark(Point)》 | - | M300RTK,M30 Series |