Sync'ed with JSBSim:
* Fixed the trim on ground algorithm. Now JSBSim aircrafts should no longer be 'dropped' on the runway at start.
* Removed a correction on the propeller induced velocity that was giving erratic results when the aircraft aero velocity is very small.
* Various source comments updates.
Tentative to fix JSBSim bug SF #115 : don't compute cl-squared when qbar is too low otherwise its value will go through the roof and so will the induced drag.
James Turner [Wed, 25 May 2016 20:48:06 +0000 (21:48 +0100)]
Fallback URL when official catalog is not found.
Tolerate the case where a URL matching the exact FG version is
not found; lookup a generic URL, in the hope it supports our
version (additional changes will make this more likely)
Torsten Dreyer [Wed, 11 May 2016 20:59:59 +0000 (22:59 +0200)]
terrasync.py: cleanup and add some more power
- add option --quick
check sha1sum of .dirindex files and skip directory if hash matches
- add option --remove-orphan
remove orphan files (files exist locally but not on server)
- be less verbose
- write .dirindex files locally
Shift of management of the precipitation OSG scene graph to the scenery manager.
The precipitation branch of the OSG scene graph is now centrally managed by the
scenery manager rather the precipitation manager itself. The scene graph
initialisation from the constructor has also been shifted into the new
FGPrecipitationMgr::sceneGraphSetup() function.
Prevention of the creation of multiple OSG scene graph roots.
As the scenery manager's init() function is called twice on start up, two OSG
scene graph roots would be created. A number of scene graph branches would be
initalised on the first root, but then be lost as the second is created. This
fixes the precipitation branch, for example.
- The first place where indentation is fixed was really misleading, at
least.
- The added comment "'line' may end with an \r character [...]" just
clarifies something that has been there for ages, to avoid people
falling into the trap.
- don't duplicate the line buffer (array of char as well as
std::string), it is not useful here;
- don't corrupt (truncate) input lines longer than 2048 bytes: there is
no such limitation in the apt.dat v1000 format spec;
- fix comments handling: the apt.dat v1000 format spec states they must
start with *two* '#' characters.
- use ( in.getline(...) ) as the main loop condition instead of
( ! in.eof() ). This should behave better (see
<https://gehrcke.de/2011/06/reading-files-in-c-using-ifstream-dealing-correctly-with-badbit-failbit-eofbit-and-perror/>);
- check in.bad() after exiting from each reading loop; if the exit was
caused by an error, log an appropriate message and throw an
exception.
apt.dat parser: separately handle the first two lines; fix line counting
- The first two lines of apt.dat have their own special syntax -> handle
them separately. Before this commit, the test "is the first character
an 'I' or an 'A'?" was done for *every* line of apt.dat, while it is
only relevant for the first one.
- Fix counting of the current line number (it was most of the time
0-based so far, which could be seen in error messages, because the
second line of apt.dat was absorbed without going through the common
code path where lines are normally read at the top of the while loop).
With this commit, line numbers in apt.dat are consistently counted
starting from 1.
Remove useless code before parsing the "row code" (terminology from the
apt.dat v1000 spec). The row code is parsed with atoi(), which will
automatically stop at the first space found if it saw at least one
digit, thus there is no need to replace it with '\0', AFAICS.
One could replace the existing atoi() call with things that do better
checking, but my tests showed that would be a bit slower, so I let it
this way (tried with std::istringstream and strtol()).
Add new method getQnhInHg to ATISInformationProvider and its implementations
to avoid rounding errors converting from hPa back to inches in ATIS reports.
The CurrentWeatherATISInformationProvider (used when live weather fetch is
not in use) continues to use the property environment/pressure-sea-level-inhg.
This produces the incorrect QNH at airports significantly above sea level
but this needs fixing elsewhere to calculate the correct QNH.
Alessandro Menti [Thu, 14 Apr 2016 14:41:19 +0000 (16:41 +0200)]
Launcher: silence 'Unknown aircraft URI scheme' warning on empty selection
------------------------------------------------------------------------
If no aircraft is selected in the launcher, the routine
AircraftItemModel::indexOfAircraftURI is called with an empty QUri,
triggering a warning in the terminal.
This commit removes such warning by ignoring QUris with empty schemes
(the routine still returns an invalid index).
JSBSim: - Fixed the forces/hold-down feature. The velocities are now zeroed when the property is set which should prevent aircraft from drifting as has been reported by G. Agostinho.
- Fixed a bug that was skipping the <system> initialization.
Richard Senior [Wed, 6 Apr 2016 23:58:34 +0000 (00:58 +0100)]
Allow ATIS format specifications to compare tokens against text values
Prior to this change, it was only possible to compare the values of tokens
to each other for use in conditionals, e.g. landing and departing runway.
This change allows comparison of a token to a text value, e.g. to compare
wind speed to zero.
James Turner [Mon, 28 Mar 2016 21:54:24 +0000 (22:54 +0100)]
Fix corrupt HUD fonts
osg::texture2D changes GL_UNPACK_ROW_LENGTH, which fntLoadTXF is not
prepared to deal with. Reset the value back to 0 before loading +
caching TXF fonts on the PLIB side.
Florent Rougon [Sun, 20 Mar 2016 18:56:18 +0000 (19:56 +0100)]
Make --metar automatically imply --disable-real-weather-fetch
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.
Torsten Dreyer [Sat, 19 Mar 2016 20:05:28 +0000 (21:05 +0100)]
Fix "failed to load file: Models/..."
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.