DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Spiral Maker for Litchi Waypoint Missions

DJ Wes

Well-Known Member
Joined
Feb 6, 2019
Messages
456
Reactions
949
Location
Springdale, AR, USA
Site
www.litchiutilities.com
Attention Litchi and Google Earth Pro users:

A type of mission that I like to fly when capturing video is a "spiral reveal". This is where the drone revolves around a point of interest (POI) while gaining in altitude. Geometrically, this is probably better described as a "coil" or "helix". Even though you can manually design such a mission in Litchi, it is difficult to get a perfect circle, spiral, or coil in a waypoint mission. Dronelink has an “Orbit” component that does this. However, Litchi does not.

I’ve created an application that takes a kml file from Google Earth Pro and converts it into a csv file that can be imported into Litchi as a waypoint mission, giving you a perfectly circular path. It allows you to specify the starting, ending, and POI height then generates a path and gimbal pitch angles based on those (and other) parameters making the whole process rather easy.

Since I am a software developer and do a bit of web development, I decided to take this stand-alone application and turn it into a web application that you can use.

My general workflow is this:

  1. Use Google Earth Pro to define a perfectly circular path around the POI.
  2. Export that path as a kml file.
  3. Import that circular path into my web application and specify heights and other parameters.
  4. Export the path as a csv file.
  5. Import that csv file into the Litchi Mission Hub (usually VLM).
  6. Tweak as necessary.
  7. Export the mission as a csv file which opens back up in Google Earth Pro.
  8. View and validate the virtual Litchi mission in Google Earth Pro.
  9. Go fly!

If interested please give it a try. I am open to feedback and would like to see any videos where you used this to help generate your mission. The URL of this web application is:

 
... A type of mission that I like to fly when capturing video is a "spiral reveal". This is where the drone revolves around a point of interest (POI) while gaining in altitude. Geometrically, this is probably better described as a "coil" or "helix". ...
Your program generates a cylindrical spring-coil path, which is terrific! Tried it, love it! ? Now (you knew this was coming!) here's your first enhancement request! An extremely useful variant would generate a true spiral path, like a coiled snake:

sparch.gif


You'd add a field that steps the radius incrementally with each WP, either positively or negatively, so that the drone--as it circles the POI--recedes from (or approaches) the POI at a constant rate. That's doubtless easier said than done; I've done a bit of coding myself. Still, if you find a way, it'd be an excellent addition!

Again, thanks for the cool tool as-is!
 
I just wanted to thank you for this technique.

It is worth adding that your site has more detailed guidance within the "instructions" button:
  1. In Google Earth Pro
    1. Use Google Earth Pro to navigate to the mission area.
    2. From the ribbon select the "Ruler" tool.
    3. In the Ruler tool, select the "Circle" tab.
    4. Click once on the map at the desired point of interest (POI).
    5. Drag to (and click) where the first waypoint is to be located.
    6. In the Ruler tool click "Save".
    7. The New Path windows will open. Click OK.
    8. In the "Places" window pane, right-click on "Circle Measure" and "Save Place As" a kml file.
  2. In This Spiral Mission Maker for Litch Web Page
    1. Select the desired units and direction of travel.
    2. Select the number of revolutions desired (fractions are acceptable).
    3. Select the starting, ending, and POI height
    4. Google Earth Pro generates many waypoints on the circumference of the circle that are not necessary for a Litchi mission. Use "Step Size" to skip waypoints. "3" is a good starting point.
    5. Use the file chooser to upload your kml file using the "Browse" button beside "Kml file upload"
    6. Generate the mission and review the resulting parameters.
    7. Download the csv file.
  3. In the Litchi Mission Hub
    1. Use the Missions menu to import the csv file created by Spiral Mission Maker for Litchi.
    2. Adjust the Litchi mission parameters as desired
    3. Go fly!
 
  • Like
Reactions: DJ Wes
Your program generates a cylindrical spring-coil path, which is terrific! Tried it, love it! ? Now (you knew this was coming!) here's your first enhancement request! An extremely useful variant would generate a true spiral path, like a coiled snake:

sparch.gif


You'd add a field that steps the radius incrementally with each WP, either positively or negatively, so that the drone--as it circles the POI--recedes from (or approaches) the POI at a constant rate. That's doubtless easier said than done; I've done a bit of coding myself. Still, if you find a way, it'd be an excellent addition!

Again, thanks for the cool tool as-is!

Yes, I knew this request would come (but not this quickly). :)

When I began coding this I didn't realize that converting distance between two latitude/longitude coordinates to feet or meters was going to be more complicated than simple trigonometry. It was. I ended up using something called "Equirectangular Approximation" to give me the information I needed to set the curve size.

To make a true spiral, I will need to do the reverse -- convert from a position in feet or meters to latitude/longitude coordinates. I'm sure I can do it. I'll let everyone know when that option is available.
 
Being a software engineer, I really appreciate clever solutions like this! Nice work.

But, I do have to ask: Is there something that Litchi does (at least in this spiral use-case) that Dronelink doesn't?

I also own a Litchi license, but find I'm using Dronlink more due to the combining of components in a single mission and the web version supporting everything. I will use Litchi if a Dronlink mission fails for some reason and I need to quickly create a mission in the field.
 
Nice coding... makes it much easier to create spirals. Just one request, please take away the height & #revolution limitation by perhaps make those write in values instead of sliders.
 
Being a software engineer, I really appreciate clever solutions like this! Nice work.

But, I do have to ask: Is there something that Litchi does (at least in this spiral use-case) that Dronelink doesn't?

I also own a Litchi license, but find I'm using Dronlink more due to the combining of components in a single mission and the web version supporting everything. I will use Litchi if a Dronlink mission fails for some reason and I need to quickly create a mission in the field.

I was a beta tester for dronelink so I am somewhat familiar with it. While Dronelink provides more "low-level" functionality than Litchi, I find that Litchi strikes a better balance between the functions it provides and the ease which with a mission can be created.

At the time I was testing Dronelink, an Orbit component was available. However, it could not be seamlessly incorporated into a waypoint mission. There was always an awkward transition (approach) between a waypoint component and an orbit component. Perhaps this has been addressed. I don't know.
 
Nice coding... makes it much easier to create spirals. Just one request, please take away the height & #revolution limitation by perhaps make those write in values instead of sliders.

Thanks for the suggestion.

There are three ways to specify the height (starting, ending, or POI):

  1. The sliders can be used. This is the quickest way. I needed to put limits on the sliders and the legal AGL limits seemed like a good place to start with the heights.
  2. If you are using either Firefox or Chrome, the Up/Down buttons in the text box can be used to increase/decrease the height.
  3. The text box shows the values specified using either the sliders or Up/Down buttons. You can also type any value you wish into the text field. I have removed the upper limits on those to give you more freedom with those attributes.
 
At the time I was testing Dronelink, an Orbit component was available. However, it could not be seamlessly incorporated into a waypoint mission. There was always an awkward transition (approach) between a waypoint component and an orbit component. Perhaps this has been addressed. I don't know.
I know what you are referring to - there appears that there needs to be a "destination" component between waypoints and an orbit which causes the footage to either pause, jump, etc. That's what video editing is for. :)
 
  • Like
Reactions: Drones.n.Pixels
... 3. The text box shows the values specified using either the sliders or Up/Down buttons. You can also type any value you wish into the text field. I have removed the upper limits on those to give you more freedom with those attributes.

Brilliant, it works, thank's!

See that some cleaning up is needed also ... but perhaps leave that to the end when you've included all other suitable proposals.

When you have generated the spiral & go back a page to adjust, the marker is still on meters but all values are stated in feet, you have to flip between meters & feet once to get it right. Another thing is that the .kml file name is invisible, even if you re-choose it ... you will not get the file name written out anymore even that it works when you go on & generate.
 
When you have generated the spiral & go back a page to adjust, the marker is still on meters but all values are stated in feet, you have to flip between meters & feet once to get it right. Another thing is that the .kml file name is invisible, even if you re-choose it ... you will not get the file name written out anymore even that it works when you go on & generate.

I have updated Spiral Maker for Litchi to use cookies to store the selected units. This way, the units are remembered from one session to the next. Also, when using the "Back" button after generating a csv file, the previously selected units will be remembered.

Regarding the display of the selected kml file after using the "Back" button: This behavior is browser-dependent. HTML does not provide a way to specify the default value of a "file" type input for security reasons. However, as you have noticed, the form still retains the value even though it is not displayed.
 
Thank you SO much for sharing this! Question: has anyone done any sort of programming for an arched path to create images like those seen when doing internet search for "droneception"?
 
  • Like
Reactions: DJ Wes
Thank you SO much for sharing this! Question: has anyone done any sort of programming for an arched path to create images like those seen when doing internet search for "droneception"?
That is a really cool idea! I think you've just given me my next project.:)
 
  • Love
Reactions: Nagem
That is a really cool idea! I think you've just given me my next project.:)
OH YAY!!!!!!! VERY EXCITING!!!! You're brilliant! I do hope you'll share what you come up with. Seems like you could program litchi to take a picture at the designated waypoints along the path. 03-inception-height-and-distance-drawing.jpg
 
  • Like
Reactions: jos A
Thanks for the tool but I have some problems, all went well except when I try to upload kml file I got
ERROR: Only kml files containing Circle Measures from Google Earth are allowed. You uploaded a kml file containing a Cirkelmarkering.
myfile: Cirkelmarkering.kml.
please give solution
Jos
 
Looks like you overwrote the file name. Its asking for file named Circle Measure. Your file is not named that. I ran into the same problem when I tried to rename the file. Keeping the file as circle measure with tagged information seems to work better.
 
Working, I had to set google earth pro to english , because when I saved the file it got a dutch word, rename it doesn't work
Thanks Nagem for the feedback
 
  • Like
Reactions: Nagem
Yeah ... this is something new compered as it was from the beginning. Now it's required that you switch language to English in Google Earth in order to get it to work (renaming of the .kml file isn't enough).

Perhaps something the creator of this can fix as it wasn't like this initially ...
 
The "Circle Measure" naming problem has been fixed. I had added some extra error checking and didn't realize that the internal kml data would change based on the language. Please give it a try now.
 
  • Like
Reactions: gope_73
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Members online

Forum statistics

Threads
134,445
Messages
1,594,852
Members
162,983
Latest member
Roel Hopstaken