Board index FlightGear Development Scenery

apt.dat - local version(s)

Questions and discussion about enhancing and populating the FlightGear world.

Re: apt.dat - local version(s)

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

The $ indicates the expansion of an environment variable, in this case FG_ROOT. This is Unix shell syntax, but used symbolically in FG documentation and on the forum. This is justified by the fact that FG's main data folder can be set using the FG_ROOT environment variable (but not when using the built-in launcher).

Concerning scenery paths and their precedence, you list them in Additional scenery locations in the Add-ons tab. If you put download_dir/TerraSync (which is $FG_HOME/TerraSync unless you changed the download location) in this list, this will determine the precedence of your TerraSync folder relatively to other scenery paths in this list, otherwise it will come after all scenery paths you have explicitely defined and before the last default, $FG_ROOT/Scenery:
Code: Select all
void QtLauncher::setSceneryPaths() // static method
{
    globals->clear_fg_scenery();

// mimic what optionss.cxx does, so we can find airport data for parking
// positions
    QSettings settings;
    // append explicit scenery paths
    Q_FOREACH(QString path, settings.value("scenery-paths").toStringList()) {
        globals->append_fg_scenery(path.toStdString());
    }

    // append the TerraSync path
    QString downloadDir = settings.value("download-dir").toString();
    if (downloadDir.isEmpty()) {
        downloadDir = QString::fromStdString(flightgear::defaultDownloadDir().utf8Str());
    }

    SGPath terraSyncDir(downloadDir.toStdString());
    terraSyncDir.append("TerraSync");
    if (terraSyncDir.exists()) {
        globals->append_fg_scenery(terraSyncDir);
    }

    // add the installation path since it contains default airport data,
    // if terrasync is disabled or on first-launch
    globals->append_fg_scenery(globals->get_fg_root() / "Scenery");

}

(this is the corresponding code in the built-in launcher, it is almost the same but not quite once "normal FG" has started, see https://sourceforge.net/p/flightgear/fl ... .cxx#l2320 [OptionResult Options::processOptions()] for those who can read C++).

As for how the "mix" between several scenery paths is done, this is explained here:
FlightGear searches these scenery paths sequentially. The first terrain found for each tile is loaded. Objects for a tile are loaded from all directories visited before (and including the one where) the terrain was found.

as well as in $FG_ROOT/Docs/README.scenery.
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 f-ojac » Sat Oct 29, 2016 5:38 am

@rogue55 you can use TGWeb to build the runways and taxiways for you and so make sure the layout is OK. Check http://ns334561.ip-5-196-65.eu/tgweb/
Hosting terrasync, World Scenery, TGWeb on my own private server. Click here to donate and help to make the service last.
f-ojac
 
Posts: 1289
Joined: Fri Mar 07, 2008 9:50 am
Version: GIT
OS: GNU/Linux

Re: apt.dat - local version(s)

Postby pommesschranke » Fri Dec 23, 2016 11:33 am

I'm testing KDFW.dat from the gateway which has >100 parking locations, but FG(git) ignores them, only shows those few from the main apt.dat.gz. The log messages look good:

Code: Select all
NavCache: main cache rebuild required
NavCache at:Path "/SDB2/dot-fgfs/navdata_2017_1.cache"
will create tables
Opened apt.dat file: '/SDB2/scenery/fgo/NavData/apt/KDFW.dat'
apt.dat format version (/SDB2/scenery/fgo/NavData/apt/KDFW.dat): 1050
Opened apt.dat file: '/SDB2/fg-fgmeta/next/install/flightgear/fgdata/Airports/apt.dat.gz'
apt.dat format version (/SDB2/fg-fgmeta/next/install/flightgear/fgdata/Airports/apt.dat.gz): 1050
/SDB2/fg-fgmeta/next/install/flightgear/fgdata/Airports/apt.dat.gz:598708: skipping airport KDFW (already defined earlier)
/SDB2/fg-fgmeta/next/install/flightgear/fgdata/Airports/apt.dat.gz:2453063: invalid Comm Frequency line (row code 54): at least 3 fields are required
/SDB2/fg-fgmeta/next/install/flightgear/fgdata/Airports/apt.dat.gz:136124: invalid Comm Frequency line (row code 51): at least 3 fields are required
Loaded data for 34721 airports
apt.dat files load took:5750
fix.dat load took:2207


ooops, I forgot: FG is still not reading parking locations from apt.dat !
I have to convert it to KDFW.groundnet.xml


Image
Image
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 rominet » Fri Dec 23, 2016 1:08 pm

pommesschranke wrote in Fri Dec 23, 2016 11:33 am:ooops, I forgot: FG is still not reading parking locations from apt.dat !
I have to convert it to KDFW.groundnet.xml

Yes, I know. The main problem from my POV is that there isn't a clear 1:1 mapping from the parking metadata allowed by apt.dat files to that allowed in groundnet.xml files (for one, the flight type / type of location / airplane type fields are clearly different in both formats). Since groundnet.xml files are heavily used for FlightGear AI traffic, adding support for the X-Plane metadata requires the input of someone familiar with this AI code, which I am not. And as you should know, the last time this was raised on flightgear-devel, there hasn't been much of a reaction from this side...
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Previous

Return to Scenery

Who is online

Users browsing this forum: No registered users and 2 guests