Board index FlightGear Development Scenery

Converting Xplane airport scenery to FG

Questions and discussion about enhancing and populating the FlightGear world.

Converting Xplane airport scenery to FG

Postby oly2b » Tue Feb 23, 2021 2:27 pm

I would like to add some airport scenery for my local area airfields, there are some very good FSX and Xplane airports available, but I am struggling to convert these to FG.

I have tried to follow the guide on the scenery portal both under Windows10 and on a Linux PC.
I have run into problems with reps being out of date and missing script files (xplane2fg.sh). See link below

https://wiki.flightgear.org/Howto:Conve ... om_X-Plane

Does anybody have a working method, ideally under Windows, of during this conversion?
oly2b
 
Posts: 57
Joined: Mon Jun 29, 2020 7:55 am
Location: UK
Callsign: G-OLYB
Version: 2020.1
OS: Windows

Re: Converting Xplane airport scenery to FG

Postby erik » Tue Feb 23, 2021 3:08 pm

Good chance it is already available in Project 3000 then:
https://wiki.flightgear.org/Project3000

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2248
Joined: Thu Nov 01, 2007 2:41 pm

Re: Converting Xplane airport scenery to FG

Postby tom_nl » Tue Feb 23, 2021 7:35 pm

I've been through this recently too. I found the same - a lot of how to do it is spread across various wikis and it's not so clear.

Here's what I figured out and works for me. This is on OS X Big Sur. and FG 2020.3.6. Should be easily modifiable for other OSses:

1) Make sure you have some prerequisites installed - (Mac only) firstly you need the xcode command line tools - install by opening a terminal and typing
Code: Select all
xcode-select --install

You also need git (which comes with the Xcode tools) and python2 - OS X only comes with python 3 so the easiest way to get python 2 is to install 'homebrew' and then install the python2 cask. For Windows, you'll need to install git and python2 however this is done in windows (apologies - I don't know how to do this).

2) Make a directory for working in and storing the needed executables. Open a terminal in this directory.

3) In this directory, clone the d-laser-fgtools tools
Code: Select all
git clone https://github.com/mherweg/d-laser-fgtools.git


4) in the master working directory, make a directory for the airport - in my case EHKD. open a terminal in this directory.

5) in the airport directory, download the airport you want to update from the X Plane gateway by using the gateway_pull.py script - when in the airport directory:
Code: Select all
python2 /path/to/d-laser-fgtools/gateway_pull.py - i <airport ICAO code>


6) convert the airport from X-plane to flightgear with the dsf2aptdat.py script - in the airport directory
Code: Select all
python2 /path/to/d-laser-fgtools/dsf2aptdat.py -i <airport ICAO code>


7) open the <airport>.dat created by the script in X-Plane World Editor to check it's got everything needed, make any edits, then export to a new .dat if required, making sure to export in X Plane 10.5 format.

8 ) open the resulting <airport>.dat file in a text editor and rearrange the first few lines as follows:
a) First line needs to be a capital letter 'I' (as in India)
b) second line needs to the airport descriptor
c) third line needs to be '1050 Generated by WorldEditor 2.3.1r1' (or whichever version was used)
Example below:

Code: Select all
I
1      1 0 0 EHKD De Kooy
1050 Generated by WorldEditor 2.3.1r1


9) upload the resulting .dat file to the flightgear airport web generator - http://ns334561.ip-5-196-65.eu/tgweb/ and follow the instructions. Then download the zip the site generates that contains the airport .btg file. Put this in the working directory for now. Note i'm using the web generator as i've not managed to get terragear and genapt850 installed locally on OS X yet (still working on it).

10) Copy the .btg and .dat file to your custom scenery folder as described here https://forum.flightgear.org/viewtopic.php?f=5&t=30734 and specify this scenery path in the launcher (--fg-scenery=/path/to/Scenery). Note the part at the bottom of the article 'Technical Details' - this is the key part for making FG pick up the custom airport.dat and the scenery models and then display it correctly - the Scenery/Terrain/xxxxxxx/yyyyyyy/ICAO.btg path needs to be the same as that in the master FG scenery directory. What I did was search for there ICAO.btg filename in the master scenery directory, make a note of the folder names, then replicate the directory structure in my custom scenery directory, then put the custom .btg there.

11) Launch flightgear with the UFO at the new airport and check everything is as it should be,

The key steps seem to be step 6 that converts (or removes) the incompatible X-plane objects. After this, the 'converted' airport can be opened in Worldeditor to add anything that's missing, and then placing the scenery generated in the correct locations as per step 9 so that FG picks it up.

