Categorise arguments to ensure user-specified ones take precedence
over values set by the launcher.
When any positional arg is set, exclude all positional ones from being
set at all, to prevent strange interactions.
This simplifies the launcher's rendering since the widget-based
code is gone, various things get hooked up as a result. Styling
fixes everywhere as well.
Menubar on Linux/Windows needs to be re-added.
* Removed the IAS dependency to the Pitot tube angle (real Pitot tube are less sensitive to AoA than was simulated)
* Removed the class FGUDPOutputSocket which was redundant with FGOutputSocket
* Added a new type of functions "template" which are intended to prevent duplication of functions. For now, they are available to compute output values and script notifications.
* Aerodynamics forces can now be specified in stability axes.
* Density altitude and pressure altitude are computed according to ISA standard atmosphere 1976.
New properties:
* Flight path angle (gamma) in degrees
- fdm/jsbsim/flight-path/gamma-deg
* Aerodynamics forces in stability axes
- fdm/jsbsim/forces/fsx-aero-lbs
- fdm/jsbsim/forces/fsy-aero-lbs
- fdm/jsbsim/forces/fsz-aero-lbs
* Aerodynamics moments in stability axes
- moments/roll-stab-aero-lbsft
- moments/pitch-stab-aero-lbsft
- moments/yaw-stab-aero-lbsft
* Pause JSBSim
- fdm/jsbsim/simulation/pause
* Fixed multiple bugs.
Display a warning when the user tries to set arguments in additional
settings which the launcher will also set / conflict with. Blacklist
is still evolving, and we don’t actually prevent the user from running,
since maybe they are doing something special
At a basic level, the implementation supports two levels of LoD:
FAR from /sim/rendering/static-lod/ai-range-bare to /sim/rendering/static-lod/ai-range-detailed.
NEAR from /sim/rendering/static-lod/ai-range-detailed to 0.
(First of many digressions: If /sim/rendering/static-lod/ai-range-mode-pixel=true then instead of measuring LOD distance in meters, the size of the object in pixels is used, so the ranges are different)
The models that are loaded for FAR and NEAR depend on a combination of the availability of a model in /AI/AIrcraft/ and FG_AIRCRAFT directories.
If /sim/rendering/static-lod/ai-range-detailed=false then an AI aircraft will be used in preference for both NEAR and FAR.
If /sim/rendering/static-lod/ai-range-detailed=true then an AI aircraft will be used for FAR, and an FG_AIRCRAFT for NEAR.
Obviously if only an AI or a FG_AIRCRAFT model are available, that will be used for the entire NEAR+FAR range.
Change delay to 15 seconds; and alert that there is a delay.
The 15 second delay should be sufficient to allow the compressor to finish processing; and in anycase this is running in a thread and therefore shouldn't freeze the whole sim for the delay period.
/sim/multiplay/use-detailed-models can be used to set whether
we will prefer models from Aircraft/ (true) or from AI/ (false).
Default (set in defaults.xml in fgdata) is true.
Fixes a perf issue when opening and closing dialogs which uses
bindings, reported by Michael Danilov - huge thanks for his help
in tracking this down.
This bug was caused by the SGBinding ‘don’t delete properties’ change,
since the PUI code was copying nodes to work-around that problem. With
SGBinding fixed, the copying caused huge numbers of nodes under
/sim/bindings/gui
When releasing the RMB over a PUI dialog, we no longer get stuck in
drag mode due to the buttons map getting out of state. This is slightly
ugly work-around, better fix to follow hopefully (needs better OSG
integration)
Make the policy of using models in FGData/AI more flexible, with the
option to prefer normal data sources. Keep the existing behaviour for
everything except multiplayer aircraft, where we now prefer the data
model (presumably, an installed aircraft) over the AI one.
bool[42] and bool[72] used to have two bits (i.e. transmitted twice). This was not harmful just wasteful.
Mapped the first of the duplicated bits of each of these to new bools at the end of the list. These two properties will not be compatible with pre 2018.2.
If all bools in a block are 0 the block would never be transmitted, i.e. fix a bug whereby each block of 0..30 used to need at least one true value to transmit the block.
This should help with a white-screen in the launcher Gijs reported,
due to our Optimus selection symbol interacting weirdly with the
dynamic OpenGL detection in Qt
The typo was introduced in 7e607b8403 from July
2016. The result was a series of alert messages such as:
savexml: writing to 'Path "/flightgear/home/.fgfs/runtime-jetways/0.xml"' denied
(unauthorized directory - authorization no longer follows symlinks)
This allows the sources and headers in src/Main/ to be used by other targets.
They are grouped into the new "Main" flightgear component via the macro in the
FlightGearComponent CMake module. The bootstrap.cxx file with its main function
has been separated out into a separate variable MAIN_SOURCE for use by the fgfs
binary.
All these files have therefore been removed from the test_suite CMakeLists.txt
file, as they are added via FG_SOURCES and FG_HEADERS. The MSVC grouping code
also does not need to deal with the now deleted separate SOURCE and HEADER
variables for these files.
This is for simplifying the main src/Main/CMakeLists.txt file and allowing the
code to be shared with the test suite.
The generated source and header files have also been removed from the main
source list and placed in the CMake module as the global variables
EMBEDDED_RESOURCE_SOURCES and EMBEDDED_RESOURCE_HEADERS.
This required many time related include files, functions, and variables to be
tested for via CMake, and converted to macros via #cmakedefine, so that they
would be automatically set for the test-mktime.cxx file.
Since the new _storagePath data member internally contains the add-on
id, changing _id after _storagePath has been initialized would make both
data members inconsistent. As changing the add-on id is probably not a
very useful operation, the simplest way to prevent such an inconsistency
from happening is to make Addon's _id data member const (as is already
the case for _storagePath), and thus remove Addon::setId().
Consequently, remove the Addon default constructor too, since add-ons
with an empty id would be ill-formed and couldn't be changed (_id being
const now). This leaves us with one Addon constructor:
Addon(std::string id, AddonVersion version = AddonVersion(),
SGPath basePath = SGPath(), std::string minFGVersionRequired = "",
std::string maxFGVersionRequired = "",
SGPropertyNode* addonNode = nullptr);
New methods Addon::createStorageDir() and Addon::getStoragePath() with
corresponding Nasal bindings in the addons.Addon ghost:
createStorageDir() method (returns the dir, doesn't fail if it already
exists)
storagePath read-only attribute to get the dir
The directory reserved for each add-on is
$FG_HOME/Export/Addons/ADDON_ID, but please use the above methods (or
the corresponding C++ ones) to avoid hardcoding such paths in your code.
Also create directory $FG_HOME/Export/Addons in fgInitConfig() as a way
of reserving the namespace, in order to prevent future failures in case
someone would have the strange idea to create it as a file...
It is the call to exit that causes FG to lock up and become a zombie.
Alternative is to throw an exception, i.e.:
throw sg_error(std::string("YASim SOLUTION FAILURE:") + a->getFailureMsg(););
This adds the fix for non converging aircraft. Henning has performed a thorough analysis of all of FGAddon and other repositories and there are a few models that fail, however there have always been a few that fail - but with this patch this situation is improving.
As for aircraft, an add-on can now add its custom dialogs in
$addon_dir/gui/dialogs. This commit makes NewGUI consider this directory
as a dialog-providing one for each registered add-on.
If an add-on has a file named addon-menubar-items.xml in its base
directory, load it and add its items to the FG menubar.
Logically, fgStartNewReset() should call
flightgear::addons::AddonManager::instance()->addAddonMenusToFGMenubar()
in order to re-add the items, however doing so would cause the
add-on-specific menus to be added one more time on every reset, because
for some reason, commit 45ea8b5daa added
the PRESERVE attribute to /sim/menubar (apparently to preserve the state
of menu entries upon reset?).
Note: the addon-menubar-items.xml files are reloaded during reset,
however the menu bar doesn't reflect this, since adding the
reloaded items to the menu bar in fgStartNewReset() would cause
the add-on-specific menus to appear several times in the menu bar,
as explained above.
Preparation for work on the synchronisation and lag prediction filters that jano has underway - firstly by adding a property to indicate the mode of the clock being used. Pre 2018.1 will be mode 0.
Automatic selection in the launcher is disabled for now, since
it needs more testing before release, but the basic UI for selection
is straightforward enough to throw in.
The add-on framework now uses the following files in each add-on
directory:
- addon-config.xml (previously: config.xml)
- addon-main.nas (previously: main.nas)
This is consistent with the addon-metadata.xml file that is already part
of the interface between FG core and add-ons. The goal is to make it
clearer, when browsing an add-on directory, which files belong to the
"FG core <-> add-on" interface and which files belong to the add-on
proper. This will be beneficial also when more files are added to the
"FG core <-> add-on" interface, such as possibly addon-events.xml in the
future.
This change is incompatible, thus it is the right time to do *before*
2018.2.1 is out, especially considering that this upcoming release
already has incompatible changes in the add-on API, namely the
requirement of the addon-metadata.xml file and the type of the argument
passed to each add-on's main() function. We'll try harder not to break
compatibility in the add-on API once 2018.2.1 is out. For now, it is
still a good time to try to get the API as clean as possible.
Prevent FDM-derived properties being sent at full speed (120Hz) which
overloads telnet connections. Instead track dirty properties and
send them at the protocol’s update rate (which is presumably what
the user expects)
the current timestamp used in mp protocol and in AImultiplayer is not a good one:
it can pause, or even change speed if we change warp value.
we want it to be used for network protocol lag and jitter estimation, and
a time flowing linearly on both side is needed, here's a first introduction
of this timestamp relates to real elapsed time.
here it's initialised to the system clock, then follow the monotonic clock.
in future improvement, it will allow time synchronisation betwen mp players,
to have a very good close formation flight experience.