With this change, binding can be activated mostly-correctly from
the compatability layer. Closing still isn't working quite right, more
changes to follow.
We now allow an aircraft to specify both simple gear contact points (which will
be automatically used by old Flightgear builds), and also gear contact surfaces
(which will be automatically used by new Flightgear builds).
When parsing gear specifications, if specified we now use 'wheel-x', 'wheel-y'
and 'wheel-z' in preference to 'x', 'y' and 'z' for the wheel centre point.
These new 'wheel-*' values will be ignored by old Flightgear builds.
So to work with both old and new Flightgear builds, an aircraft should specify
old-style contact points with 'x', 'y' and 'z' as before, and new-style contact
surfaces with 'wheel-x', 'wheel-y' and 'wheel-z', and 'wheel-radius' and
'tyre-radius'.
test_suite/unit_tests/FDM/CMakeLists.txt
test_suite/unit_tests/FDM/TestSuite.cxx
test_suite/unit_tests/FDM/yasim-gear.cxx
test_suite/unit_tests/FDM/yasim-gear.hxx
E.g. run test suite with: -u YASimGearTests::test
Contact surface can now be a torus shaped tyre; we find the part of this torus
that is furthest towards the ground instead of using a fixed contact point.
Torus is specified by radius of wheel centred on original contact point,
orientation of a wheel axle, and radius of torus. If both wheel and tyre radius
are both zero the calculations reduce to a fixed contact point as before.
src/FDM/YASim/FGFDM.cpp
Read new optional <gear> attributes:
wheel-axle-x
wheel-axle-y
wheel-axle-z
wheel-radius
tyre-radius
src/FDM/YASim/Gear.cpp
Added new gearCompression() function that calculates gear compression for
wheel with torus tyre. If new radius values are both zero the calculation
behaves like a contact point as before; we also optimse this case to avoid
the extra matrix operations.
Moved old algorithm into gearCompressionOld() function to allow testing
that new algorithm gives same results when wheel and tyre have zero radius.
src/FDM/YASim/Gear.hpp
Added new members:
_wheelAxle,
_wheelRadius
_tyreRadius
Also declare gearCompression() function so it is available for unit
testing.
Added GearVector struct for caching unit vector and magnitude and use for
_compr and _wheelAxle, so we avoid having to calculate magnitude and unit
vector each iteration.
Clarified that _compressDist is vertical movement of gear. Not useful for
gear animations - one must use compression-norm.
src/FDM/YASim/Airplane.cpp
src/FDM/YASim/Model.cpp
src/FDM/YASim/YASim.cxx
Use g->getContact() instead of manually adding compression vector to
g->getPosition() (which no longer gives the correct contact point).
Ensure that lag/lag-mod-averaged is created and set to a valid value (0) prior to calling the base class init method as otherwise the MPList will have a nil reference.
This needs to be done prior to the base class ::init() because that method sets the model-added property which will trigger the lisetener.
refs: https://sourceforge.net/p/flightgear/codetickets/2674/
Because disabling threaded GC wouldn't result in exactly the same allocation and GC due to changes I made to the GC as part of the threaded GC work the only safe thing to do is to remove it all.
Once we have figured out if it is the threaded GC causing the problem or not then we will at least know what needs fixing.
Using a <condition> images can be hidden now.
Also reworked the logic so that any hidden item will be hidden from creation and not rely on the update logic; as otherwise items can momentarily appear.
Refactor Splash to be data drive using definitions in <content> for the system splash and <model-content> for model related content.
All system splash is at fixed index and should not be changed except for good reason.
Allow other code to map property values to an naRef, without exposing
the generic property node on their API. This avoids creating a wrapper
props.Node frequently for simple value access.
(Disabled by a CMake option)
This builds equivalent C++ objects to what the PUI dialogs build, with
properties exposed to Nasal. Peer objects are created by Nasal callbacks,
which can implement the various dialog functions needed to keep
compatibility, especially the ‘update’ and ‘apply’ hooks.
Create lag/foo properties used by the Pilot-list UI in bind(). This avoids
a race condition where motion info was not yet updated, but Nasal tries
to retrieve the lag properties and errors out.
Flightgear 2020.3 releases use a different encoding for multiplayer information
in Normal recordings (these are saved from in-memory recording data), which
we failed to parse. This commit restores handling of this encoding, enabling
replay of older recordings.
Also when replaying in-memory recording, don't do background in-memory record
of multiplayer information, because this gradually prunes the information that
is being replayed.
from Chris RINGEVAL
https://sourceforge.net/p/flightgear/flightgear/merge-requests/273/
Squashed commit of the following:
commit ea6e808e418533db1a41671c67a7873ddbfcc858
Author: Gonzalo Pesquero <gpesquero@yahoo.es>
Date: Sun Nov 21 17:44:44 2021 +0100
Add translations on splash screen
commit 3c47d771877743692f5d0d63e980d6694a549405
Author: Chris Ringeval <eatdirt@protonmail.com>
Date: Sat Nov 27 16:37:31 2021 +0100
Moon direction vector in the eye frame available to shaders
commit 70728f7ea29dad75c34cad69745021ee927bea31
Author: Chris Ringeval <eatdirt@protonmail.com>
Date: Sun Nov 21 22:18:38 2021 +0100
Add altitude to scolor object as needed by Milky Way texturing