Move the splash screen from the scene root to a camera group camera,
just below the GUI camera. This has a number of advantages, mainly VR
related:
- The splash FBO will only be rendered once per frame. Currently it
appears to be rendered for both near & far cameras, and with
stereoscopic rendering for both left & right (even though it splats
right across both views at the moment), so 2 or 4 times.
- It makes it possible to render the splash fullscreen on the desktop
window, while presenting it on a 3d quad in VR (possibly via an
OpenXR composition layer so the runtime can keep rendering it
smoothly while FlightGear framerate drops during loading.
We were not appending the video container suffix if there was already a '.' in
the name.
Part of this fix is also to simplify the code - if name_in is not "" we don't
attempt to create softlink or append /sim/video/container.
* Parking with point beyond parking so aircraft don't stop early
* Better approach routes (wait pattern)
* Extracting vector math from AIFlightplan
* More use of SGPositioned in ATC
The launcher diagram and navaid-search now include TACANs, using
the current NavCache encoding (DME whose name ends in TACAN). A new
‘—tacan’ option works similar to —vor etc to set position (with
optional offset).
Tuning the Tacan instrument from the command line is not yet supported,
but could be easily added.
upper_case_property causes valueChanged to fire twice, since
SGPropertyNode string storage is now immutable (std::string). This
caused double-processing of for example adding a waypoint in
the route-manager dialog. Since the InputListener already upper-cases
the string, we can simply remove the upper-case property logic.
Detects /sim/affinity-control being set to 'clear' and 'revert' and modifies
all thread affinities accordingly. Only active on Linux.
Also modified meaning of /sim/thread-cpu-affinity. Instead of true/false, we now
expect these values:
'': do nothing.
'none': tell OSG to not set up any thread affinities (same as prev
'false').
'osg': allow OSG to set up thread affinities but attempt to cancel affinity
of main thread afterwards.
This is for investigating bug 2734.
If /sim/thread-cpu-affinity is true or unset on startup, we use default
behaviour where we tell OSG to set up thread-cpu affinities.
Setting /sim/thread-cpu-affinity to false on start up results in all/most
threads being free to run on any cpu core. For example in .fgfsrc or on
command, use:
--prop:bool:/sim/thread-cpu-affinity=false
- Output files are now written in the current directory instead of being written in the aircraft folder (issue GH#337)
- A new exception TrimFailureException is now thrown when trim fails. This eases the detection of the trim failure (previously the exception message needed to be checked).
- An exception is thrown when a latitude higher than 90 degrees is supplied to a <waypoint> control element (PR GH#536)
- Fix the sign of the initial NED climb rate (property ic/gamma-deg) (PR #545)
- JSBSim now checks malformed data in <table> elements. Anything different than numbers and spaces/tabs will be rejected.
- Usage of <location> and <orientation> in engines is now officially dropped (PR #559, #561 and #563). These elements were deprecated long ago in favor of the corresponding elements <location> and <orientation> in thrusters. Therefore the code removed is no-op.
- The computation of the initial rotation rates has been fixed (Issue GH#553). Previously, the rotation rates could be initialized with extremely high values when the vehicle was spawned over the Poles. And for a given set of initial conditions, the initial rotation rates could have different values depending on the initial latitude at which the vehicle was initialized. This now fixed.
- The precision with which values are transmitted thru a socket can now be set via the attribute precision such as <output precision="8"> (PR GH#579)
- Added 2 new methods to FGFDMExec: SetOutputPath and GetOutputPath to specify the path to which the output files will be written.
- All JSBSim exceptions now inherit from JSBSim::BaseException. There still exist std::* exceptions thrown by JSBSim. Cleanup is still in progress.
- JSBSim no longer calls exit() or abort(). Exceptions are thrown instead. This gives the calling application an opportunity to gracefully recover.
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'.
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
FIx some bugs in computing turnExitPos for fly-over waypoints,
and computing leg course when preceeeding leg is a runway.
In both cass we had an incorrect turnExitPos, so points along
the leg were incorreclty positioned.
Extend the test cases to cover this further.
Make the max-flyBy angle configuable, since for exmaple AIrbus uses 90
degrees. Expose this via a new gps/config property, and extend the tests
to verify that angles greater than the fly-by angle behav as fly-over
waypoints.
Extend the RoutePath code to share this configuration, so that route
visualisations match the configured angle.
SF-ID: https://sourceforge.net/p/flightgear/codetickets/2694/
When we don't build any wapy controller, also bail out, rather than
crashing. Jonathan could trigger this with an empty route on the A320,
although no stand-alone test-case so far.
SF-ID: https://sourceforge.net/p/flightgear/codetickets/2695/
Previosu parse had embedded whitespace which is annoying
to parse in other places, switch to using backslash to
seperate terms, similar to how navdaid offsets are defined.
Add a bool flag isRoute to flight-plan, and use it to model
routes (which contain VIAs) from plans/legs, which do not.
Default isRoute to false, so most users only see expanded
Vias, and hence something that can be flown directly.
Allow making the AP source indirect (via a string property),
so that the actual source property can be configured or
adjusted from a -set.xml, or at runtime.
virtual dtor
initialize members before the ctor
config.h is not used
YawTo() is unused
assertSpeed() is unused
initializeFlightPlan() is unused
getTimeString() is unused
get/set is old school
default dtor
YawTo() seems to be unused
ensure all members are initialized
_path and _elevation_m were hiding parent members
config.h is not used
TODO: string compare not via strcmp()
TODO: remove magic number
Handle removal of SGPropertyNode::getValue<const char *>() in
VRManager::Listener<const char *>::valueChanged() by switching the
string listeners and VRManager setter handlers to std::string.
This fixes the following link error when VR is enabled:
ld: VRManager.cxx.o: in function `flightgear::VRManager::Listener<char const*>::valueChanged(SGPropertyNode*)':
src/Viewer/VRManager.hxx:147: undefined reference to `char const* SGPropertyNode::getValue<char const*>(std::enable_if<simgear::props::PropertyTraits<char const*>::Internal, void>::type*) const'
If continuous compression is enabled, we used to compress recovery recording's
data, without setting continuous-compression to true in recording header, so it
would fail to load.
The fix is to compress recording data only if we are making a continuous
recording.
Two affected places:
- the built-in launcher (command line options link);
- package/org.flightgear.FlightGear.metainfo.in.
The previous link points to an old version of the manual.
It doesn't look like menubar items can be enabled/disabled using <property>
or <expression>, so instead we write to the File menu's items tree
/sim/menubar/default/menu[]/name[]/enabled.
We also set /sim/video/encoding-path to '' or path of video file that we are
encoding to.
Improve argument parsing for createViaTo, createViaFromTo to
handle Airway ghosts as well as strings. As part of this, allow
specification of the airway level explicitly when looking
up an airway.
SF-ID: https://sourceforge.net/p/flightgear/codetickets/2686/
geodFromHash() will now respect the _pdirty and _cdirty flags. This
ensres that FGPositioned functions are protected from invalid or
outdated coordinates, and therefore from erroneous results.
This is by Lars Toenning <dev@ltoenning.de>, Roman Ludwicki <romek21@op.pl> and
SDeAstis <salvatore.deastis@gmail.com>, in 2021 Hackathon.
Also cope with removal of SGPropertyNode::getName() - use getNameString()
instead.
Make --view-offset set /sim/view[0]/config/heading-offset-deg instead of
/sim/current-view/heading-offset-deg. Setting the latter has no effect
because of what flightgear::View::createFromProperties() does when it
initializes flightgear::View::View. This was discussed at [1].
[1] https://sourceforge.net/p/flightgear/mailman/message/37406317/
_simple_time_fdm was not being initialised, which was causing occasional hangs
on startup. So set to zero in constructor and TimeManager::init().
For simplicity, we also initialise all other basic type state in the
TimeManager class.
If _simple_time_fdm's starting value happens to be very large (e.g. 1e228),
_simple_time_fdm + fixed_dt would result in _simple_time_fdm, so we would end
up always setting simDt and realDt to zero.
This stops SGEventMgr from processing any events, which means that
initPosition()'s event to call finalizePosition() is never processed so
/sim/position-finalized is stuck on false, which results in the FDM never
setting /sim/fdm-initialized.
This will fix other uses of the APi blocking because the backend
failed to start. Enable debug logging in non-release builds so
it's obvious when the deploymenty is not configured right.