Howto:Test your airport layout: quick and easy: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Thanks to LucMTL in [http://www.flightgear.org/forums/viewtopic.php?f=5&t=3230&st=0&sk=t&sd=a&start=60#p29683 this post] we can now test our new Airport Layout Easily!
Thanks to LucMTL in [http://www.flightgear.org/forums/viewtopic.php?f=5&t=3230&st=0&sk=t&sd=a&start=60#p29683 this post] we can now test our new airport layout easily!


Relatively Simple Procedure to Get a Quick Look at a New Airport Layout Drawn in TaxiDraw :
== Required software ==
* [[WED]] to draw/change the airport layout (runways, taxiways, tarmac).
* [[TerraGear]] to generate the FlightGear scenery.


== File Creation ==
== Relative simply method ==
=== File creation ===


Let's suppose your airport in project has the ICAO code : ''ABCD''.
Let's suppose your airport in project has the ICAO code: ''ABCD''.


# Create a folder anywhere named with any name, and copy the genapts executable into it, from the TerraGear suite.
# Create a folder anywhere named with any name, and copy the genapts executable into it, from the TerraGear suite.
# In TaxiDraw, open your project and do the command : '''Export Airport'''. Save the export ''ABCD.dat'' file into your folder.  
# In WED, open your project and do the command: '''Export Airport'''. Save the export ''ABCD.dat'' file into your folder.  
# Open a command line window and go to your folder in it.
# Open a command line window and go to your folder in it.
# Do the command exactly as here, including the dot at the end (but put the real ICAO code of your airport of course, instead of "''ABCD''" at the input parameter) :
# Do the command exactly as here, including the dot at the end (but put the real ICAO code of your airport of course, instead of "''ABCD''" at the input parameter):<br/>
   genapts --input=ABCD.dat --work=.
   genapts --input=ABCD.dat --work=.
: That command will make a series of data lines pass through the screen. Your new airport has just been generated. We must now manage to put the current scenery out of our way, and place the new airport temporarily at the right place, so we can take a look at it.
: That command will make a series of data lines pass through the screen. Your new airport has just been generated. We must now manage to put the current scenery out of our way, and place the new airport temporarily at the right place, so we can take a look at it.


== Putting Aside the Current Scenery ==
=== Putting aside the current scenery ===


# Go to FlightGear/data/Scenery/Terrain, and go through to your exact scenery sub-folder where the airport is normally stored.
# Go to <tt>[[$FG_ROOT]]/Scenery/Terrain</tt>, and go through to your exact scenery sub-folder where the airport is normally stored.
# In this folder, there is already the official "ABCD.btg.gz" file existing. Rename it by adding the word BACKUP at the end of its name. That will put it aside for the moment.
# In this folder, there is already the official "ABCD.btg.gz" file existing. Rename it by adding the word BACKUP at the end of its name. That will put it aside for the moment.
# Also in that same folder, locate your exact bucket file corresponding to the place where your airport is supposed to be. For example, the bucket file for the CSK3 airport is 1745385.btg.gz. Rename it by adding the word BACKUP at the end of its name. That will completely deactivate for the moment all the surrounding scenery around your airport (Important ! Otherwise, parts of your new airport layout are likely to be hidden by the old scenery).
# Also in that same folder, locate your exact bucket file corresponding to the place where your airport is supposed to be. For example, the bucket file for the CSK3 airport is <tt>1745385.btg.gz</tt>. Rename it by adding the word BACKUP at the end of its name. That will completely deactivate for the moment all the surrounding scenery around your airport (Important ! Otherwise, parts of your new airport layout are likely to be hidden by the old scenery).
# Finally, always in the scenery folder, locate the small text file with the same numbered name as the bucket file, but with the .stg extention. For example, for the CSK3 airport, the file is 1745385.stg. Rename it also by adding the word BACKUP at the end of its name. That will put aside the current scenery instructions given to FlightGear for the local area you're working on.
# Finally, always in the scenery folder, locate the small text file with the same numbered name as the bucket file, but with the .stg extention. For example, for the CSK3 airport, the file is <tt>1745385.stg</tt>. Rename it also by adding the word BACKUP at the end of its name. That will put aside the current scenery instructions given to FlightGear for the local area you're working on.


== Putting the New Airport in Place ==
=== Putting the new airport in place ===


# Now, in your working folder, there are two new subfolders : AirportArea and AirportObj.
# There should be two new subfolders in your working folder: <tt>AirportArea</tt> and <tt>AirportObj</tt>.
# In AirportObj, go through the subfolders and locate your new airport file : ABCD.btg.gz. Copy it from your working folder to that scenery folder.
# In <tt>AirportObj</tt>, go through the subfolders and locate your new airport file: <tt>ABCD.btg.gz</tt>. Copy it from your working folder to the corresponding scenery folder.
# Still in AirportObj, locate also the new scenery instructions text file. It is named with the bucket number plus the .ind extension (ex. : 1745385.ind). Rename it to the .stg extension (ex. : 1745385.stg), and copy it to the scenery folder.
# Still in <tt>AirportObj</tt>, locate also the new scenery instructions text file. It is named with the bucket number plus the .ind extension (ex. <tt>1745385.ind</tt>). Rename it to the .stg extension (ex. <tt>1745385.stg</tt>), and copy it to the scenery folder.
# Now start FlightGear with the UFO and go to your airport. At the beginning you will see nothing but a void. Go up, take some altitude : you can see your airport right there, you were just UNDER it at the start. It floats alone in the middle of the air, but it's all there, you can see what it looks like.
# Edit your .stg file: Add a first line like this:
OBJECT_BASE your_stg_number.btg
example:
OBJECT_BASE 1745385.btg
OBJECT ABCD.btg
Now start FlightGear with the [[UFO]] and go to your airport. At the beginning you will see nothing but a void. Go up, take some altitude : you can see your airport right there, you were just UNDER it at the start. It floats alone in the middle of the air, but it's all there, you can see what it looks like.


== Restoring ==
=== Restoring ===


When you're done working on the airport layout and you're satisfied :
When you're done working on the airport layout and you're satisfied :
Line 34: Line 42:
# Go to the scenery folder and delete both the new ABCD.btg.gz and the new "bucket-number".stg file.
# Go to the scenery folder and delete both the new ABCD.btg.gz and the new "bucket-number".stg file.
# Locate the three files that were renamed "BACKUP" at the end, and rename them back to their previous names.
# Locate the three files that were renamed "BACKUP" at the end, and rename them back to their previous names.
== Quicker but dirty way ==
This way is quicker because you don't need to modify your current scenery (nor make backup copies or restore it afterward). The only drawback (the ''dirty'' part, so to speak) is that the '''only''' thing that you will see is the new airport.
* Run the genapts command as described above in the first paragraph.
* Go into the directory of the generated airport object. eg:
cd AirportObj/w060s40/w059s38/
:(Your path should be consistent with the coordinates of your airport)
* Rename the .ind file with a .stg extension. eg:
mv 1984723.ind 1984723.stg
* Get back to the AirportObj directory:
cd ../../
* Start FlightGear with the current directory as the scenery path and loacted on your new airport (change ABCD with the icao code of your airport):
fgfs --fg-scenery=. --aircraft=ufo --airport=ABCD
== Use fgviewer ==
You can also use [[FGViewer]] to look at your airport.
== Terragear web interface ==
Even quicker use the Terragear web interface at http://ns334561.ip-5-196-65.eu/tgweb/ . Just submit the apt.dat, it will generate the airport .btg.gz (not the surrounding tiles) for you.
And that's it!
[[Category:Howto|Airport layout test]]
[[Category:Scenery enhancement|Airport layout test]]

Latest revision as of 13:22, 4 February 2016

Thanks to LucMTL in this post we can now test our new airport layout easily!

Required software

  • WED to draw/change the airport layout (runways, taxiways, tarmac).
  • TerraGear to generate the FlightGear scenery.

Relative simply method

File creation

Let's suppose your airport in project has the ICAO code: ABCD.

  1. Create a folder anywhere named with any name, and copy the genapts executable into it, from the TerraGear suite.
  2. In WED, open your project and do the command: Export Airport. Save the export ABCD.dat file into your folder.
  3. Open a command line window and go to your folder in it.
  4. Do the command exactly as here, including the dot at the end (but put the real ICAO code of your airport of course, instead of "ABCD" at the input parameter):
 genapts --input=ABCD.dat --work=.
That command will make a series of data lines pass through the screen. Your new airport has just been generated. We must now manage to put the current scenery out of our way, and place the new airport temporarily at the right place, so we can take a look at it.

Putting aside the current scenery

  1. Go to $FG_ROOT/Scenery/Terrain, and go through to your exact scenery sub-folder where the airport is normally stored.
  2. In this folder, there is already the official "ABCD.btg.gz" file existing. Rename it by adding the word BACKUP at the end of its name. That will put it aside for the moment.
  3. Also in that same folder, locate your exact bucket file corresponding to the place where your airport is supposed to be. For example, the bucket file for the CSK3 airport is 1745385.btg.gz. Rename it by adding the word BACKUP at the end of its name. That will completely deactivate for the moment all the surrounding scenery around your airport (Important ! Otherwise, parts of your new airport layout are likely to be hidden by the old scenery).
  4. Finally, always in the scenery folder, locate the small text file with the same numbered name as the bucket file, but with the .stg extention. For example, for the CSK3 airport, the file is 1745385.stg. Rename it also by adding the word BACKUP at the end of its name. That will put aside the current scenery instructions given to FlightGear for the local area you're working on.

Putting the new airport in place

  1. There should be two new subfolders in your working folder: AirportArea and AirportObj.
  2. In AirportObj, go through the subfolders and locate your new airport file: ABCD.btg.gz. Copy it from your working folder to the corresponding scenery folder.
  3. Still in AirportObj, locate also the new scenery instructions text file. It is named with the bucket number plus the .ind extension (ex. 1745385.ind). Rename it to the .stg extension (ex. 1745385.stg), and copy it to the scenery folder.
  4. Edit your .stg file: Add a first line like this:
OBJECT_BASE your_stg_number.btg

example:

OBJECT_BASE 1745385.btg
OBJECT ABCD.btg

Now start FlightGear with the UFO and go to your airport. At the beginning you will see nothing but a void. Go up, take some altitude : you can see your airport right there, you were just UNDER it at the start. It floats alone in the middle of the air, but it's all there, you can see what it looks like.

Restoring

When you're done working on the airport layout and you're satisfied :

  1. Go to the scenery folder and delete both the new ABCD.btg.gz and the new "bucket-number".stg file.
  2. Locate the three files that were renamed "BACKUP" at the end, and rename them back to their previous names.


Quicker but dirty way

This way is quicker because you don't need to modify your current scenery (nor make backup copies or restore it afterward). The only drawback (the dirty part, so to speak) is that the only thing that you will see is the new airport.

  • Run the genapts command as described above in the first paragraph.
  • Go into the directory of the generated airport object. eg:
cd AirportObj/w060s40/w059s38/
(Your path should be consistent with the coordinates of your airport)
  • Rename the .ind file with a .stg extension. eg:
mv 1984723.ind 1984723.stg
  • Get back to the AirportObj directory:
cd ../../
  • Start FlightGear with the current directory as the scenery path and loacted on your new airport (change ABCD with the icao code of your airport):
fgfs --fg-scenery=. --aircraft=ufo --airport=ABCD

Use fgviewer

You can also use FGViewer to look at your airport.

Terragear web interface

Even quicker use the Terragear web interface at http://ns334561.ip-5-196-65.eu/tgweb/ . Just submit the apt.dat, it will generate the airport .btg.gz (not the surrounding tiles) for you.

And that's it!