Hi,
I use an application that produces a .kml file for use with DJI Pilot and the Mavic 2 Enterprise series, however, I’m experimenting with using this file for use with Litchi and non-enterprise drones such as the Mavic Air. When importing the .kml file into Litchi Mission Hub the number of waypoints appear to be doubled. I then have to delete half the imported waypoints as well as set the gimbal pitch angle and heading (settings being custom heading, interpolate, straight lines) as well as when importing selecting Treat Views as Waypoints and Add Take Photo Action. I’ve played about exporting the Litchi produced mission as a .csv file and then also changing the DJI .kml file to a .xml file and importing to Excel to then cut and paste heading and gimbal settings direct into the Litchi .csv file and then re-uploading this file back into Litchi. Is there an easier way to do this as although the method works it is very clunky! I just can’t seem to find a clear answer.
Many thanks
In order to answer this I would have to see the kml file. Have you tried opening the kml file in Google Earth Pro to see what is in it? DJI is notorious for using incorrect extensions on their files. For example, a DJI kmz file contains wpml data instead of kml data. Once I see what is in your kml file, I can tell you if there is an easier way.
Hi Wes,
Many thanks for the reply. An example .kml file is detailed below. Any help would be most welcome!
That is not a properly formatted kml file. The forum software is probably stripping the xml tags from the data. You will need to host the kml file on a site and post the link here or contact me through my web site so that you can email the kml file as an attachment to me.
Hi Wes,
Thanks. Could you provide you website details and I will forward as an attachment?
Thanks
Try clicking his blue logo
I have had a look at the KML file that you sent to me. That KML file contains valid Google Earth KML data plus some extended XML data (containing other mission parameters) using a separate XML namespace.
The main reason you are seeing duplicated waypoints when importing this file into Litchi’s Mission Hub is because the KML file contains a set of Placemarks (that are treated as waypoints) and a “LineString element” (a path that is also treated as waypoints). Only the path is necessary to be imported into Litchi’s Mission Hub.
There are several ways to make this work but, unfortunately, none that are easy unless you are comfortable editing XML code. Here is my suggestion:
- Open your KML file using Google Earth Pro.
- Expand the imported data to reveal “Waypoints” and “Wayline”.
- Right-click on “Wayline” and choose “Save Place as…”
- Save this as a KML file.
- Edit the saved KML file with a plain text editor and change the following line:
Change from this: <ExtendedData>
To this: <ExtendedData xmlns:mis=“www.dji.com”>
The resulting file can be imported into Litchi’s Mission Hub (do not check the “Treat Views as Waypoints” checkbox)
I also had a look at your process. It is hard for me to follow and I don’t think all those steps should be necessary. The first step is definitely not necessary as Notepad is not required to change a file extension. If those steps were used to create the file that you sent to me, I would like to see the original file. I am pretty sure I can suggest a more straight-forward method.