A multi-platform and open source tool to convert between different airspace and waypoint formats.
Can read airspace and waypoint files in the following formats:
- OpenAir
- openAIP
- KML/KMZ
- SeeYou
- LittleNavMap
Can write in the following formats:
- KMZ
- OpenAir
- SeeYou
- LittleNavMap
- Polish
- Garmin IMG
While converting to OpenAir AirspaceConverter estimates if the points are part of arcs or circumferences in order to make use of arc and circumference definitions of the OpenAir format and so avoiding to output all points one by one.
The ability to read KML/KMZ is based on the KMZ airspace files produced by Austrocontrol. This utility can convert also SeeYou .CUP waypoint files to KMZ (for Google Earth). The conversion to IMG for Garmin devices is done using cGPSmapper.
AirspaceConverter is written in C++11 and runs on Linux, Windows and macOS. In order to be immediately easy to use it has Qt and Windows MFC user interfaces. But it can also work from command line.
For more information's about this project: alus.it/AirspaceConverter
Contributors are, always, warmly welcome!
Airspace represented in 3D in Google Earth can help to visualize and better understand the airspace structure.
Not only, having the planned route or track of a flight (as GPX file), displayed as well in Google Earth will make easy to check for airspace crossed or to be avoided.
This software can also be useful for maintainers of OpenAir airspace and SeeYou waypoints files, not only to visualize airspace and waypoints but also to verify the syntax of OpenAir or SeeYou lines entered.
Duplicate consecutive points will be ignored, the converter will warn about them while reading OpenAir files. This will also detect the special case of an unnecessary point repeating the end of the arc defined on the previous line.
For the "landable" waypoints in the CUP files an estimation of the runway perimeter is drawn on the earth surface, in order to do that not only the position is used but also the runway orientation and length. This is particularly useful to verify that the position of the airfield in the CUP file matches exactly the runway in Google Earth. In software like LK8000 the airfield position is considered as the exact center of the runway, orientation and length are used to assist for landing with an HSI and glide slope indications thus the correctness of position, orientation and length becomes really important.
openAIP (https://www.openaip.net/) provides a free, worldwide and updated airspace and waypoint repository but in his own format, while many devices and software support OpenAir airspace files. This software can convert: openAIP airspace to OpenAir and openAIP waypoints to SeeYou; so making openAIP data available to many portable devices.
AirspaceConverter can be used also to merge together several airspace or waypoint files (openAIP repeated airspaces will be automatically removed) and filter the result on a specific range of latitudes and longitudes.
Converting openAIP files to OpenAir has also the advantage to reduce significantly the size of the total airspace database used on a portable device. For example LK8000 recently supports also the openAIP format (feature that I implemented) but it is not always possible to load bigger openAIP files on older PNA devices, while the same files converted in OpenAir yes.
There are also cases where the "official" airspace files are available only in KML format like the Austrian airspace from Austrocontrol, also in this case is possible to convert it to OpenAir.
In case is required to import long lists of points (like state borders) from KML LineString tracks: just use the option -t
and the tracks found will be closed and treated as unknown airspace. Then it will be possible to adapt the airspace definitions manually in the so converted OpenAir file.
The Keyhole Markup Language, used by Google Earth is probably a good format to define models of buildings but it is not exactly practical to define airspace. This because it not possible, at least from my understanding, to define in the same 3D object points at altitudes with different references: it is the typical case of an airspace with AGL floor and AMSL ceiling.
One possible solution is to translate, where necessary all the altitudes to the same reference but to do that we need the know the altitude of the terrain at every location, reason why this software uses terrain maps.
Another important limitation of KML is that surfaces which follow the terrain are possible only at terrain altitude.
So please, be advised that, what you will see in Google Earth will not exactly match how airspace definitions are really intended.
This program uses the same terrain raster maps (.dem) of LK8000 to convert altitudes from AGL to AMSL.
Also while importing SeeYou waypoints with null altitude (except unknown and normal types) the ground elevation will be used as altitude of that point. For doing this the terrain raster maps must be loaded before the waypoints. Ground heights between -5 and 5 meters will be anyway considered AMSL.
In case the loaded terrain maps are overlapping, the one with the best resolution will be automatically used.
On the LK8000 website there is a wide terrain raster map collection.
The part of this program reading and using the terrain maps has been derived and adapted from LK8000 project.
To know more about LK8000 project: lk8000.it
The repository of LK8000 is available here: github.com/LK8000
This software is designed to keep completely separated functionalities from the user interfaces.
All the reading, writing and conversion features are in a common shared library: libAirspaceConverter can be compiled under different platforms and so used from different user interfaces.
The airspaceconverter
command line executable, works taking several arguments, for example:
airspaceconverter -q 1013 -a 35 -i inputFileOpenAir.txt -i openAIP_asp.aip -w waypoints.cup -w openAIP_wpt.aip -m terrainMap.dem -o outputFile.kmz
Possible options:
- -q: optional, specify the QNH in hPa used to calculate height of flight levels
- -a: optional, specify a default terrain altitude in meters to calculate AGL heights of points not covered by loaded terrain map(s)
- -i: multiple, input file(s) can be OpenAir (.txt), openAIP (.aip), Google Earth .kmz, .kml)
- -w: multiple, input waypoint file(s) can be SeeYou (.cup), openAIP (.aip) or LittleNavMap (.csv)
- -m: optional, multiple, terrain map file(s) (.dem) used to lookup terrain heights
- -l: optional, set filter limits in latitude and longitude for the output, followed by the 4 limit values: northLat,southLat,westLon,eastLon where the limits are comma separated, expressed in degrees, without spaces, negative for west longitudes and south latitudes
- -o: optional, output file .kmz (Google Earth), .txt (OpenAir), .cup (SeeYou), .csv (LittleNavMap), .img (Garmin) or .mp (Polish). If not specified will be used the name of first input file as KMZ
- -p: optional, when writing in OpenAir avoid to use arcs and circles but only points (DP)
- -s: optional, when writing in OpenAir use coordinates always with minutes and seconds (DD:MM:SS)
- -d: optional, when writing in OpenAir use coordinates always with decimal minutes (DD:MM.MMM)
- -t: optional, when reading KML/KMZ files treat also "LineString" tracks as airspaces
- -v: print version number
- -h: print short guide
At least one input airspace or waypoint file must be present.
Warning: any already existing output file will be overwritten.
In order to be portable, the graphical interface is written in Qt and actually it can be compiled in Linux, Windows and macOS.
For Windows only is also available a Windows MFC user interface; if, while starting it, you get the error about VCRUNTIME140.dll
missing: it can be easily fixed installing the: Microsoft VC++ redistributable, this will allow this software to run also on older Windows versions such us WindowsXP.
This is the default way to use the graphical user interface:
- Choose the desired output format.
- If needed, specify the QNH to be used for calculating the height of flight levels, this must be done before reading airspace files.
- If converting to GoogleEarth specify a default terrain altitude to be used for the points not under terrain raster map coverage.
- Select as input multiple openAIP (.aip) OpenAir (.txt) and/or GoogleEarth (.kmz) files or the folder containing them.
- If converting to GoogleEarth or to find missing altitudes of SeeYou waypoints it is possible to load multiple raster map files (.dem) with the terrain altitude.
- And/or select one or multiple waypoints files (.cup, .csv) or the folder containing them.
- Optionally configure the latitude and longitude ranges for filtering the output.
- If converting to OpenAir choose if to output only points and the desired coordinates format.
- Press the "Convert" button.
- The converter will ask where to save the converted file and then the conversion process will start.
- Verify if the output is correct and report any problem found.
WARNING: this software is experimental. The generated output files may contains errors.
So please always verify the generated files before using in flight and report any error found.
By using this program you understand and completely agree that the generated output files (maybe wrong) are just for demonstration purposes and they do not absolutely substitute the official AIP publications.
Please always refer to official AIP publications for valid and updated airspace definitions.
The already compiled executables are available to download from the project downloads page
For the Linux distributions based on Debian there is a also an APT repository available.
In order to compile this project the following libraries are required:
- Qt (
libqt4-dev
) - libzip2 (
libzip-dev
) and dependencies (zlib) - Boost libraries (
libboost-filesystem-dev
andlibboost-locale-dev
)
First it is necessary to install the dependencies, on a Debian based distribution it would be:
sudo apt install libzip-dev libboost-filesystem-dev libboost-locale-dev libqt5-private-dev lsb-release
On older Ubuntu or Debian install libqt4-dev
instead of libqt5-private-dev
On Fedora:
sudo dnf install libzip-devel boost-devel qt-devel lsb-release
Then, to compile, from the root of this project: ./build.sh
To install: ./install.sh
This will install everything: the shared library the command line executable and the Qt GUI interface.
After it will be possible to run AirspaceConverter CLI from anywhere simply calling: airspaceconverter
The same for the AirspaceConverter Qt GUI graphical interface: airspaceconverter-gui
To uninstall (from the root of the project): ./uninstall.sh
First it is necessary to install Qt and the other dependencies:
brew install libzip boost
Make sure to have the Qt tools reachable from your $PATH
. This can be done, for example, adding to .bash_profile
a line like:
export PATH="$HOME/Qt/<Qt version>/clang_64/bin":"$PATH"
Then, to compile and install, from the root of this project: ./install.sh
This will install everything: the shared library the command line executable and the Qt GUI interface.
After it will be possible to run AirspaceConverter CLI from anywhere simply calling: airspaceconverter
While the AirspaceConverter Qt GUI graphical interface will be directly available from the Launchpad menu.
To uninstall (from the root of the project): ./uninstall.sh
In the "VisualStudio" folder there is the VisualStudio solution and project files.
It requires to have the proper Boost libraries installed, with their location configured in the VS project.
From SourceForge download the latest version of Boost libraries alredy compiled for VisualStudio.
While libzip and zlib (also not included in this repository) can be obtained via nuget.
When compiling with VisualStudio 2017 (vs141), and newer, in order to link with libzip it is necessary to modify libzip.targets
located in VisualStudio\packages\libzip.1.1.2.7\build\native
replacing all occurrencies of PlatformToolset.ToLower().IndexOf('v140')
with PlatformToolset.ToLower().IndexOf('v14')
If required cGPSmapper can be found in the portable distribution archive of this project.
Some of the placemark icons used for displaying the waypoints in Google Earth included in the produced KMZ file (and so used by this project) are coming from: Maps Icons Collection
On Windows, the folder icons
with the placemarks PNG icons must be kept in the same location of AirspaceConverter executable.
- Valerio Messina : packaging for Ubuntu, CSV waypoints, various issues fixed and testing
Author: Alberto Realis-Luc
Web: alus.it/AirspaceConverter
E-mail: [email protected]