Skip to content

A C++/Qt flight planner for MSFS, X-Plane, and Prepar3D. Craft optimal routes with A algorithms, visualize on MapTiler maps, and export to .pln, .fms, or .lnmpln. Features a sleek GUI with real-time weather, mock charts, and pilot tools.

Notifications You must be signed in to change notification settings

Kiptoo-Deus/AeroPlan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✈️ AeroPlan

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.

Screenshot 2025-05-05 at 8 29 12 PM

🌟 Features

  • 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


⚙️ Prerequisites

  • 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


🖥️ Installation

macOS

  1. Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Install Dependencies
brew install cmake qt libcurl
  1. Clone Repository
git clone https://github.com/yourusername/flight-planner.git
cd flight-planner
  1. 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
  1. 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
  1. Create Resource File
echo '<RCC><qresource prefix="/"><file>world_map.jpg</file></qresource></RCC>' > resources.qrc
  1. Build & Run
mkdir build && cd build
cmake .. -DQt6_DIR=/opt/homebrew/lib/cmake/Qt6 -DCURL_DIR=/opt/homebrew/lib/cmake/CURL
make
./flight-planner

Windows

  1. Install Visual Studio

  2. Install CMake

  3. Install vcpkg

git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
  1. Install Dependencies
.\vcpkg install qt6-base qt6-webengine curl --triplet x64-windows
  1. Clone Repository
git clone https://github.com/yourusername/flight-planner.git
cd flight-planner
  1. 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
  1. 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
  1. Create Resource File
echo ^<RCC^>^<qresource prefix="/"^>^<file^>world_map.jpg^</file^>^</qresource^>^</RCC^> > resources.qrc
  1. 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\vcpkg with your actual vcpkg path.


🚀 Usage

  • Route Planning: Select departure/arrival airports (e.g., EGLL to KJFK); A* algorithm generates route.

  • Map Viewer:

    • 🟦 Airports, 🔴 VORs
    • 🟩 Green route line
    • Zoomable, clickable interface
  • Export:

    • .pln: Copy to C:\ProgramData\Garmin\Trainers\GTN\FPLN or load in MSFS/Prepar3D
    • .fms: Copy to Output/FMS plans for X-Plane
    • .lnmpln: Import into Little Navmap
  • Charts & Tools:

    • View mock SIDs/STARs
    • METAR, NOTAMs, and ATIS
    • "Refresh Weather" for updates

🛠️ Troubleshooting

  • 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");

🤝 Contributing

Contributions are welcome!

  1. Fork the repo
  2. Create a feature branch
  3. Submit a pull request

🙏 Acknowledgments


About

A C++/Qt flight planner for MSFS, X-Plane, and Prepar3D. Craft optimal routes with A algorithms, visualize on MapTiler maps, and export to .pln, .fms, or .lnmpln. Features a sleek GUI with real-time weather, mock charts, and pilot tools.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages