Board index FlightGear Development Scenery

apt.dat - local version(s)

Questions and discussion about enhancing and populating the FlightGear world.

apt.dat - local version(s)

Postby Alant » Tue Oct 18, 2016 3:44 pm

apt.dat now supports local versions.

It is now possible to have one or more local apt.dat files each containing data for one or more airfields. The airfields in the local apt.dat files take precedence over the contents of the apt.dat.gz file that is distributed as part of fgdata. - in much the same way as local custom scenery takes preference over terragear scenery.

If you are using WED, the apt.dat output by that program is suitable.

To use it add a folder NavData/apt in your fg-scenery and place your private files in that folder.

This is an extract from the author's (Florent Rougon) post in the devel list.
No need for any command-line option. As I wrote in
<https://sourceforge.net/p/flightgear/mailman/message/35424973/>, you
have to put your apt.dat files (any name ending with .dat or .dat.gz is
OK) in a structure like the following:

Scenery path
| -- Airports
| -- Models
| -- NavData
| -- | -- apt
| -- | -- | -- vrmg.dat
| -- | -- | -- vrmh.dat
| -- | -- | -- vrmk.dat
| -- | -- | -- vrmm.dat
| -- | -- | -- vrmo.dat.gz
| -- | -- | -- vrmt.dat
| -- Objects
| -- Terrain

