Board index FlightGear Development Scenery

Upgrading Perugia LIRZ Airport

Questions and discussion about enhancing and populating the FlightGear world.

Upgrading Perugia LIRZ Airport

Postby RedGriffin » Tue Dec 25, 2018 8:41 pm

Hello everyone,
I live in Perugia (Umbria, Italy) and I have a fond interest in flight simulation since the times of Bruce Artwick's SubLOGIC Flight Simulator which I was running on a Commodore 64.
I am also a fond user of Flightgear which I am running on my Linux box since the times of its very early development and release. My favorite airport has always been the local airport of Perugia (the city where I live in) San Francesco LIRZ. Unfortunately the representation of LIRZ airport is very outdated and it actually dates back to the condition it had prior to 2010. In that year, in fact, the airport has gone through a deep and substantial upgrade, with a longer runway, new taxiways and facilities, not to mention, I would really love to see all this in FlightGear.
I tried to upgrade the airport myself but it seems to be a quite complex job, in particular, lacking of detailed information on how to do that. I understand you can import/convert X-Plane airports and here LIRZ airport seems to be up to date, with all the new buildings, taxiways and longer runway.
I downloaded the LIRZ files from https://gateway.x-plane.com and the corresponding elevation data for that area, then I basically followed this tutorial to convert everything into something FlightGear can use: http://wiki.flightgear.org/Using_TerraG ... ssing_data
The problem is genapts850 is not generating any output, it does not create AirportArea and AirportObj folders in the work directory, although at the end of the process it says it successfully converted everything.
I understand at the end of the process I should get a .btg file (I guess containing the airport itself, buildings, signs and everything else) which I can copy in my local scenery folder, however, it is now many days I am trying to do that, unfortunately with no success at all.
What am I missing? Is there something in particular to be done in order to properly convert X-Plane apt.dat files? Is there anyone who can help me or give me information on how to properly convert a X-Plane airport in order to be used to FlightGear?

Thank you for reading this and thank you for any help you can provide.
User avatar
RedGriffin
 
Posts: 293
Joined: Tue Dec 25, 2018 8:04 pm
Location: Perugia, Italy
Callsign: IK0TOJ
Version: 2020.4 git
OS: Linux Fedora 35

Re: Upgrading Perugia LIRZ Airport

Postby D-ECHO » Tue Dec 25, 2018 9:57 pm

