KMZ file upload Error
已完成I want to upload a KMZ file to a M350 Aircraft. The file is located under:
/data/user/0/org.opensky.monsoon.flightopsrdi/files/M350.kmz
There is a folder "wpmz" under /data/user/0/org.opensky.monsoon.flightopsrdi/files/. In this folder, we have:
folder: res
file: waylines.wpml
file: template.kml
The content of waylines.wpml is:
<?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.2">
<Document>
<wpml:missionConfig>
<wpml:flyToWaylineMode>safely</wpml:flyToWaylineMode>
<wpml:finishAction>noAction</wpml:finishAction>
<wpml:exitOnRCLost>goContinue</wpml:exitOnRCLost>
<wpml:executeRCLostAction>hover</wpml:executeRCLostAction>
<wpml:takeOffSecurityHeight>20</wpml:takeOffSecurityHeight>
<wpml:globalTransitionalSpeed>12</wpml:globalTransitionalSpeed>
<wpml:droneInfo>
<wpml:droneEnumValue>89</wpml:droneEnumValue>
<wpml:droneSubEnumValue>0</wpml:droneSubEnumValue>
</wpml:droneInfo>
<wpml:payloadInfo>
<wpml:payloadEnumValue>43</wpml:payloadEnumValue>
<wpml:payloadSubEnumValue>0</wpml:payloadSubEnumValue>
<wpml:payloadPositionIndex>0</wpml:payloadPositionIndex>
</wpml:payloadInfo>
</wpml:missionConfig>
<Folder>
<wpml:templateId>0</wpml:templateId>
<wpml:executeHeightMode>WGS84</wpml:executeHeightMode>
<wpml:waylineId>0</wpml:waylineId>
<wpml:autoFlightSpeed>8</wpml:autoFlightSpeed>
<Placemark>
<Point>
<coordinates>
34.84076123979556,
31.055519372338836
</coordinates>
</Point>
<wpml:index>0</wpml:index>
<wpml:executeHeight>50</wpml:executeHeight>
<wpml:waypointSpeed>12</wpml:waypointSpeed>
<wpml:waypointHeadingParam>
<wpml:waypointHeadingMode>followWayline</wpml:waypointHeadingMode>
</wpml:waypointHeadingParam>
<wpml:waypointTurnParam>
<wpml:waypointTurnMode>toPointAndPassWithContinuityCurvature</wpml:waypointTurnMode>
<wpml:waypointTurnDampingDist>1</wpml:waypointTurnDampingDist>
</wpml:waypointTurnParam>
</Placemark>
<Placemark>
<Point>
<coordinates>
34.84652095198356,
31.05206442661723
</coordinates>
</Point>
<wpml:index>1</wpml:index>
<wpml:executeHeight>50</wpml:executeHeight>
<wpml:waypointSpeed>12</wpml:waypointSpeed>
<wpml:waypointHeadingParam>
<wpml:waypointHeadingMode>followWayline</wpml:waypointHeadingMode>
</wpml:waypointHeadingParam>
<wpml:waypointTurnParam>
<wpml:waypointTurnMode>toPointAndPassWithContinuityCurvature</wpml:waypointTurnMode>
<wpml:waypointTurnDampingDist>1</wpml:waypointTurnDampingDist>
</wpml:waypointTurnParam>
</Placemark>
</Folder>
</Document>
</kml>
The content of template.kml:
<?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.2">
<Document></Document>
</kml>
I can see all these files. If i try to read, for example the /wpmz/wayline.wpml file, I can see its contents.
But, If i run
Log.d("Monsoon Command Execution :", "Monsoon File Routine: checking file validity: " + vv.value.toString())
I get:
Monsoon File Routine: checking file validity: [FileNotExist], Kmzfile.absolutepath is correct.
Even tho, i can read the file using
If I now call
The error is: Monsoon File Routine: mission upload error,ErrorImp{errorType='WAYPOINT', errorCode='FILE_TRANSFER_FAIL', innerCode='null', description='Upload failed. Try again later', hint=''}
How can I resolve the issue? Thank you.
-
We kindly request you to transfer your KMZ file to the memory of the remote controller. Subsequently, please open our sample code, select the "waypoint mission" option, click on "KMZ Import," choose your KMZ file, and proceed by clicking on "Upload KMZ file." Kindly verify if the upload process is successful. -
Due to developmental reasons, I am not able to execute your sample code on the RC. So, please i need to find a solution in my code. Here is code again:
WaypointMissionManager.getInstance().init()
val vv = WPMZManager.getInstance().checkValidation(kmzFile.absolutePath)
WaypointMissionManager.getInstance().pushKMZFileToAircraft(kmzFile.absolutePath, callback)// kmzFile.absolutePath exists, and can be accessed by a file reader in Kotlin
请先登录再写评论。
评论
5 条评论