A C++/Qt-based flight planning application for Microsoft Flight Simulator (MSFS), X-Plane, and Prepar3D. It generates optimal routes using the A* algorithm, displays real-time maps via MapTiler, and exports flight plans in .pln, .fms, and .lnmpln formats.
-
Route Planning: A* algorithm optimized with global airport and VOR data from OurAirports, considering wind data from NOAA.
-
Map Display: Real-time MapTiler map with clickable waypoints
- 🟦 Airports
- 🔴 VORs
- 🟩 Route lines
- ⚪ White labels
-
Export Formats:
.pln(MSFS/Prepar3D).fms(X-Plane).lnmpln(Little Navmap)
-
Modern GUI:
- Dark theme
- Toolbar (Export, Refresh Weather)
- Route summary (waypoints, distance)
- Tabified docks (charts, pilot tools)
-
Weather Tools: Fetches METAR data every 15 minutes or on demand
-
Cross-Platform: macOS & Windows
-
CMake: ≥ 3.10
-
Qt 6:
Widgets,WebEngineWidgets -
libcurl: For NOAA weather API
-
C++17 Compiler: Clang (macOS) or MSVC (Windows)
-
Dependencies:
-
Data Files:
airports.csv(OurAirports)navaids.csv(OurAirports)
-
Internet Access: Required for MapTiler & NOAA API
- Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"- Install Dependencies
brew install cmake qt libcurl- Clone Repository
git clone https://github.com/yourusername/flight-planner.git
cd flight-planner- Download Headers
mkdir -p include
curl -L https://github.com/nlohmann/json/releases/download/v3.11.3/json.hpp -o include/json.hpp
curl -L https://github.com/vincentlaucsb/csv-parser/raw/master/single_include/csv.hpp -o include/csv.hpp- Download Data Files
mkdir -p data
curl -L https://davidmegginson.github.io/ourairports-data/airports.csv -o data/airports.csv
curl -L https://davidmegginson.github.io/ourairports-data/navaids.csv -o data/navaids.csv- Create Resource File
echo '<RCC><qresource prefix="/"><file>world_map.jpg</file></qresource></RCC>' > resources.qrc- Build & Run
mkdir build && cd build
cmake .. -DQt6_DIR=/opt/homebrew/lib/cmake/Qt6 -DCURL_DIR=/opt/homebrew/lib/cmake/CURL
make
./flight-planner-
Install Visual Studio
- Download Visual Studio 2022 Community
- Include "Desktop development with C++" workload
-
Install CMake
- Download
- Add to
PATH
-
Install vcpkg
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat- Install Dependencies
.\vcpkg install qt6-base qt6-webengine curl --triplet x64-windows- Clone Repository
git clone https://github.com/yourusername/flight-planner.git
cd flight-planner- Download Headers
mkdir include
curl -L https://github.com/nlohmann/json/releases/download/v3.11.3/json.hpp -o include\json.hpp
curl -L https://github.com/vincentlaucsb/csv-parser/raw/master/single_include/csv.hpp -o include\csv.hpp- Download Data Files
mkdir data
curl -L https://davidmegginson.github.io/ourairports-data/airports.csv -o data\airports.csv
curl -L https://davidmegginson.github.io/ourairports-data/navaids.csv -o data\navaids.csv- Create Resource File
echo ^<RCC^>^<qresource prefix="/"^>^<file^>world_map.jpg^</file^>^</qresource^>^</RCC^> > resources.qrc- Build & Run
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -A x64 -DCMAKE_TOOLCHAIN_FILE=C:\path\to\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake --build . --config Release
.\Release\flight-planner.exe🔁 Replace
C:\path\to\vcpkgwith your actual vcpkg path.
-
Route Planning: Select departure/arrival airports (e.g.,
EGLLtoKJFK); A* algorithm generates route. -
Map Viewer:
- 🟦 Airports, 🔴 VORs
- 🟩 Green route line
- Zoomable, clickable interface
-
Export:
.pln: Copy toC:\ProgramData\Garmin\Trainers\GTN\FPLNor load in MSFS/Prepar3D.fms: Copy toOutput/FMS plansfor X-Plane.lnmpln: Import into Little Navmap
-
Charts & Tools:
- View mock SIDs/STARs
- METAR, NOTAMs, and ATIS
- "Refresh Weather" for updates
-
Build Errors:
- Confirm Qt6, libcurl, and CMake are installed
- Check file presence:
include/json.hpp,include/csv.hpp,data/*.csv
-
Map Not Rendering:
-
Verify internet access
-
Test MapTiler API:
curl -I https://api.maptiler.com/maps/basic/style.json?key=YOUR_API_KEY
-
-
Export Issues:
-
Check file permissions:
ls -l ~/route.pln
-
-
JavaScript Errors in WebView: Add this before
app.exec():qputenv("QT_LOGGING_RULES", "qt5.webenginecontext=true");
Contributions are welcome!
- Fork the repo
- Create a feature branch
- Submit a pull request
- OurAirports – Airport & VOR data
- MapTiler – Map rendering
- NOAA – METAR data