Skip to content

Commit dcc2bc3

Browse files
committed
Update read me
2 parents 4d360c7 + fc22813 commit dcc2bc3

File tree

1 file changed

+70
-9
lines changed

1 file changed

+70
-9
lines changed

README.md

Lines changed: 70 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,80 @@
11
# Drone Flight Plan Generator for FLYLITCHI
22

3-
Website: https://flylitchi.com/hub <br>
3+
### Website: https://flylitchi.com/hub <br>
44

5-
<b> Sample source code </b> <br>
5+
### How to get the coordinates of the field?
66

7+
1) Go to https://flylitchi.com/hub and search for your target location.
8+
9+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;![searchloc](https://user-images.githubusercontent.com/11206290/35094779-49996776-fc81-11e7-9fd8-58c0b42da73a.png)
10+
11+
2) Click the map to generate a point and extract the coordinates from the panel.
12+
13+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;![clickpoint](https://user-images.githubusercontent.com/11206290/35095296-eb475ac8-fc82-11e7-82b4-5e487dc3dba2.png) &nbsp;&nbsp;![getcoordinates](https://user-images.githubusercontent.com/11206290/35095469-88463588-fc83-11e7-8c18-3bac2fe029ac.png)
14+
15+
### Input requirement for the drone flight plan
16+
17+
Four corners of the field (latitude and longitude)
18+
19+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;corner 1 = 14.168092, 121.255055 <br>
20+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;corner 2 = 14.168402, 121.255369 <br>
21+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;corner 3 = 14.167741, 121.256036 <br>
22+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;corner 4 = 14.167434, 121.255701 <br>
23+
24+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;![cornersfield](https://user-images.githubusercontent.com/11206290/35095787-c8142c64-fc84-11e7-878a-c2cea96d57d5.png)
25+
26+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Horizontal partition (x) and vertical partition (y)
27+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In this example x = 4 and y = 3
28+
29+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;![grid](https://user-images.githubusercontent.com/11206290/35096465-48f8539e-fc87-11e7-9337-4265b4d68343.png)
30+
31+
<b>NOTE:</b> Create <b>drone</b> folder in your root directory for the output
32+
33+
### Implementation of API
34+
35+
#### Import dplan library
736
from dplan import Flight <br>
837
from dplan import Order <br>
938

10-
"""Initiate flight plan"""<br>
11-
fl = Flight() <br>
12-
fl.setCorners(corner1=(14.168087,121.255039), corner2=(14.168399,121.255377), corner3=(14.167741,121.256045), corner4=(14.167442,121.255707)) <br>
13-
fl.setPartition(x=3, y=4) <br>
39+
#### Initialize flight
40+
flight = Flight()
41+
42+
#### Set four corners of the field
43+
flight.setCorners(corner1 = (14.168092, 121.255055),
44+
corner2 = (14.168402, 121.255369),
45+
corner3 = (14.167741, 121.256036),
46+
corner4 = (14.167434, 121.255701))
47+
48+
#### Set partition of x and y
49+
flight.setPartition(x=4, y=3) <br>
1450
unique_coordinates = fl.calculateDistance()
51+
52+
### Result
53+
To view the default flight plan result, import the <b>litchi.csv</b> from the </b>drone</b> folder to https://flylitchi.com/hub
54+
55+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;![folder](https://user-images.githubusercontent.com/11206290/35097591-bb2ac4e8-fc8b-11e7-915c-9d71b1f407c4.png) &nbsp;&nbsp;![litchi](https://user-images.githubusercontent.com/11206290/35097596-bebeb72c-fc8b-11e7-863d-545213892d8f.png) &nbsp;&nbsp;![import](https://user-images.githubusercontent.com/11206290/35097669-18067946-fc8c-11e7-8b8e-940b834a310b.png)
56+
57+
### Default flight plan result
58+
59+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;![result 2](https://user-images.githubusercontent.com/11206290/35098286-849d7508-fc8e-11e7-9e09-31f95b10e775.png)
60+
61+
### Customize flight plan
62+
63+
### Initialize order
64+
order = Order()
1565

16-
"""Initiate order of points"""<br>
17-
order = Order() <br>
18-
order.setPointOrder(unique_coordinates, [20,19,17,15,11,13,16,18,14,12,9,7,3,5,8,10,6,4,2,1]) <br>
66+
#### Select point numbers in which order you prefer
67+
This a sample order of points <br>
68+
69+
list_order = [14,9,4,1,2,6,11,16,18,13,8,3,5,10,15,19,20,17,12,7] <br>
70+
order.setPointOrder(unique_coordinates, list_order)<br>
1971
order.start() <br>
72+
73+
### Result
74+
To view the customized flight plan result, import the <b>litchi_order.csv</b> from the </b>drone</b> folder to https://flylitchi.com/hub
75+
76+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;![folder](https://user-images.githubusercontent.com/11206290/35097591-bb2ac4e8-fc8b-11e7-915c-9d71b1f407c4.png) &nbsp;&nbsp;![litchi_order](https://user-images.githubusercontent.com/11206290/35098558-9e553002-fc8f-11e7-98aa-1cefc6330d7b.png) &nbsp;&nbsp;![import](https://user-images.githubusercontent.com/11206290/35097669-18067946-fc8c-11e7-8b8e-940b834a310b.png)
77+
78+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;![customize](https://user-images.githubusercontent.com/11206290/35098596-d3fef206-fc8f-11e7-8f5c-8e49b80d7608.png)
79+
80+
### View test.py for your reference

0 commit comments

Comments
 (0)