A highly scalable pathfinding engine designed to generate energy-optimized 3D flight routes for Unmanned Aerial Vehicles (UAVs). By integrating real-time weather data, high-resolution topography, and strict airspace geofences, this system calculates the most efficient path based on advanced aerodynamic profiling and a custom energy-weighted routing algorithm.
- 🔋 Energy-Weighted Pathfinding: Employs a custom 3D A* algorithm weighted by calculated energy consumption (Joules/second) rather than relying solely on the shortest geographic distance.
- 🌤️ Real-Time Environment Awareness: Automatically polls NOAA/OpenWeather for 3D wind vectors and parses heavy GeoTIFF/SRTM tiles to account for terrain elevation and slopes.
- 🛑 Airspace Compliance: Caches FAA no-fly zones and Temporary Flight Restrictions (TFRs) to actively route around dynamic geofences.
- 🚁 Advanced Aerodynamic Modeling: Calculates drag forces and thrust requirements using specific drone profiles (mass, frontal area, drag coefficient, and battery capacity).
- 🗺️ Interactive Mission Planner: A robust web dashboard featuring MapboxGL for 3D trajectory visualization, alongside 2D charts tracking altitude vs. terrain height and estimated battery drain.
- ☸️ Cloud-Native Scalability: Built on a microservices architecture, fully containerized, and optimized for Kubernetes orchestration with Redis caching.
The system is separated into three distinct, containerized microservices:
- Environment Service (Go): A high-concurrency internal gRPC/REST server that fetches spatial maps, weather grids, and airspace constraints.
- Routing Engine (Python / FastAPI): The physics and mathematics brain. It utilizes
networkx,shapely, andscipyto build searchable 3D graph nodes and process aerodynamic drag constraints. - Frontend (React / TypeScript): The user-facing mission planner utilizing
mapbox-gl,turf.js, andrechartsfor an interactive map and drag-and-drop waypoint experience.
- Docker and Docker Compose (for local development)
- Kubernetes cluster (for production deployment)
- Mapbox API Key (required for frontend rendering)
- Node.js, Go 1.20+, and Python 3.10+ (for bare-metal development)
-
Clone the repository:
git clone https://github.com/mtepenner/uav-flight-optimizer.git cd uav-flight-optimizer -
Configure Environment Variables: Create
.envfiles in the respective service directories to provide your Mapbox and Weather API keys. -
Deploy Locally via Docker Compose: The included
docker-compose.ymlsets up the local cluster along with the Redis cache.make run # Or explicitly: docker-compose up --build -d -
Deploy via Kubernetes: Apply the provided manifests for orchestration in a cloud environment.
kubectl apply -f k8s/
Once the cluster is actively running:
- Navigate to the frontend Mission Planner at
http://localhost:3000. - Select your specific drone profile (e.g., Quadcopter vs. Fixed Wing) to set baseline aerodynamic parameters.
- Use the MapboxGL interface to drop a starting point and a destination waypoint.
- Click Optimize Route. The frontend will fetch the computed GeoJSON trajectory and render it over the topological map.
- Review the Elevation Profile and Battery Curve charts below the map to verify the drone has sufficient energy to safely complete the mission.
Contributions to improve pathfinding efficiency or expand environment data sources are welcome!
- Fork the repository
- Create your feature branch (
git checkout -b feature/NewAlgorithm) - Ensure all unit tests pass, especially the A*/Dijkstra algorithms in the CI pipeline (
test-pathfinding.yml) and container builds (build-containers.yml). - Commit your changes (
git commit -m 'Add a NewAlgorithm') - Push to the branch (
git push origin feature/NewAlgorithm) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for more details.