where “Scenery path” can be any of you scenery paths (e.g., any
component of --fg-scenery/$FG_SCENERY; the path given to --terrasync-dir
is also one). The files read are all NavData/apt/*.dat[.gz] files inside
each scenery path, followed by the default $FG_ROOT/Airports/apt.dat.gz
(last in precedence order, thus allowing your custom sceneries to
override airports already present in $FG_ROOT/Airports/apt.dat.gz).

In the typical case, just put your apt.dat files(*) in the NavData/apt
subdirectory of your custom scenery and they will be picked up
automatically. In each of these files, you may include as many airport
definitions as you want.

(*) Actually, any name ending with .dat or .dat.gz---but the syntax
inside, of course, must be valid "apt.dat syntax". And if the file
name ends in .gz, of course the contents must be gzipped-compressed.





Of course your apt.dat changes should continue to be submitted to the Xplane gateway so that they will eventually be included in the main distribution.

Alan
Alant
 
Posts: 912
Joined: Wed Jun 23, 2010 5:58 am
Location: Portugal
Callsign: Tarnish99
Version: from Git
OS: Windows 10

Re: apt.dat - local version(s)

Postby pommesschranke » Wed Oct 19, 2016 11:34 am

That's very nice!

My test case is OMDB, Runway 30L
FG is reading the new OMDB.dat
from OMDB-fg-CustomScenery/NavData/apt

The runways on the in-game map look correct now, but the aircraft is still placed on the wrong, old threshold.

Either some old data stayed in NavDB or some wrong OMDB.threshold.xml is still read.

I had it right once, but then the wrong OMDB.threshold.xml was downloaded via TerraSync again and it seems to have priority
over any apt.dat :-(

It works constantly correct when Terrasync is disabled.
pommesschranke
 
Posts: 1104
Joined: Sat Apr 27, 2013 7:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Lubuntu 18.04

Re: apt.dat - local version(s)

Postby Alant » Wed Oct 19, 2016 12:36 pm

Do you have a file OMDB-fg-CustomScenery/Airports/O/M/D/OMDBThreshold.xml ?
This should not be overwritten by Terrasync.
Alant
 
Posts: 912
Joined: Wed Jun 23, 2010 5:58 am
Location: Portugal
Callsign: Tarnish99
Version: from Git
OS: Windows 10

Re: apt.dat - local version(s)

Postby pommesschranke » Wed Oct 19, 2016 1:14 pm

Alant wrote in Wed Oct 19, 2016 12:36 pm:Do you have a file OMDB-fg-CustomScenery/Airports/O/M/D/OMDBThreshold.xml ?
This should not be overwritten by Terrasync.


True. But I removed it because it was the same as the one in Terrasync.
For one airport I can edit it manully, but for 40000 airports we will need a converter that reads from apt.dat and writes the XML files.
That's what I did for groundnet.xml files.

Maybe we just remove the *.threshold.xml files from the Terrasync server ?
Do older FG versions need them ?
pommesschranke
 
Posts: 1104
Joined: Sat Apr 27, 2013 7:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Lubuntu 18.04

Re: apt.dat - local version(s)

Postby Alant » Wed Oct 19, 2016 2:16 pm

OK

Have you tried putting your desired positions in OMDB-fg-CustomScenery/Airports/O/M/D/OMDBThreshold.xml? Also does changing the positions in that file have any effect?

Alan
Alant
 
Posts: 912
Joined: Wed Jun 23, 2010 5:58 am
Location: Portugal
Callsign: Tarnish99
Version: from Git
OS: Windows 10

Re: apt.dat - local version(s)

Postby rogue55 » Tue Oct 25, 2016 1:42 am

I am new to all of this, for starters. I am working on my local airport, KFFC, and I am starting to get a feel for WED. Correcting the taxiways and adding the proper shaped ramps and runway thresholds. I discovered this post in my day long search for how to view my work in the terrain. I read about terragear and I cannot understand it. Also, the link to the "compiled" version in the wiki is broken. I'm still not sure how many days it would have taken me to get it to work properly. Anyway, I am trying to get my version of this airport to show in game and it is not working for me. I'm not sure what I am doing incorrectly and I am just sure it is something stupid and easy.

I have flightgear on my K: drive. I exported my airport as an apt.dat file from WED to a newly created NavData file that I created inside the terrasync folder. At first I had it in the scenery folder and it was not working there. the actual file path is as follows:

K:\Program Files (x86)\FlightGear 2016.3.1\data\Scenery\TerraSync\NavData\apt\kffcapt.dat

like I said, before this I had it in the \data\Scenery\NavData\apt\kffcapt.dat location. It did not work either way. I keep getting the "default" KFFC each time I launch the sim.

So what am I doing totally wrong? Thanks in advance.
rogue55
 
Posts: 10
Joined: Sat Oct 08, 2016 4:26 pm
Location: KFFC / KATL / KPDK
Callsign: Rogue55
OS: Win 7

Re: apt.dat - local version(s)

Postby wkitty42 » Tue Oct 25, 2016 2:00 am

don't put anything in the terrasync folder as it will be deleted since it does not reside on the terrasync servers... create your own custom scenery folder and add that to your fg-scenery path... then place your custom apt.dat in there with your other scenery files...

eg:
k:\myflightgear\myscenery
k:\myflightgear\myscenery\Airports
k:\myflightgear\myscenery\NavData
k:\myflightgear\myscenery\NavData\apt\KFFC.dat
k:\myflightgear\myscenery\Objects
k:\myflightgear\myscenery\Terrain

with the above, you would add "k:\myflightgear\myscenery" to your fg-scenery config line...

the new local apt.dat stuff must follow the above specific format, too... all of them go into NavData\apt with the ICAO code of the airport as the name of the .dat file and having the .dat extension...

if you are working on groundnets, threshold and tower files, they go in the Airports directory... in this case, your KFFC files could be
k:\myflightgear\myscenery\Airports\K\F\F\KFFC.groundnet.xml
k:\myflightgear\myscenery\Airports\K\F\F\KFFC.threshold.xml
k:\myflightgear\myscenery\Airports\K\F\F\KFFC.twr.xml
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5653
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: apt.dat - local version(s)

Postby rogue55 » Tue Oct 25, 2016 2:44 am

I'm thinking there is something wrong with this...

Do I need to create an entire directory in K: named "myflightgear"? and then add all those subdirectories?

I'm pretty sure I need to put this apt.dat file into the existing flightgear directories somewhere.

bear in mind I have already tried K:\Program Files (x86)\FlightGear 2016.3.1\data\scenery\NavData\apt\kffcapt.dat

I have now removed the entire \NavData folder from the \TerraSync folder, and moved it back to the \Scenery folder.
rogue55
 
Posts: 10
Joined: Sat Oct 08, 2016 4:26 pm
Location: KFFC / KATL / KPDK
Callsign: Rogue55
OS: Win 7

Re: apt.dat - local version(s)

Postby rominet » Tue Oct 25, 2016 7:14 am

wkitty42 is right except for this small bit:
wkitty42 wrote in Tue Oct 25, 2016 2:00 am:the new local apt.dat stuff must follow the above specific format, too... all of them go into NavData\apt with the ICAO code of the airport as the name of the .dat file and having the .dat extension...

The rule is that your file(s) must end in .dat (or .dat.gz if gzip-compressed), there is no requirement to use the airport code in the file name, although of course it is clearer this way if you have one apt.dat file per airport. But it is also possible to have many airports in one big apt.dat or apt.dat.gz file like the $FG_ROOT/Airports/apt.dat.gz that comes with FG.

But your problem is simply that the folder you put your new NavData\apt subfolder in must be declared as a scenery path to FG. How to do that depends on which launcher you are using. Tell us your custom scenery folder and launcher.

wkitty42 is right in that you shouldn't add things yourself to the TerraSync folder or even, in this case, to K:\Program Files (x86)\FlightGear 2016.3.1\data created by the FG installation. You should just create a new folder for your custom scenery (k:\myflightgear\myscenery was an example, choose whatever you want) and declare it as a scenery path to FG. The Airports, Objects and Terrain subfolders are standard folders inside custom sceneries, so in the end if your custom scenery is non-empty, you'll have at least Objects or Terrain.

PS: for your file name, KFFC.dat would be nicer than kffcapt.dat, although the latter is accepted.
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: apt.dat - local version(s)

Postby Gijs » Tue Oct 25, 2016 9:58 am

I think there's some misunderstanding here. Rogue is trying to generate a complete airport, including physical layout, while this topic is about the new local NavData feature only.
rogue55 wrote in Tue Oct 25, 2016 1:42 am:I read about terragear and I cannot understand it. (...) Anyway, I am trying to get my version of this airport to show in game and it is not working for me.

You must use TerraGear to generate the airport for it to show up in-sim. Placing the .dat file in your scenery directory is not sufficient (see below).
rogue55 wrote in Tue Oct 25, 2016 1:42 am:I exported my airport as an apt.dat file from WED to a newly created NavData file that I created inside the terrasync folder.

Local NavData directory support was added very recently. As far as I know it wasn't included in 2016.3.1. But even when you do have a more recent version, you still need to use TerraGear to actually generate the visible terrain. NavData is only used for maps, startup locations etc., while the physical layout including runways and taxiways has to be generated in advance with TerraGear.
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9365
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: apt.dat - local version(s)

Postby rogue55 » Tue Oct 25, 2016 11:10 am

Gijs is right about what I am trying to do. I have modified an existing airport from the gateway and I am just trying to see my airport's taxiways inside the sim (or similar) to make sure they look decent as far as lines lining up, no gaps, night lighting, etc.

If I have to use terragear for this, then I guess I need to start a separate topic as I need help figuring out how to get started with it. before I leave, does anyone know where I can download the windows version of terragear? The link in the wiki here; http://wiki.flightgear.org/TerraGear_Installation_for_Windows does not work.
rogue55
 
Posts: 10
Joined: Sat Oct 08, 2016 4:26 pm
Location: KFFC / KATL / KPDK
Callsign: Rogue55
OS: Win 7

Re: apt.dat - local version(s)

Postby rominet » Tue Oct 25, 2016 11:34 am

Gijs is mostly right, the NavData/apt/*.dat[.gz] files will allow you to see airports on the map, but to see actual 3D terrain different from what is already in TerraSync, running TerraGear and using its output(*) will be necessary.

As for the startup locations, it is definitely good for the future to include them in these files, but current FG only takes them from groundnet.xml files AFAIK, not apt.dat files (however, I've seen people post links about conversion tools from apt.dat format to groundnet.xml format, so probably the best way currently is to use apt.dat/WED as your primary data source even for startup locations/parkings and generate the groundnet.xml files from that). FFGo does read startup locations from $FG_ROOT/Airports/apt.dat.gz, not yet from NavData/apt/*.dat[.gz] files inside scenery paths, but this is coming...

It is also true that only very recent FG 2016.4.0 read the NavData/apt/*.dat[.gz] files inside scenery paths (basically, I consider the feature complete since this commit from Oct 20).

As for TerraGear on Windows, there is a thread here...

(*) Precisely the Airports, Objects and Terrain folders you were wondering about.
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: apt.dat - local version(s)

Postby rogue55 » Tue Oct 25, 2016 11:39 am

I felt the need to respond to you despite realizing that I need to figure out terragear. I feel like I can glean information form furthering this discussion.

rominet wrote in Tue Oct 25, 2016 7:14 am:The rule is that your file(s) must end in .dat (or .dat.gz if gzip-compressed), there is no requirement to use the airport code in the file name, although of course it is clearer this way if you have one apt.dat file per airport. But it is also possible to have many airports in one big apt.dat or apt.dat.gz file like the $FG_ROOT/Airports/apt.dat.gz that comes with FG.


I have my file name as kffc.dat currently, so that should be the correct format for this, and a slightly cleaner file name as per your suggestion. However I have seen this "$FG_ROOT" before and I have no idea what that is. I could not find anything like that in my \FlightGear 2016.3.1 directory. Would it exist somewhere else on my system? I think this is part of my problem... trying to figure out wiki instructions for directories and folders that I cannot find on my system.

But your problem is simply that the folder you put your new NavData\apt subfolder in must be declared as a scenery path to FG. How to do that depends on which launcher you are using. Tell us your custom scenery folder and launcher.


Where would I find the custom scenery folder in flightgear? I have searched and not found it. Also, how do I determine the launcher? I downloaded FlightGear 2016.3.1 from the flightgear website at the beginning of the month so I have whatever was packaged with it.

wkitty42 is right in that you shouldn't add things yourself to the TerraSync folder or even, in this case, to K:\Program Files (x86)\FlightGear 2016.3.1\data created by the FG installation. You should just create a new folder for your custom scenery (k:\myflightgear\myscenery was an example, choose whatever you want) and declare it as a scenery path to FG. The Airports, Objects and Terrain subfolders are standard folders inside custom sceneries, so in the end if your custom scenery is non-empty, you'll have at least Objects or Terrain.

PS: for your file name, KFFC.dat would be nicer than kffcapt.dat, although the latter is accepted.


So this begs the question, (I think you were getting at it in the previous paragraph) if I create folders outside of flightgear, how does flightgear know to look for folders outside of itself? If I am understanding you correctly, I am not looking for a "custom scenery" folder inside flightgear. I'm supposed to be creating this folder somewhere and then somehow telling flightgear to look in THAT folder for scenery instead of using terrasync?
rogue55
 
Posts: 10
Joined: Sat Oct 08, 2016 4:26 pm
Location: KFFC / KATL / KPDK
Callsign: Rogue55
OS: Win 7

Re: apt.dat - local version(s)

Postby rominet » Tue Oct 25, 2016 12:23 pm

rogue55 wrote in Tue Oct 25, 2016 11:39 am:I have my file name as kffc.dat currently, so that should be the correct format for this, and a slightly cleaner file name as per your suggestion. However I have seen this "$FG_ROOT" before and I have no idea what that is. I could not find anything like that in my \FlightGear 2016.3.1 directory.

$FG_ROOT represents the main data folder of your FG installation, see http://wiki.flightgear.org/$FG_ROOT for more info. In your case, it seems to be K:\Program Files (x86)\FlightGear 2016.3.1\data.
rogue55 wrote in Tue Oct 25, 2016 11:39 am:Where would I find the custom scenery folder in flightgear? I have searched and not found it. Also, how do I determine the launcher? I downloaded FlightGear 2016.3.1 from the flightgear website at the beginning of the month so I have whatever was packaged with it.

If you see things like the screenshots at http://wiki.flightgear.org/FlightGear_Qt_launcher then you are using the built-in launcher (based on Qt 5). In this case, setting the scenery paths is done on the Add-ons page.
rogue55 wrote in Tue Oct 25, 2016 11:39 am:So this begs the question, (I think you were getting at it in the previous paragraph) if I create folders outside of flightgear, how does flightgear know to look for folders outside of itself?

By declaring your scenery paths in whatever launcher you are using.
rogue55 wrote in Tue Oct 25, 2016 11:39 am:If I am understanding you correctly, I am not looking for a "custom scenery" folder inside flightgear. I'm supposed to be creating this folder somewhere and then somehow telling flightgear to look in THAT folder for scenery instead of using terrasync?

Yes, except you don't have to disable TerraSync: your custom sceneries can be overlaid on top of the TerraSync scenery. In the built-in launcher, this is the default when TerraSync is activated. Otherwise, you just have to know that:
  • you may explicitely put the TerraSync folder in your list of scenery paths;
  • earlier entries in this list take precedence over later ones (details here for people using the command line, not the built-in launcher).
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: apt.dat - local version(s)

Postby rogue55 » Tue Oct 25, 2016 1:55 pm

I appreciate your help rominet. The $FG_ROOT thing was confusing as it looked like a file or code. To the layman like myself it looks specific. So if I see a $ in front of something, does that make it a representation of a file or folder or is there more to the nomenclature that I should recognize?

Looking at the screenshot, I am using that QT launcher. So on the add-ons page I can type in the directory to my scenery files and it will use that in precedence over terrasync. Or rather, where the two overlap it will use custom scenery first, and terrasync will fill in the rest of the scenery, correct?

I'm starting to feel like some of my earlier questions and misunderstandings were a little silly but thank you for working with me.
rogue55
 
Posts: 10
Joined: Sat Oct 08, 2016 4:26 pm
Location: KFFC / KATL / KPDK
Callsign: Rogue55
OS: Win 7

Next

Return to Scenery

Who is online

Users browsing this forum: No registered users and 1 guest