Hi FlyingGriffin :)
There are essentially two main steps of using terragear: Pre-processing and constructing. The first means pre-processing
1) elevation data (SRTM-3, usually from http://viewfinderpanoramas.org/Coverage ... s_org3.htm)
2) Landcover data (for my scenery sets I use a mix of CORINE https://land.copernicus.eu/pan-european ... land-cover / https://www.eea.europa.eu/data-and-maps ... ta-version and OSM (openstreetmap.org)
3) Airport data (the apt.dat you downloaded from the gateway

Import to know also is that terragear outputs terrain and basic airport stuff (signs, windsocks), every other object has to be placed seperately (this also means that buildings created with WED for X-Plane cannot easily be ported, although e.g. laserman created some scripts to do this)

The second step is running tg-construct, which puts together all the pre-processed data.

Would you mind sending the complete log output from genapts850?

Regards
D-ECHO
D-ECHO
 
Posts: 2459
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Upgrading Perugia LIRZ Airport

Postby RedGriffin » Wed Dec 26, 2018 12:26 am

Hello D-ECHO,
thank you for replying to my post and for your help.
Here it is genapts850 complete log:

$ genapts850 --input=./apt.dat --work=/tmpfs/work --dem-path=/tmpfs/work/srtm/
:Genapts850 version 2.2.0 running with 1 threads
:Launch command was genapts850
:Input file = ./apt.dat
:Work directory = /tmpfs/work
:Longitude = -180:180
:Latitude = -90:90
:Terrain sources =
: /tmpfs/work//tmpfs/work/srtm/
:Nudge = 10
:Set debug Path .
LIRZ:Found airport LIRZ at 36
LIRZ:
*******************************************************************
LIRZ:Start airport LIRZ at 36: start time Wed Dec 26 00:21:51 2018

LIRZ:Build Airport LIRZ
LIRZ:BUILDBTG
LIRZ:num runways is 1 num helipads is 0
LIRZ: long, lat is 12.514, 43.0981
LIRZ:Parse Complete - Runways: 1 Pavements: 11 Features: 109 Taxiways: 0
LIRZ:Build Base with user defined boundary
LIRZ:runway heading = 14.3515 designation 01 has overrun 96
LIRZ:stopway is 96 meters
LIRZ:Runway name is 01
LIRZ:Runway designation letter =
LIRZ: RWY CENTERLINE: offset_length is 838.773 full_segs is 14
LIRZ: uncompressed_length is 853.44 compressed_length 156.021
LIRZ: compress_ratio is 0.914072
LIRZ:runway heading = 194.351 designation 19 has overrun 60
LIRZ:stopway is 60 meters
LIRZ:Runway name is 19
LIRZ:Runway designation letter =
LIRZ: RWY CENTERLINE: offset_length is 838.773 full_segs is 14
LIRZ: uncompressed_length is 853.44 compressed_length 156.021
LIRZ: compress_ratio is 0.914072
LIRZ:Build 1 user boundaries
LIRZ:done
LIRZ:ClipBase
Area size = 3105.13 x 1777.41 (m)
M(11,8)
start of slope processing pass
Central offset point = lon = 12.5094deg, lat = 43.0978deg, elev = 100m
ready to create fitted surface
tgSurface::fit - got 16 coefficients
fit process successful.
LIRZ:Finished airport LIRZ : parse 0.048916768 : build 0.000000000 : clean 0.000000000 : tesselate 0.000000000
:Genapts finished successfully

I downloaded the elevation data from the site you suggested. At the end of processing, no file was generated by genapts850.
I also see genapts850 detected 0 taxiways, however they are all defined in apt.dat

Thank you for your help.
Red Griffin - IK0TOJ
Author and developer of Red Griffin ATC (Wiki) - Enjoy my Youtube Channel
User avatar
RedGriffin
 
Posts: 293
Joined: Tue Dec 25, 2018 8:04 pm
Location: Perugia, Italy
Callsign: IK0TOJ
Version: 2020.4 git
OS: Linux Fedora 35

Re: Upgrading Perugia LIRZ Airport

Postby D-ECHO » Wed Dec 26, 2018 8:56 am

It's very strange that there is no file (you are sure you looked in /tmpfs/work/ ?) and I don't have an explanation for that at the moment.
Just a short idea, where have you gotten your terragear from? It's usually best for linux to build it oneself from the scenery/ws2.0 branch.
I will try whether the processing works here for me, the apt.dat seems fine (there are some areas e.g. building roots defined as draped polygons which genapts doesn't pass, so it's best to convert this using laser's dsf2aptdat.py script (https://github.com/mherweg/d-laser-fgtools), but this should not be the problem you face here. About the taxiways:0 message, this is normal/correct as genapts seems to count what we have in WED as taxiways as "Pavements", which are processed correctly

Oh, and can you confirm that you processed the elevation data i.e. there is pre-processed elevation data in work/SRTM-3 ? If not you will have to do that first:
for i in $PWD/data/SRTM-3/*.hgt; do hgtchop 3 $i $PWD/work/SRTM-3; done
terrafit work/SRTM-3 -e 5 -x 20000
D-ECHO
 
Posts: 2459
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Upgrading Perugia LIRZ Airport

Postby RedGriffin » Wed Dec 26, 2018 11:01 am

Hello D-ECHO,
thank you for your reply and help.
I of course compiled terragear myself, however I used the code of the master branch.
I cloned and compiled the code of scenery/ws2.0 branch like you suggested and the result was the same. genapts850 seems to process everything right however not producing any output. I get the very same log I attached above.
As for the elevation data, yes, I used both hgtchop and terrafit, although - as for terrafit - I did not use the options you suggested (-e 5 -x 20000). I rerun terrafit with these options and rerun genapts850, same result as before.
I also tried to check genapts850's code in order to see where it actually writes data to files and I did not find any occurrence of "AirportArea" (the name of the supposed output folder) and the only method in which "AirportObj" (the other folder) is found is WriteObjects belonging to Airport class. The funny fact, it seems no one is calling such method so I wonder how could genapts850 possibly generate any output file?

Thank you for your help and support.

P.S.: I also cloned laser's tools which seems to be very useful and promising in converting objects. I will certainly use them as soon as I can get any usable output from genapts850. Thank you.
Red Griffin - IK0TOJ
Author and developer of Red Griffin ATC (Wiki) - Enjoy my Youtube Channel
User avatar
RedGriffin
 
Posts: 293
Joined: Tue Dec 25, 2018 8:04 pm
Location: Perugia, Italy
Callsign: IK0TOJ
Version: 2020.4 git
OS: Linux Fedora 35

Re: Upgrading Perugia LIRZ Airport

Postby D-ECHO » Wed Dec 26, 2018 11:22 am

Hey :)
Okay, honestly I have no idea what is going on here, it's working fine for me, but I can't imagine what the problem is at the moment. If you want and as I already have all of CORINE on my PC, I can just generate this scenery for you if the problem persists and you can't find what the reason is.
Regards ;)
D-ECHO
 
Posts: 2459
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Upgrading Perugia LIRZ Airport

Postby RedGriffin » Wed Dec 26, 2018 11:26 am

A quick update: in order to understand what is wrong with genapts850, I tried to convert another airport (LIAF, in Foligno, not so far from LIRZ and which I planned to upgrade as well) and downloaded the corresponding apt.dat file from the gateway.
I run genapts850 with this apt.dat file and, again, no file is generated and the conversion ends successfully. Here it is the LIAF's log as generated by genapts850:

$ genapts850 --input="LIAF_Scenery_Pack/Earth nav data/apt.dat" --work=/opt/FlightGear/flightgear-terragear/work --dem-path=/opt/FlightGear/flightgear-terragear/work/SRTM-3
:Genapts850 version 2.2.0 running with 1 threads
:Launch command was genapts850
:Input file = LIAF_Scenery_Pack/Earth nav data/apt.dat
:Work directory = /opt/FlightGear/flightgear-terragear/work
:Longitude = -180:180
:Latitude = -90:90
:Terrain sources =
: /opt/FlightGear/flightgear-terragear/work//opt/FlightGear/flightgear-terragear/work/SRTM-3
:Nudge = 10
:Set debug Path .
LIAF:Found airport LIAF at 36
LIAF:
*******************************************************************
LIAF:Start airport LIAF at 36: start time Wed Dec 26 11:22:47 2018

LIAF:Build Airport LIAF
LIAF:BUILDBTG
LIAF:num runways is 2 num helipads is 0
LIAF: long, lat is 12.7127, 42.9328
LIAF:Parse Complete - Runways: 2 Pavements: 3 Features: 17 Taxiways: 0
LIAF:Build Base with user defined boundary
LIAF:Runway name is 17
LIAF:Runway designation letter =
LIAF: RWY CENTERLINE: offset_length is 438.02 full_segs is 8
LIAF: uncompressed_length is 487.68 compressed_length 121.028
LIAF: compress_ratio is 0.709059
LIAF:Runway name is 35
LIAF:Runway designation letter =
LIAF: RWY CENTERLINE: offset_length is 438.02 full_segs is 8
LIAF: uncompressed_length is 487.68 compressed_length 121.028
LIAF: compress_ratio is 0.709059
LIAF:Build 1 user boundaries
LIAF:done
LIAF:ClipBase
Area size = 2241.63 x 727.392 (m)
M(8,8)
start of slope processing pass
Central offset point = lon = 12.7127deg, lat = 42.933deg, elev = 100m
ready to create fitted surface
tgSurface::fit - got 16 coefficients
fit process successful.
LIAF:Finished airport LIAF : parse 0.005018127 : build 0.000000000 : clean 0.000000000 : tesselate 0.000000000
:Genapts finished successfully


I forgot to mention genapts850 generates some files and creates a folder having this structure and content: (output of tree command)

e010n40
|-- e012n42
| `-- 3154234
| |-- Grass.dbf
| |-- Grass.prj
| |-- Grass.shp
| `-- Grass.shx
`-- e012n43
`-- 3154241
|-- Grass.dbf
|-- Grass.prj
|-- Grass.shp
`-- Grass.shx
Red Griffin - IK0TOJ
Author and developer of Red Griffin ATC (Wiki) - Enjoy my Youtube Channel
User avatar
RedGriffin
 
Posts: 293
Joined: Tue Dec 25, 2018 8:04 pm
Location: Perugia, Italy
Callsign: IK0TOJ
Version: 2020.4 git
OS: Linux Fedora 35

Re: Upgrading Perugia LIRZ Airport

Postby RedGriffin » Wed Dec 26, 2018 11:29 am

Hello D-ECHO,
you mean you successfully imported and converted LIRZ with your machine? This means the problem is not apt.dat like I guessed.
It would be VERY nice of you if you could convert LIRZ (and possibly LIAF too) and send it to me.
That would be a temporary solution waiting for fixing the issues I am having with genapts850 here.

Thank you very much indeed for your help and support.
Red Griffin - IK0TOJ
Author and developer of Red Griffin ATC (Wiki) - Enjoy my Youtube Channel
User avatar
RedGriffin
 
Posts: 293
Joined: Tue Dec 25, 2018 8:04 pm
Location: Perugia, Italy
Callsign: IK0TOJ
Version: 2020.4 git
OS: Linux Fedora 35

Re: Upgrading Perugia LIRZ Airport

Postby D-ECHO » Wed Dec 26, 2018 1:24 pm

The behaviour you see seems to be a result of a different version of terragear, as I have never seen genapts building a Grass.shp file... you said you are using scenery/ws2.0, right? Anyway, I will convert the scenery for you later
D-ECHO
 
Posts: 2459
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Upgrading Perugia LIRZ Airport

Postby RedGriffin » Wed Dec 26, 2018 1:28 pm

Yes, I am using scenery/ws2.0 branch and built it myself. Those Grass.* files were also generated by master branch. This is very puzzling to me.
Anyway, thank you for your help and support in converting LIRZ (and hopefully LIAF too) for me. Thank you.
Red Griffin - IK0TOJ
Author and developer of Red Griffin ATC (Wiki) - Enjoy my Youtube Channel
User avatar
RedGriffin
 
Posts: 293
Joined: Tue Dec 25, 2018 8:04 pm
Location: Perugia, Italy
Callsign: IK0TOJ
Version: 2020.4 git
OS: Linux Fedora 35

Re: Upgrading Perugia LIRZ Airport

Postby D-ECHO » Thu Dec 27, 2018 11:58 am

Here it is: https://gitlab.com/decho/lirz_liaf :) Please report when you find any bugs, I've also created and added some smaller airfields in the area (Panicarola, Montemelino and Sagrantino).
D-ECHO
 
Posts: 2459
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Upgrading Perugia LIRZ Airport

Postby RedGriffin » Thu Dec 27, 2018 1:41 pm

THANK YOU!!!!
Very good job indeed and I wish my genapts850 to work as fine as yours!
I see there is no building in the airports, I guess these must be converted and imported separately like you previously said.
At a first glance, everything seems to be just great and in place, moreover the addition of the three airfields definitely is super bonus. Thank you.
Do you have any advice on how to import buildings and the other stuff from the gateway's definition? Or how to use those defined in Flightgear's LIRZ?
Anyway, I guess it is now easy to place objects and the rest also by simply using the UFO. If you have suggestions on how to import and convert those defined in X-Plane I am more than happy to read your comments.

Many, many, many and huge thanks for your nice and very kind job!
Red Griffin - IK0TOJ
Author and developer of Red Griffin ATC (Wiki) - Enjoy my Youtube Channel
User avatar
RedGriffin
 
Posts: 293
Joined: Tue Dec 25, 2018 8:04 pm
Location: Perugia, Italy
Callsign: IK0TOJ
Version: 2020.4 git
OS: Linux Fedora 35

Re: Upgrading Perugia LIRZ Airport

Postby D-ECHO » Thu Dec 27, 2018 3:56 pm

Hi :)
You're very welcome and it's always fun to do this, so no problem :)

The objects that are already there can just be copied over from the terrasync folder ("Objects" folder, it currently only contains some trees I placed around the smaller airfield). Converting from X-Plane can be done (or might even already have been done) by Project 3000 http://wiki.flightgear.org/Project3000
D-ECHO
 
Posts: 2459
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Upgrading Perugia LIRZ Airport

Postby RedGriffin » Thu Dec 27, 2018 4:59 pm

Hi D-ECHO,
thank you again for your help, time and support.
I saw you added some trees and I already copied everything in my custom scenery folder. Very good job!
I also downloaded a couple of days ago the whole d-laser's project in my disk and took a look at it. As far as I can tell, the collection already include both LIRZ and LIAF objects. I tried to follow the instructions in the link you suggested above but, unfortunately and once again, it seems dsf2stg.py is not producing any output in the scenery folders (all the environment variables have been set) and all I get is a file named LIRZ.txt_elev.pkl the script writes into dsf_txt_collection2000 folder.
I guess I need to do that when I have more time and to investigate everything better. LIAF too seems to be included in this collection, so I guess it will not be hard to add everything to your very good job.

P.S.: while I was testing your scenery I had the multiplayer mode on (I always have it on whenever I run FlightGear) and I saw you said "Hello". I saw your airplane in LIRZ airport and I too said "hello". I guess you quit FlightGear before reading all of my messages. :-)
Red Griffin - IK0TOJ
Author and developer of Red Griffin ATC (Wiki) - Enjoy my Youtube Channel
User avatar
RedGriffin
 
Posts: 293
Joined: Tue Dec 25, 2018 8:04 pm
Location: Perugia, Italy
Callsign: IK0TOJ
Version: 2020.4 git
OS: Linux Fedora 35

Re: Upgrading Perugia LIRZ Airport

Postby RedGriffin » Thu Dec 27, 2018 11:24 pm

Done! I successfully imported all the objects and buildings in both LIRZ and LIAF.
I see signs are not converted or imported, I guess this must be done in a different way. I will figure it out how to create taxiways, stands, runway entrance and all the other signs. In the wiki I saw there are specific tools for making signs but it seems they are outdated or not available anymore.
If you have any suggestion about this, they are more than welcome.

Thank you!
Red Griffin - IK0TOJ
Author and developer of Red Griffin ATC (Wiki) - Enjoy my Youtube Channel
User avatar
RedGriffin
 
Posts: 293
Joined: Tue Dec 25, 2018 8:04 pm
Location: Perugia, Italy
Callsign: IK0TOJ
Version: 2020.4 git
OS: Linux Fedora 35

Next

Return to Scenery

Who is online

Users browsing this forum: No registered users and 7 guests