What about a Litchi-CSV to kmz-Converter?

At the moment, the litchi adaption to new drones depends on the avalability of the SDK for these drones.

I think, there is a way, to use at least some the litchi capabilities without using the SDK. The litchi csv export defines most of the Flight plan contents in an easy understandable table.

I used this as a basis to translate it into a kmz-file (containing template.kml and waylines.wpml) for my new mini4p. As I am not familiar with this kml-Syntax, it was a longer way of trial and error, but finally succeeded.

proposal: couldnā€™t the flylitchi team develop and sell such a tool? I shurely would be a happy client to order it!

Best regards
Albrecht

Thereā€™s a free online tool that does just that:

Yes, I am already in conversation with Wes. His converter did not work for the Mavic 3 E, as it originally was. After he put some content into the wayline-Part, it worked (partially). But for the Mini-Drones (in my case Mini4 pro) I could not get a flyable kmz-file.

For my task, i am now producing a Litchi compatible CsV-file. As I need the Rtk-GPS precision, currently the m3e flying under Pilot 2 Control is the only option, as long as Litchi does not support the Rtk. Out of this reason the conversion of the Litchi-csv to Kmz is the only way to go.

Finally I ended up writing an own Programm, that sets up the template and waylines Files, compressing them into a kmz-file. Input is the litchi-Csv-File. Of course, this solution is not a general one, but restricted to features, needed for my missions.

It was a long and stony way to go. Learnig, that the kmz content for different target drones is significantly differentā€¦. In my case, each waypoint requires a kml-description of about 80(!) Lines, when taking acount gimbal orientation, foto-Actions etc. And not every Kml-command is fully understood, many have been set up by a tedious Trial and error processsā€¦.

While the Fight plan works as it should in my Mini4pro, including RTH after the end of the mission, the Mavic3E stops on the last waypoint, seemingly forever. Althoug in the settings the RTH after completion of the mission has been set. Any Idea?

For my Mini 4 Pro & Mavic 3 Classic the Wes CSV->KMZ works fine but I never put the CSV directly as exported by Litchi, I always pass through an Own Program I called ā€˜CSV Editorā€™ (from my experience with macros excel to modify the Litchi CSV to my liking (to fix interpolate and not tilt for example) and compiled by my son in pyton to have a .exe) and soon will add the converter in KMZ directlyā€¦

I donā€™t have the Mavic3E so I canā€™t testā€¦

The kmz-Contents for M4p and M3E are significantly different. The M4E requires in the template branch only some kind of Headerlines, while the flight instructions are all sumnarized in the waylines branch.

For the M3E I got the best results, providing exactly the same content in both, the template and in the waylines files.

But there are further differences. The m4e, for example, accepts reads ā€žwaylines with discontinuity Stopā€œ, but does not execute this features. Only continouus Splines can be operatet by means of KMZ. Of course, with the hover option at waypoints, this can be overcome, but requires according definition on Ltchi-Csv-Level.

On the other side, the M3E supports only one(!) POI, so the very comfortable way to point the camera waypointwise to correspondingly defined POIs is not possible. But for the M4P this mehthod works like a charme. Again, this restriction can be overruled, by calculating the gimbal orientation externally and providing the heading data into the Litchi CSVā€¦.

This behaviour is of course related to the possibilities of the Target drones, when operated under the DJI-Controllers. If operated under Litchi-Apps, their use of the SDK extends the Drone capabilities to whatever us needed.

.

1 Like

Others are successfully using my converter for their Mini 4 Pros. Can you describe what is not working for you?

1 Like

Iā€™m having problems with M4P.

First, I created the path in litchi hub and flew the mini 3 pro with litchi pilot, perfect. Followed exactly the path.

I converted the CSV file to Litchi Waypoint Mission to DJI Fly Waypoint Mission and tried flying on the mini 4 pro.

I already understand the difference in the curves, but the problem happens when I try to interpolate -90 to -10.

What am I missing?

Iā€™m also having problems with the heading. In M4P the heading is -180 to 180 and in litchi it is 0 to 360.

As always, thank you @wesbarris

Regarding the heading difference, my software converts from Litchiā€™s 0-360 range to DJIā€™s -180-180 range. For the interpolation problem, I would like to see the Litchi CSV file you are converting. Perhaps it would be easier for sharing files if you contacted me directly through my web site.

