Expand existing —-config option to read either property-XML files (as
it previously did) but for non-XML files, to parse them as command
line argument files.
With Simgear commit d7d59b08a2f1a77a4247ec1a89d6ff48ed73f5c7, this
allows terrasync to be initialised from files in the install data,
which avoids downloading them again.
Relocate the start-up position to a plausible hold-short position
when MP is active and a runway start is requested. This does not (yet)
use ground-net data to identify a real hold-short position.
Remove uses of .str(), .c_str() and some other methods of SGPath.
Pass SGPath directly where possible, or explicitly convert to the
appropriate 8-bit encoding.
When set on the command line, will be used for aircraft packages. When
set in the Qt launcher, will also be used for aircraft downloads at
all times.
When changing the path in the launcher, the set of aircraft catalogs
is refresh automatically. Note the default catalog may need to be
re-installed.
The --metar option has no effect unless --disable-real-weather-fetch is
also passed. This often makes users believe that --metar doesn't work.
Change the implementation for --metar so that it automatically implies
--disable-real-weather-fetch.
After removing /Models from FGData loading of shared models from
within a scenery model failed because the ResourceManager did not know
about additional scenery paths.
The problem was that the change to make FGScenery a standard subsystem caused
the particle OSG group to no longer be inserted into the scene graph. The
solution was to convert the particle group to be set up as a standard branch of
the scene graph, alongside the terrain, models, aircraft, and interior branches.
The particle system is now set up as part of the init() subsystem function call,
so it is compatible with the new subsystem design.
This follows from http://thread.gmane.org/gmane.games.flightgear.devel/78650 and
resolves the sign bug https://sourceforge.net/p/flightgear/codetickets/1778/ .
Combined with a matching change to FGData, this changes the HUD formats from the
current set of 3 (note that the text in brackets is not shown in the HUD
preferences PUI dialog, but is show here for reference):
0) Decimal degrees (37.618890N -122.375000W)
1) Degrees, minutes (37*37.133N -122*22.500W)
2) Degrees, minutes, seconds (37*37 08.0 N -122*22 30.0 W)
to (here the text in brackets will be shown in the PUI dialog):
0) DDD format (37.618890N 122.375000W)
1) DMM format (37*37.133'N 122*22.500'W)
2) DMS format (37*37'08.0"N 122*22'30.0"W)
3) Signed DDD format (37.618890 -122.375000)
4) Signed DMM format (37*37.133' -122*22.500')
5) Signed DMS format (37*37'08.0" -122*22'30.0")
6) Zero padded DDD (51.477500N 000.461389W)
7) Zero padded DMM (51*28.650'N 000*27.683'W)
8) Zero padded DMS (51*28'39.0"N 000*27'41.0"W)
9) Trinity House Navigation (51* 28'.650N 000* 27'.683W)
- Use setlocale() to ensure consistent handling of locales and
string handling irrespective of whether or not QCoreApplication
is invoked. Forces a the C locale for numerics and collation,
since many pieces of FG assume this.
- add a button to the main dialog, explaining how to adjust the
fg-root path via the GUI
- tweak the GUI flow to support explicitly changing the path even
when the default path is acceptable.
Under some conditions on my system
aircraft_paths.begin() was equal to scenery_paths.end()
This resulted in neither of them being added to read_allowed_paths
followed by failure to load Nasal scripts from the aircraft directory.
This might happen, if scenery_paths gets allocated just before aircraft_paths
in memory.
Better loop across the desired lists instead of using fancy tricks with
the iterator.
Avoid intermittent race conditions on shutdown when the OSG
pager/Db thread is running. Ensure the OSG threads are stopped before
we start tearing down any scene graph nodes.
- remove some global headers from AI headers, to avoid pollution
- change how ATC owns the ‘player’ FGAIAircraft so reset works
- ensure AIAircraft controllers are cleared on unbind for reset
This is for the FGProperties::getLongitudeString() and
FGProperties::getLatitudeString() functions. The previous algorithm was to
round the degrees up by the smallest fraction required to prevent a round up to
60 minutes or seconds, and then round down the final minutes or seconds by the
same fraction. The new algorithm is to detect if the final minute or seconds
will be rounded to 60 by the string formatting and, if so, the higher unit
(degrees or minutes) is incremented by one, and the lower unit decremented by
60.
Drop fgNormalizePath, use realpath() only
As this makes it accept relative paths, always use the returned
(absolute) version for the actual file operation to avoid check-to-use
races, or where this is not possible (NasalSGPath) explicitly reject
relative paths
Fix: do_save is a write, not a read
* Before setting /sim/aircraft-dir from the --aircraft-dir option,
canonicalize its value with SGPath::realpath() as is already done in
FGGlobals::append_aircraft_path() for the paths given with --fg-aircraft
or via the FG_AIRCRAFT environment variable.
* This fixes a bug when --aircraft-dir is used, due to the fact that
fgValidatePath() canonicalizes its 'path' argument before matching it
against the allowed patterns, and therefore will not validate paths
under the directory specified with --aircraft-dir if this directory has
been given in a non-canonical form by the user (e.g., containing at
least one symlink component).
* This fix does not lower security: the path which is canonicalized has
been explicitely given by the user. This operation is already done for
all paths specified with --fg-aircraft or via the FG_AIRCRAFT
environment variable, via Options::initPaths() which calls
FGGlobals::append_aircraft_paths().
* To reproduce the bug, create a symlink (e.g., /tmp/aircrafts) to a
directory suitable for --fg-aircraft, then run:
fgfs ... --fg-aircraft=/tmp/aircrafts \
--aircraft-dir=/tmp/aircrafts/SenecaII --aircraft=SenecaII
This will trigger many failures such as:
loadxml: reading '/tmp/aircrafts/SenecaII/Dialogs/registration.xml'
denied (unauthorized directory - authorization no longer follows
symlinks; to authorize reading additional directories, add them to
--fg-aircraft)
(from do_load_xml_to_proptree() in flightgear/src/Main/fg_commands.cxx)
I have also tested this with the ec130b4 and the 777-200ER. Same
problem, same fix.