Skip to main content

Coverage path planning for UAV aerial surveying

Project description

OpenCoverage

Coverage path planning for UAV aerial surveying. OpenCoverage computes waypoint flight paths that fully cover a terrain polygon, with support for camera overlap, flight constraints, and multiple sweep patterns.

Python reimplementation of the original UAV Planning library, using Shapely instead of CGAL. CPU execution is the default; optional GPU acceleration via CuPy is available for the optimal sweep search.

Features

  • Search patterns: back-and-forth, long-edge, optimal sweep, following-wind
  • Planning targets: spatial resolution, cruise velocity, or fixed altitude
  • Mission splitting by UAV flight-time limits
  • Input formats: KML polygons, Mission Planner .poly files, INI configuration
  • Output: QGroundControl WPL 120 waypoint files
  • Optional GPU: CuPy acceleration for optimal sweep angle search

Installation

pip install -e ".[dev]"

Optional GPU support:

pip install -e ".[gpu]"

Quick start

from shapely.geometry import Polygon

import opencoverage as oc

polygon = Polygon([(0, 0), (100, 0), (100, 80), (0, 80)])

mission = oc.plan(
    polygon=polygon,
    uav=oc.UAV(min_height=70, max_height=500, survey_velocity=17),
    camera=oc.PinholeCamera(
        pixel_size_mm=0.0032,
        focal_length_mm=8.43,
        sensor_width_mm=6.55,
        sensor_height_mm=4.92,
        capture_rate_s=3,
    ),
    pattern="optimal_sweep",
    lateral_overlap=0.8,
    forward_overlap=0.7,
    target="velocity",
    target_value=17.0,
)

print(len(mission.path), "waypoints at", mission.flight_height, "m")

Command line

opencoverage examples/sample_field.kml config/quad_tetracam.ini mission.txt
opencoverage examples/sample_field.poly config/quad_tetracam.ini mission.txt --split
opencoverage examples/sample_field.kml config/quad_tetracam.ini mission.txt --gpu

Patterns

Pattern Description
back_forth Standard boustrophedon sweep
long_edge Sweep lines perpendicular to the longest polygon edge
optimal_sweep Minimize horizontal sweep width over rotation angles
following_wind Align sweeps with meteorological wind direction

Project layout

src/opencoverage/
├── models.py            # UAV, camera, mission dataclasses
├── parameters.py        # Survey parameter formulas
├── planner.py           # High-level plan() API
├── mission_splitter.py  # Flight-time mission splitting
├── geometry/            # Shapely map and transforms
├── patterns/            # Coverage search patterns
├── io/                  # Config, KML, QGC, coordinate conversion
└── gpu/                 # Optional CuPy kernels

License

MIT License. Copyright (c) J. Irving Vasquez-Gomez.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opencoverage-0.2.0.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opencoverage-0.2.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file opencoverage-0.2.0.tar.gz.

File metadata

  • Download URL: opencoverage-0.2.0.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for opencoverage-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e1fd881f2a1678134513332038aaed26200faf243cfd4c2064608e18090c753f
MD5 5e17eeb519c5c8538c85976338cba684
BLAKE2b-256 56483db7716c3b6eac1231fece0060816a3f9cb787318eb20e4ffdbea62e0017

See more details on using hashes here.

File details

Details for the file opencoverage-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: opencoverage-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for opencoverage-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 baa6ce5ca85f79f9ab9cab86e148ed7fdf33b41dd8f1319db63b70d3022ce07d
MD5 f5588f760cb6ac71678c1ede6dfdec08
BLAKE2b-256 37d8dec419eed9ebd11826031c9ce9a8d20ee2dc8309fc2c6a4bdacaf9555bfd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page