I have had a closer look at your mission. I am seeing several things that make this a difficult mission to fly and convert.

  1. Your mission has three co-located adjacent waypoints. Iā€™m surprised you donā€™t get an error with either the Litchi app or the DJI app. The minimum distance between adjacent waypoints is 0.6m for Litchi and 0.5m horizontal and vertical for DJI Fly. Between waypoints 7 and 8 your gimbal pitch is supposed to change from 0 degrees to -90. However, since those waypoints are co-located, the time to fly between those waypoints and the time allowed for the rotation is zero. Recommendation: change your mission so that each waypoint has its own distinct GPS coordinates.

  2. Your mission includes both POIs and interpolated headings. I have experienced problems when flying a Litchi missions using both. I donā€™t know whether or not DJI Fly would have difficulties with this. Recommendation: change your mission to only use POIs or only use interpolated headings. I donā€™t think this alone will make DJI Fly execute the mission properly.

  3. Your mission is set to have curved turns but you have two ā€œWait Forā€ waypoint actions. Even though your curve size is set to zero for those waypoints, the waypoint actions will be ignored with the ā€œPath Modeā€ set to ā€œCurved Turnsā€. Recommendation: remove the camera actions from your mission and use non-zero curve sizes for all waypoints (when capturing video).

  4. This one will be harder to explain. In Litchi, gimbal pitch changes are stored as either an explicit gimbal pitch angle or a POI (in which case the gimbal pitch angle is computed). In DJI Fly, gimbal pitch changes are all stored as waypoint actions. Even though the WPML language is capable of storing an unlimited number of waypoint actions, DJIā€™s implementation appears to limit how many actions can be performed at a given waypoint. Your waypoint 7, when converted to WPML includes three waypoint actions (gimbal=0, stay for 5s, gimbal rotate to -90). This is also where you transition from using ā€œFocus POIā€ to an interpolated gimbal pitch angle. Recommendation: try removing the ā€œStay Forā€ action, try using either POIs or explicit headings throughout the mission, try removing those co-located waypoints.

2 Likes

I did more tests! But the interpolate -90 to -20 command still didnā€™t work. As a workaround, I run the entire mission starting from WP1 and then restart the mission from WP7 (where the interpolate starts).

First I removed the Stay For, POI and change the three co-located adjacent waypoints.

WP9 Work ? Itā€™s WP10 & WP11 that donā€™t interpolate ?

Interpolate DOES work in DJI Fly.
However, because thereā€™s NO distance to travel between the wayponts 6 (-34Ā°), 7 (0Ā°) & 8 (-90Ā°), the gimbal stays at -34Ā° from WP6 to WP8 (as expected).
Then from WP8 to WP9 the gimbal moves from -34Ā° to -20Ā°.
Also the 2 ā€œStay for 5secā€ instructions are executed. They are NOT executed in Litchi Pilot.

In Litchi Pilot the gimbal flips from -34Ā° to -90Ā° at WP8, the interpolate command 0Ā° at WP7 is ignored.
Then from WP8 to WP9 the gimbal moves from -90Ā° to -20Ā°.

Well seen TriBar, I didnā€™t see that there were 4 wp in the same place.
Never put 2 or more WP in the same place, space them by 0.000050 on Lat or Long.

Actually the minimum 3d distance between 2 waypoints is 0.6m.
Lat & Long can be the same if there is an altitude difference.
Quote from the Litchi User Guide:
ā€œImportant The 3D distance between consecutive waypoints must be between 0.6m and 1999m.ā€

Thanks, good ! Never read the Guideā€¦I always put that value in Latitude on my Macros & works fine.

Would you be willing to share this new mission so that I can take a closer look?

The new mission is here:

My bad, I did a new mission.
Now the interpolate start on WP7.

I wanted to increase in WP height, so I copied and pasted the WP coordinates and only changed the height. Did I do it wrong?

Thanks. This new mission looks good. I ran it through the converter and the output looks good too. It should execute properly. The only very slight curiosity is that only 3 of your 9 waypoints have a non-zero curve size. There is absolutely nothing wrong with this. However, missions that are used to capture video typically have a non-zero curve size at each waypoint to make the resulting video smoother.