A MATLAB-based flight path planning system for unmanned aerial vehicles (UAVs) that generates optimal routes while avoiding restricted airspace zones.
This algorithm automatically computes optimal flight paths between user-defined waypoints by detecting restricted areas and generating collision-free trajectories. The system performs two-stage optimization: initial obstacle avoidance followed by path shortening for minimal flight distance.
main.m - Primary execution script controlling the complete planning pipeline
intersection.m - Obstacle avoidance path generation using polygon edge traversal
opti.m - Route optimization through shortcut detection and validation
heading.m - Bearing calculation between coordinate pairs
circle_points.m - Bounding circle computation for polygonal restricted zones
data_AIRAC.m - Real-world airspace restrictions from AIRAC navigation database
poligeni.m - Random polygon generator for algorithm testing
strefy_testowe.m - Predefined test scenarios with known restricted areas
isconvex.m - Polygon convexity verification and convex hull generation
okrag.m - Circle coordinate generation
polygen.m - Individual polygon creation within specified boundaries
polygeom.m - Geometric property calculation (centroid, area, moments)
konwersja.m - Coordinate conversion from DMS to decimal degrees
User selects start and destination points through interactive interface. System establishes coordinate bounds and initializes visualization environment.
Algorithm loads obstacle data from selected source (AIRAC database, test zones, or random generation). Each polygonal restricted area receives a circumscribing circle for intersection calculations.
Direct path between waypoints is analyzed for intersections with restricted zone circles. Only zones intersecting the flight corridor undergo detailed processing.
For each intersecting zone, the system:
- Converts non-convex polygons to convex hulls
- Determines optimal entry/exit points along polygon perimeter
- Generates two alternative paths around the obstacle
- Selects shorter alternative for incorporation into route
Route undergoes iterative improvement through shortcut identification. System validates each potential direct connection between non-adjacent waypoints against all restricted zones, implementing successful shortcuts that maintain collision-free status.
Algorithm provides optimized waypoint sequence with distance metrics and heading calculations for navigation system integration.
Coordinate System: Decimal degrees (latitude/longitude) or Cartesian (x/y)
Restricted Zone Format: Polygonal boundaries with vertex coordinates
Path Representation: Sequential waypoint coordinates with inter-point headings
Optimization Criterion: Minimum total flight distance
MATLAB environment with following dependencies:
- Mapping Toolbox (for polygon operations)
- Image Processing Toolbox (for boundary functions)
- Base MATLAB (for core mathematical operations)
Execute main.m and follow interactive prompts for waypoint selection. Algorithm automatically processes obstacles and generates optimal flight path with performance metrics.
- Standard route length (initial obstacle avoidance path)
- Optimized route length (after shortcut implementation)
- Distance reduction achieved through optimization
- Complete waypoint sequence with navigation headings
- Graphical route visualization with restricted zones
Damian Szumski (2018)
Rzeszow University of Technology
The Faculty of Mechanical Engineering and Aeronautics