An intelligent flight route optimization system that uses AI algorithms to minimize carbon emissions and fuel consumption while maintaining efficient flight times.
- π€ AI-Powered Optimization - A* pathfinding algorithm for optimal routes
- π Real-World Data - 7,000+ airports and 60,000+ flight routes
- π Emission Tracking - Real-time COβ and fuel consumption calculations
- π― Multi-Objective - Balance between eco-friendliness, time, and efficiency
- π Visual Analytics - Interactive charts and route visualizations
- β‘ Fast API - RESTful backend with comprehensive documentation
ecoflight-ai/
βββ backend/ # FastAPI Backend
β βββ api/ # API endpoints
β β βββ routes/ # Route handlers
β β βββ services/ # Business logic
β βββ models/ # Database models
β β βββ database/ # SQLAlchemy schemas
β β βββ ml/ # ML models
β βββ utils/ # Utilities
β
βββ frontend/ # React Frontend
βββ src/
β βββ components/ # React components
β βββ services/ # API integration
β βββ App.jsx # Main application
βββ public/
- FastAPI - Modern Python web framework
- SQLAlchemy - Database ORM
- SQLite - Embedded database
- NetworkX - Graph algorithms for route optimization
- Scikit-learn - Machine learning utilities
- Geopy - Geographic calculations
- React 18 - UI framework
- Vite - Build tool
- Tailwind CSS - Styling
- Recharts - Data visualization
- Lucide React - Icons
- Axios - HTTP client
- Python 3.10+
- Node.js 18+
- npm or yarn
# Clone the repository
git clone <your-repo-url>
cd ecoflight-ai
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
cd backend
pip install -r requirements.txt
# Initialize database
python init_database.py
# Load airport and route data
python load_data.py
# Start the API server
uvicorn main:app --reloadThe API will be available at http://localhost:8000
# Navigate to frontend
cd frontend
# Install dependencies
npm install
# Start development server
npm run devThe frontend will be available at http://localhost:5173
- Enter departure and arrival airports
- Autocomplete suggestions appear as you type
- Select from 4 real aircraft models
- Each with different fuel efficiency ratings
- ECO: Minimize COβ emissions (70% weight on fuel)
- BALANCED: Balance time and emissions (50/50)
- FAST: Prioritize speed (70% weight on time)
- Total distance and flight time
- Fuel consumption and COβ emissions
- COβ savings vs. direct route
- Optimized waypoint path
- Visual route map and comparison charts
The system uses A pathfinding* with custom heuristics:
# Cost function
cost = w_fuel Γ fuel_consumption + w_time Γ flight_time
# Heuristic (great circle distance)
h(n) = geodesic_distance(current_node, goal_node)
# Total score
f(n) = g(n) + h(n)| Mode | Fuel Weight | Time Weight |
|---|---|---|
| ECO | 0.7 | 0.3 |
| BALANCED | 0.5 | 0.5 |
| FAST | 0.3 | 0.7 |
GET /api/v1/airports- List airportsGET /api/v1/airports/{iata}- Get specific airportGET /api/v1/airports/search/autocomplete- Search airports
POST /api/v1/flights/calculate-emissions- Calculate COβGET /api/v1/flights/aircraft- List aircraft
POST /api/v1/optimize/route- Optimize single routePOST /api/v1/optimize/alternatives- Find alternativesGET /api/v1/optimize/history- View history
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
- airports - 7,000+ airports worldwide
- flight_routes - 60,000+ real routes
- aircraft - Aircraft specifications
- emission_data - Calculated emissions
- optimized_paths - AI-optimized routes
- Jet fuel: 3.16 kg COβ per kg fuel (ICAO standard)
- Based on real aircraft fuel efficiency data
- Considers takeoff/landing overhead (15%)
- JFK β LAX (Eco Mode): ~8-12% COβ reduction
- Longer Routes: Up to 15-20% savings possible
- Modern gradient design
- Smooth animations
- Responsive layout
- Real-time search
- Interactive visualizations
- Professional data presentation
- 3D Globe visualization with leaflet
- Weather data integration
- Historical flight data analysis
- User accounts and saved routes
- Carbon offset calculator
- Mobile app
- Real-time flight tracking
- Multi-leg journey optimization
Contributions are welcome! Please feel free to submit a Pull Request.
Steve Thomas Mulamoottil
Built with β€οΈ for a sustainable future in aviation
- OpenFlights.org for airport and route data
- ICAO for COβ emission standards
- Aircraft manufacturers for fuel efficiency data
- Open-Meteo for weather API
- Esri for satellite imagery
For issues or questions, please open an issue on GitHub.
Let's make aviation more sustainable, one optimized route at a time! π