Skip to main content

UAV Coverage Path Planner

Tests License: MIT

A standalone Python library and CLI for constraint-aware UAV area-coverage route planning. It creates lawnmower routes inside a polygon and uses a deterministic genetic algorithm to jointly optimize:

  • heading angle;
  • lane spacing;
  • cruise speed.

The optimizer derives feasible lane-spacing and speed bounds from generic camera geometry, desired ground sampling distance (GSD), overlap requirements, capture interval, aircraft speed, range, flight time and reserve energy. It contains no maps, hardware drivers, user data, model files, branding assets, or application code.

中文说明见 README_zh-CN.md

Install

python -m pip install uav-coverage-path-planner

For development:

git clone https://github.com/luoyuejun9/uav-coverage-path-planner.git
cd uav-coverage-path-planner
python -m pip install -e ".[dev]"
pytest

Quick start

from uav_coverage_path_planner import PlanningProblem, optimize_coverage_route

problem = PlanningProblem(
    boundary=((0, 0), (160, 10), (180, 110), (95, 145), (10, 105)),
    takeoff_point=(-25, -30),
    task_height_m=55,
)
result = optimize_coverage_route(problem)

print(result.optimized.heading_deg)
print(result.optimized.lane_spacing_m)
print(result.optimized.cruise_speed_mps)

local_xy is the default coordinate system and uses metres. Set coordinate_system="wgs84" to pass (longitude, latitude) points; the library internally applies a local equirectangular projection and returns the route in WGS84 again.

CLI

uav-route-optimize examples/synthetic_mission.json --output output

This writes only runtime results to output/:

  • result.json — full optimization result;
  • route.geojson — coverage polyline;
  • convergence.csv — generation history;
  • population.csv — final population sample;
  • analysis.png — four-panel diagnostic chart.

The included mission is a synthetic local-metre example. It contains no real locations.

Model

For a chromosome x = [heading, lane_spacing, cruise_speed], the algorithm minimizes:

J(x) = w_geometry × J_geometry + w_time × J_time + w_energy × J_energy + w_quality × J_quality + w_speed × J_speed

subject to GSD, side-overlap, forward-overlap, capture-interval, speed, range and reserve-energy constraints. Infeasible individuals are ranked behind feasible individuals and carry a violation penalty. The default population is 50, with two deterministic restarts and early stopping after stagnant generations.

fine, balanced, efficient, and custom profiles only change objective weights and quality constraints supplied by the caller; they do not encode a specific aircraft or commercial platform.

Reproducibility

Pass OptimizationConfig(seed=...) for a repeatable run. If no seed is supplied, a stable seed is derived from the mission definition.

Safety note

This package is a planning aid, not a flight controller. Validate all routes, geofencing, terrain clearance, communications, local aviation rules and aircraft limits before operating a UAV.

License

MIT. See LICENSE.

Download files

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

Source Distribution

uav_coverage_path_planner-1.0.0.tar.gz (93.9 kB view details)

Uploaded Source

Built Distribution

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

uav_coverage_path_planner-1.0.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file uav_coverage_path_planner-1.0.0.tar.gz.

File metadata

  • Download URL: uav_coverage_path_planner-1.0.0.tar.gz
  • Upload date:
  • Size: 93.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for uav_coverage_path_planner-1.0.0.tar.gz
Algorithm Hash digest
SHA256 675d8473974d4d0dd18218ef85d7e5f089c822d0a001c3357b8091a1daa2837d
MD5 03320febffa2e581cdb73bed505c8d75
BLAKE2b-256 df9661cf65c18bb80871c882968c1413297cb1a06902fa92dfe6083df03ee2d2

See more details on using hashes here.

File details

Details for the file uav_coverage_path_planner-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: uav_coverage_path_planner-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for uav_coverage_path_planner-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8df29cd92e5e34cfec77f825776b9f95ea3e2ccf56e3a1043f1bc1e33104e656
MD5 d6163fb17922a24c57cbd3f0d94bcbfa
BLAKE2b-256 c26638bbc6e5f4f62a56c30423893df206fcd3ab582e42424a9a22a2719d9222

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page