flight-planning-and-navigation
How to Integrate External Charts and Navigation Data Into Flightgear
Table of Contents
Choosing the Right Data Sources for FlightGear
To get the most out of FlightGear’s external data capabilities, start with reliable, up-to-date sources. The quality of your simulation depends directly on the accuracy and completeness of the data you feed it.
- OpenStreetMap (OSM) – Ideal for airport layouts, taxiways, runway markings, and terrain features. OSM data can be filtered for aviation-specific features using tools like osmfilter or Osmconvert. Official OSM downloads are available free at openstreetmap.org.
- Aviation NavData – Providers like Navigraph or the free, community-maintained X-Plane Gateway (converted for FlightGear) supply waypoints, navaids (VORs, NDBs, ILS), airways, and procedures. The FlightGear project itself also maintains a set of default navigation data that can be supplemented.
- Chart Archives – For approach plates, SIDs, STARs, and airport diagrams, sources like FAA Aeronav Products (USA) or Eurocontrol provide official PDFs. These can be displayed via FlightGear’s built-in chart viewer if converted to compatible image formats (PNG, JPEG, or GeoPDF).
- Weather and Wind Data – Real-time METAR and TAF data can be pulled from services like NOAA Aviation Weather and integrated using FlightGear’s weather engine or plugins like fgwx.
Preparing Navigation Data Files
FlightGear expects navigation data in specific formats: .nav, .fix, .awy, and .apt files (collectively known as NavData). While you can manually create or edit these flat files, it is far easier to use dedicated converters or pre-compiled datasets from the community.
Converting from Other Simulators
- If you have data from X-Plane (CIFP or earth_nav.dat format), tools like xplane2fg convert it to FlightGear NavData.
- For Microsoft Flight Simulator data, use fgfs-msfs-converter or manually extract relevant waypoints via text parsing.
- OpenStreetMap data can be processed using QLandkarteGT or MaemoMapper to produce .nav files for airports and navaids.
Organizing Your Custom Data Folder
Inside your main $FG_DATA directory (often .../FlightGear/data/), create a dedicated folder for custom content:
$FG_DATA/Export/NavData/custom/
$FG_DATA/Export/Charts/
$FG_DATA/Export/Airports/
Place your updated or supplementary files here. This keeps default data intact while allowing easy rollback.
Configuring FlightGear to Recognize External Data
Editing the NavData Configuration
Open navdata.xml located in $FG_DATA/Airports/. Look for the <navdata> section. Add a new entry pointing to your custom folder:
<navdata type="raw" name="Custom" path="Export/NavData/custom"/>
You can also reference individual .nav files. Ensure the file extensions match FlightGear’s expectations: .nav for VOR/NDB, .fix for enroute fixes, .awy for airways, and .apt for airport layouts.
Integrating Charts
Charts are displayed in FlightGear’s Map dialog or as overlay textures. To add chart images:
- Place your chart images (PNG, JPG, or TIFF) in
$FG_DATA/Export/Charts/. Name them by airport ICAO code (e.g.,kdfw.png). - Create a chart.xml in your main data directory (or edit an existing one) that lists chart files with their geographic bounds. A typical entry looks like:
<chart>
<name>KDFW Airport Diagram</name>
<airport>KDFW</airport>
<type>airport</type>
<image>Export/Charts/kdfw.png</image>
<bounds>
<lat-north>32.89</lat-north>
<lat-south>32.83</lat-south>
<lon-east>-96.83</lon-east>
<lon-west>-97.05</lon-west>
</bounds>
</chart>
Load the chart in the sim via View > Map or by clicking the chart icon in the toolbar.
Environment Variables
Setting the FG_DATA variable is not strictly required if you run FlightGear from its default installation, but it is helpful for developers. On Linux/macOS, add to ~/.bashrc or ~/.zshrc:
export FG_DATA=/path/to/your/flightgear/data
On Windows, go to System Properties > Advanced > Environment Variables and create a new variable named FG_DATA with the value pointing to your Data folder. Restart the terminal or launcher.
Advanced Configuration: Using Custom Scripts and Plugins
For power users, FlightGear’s Nasal scripting language and the fgdata repository allow deep customization. You can write a Nasal script to automatically download fresh charts on startup or to parse real-time navigation feeds from online APIs.
Example: Loading an External Chart via Nasal
var chart_path = "Export/Charts/ksfo.png";
var chart_dlg = nil;
var load_chart = func {
if (chart_dlg == nil) {
chart_dlg = canvas.new();
chart_dlg.set("view", [south, north, west, east]);
chart_dlg.load(chart_path);
}
chart_dlg.show();
}
Place this script in $FG_DATA/Nasal/charts.nas and trigger it via a keyboard shortcut or menu button. The FlightGear Nasal Wiki offers a wealth of examples.
Verifying Your Integration
Launch FlightGear with verbose logging to confirm your data is loaded:
fgfs --verbose --log-level=info
Check the terminal output for lines like “Loading navdata from Export/NavData/custom…” or “Chart KDFW loaded from Export/Charts/kdfw.png”.
Inside the sim, open the Map dialog (default key M). Zoom into an airport or enroute area. You should see custom navaids, airways, and chart overlays. If not, double-check file paths, format, and that the parent folders are readable by the FlightGear process.
Troubleshooting Common Issues
| Problem | Likely Cause | Solution |
|---|---|---|
| Custom navaids not appearing | Wrong file format; missing .nav extension; navdata.xml not updated | Use fg-navconvert to verify format; ensure navdata.xml entry is top-level. |
| Charts not showing | Geo-bounds misaligned; image too large; missing chart.xml | Double-check latitude/longitude; resize image to under 2048x2048 pixels; reference chart.xml at startup with --config=Export/chart.xml. |
| FlightGear crashes on load | Corrupt data file; duplicate navaid codes; infinite loop in Nasal script | Test with a minimal subset of files; run in safe mode (--disable-save). |
Keeping Your Data Current
Navigation databases are updated every 28 days (AIRAC cycle). Subscribe to services like Navigraph for monthly updates, or use free sources like Aerobaticsweb (community-maintained FlightGear NavData conversions). Automate the download process with a cron job or Task Scheduler script that fetches the latest files and reorganizes them into your custom folder.
Community Resources and Further Reading
- FlightGear Wiki: Add Custom Airport Data
- FlightGear Wiki: Map Structure (Charts)
- FlightGear Forum: Navigation & Charts
- GitHub: FlightGear Data Tools
Final Thoughts
Integrating external charts and navigation data elevates FlightGear from a casual toy to a serious training tool. By leveraging open data, community converters, and careful configuration, you can replicate real-world flight planning and situational awareness. Start with a single airport and test thoroughly before adding multiple datasets. With practice, you’ll create a bespoke simulation environment that rivals commercial products in accuracy and depth.