Welcome Mavic Pilot!
Jump in and join our free DJI Mavic community today!
Sign up

Spiral Maker for Litchi Waypoint Missions

DJ Wes

Well-Known Member
Joined
Feb 6, 2019
Messages
65
Reaction score
107
Location
Northwest AR
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:

 

Prismatic

Well-Known Member
Joined
Feb 26, 2018
Messages
254
Reaction score
237
Age
66
Location
Northern Colorado
... 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:



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!
 

Facherty

Active Member
Joined
Mar 31, 2019
Messages
41
Reaction score
25
Location
Edinburgh, Scotland
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

DJ Wes

Well-Known Member
Joined
Feb 6, 2019
Messages
65
Reaction score
107
Location
Northwest AR
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:



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.
 

ctaranto

Member
Joined
Jul 8, 2019
Messages
24
Reaction score
2
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.
 

slup

Active Member
Joined
Oct 18, 2019
Messages
43
Reaction score
25
Age
52
Location
Sweden
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.
 

DJ Wes

Well-Known Member
Joined
Feb 6, 2019
Messages
65
Reaction score
107
Location
Northwest AR
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.
 

DJ Wes

Well-Known Member
Joined
Feb 6, 2019
Messages
65
Reaction score
107
Location
Northwest AR
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.
 

ctaranto

Member
Joined
Jul 8, 2019
Messages
24
Reaction score
2
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. :)
 

slup

Active Member
Joined
Oct 18, 2019
Messages
43
Reaction score
25
Age
52
Location
Sweden
... 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.
 

DJ Wes

Well-Known Member
Joined
Feb 6, 2019
Messages
65
Reaction score
107
Location
Northwest AR
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.
 

New Threads

Forum statistics

Threads
73,483
Messages
851,327
Members
100,652
Latest member
Ikfoto