Hope this helps,

Tom
tom_nl
 
Posts: 84
Joined: Tue Aug 04, 2020 11:41 am
Location: Netherlands
OS: OS X Big Sur

Re: Converting Xplane airport scenery to FG

Postby oly2b » Wed Feb 24, 2021 6:13 pm

Hi all many thanks for your relies.

Tom_nl many thanks for your detailed instructions will give a go, is there any reason why it needs to be python2?
oly2b
 
Posts: 57
Joined: Mon Jun 29, 2020 7:55 am
Location: UK
Callsign: G-OLYB
Version: 2020.1
OS: Windows

Re: Converting Xplane airport scenery to FG

Postby D-ECHO » Wed Feb 24, 2021 7:18 pm

Please note that - at least as far as I remember - the airport web generator does not take into account elevation, so the airport will be completely flat and placed at sea level, as it is usually only meant for testing an airport layout. To generate a whole scenery without seams and elevation issues, you need to re-generate the area using TerraGear.
D-ECHO
 
Posts: 2462
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Converting Xplane airport scenery to FG

Postby tom_nl » Wed Feb 24, 2021 9:10 pm

D-ECHO wrote in Wed Feb 24, 2021 7:18 pm:Please note that - at least as far as I remember - the airport web generator does not take into account elevation, so the airport will be completely flat and placed at sea level

Thanks - good to know, That will be the reason why the two airports i've done both worked fine - both EHTX and EHKD, being in North Holland. are in fact at sea level! :lol:

I need to get Terragear installed and working, then amend the above accordingly.

Tom
tom_nl
 
Posts: 84
Joined: Tue Aug 04, 2020 11:41 am
Location: Netherlands
OS: OS X Big Sur

Re: Converting Xplane airport scenery to FG

Postby Maerchenprinz » Thu Feb 25, 2021 2:32 pm

Aren't areas at sea level being called "mountains" in the Netherlands?
(Sorry, just couldn't resist to make that one...)
User avatar
Maerchenprinz
 
Posts: 306
Joined: Thu Mar 15, 2007 6:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: Converting Xplane airport scenery to FG

Postby tom_nl » Fri Feb 26, 2021 11:43 am

Maerchenprinz wrote in Thu Feb 25, 2021 2:32 pm:Aren't areas at sea level being called "mountains" in the Netherlands?

:lol:

We get scared when we mountains!

Tom
tom_nl
 
Posts: 84
Joined: Tue Aug 04, 2020 11:41 am
Location: Netherlands
OS: OS X Big Sur

Re: Converting Xplane airport scenery to FG

Postby MrCrow23 » Wed Dec 14, 2022 12:32 am

I was trying to use the http://ns334561.ip-5-196-65.eu/tgweb/ website but it seems to be down for the last two years, Do you have any side option for this. I'm a Mac os user so I'm not able to download terragear without a VM.
MrCrow23
 
Posts: 4
Joined: Tue Dec 13, 2022 11:25 pm
Callsign: HK-2311
OS: Mac os

Re: Converting Xplane airport scenery to FG

Postby merspieler » Wed Dec 14, 2022 12:25 pm

Do you just want the up-to-date airports from the xplane gateway or do you want to build airports which you've modified your self?

In the 1st case I could help you... depending of what you ultimately want to archive.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2295
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Converting Xplane airport scenery to FG

Postby MrCrow23 » Wed Dec 14, 2022 5:48 pm

I want to modify the taxi ways of airports that FG already has.
MrCrow23
 
Posts: 4
Joined: Tue Dec 13, 2022 11:25 pm
Callsign: HK-2311
OS: Mac os

Re: Converting Xplane airport scenery to FG

Postby merspieler » Wed Dec 14, 2022 6:11 pm

afaik, docker also runs on macOS, so you could try this container I've built a few months ago which works well for building airports.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2295
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Converting Xplane airport scenery to FG

Postby vanosten » Sat Dec 17, 2022 8:31 am

Please be advised that I did do a port of Project3000 to osm2city (runs on Python 3) - but never finished it. The reason is that some of the things generated by Project3000 are not ideal performance wise. If someone wants to continue on Project3000, then please align with me, so it can be part of osm2city and profit for osm2city's other code (e.g. some elevation probing was inherited by Project3000 from osm2city).
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 542
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: Converting Xplane airport scenery to FG

Postby merspieler » Sat Dec 17, 2022 2:12 pm

I guess performance could greatly improve when we've finally got general object GPU instancing working.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2295
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS


Return to Scenery

Who is online

Users browsing this forum: No registered users and 2 guests