background

Unmanned

Drone

Flight

Path

Optimization

KiDrone

Python

numPy

pandas

Geopandas

matplotlib

sciPy

Shapely

pyproj

PyTorch

~7 min read
May.2024 - PresentMay.2024 - PresentMay.2024 - PresentMay.2024 - PresentMay.2024 - PresentMay.2024 - PresentMay.2024 - PresentMay.2024 - PresentMay.2024 - PresentMay.2024 - Present
Algorithm EngineerAlgorithm EngineerAlgorithm EngineerAlgorithm EngineerAlgorithm EngineerAlgorithm EngineerAlgorithm EngineerAlgorithm EngineerAlgorithm EngineerAlgorithm Engineer
image3D flight path generation

Overview

This project encapsulates building an optimal flight path generator for unmanned drones from scratch. Algorithm used includes boustrophedon cellular decomposition, dijsktra's algorithm, and a custom score normalization ranking system for tuning the desired optimization parameters.

The data output in a format readable by the drone, and also generates 2D and 3D visualizations to help analyzing flight path details. Wind magnetude and direction, drone weight, seed weight, acceleration profiles, and elevations are all considered as variables to ensure generality and compatibility with future scaling of the algorithm.

The algorithm plans to integrate real-time indispersable site detection, and the functionality to determine the optimal seed to disperse at a site given the forest data using neural network and collaboration with forestry experts. I was responsible for researching this implementation as well.

imageGraphical representation of Boustrophedon Cellular Decomposition (larger cells are better)

What?

This project is built using Python. The algorithm is built through OOP and provides geographic data manipulations. The drone can take in exclusion areas and avoid dispersing seed there. The drone can adjust its velocity to traverse outside of the designated area if it means better overall efficiency. The drone can also travel across multiple unconnected sites in an optimized sequence. The drone is also maintained at a constant height to avoid collision with terrain and ensure even distribution of seeds. Height data are extracted from the U.S. Geological Survey (USGS) elevation API.

imageGraphical representation of the basic Boustrophedon method

Why?

Drone reforestation is a difficult task. Aside from research in seed and saplings, drone optimization is perhaps the most important and complicated task. The drone need to be able to cover as much area as possible on the single flight to ensure efficiency, and be able to recognize areas like lake and burned sites to avoid dispersion.

imageGraphical representation of Dijkstra's Algorithm

How?

This project is challenging but rewarding for me because it is my first large-scale project built from scratch, and I am also tackling it by myself. The most difficult part of this project is perhaps the time when I opened a new VS Code project when I finished researching, staring at a blank screen, scratching my head, thinking how I should go from here to a fully developed codebase. After thinking for a little, I just decided to start doing, telling myself that I will just face whatever challenges that come my way.

After a week of reading Shapely, ArcGIS documentations and stackoverflow, I was able to generate the first path to cover a field. I refactored the code the second week to improve readability and performance, and by the end of week three, I was able to implement not only the path generation, but also path flight time modeling based on drone and environment conditions and path score normalization for ranking the paths.

With a few other interns joining the team after I finished the algorithm, we worked on integration with ArcGIS exports and completed the entire workflow two weeks before the internship ends, a progress way ahead of the company's planned timeline. We then took the task to develop the front-end interface for this algorithm, which you can find in the other project named 'reforestation tracking desktop app'.