GithubHelp home page GithubHelp logo

pathfinderv2's Introduction

Pathfinder generates a path that the UAV will traverse. The follow input arguments are necessary for the algorithm to function:

  1. The boundaries of the search area
  2. The initial location of the plane
  3. The direction of the wind
  4. overshoot_distance: The distance it takes the plane to level itself after turning
  5. path_width: The horizontal distance of the field that the camera can capture in one shot

As output, the algorithm returns a list of coordinates that the plane can traverse to capture the entire search area. Note that the algorithm assumes a 2D euclidian coordinate system. In practice, using GPS coordinates is fine.

Algorithm

  1. Parallel lines are drawn over the search area in the direction of the wind. Each line is path_width units apart.
  2. The lines are broken up into line segments, and the line segments are cropped at the borders of the search area.
  3. overshoot_distance units are added to the top and bottom of each line segment
  4. Starting from the plane location, a path is generated using the following algorithm: a. From the current point, find the nearest point in any line segment that hasn't been seen b. Add that point to the path, followed by the other point in that line segment c. Mark that line segment as seen, and set the current point to the end of the line segments d. Repeat until all line segments have been seen

Algorithm Rationale

This algorithm was chosen to address a couple concerns:

  1. The resulting path primarily has the plane flying into or against the wind, therefore reducing the distance that the plane will veer off track
  2. By padding each line segment by the distance it takes to level the plane, it ensures that the plane will always be flying level when it is over the search area

Requirements

Pathfinder requires that the following libraries be installed: - numpy (pip install numpy) - scipy (pip install scipy) - shapely * GEOS must be installed first. on mac os x you can use brew install geos - Can be installed with pip install shapely - Python Imaging Libary (recommended) - Can be installed with pip install pil - PIL is only used to render the images for the map, so it is not technically necessary, but useful

How to Run

  1. Modify main in pathfinder.py with the coordinates that you wish to use
  2. Open a console and run: python pathfinder.py
  3. The path will be output to STDOUT in QGC format, and the image of the path and search area will be saved to output.jpg

pathfinderv2's People

Contributors

zgrannan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.