Route manager: Difference between revisions

Jump to navigation Jump to search
m
→‎SIDs and STARs: add indentation after bash-code-block
(→‎SIDs and STARs: added bash script for sorting xml-files into I/C/A/ICAO.procedures.xml)
m (→‎SIDs and STARs: add indentation after bash-code-block)
Line 60: Line 60:
* Another possibility, using [https://www.python.org/ Python] 3, is this [http://people.via.ecp.fr/~flo/python_dumping_ground/short_scripts/extract-navdata.py extract-navdata.py script], which can install the files from a directory or directly from a tarball. Run <tt>extract-navdata.py --help</tt> or <tt>python3 extract-navdata.py --help</tt> for instructions. You may need to use <tt>py -3</tt> instead of <tt>python3</tt> on Windows, cf. [https://docs.python.org/3/using/windows.html Using Python on Windows].
* Another possibility, using [https://www.python.org/ Python] 3, is this [http://people.via.ecp.fr/~flo/python_dumping_ground/short_scripts/extract-navdata.py extract-navdata.py script], which can install the files from a directory or directly from a tarball. Run <tt>extract-navdata.py --help</tt> or <tt>python3 extract-navdata.py --help</tt> for instructions. You may need to use <tt>py -3</tt> instead of <tt>python3</tt> on Windows, cf. [https://docs.python.org/3/using/windows.html Using Python on Windows].
* You could also use a small bash-script to do the work for you. Bash is a shell, native on Linux, also exists on Macs. Copy the following code into a new file, name it "convert.sh". Put it into the lowest directory, where all the xml-files are stored.
* You could also use a small bash-script to do the work for you. Bash is a shell, native on Linux, also exists on Macs. Copy the following code into a new file, name it "convert.sh". Put it into the lowest directory, where all the xml-files are stored.
<syntaxhighlight lang="bash" enclose="div">#!/bin/bash
:<syntaxhighlight lang="bash" enclose="div">#!/bin/bash


for file in *.xml
for file in *.xml
Line 74: Line 74:
   done
   done
</syntaxhighlight>
</syntaxhighlight>
Now it's time to fire up a terminal and navigate to the files:
:Now it's time to fire up a terminal and navigate to the files: <code>cd /path/to/LevelD/package</code> To make the script executable type: <code>chmod +x convert.sh</code> Now you're ready to run the script! <code>./convert.sh</code>  
<code>cd /path/to/LevelD/package</code>
 
To make the script executable type:
:When the script is done, you will find a new folder on your hard-disk: "/path/to/LevelD/Airports" which contains the files in our "I/C/A/ICAO.procedures.xml fashion".
<code>chmod +x convert.sh</code>
Now you're ready to run the script!
<code>./convert.sh</code>
When the script is done, you will find a new folder on your hard-disk: "/path/to/LevelD/Airports" which contains the files in our "I/C/A/ICAO.procedures.xml fashion".


Next time you start FlightGear, you can load the routes through the route manager interface.
Next time you start FlightGear, you can load the routes through the route manager interface.
177

edits

Navigation menu