Skip to content

generomuga/dplan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drone Flight Plan Generator for FLYLITCHI

Prerequisites

Python 2.7
Numpy 1.14.0

Installation

pip install dplan

How to get the coordinates of the field?

  1. Go to https://flylitchi.com/hub and search for your target location.

       searchloc

  1. Click the map to generate a point and extract the coordinates from the panel.

       clickpoint   getcoordinates

Input requirement for the drone flight plan

Four corners of the field (latitude and longitude)

       corner 1 = 14.168092, 121.255055
       corner 2 = 14.168402, 121.255369
       corner 3 = 14.167741, 121.256036
       corner 4 = 14.167434, 121.255701

       cornersfield

       Horizontal partition (x) and vertical partition (y)        In this example x = 4 and y = 3

       grid

NOTE: Create drone folder in your root directory for the output

Implementation of API

Import dplan library

from dplan import Flight
from dplan import Order

Initialize flight

flight = Flight()

Set four corners of the field

flight.setCorners(corner1 = (14.168092, 121.255055), corner2 = (14.168402, 121.255369), corner3 = (14.167741, 121.256036), corner4 = (14.167434, 121.255701))

Set partition of x and y

flight.setPartition(x=4, y=3)
unique_coordinates = fl.calculateDistance()

Result

To view the default flight plan result, import the litchi.csv from the drone folder to https://flylitchi.com/hub

       folder   litchi   import

Default flight plan result

       result 2

Customize flight plan

Initialize order

order = Order()

Select point numbers in which order you prefer

This a sample order of points

list_order = [14,9,4,1,2,6,11,16,18,13,8,3,5,10,15,19,20,17,12,7]
order.setPointOrder(unique_coordinates, list_order)
order.start()

Result

To view the customized flight plan result, import the litchi_order.csv from the drone folder to https://flylitchi.com/hub

       folder   litchi_order   import

       customize

View test.py for your reference

MIT License

Copyright (c) 2018 Gene Romuga and Tri Setiyono

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Drone flight plan generator for flylitchi

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages