Board index FlightGear Development Aircraft

[SOLVED] Keeping up with the latest aircraft

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

[SOLVED] Keeping up with the latest aircraft

Postby Amarildojr » Tue Jan 05, 2016 1:28 am

I've compiled FlightGear 3.6 (stable) from Git. However, there is only one aircraft present.

I tried downloading a snapshot from herebut only a few aircraft are present in the .zip download. I also tried cloning this repo with git, with no success.

Is there another way of tracking all these babies?
Last edited by Amarildojr on Tue Jan 05, 2016 2:06 am, edited 1 time in total.
Amarildojr
 
Posts: 94
Joined: Sat Jan 02, 2016 11:32 pm
Location: Basil
Callsign: TAM91
OS: Arch Linux

Re: Keeping up with the latest aircraft

Postby wkitty42 » Tue Jan 05, 2016 1:56 am

yes, only the c172p and the UFO are released with FGFS now... what you can do is to download other craft from their hangers and place them in your private craft directory... at the very top of this page is a link to aircraft where you can download craft that are maintained in the official FGAddon area... currently that link points to craft that are compatible with 3.4 and they should still work with 3.6 and 3.7...

if you are running 3.7 and using the new built-on Qt5 --launcher, it will list the craft available in the default FGFS hanger and you can download them for a flight with a simple click of the install button... or as you tried to do, you can clone the FGAddon repo... it is not a git repo... it is a svn repo... what i did was the following...

Code: Select all
svn checkout svn://svn.code.sf.net/p/flightgear/fgaddon/trunk /home/myuser/flightgear-dev/fgaddon-ng


that's the same command i use in my updater script which updates and compiles FGFS from the git repos... i always update from FGAddon, FGData and the source code repos at the same time in my script... that keeps everything all in line together...
"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: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Keeping up with the latest aircraft

Postby Amarildojr » Tue Jan 05, 2016 2:05 am

It's weird, NOW I can clone them? hehehehe.

Thank you very much! You're helping me a lot today/tonight :P
Amarildojr
 
Posts: 94
Joined: Sat Jan 02, 2016 11:32 pm
Location: Basil
Callsign: TAM91
OS: Arch Linux

Re: [SOLVED] Keeping up with the latest aircraft

Postby wkitty42 » Tue Jan 05, 2016 6:33 pm

not a problem... i forgot to add that once you get the craft down, you add them to your --fg-aircraft parameter... something like this...

Code: Select all
--fg-aircraft=/home/myuser/myflightgear/Aircraft:/home/myuser/flightgear-dev/fgaddon-ng/Aircraft


note that there are two paths there... as i'm on linux, we use the colon ":" to split them... the order they are listed is important, too, but i forget if the first overrides those following or if the later one(s) override the earlier ones... or maybe this one doesn't do overrides like the scenery paths??
"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: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: [SOLVED] Keeping up with the latest aircraft

Postby Amarildojr » Tue Jan 05, 2016 9:40 pm

Thanks, I already had the path setup in FGRun.
Amarildojr
 
Posts: 94
Joined: Sat Jan 02, 2016 11:32 pm
Location: Basil
Callsign: TAM91
OS: Arch Linux

Re: [SOLVED] Keeping up with the latest aircraft

Postby rominet » Tue Jan 05, 2016 10:25 pm

Well, it is not quite that simple:
  • if you use --aircraft-dir=dir, the aircraft specified by --aircraft is only looked for in directory dir (error if the corresponding -set.xml file doesn't exist);
  • otherwise, FindAndCacheAircraft::getAircraftPaths() is used to compute the concatenation of your aircraft paths in this order (always left to right, except maybe for catalog paths, with which I am not familiar):
    1. aircraft catalog paths, if any;
    2. every path contained in a --fg-aircraft option (there may be more than one);
    3. every path contained in the FG_AIRCRAFT environment variable.
    FlightGear maintains a <path-cache> in $FG_HOME/autosave_X_Y.xml that remembers:
    • the value of FG_ROOT;
    • the return value of FindAndCacheAircraft::getAircraftPaths();
    • where a given aircraft was found when it was added to this cache.
    When this cache is empty, the first -set.xml file found in FindAndCacheAircraft::getAircraftPaths() order or, as a last resort, in $FG_ROOT/Aircraft, is loaded. This case is intuitive, but the general case can reserve surprises.

    If any of FG_ROOT and FindAndCacheAircraft::getAircraftPaths() is different from the corresponding value stored in the <path-cache>, or if the specified aircraft is not in the <path-cache>, then the cache is rebuilt: the current values for FG_ROOT and FindAndCacheAircraft::getAircraftPaths() are stored, all <aircraft> child elements of the <path-cache> are removed, and each component of FindAndCacheAircraft::getAircraftPaths() + $FG_ROOT/Aircraft is visited in turn, until the -set.xml file corresponding to the value given for --aircraft is found (if not, you get the "Aircraft not found" fatal error). During this visit, every -set.xml file found is added to the <path-cache> as part of a new <aircraft> child element (from top to bottom, I suppose using filesystem order).

    On the contrary, if both FG_ROOT and FindAndCacheAircraft::getAircraftPaths() correspond to the values stored in the <path-cache>, and if the aircraft specified with --aircraft is found therein (using case-insensitive comparison with the <file> element text of each <aircraft> element of the <path-cache>), then it is directly used without looking into the aircraft paths. This is the common case when you don't change your paths and select an aircraft you have already used and that is still in the location that was recorded when it was added to the cache.
For those who want to study this in the FlightGear source code, the main entry points are:
  • FindAndCacheAircraft::loadAircraft() in src/Main/fg_init.cxx;
  • AircraftDirVistorBase::visitAircraftPaths() in src/Main/AircraftDirVisitorBase.hxx;
  • Options::initPaths() in src/Main/options.cxx;
  • FGGlobals::get_aircraft_paths() in src/Main/globals.cxx.
Hope this helps. :wink:

Edit: mention the last resort search in $FG_ROOT/Aircraft, and that (obviously) all <aircraft> child elements of the <path-cache> are removed when the cache is rebuilt.
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux


Return to Aircraft

Who is online

Users browsing this forum: No registered users and 17 guests