With this patch, the dev can set <max-compression-ft> or <max-compression-m> in the set-file (or another
xml-file that get included from the set-file).
The code calculates also 'compression-m' for every gear.
If the 'max-compression-*' property is omitted, the code behave as before ('compression-norm' is the same as 'compression-ft').
Some of the subsystems created in the fg_init fgCreateSubsystems() function were accidentally
shifted into the subsystem group SGSubsystemMgr::GENERAL, as these subsystems cannot be currently
registered with the subsystem manager and still have to use the non-templated subsystem manager
add() function.
Previously any missing WS30 tiles created multiple OSG WARN
messages from the file not being found. This change does a check
to ensure the file actually exists before put it on the queue for
loading.
AI models have rudimentary collision detection with submodels that performs two tests.
1. The height difference must be less than a defined amount
2. The centre point range must be less than a defined amount.
(2) above by itself would result in a spherical comparison; however (1) effectively modifies this to slice off the top and bottom of the sphere so that the sphere heigh is half of the value in (1).
Previously these heights and lengths were hardcoded - this change allows these to be defined in the xml instead using the <collision-length> and <collision-height> tags
e.g.
<entry>
<type>ship</type>
<collision-length type="double">50</collision-length>
<collision-height type="double">50</collision-height>
</entry>
Default values:
+---------------+-------------+------------+
| Type | Height(m) | Length(m) |
+---------------+-------------+------------+
| Null | 0 | 0 |
| Aircraft | 50 | 100 |
| Ship | 100 | 200 |
| Carrier | 250 | 750 |
| Ballistic | 0 | 0 |
| Rocket | 100 | 50 |
| Storm | 0 | 0 |
| Thermal | 0 | 0 |
| Static | 50 | 200 |
| Wingman | 50 | 100 |
| GroundVehicle | 20 | 40 |
| Escort | 100 | 200 |
| Multiplayer | 50 | 100 |
+---------------+-------------+------------+
This covers all instantiated SGSubsystem derived classes, i.e. those that are
not base classes, including subsystem groups. Both non-instanced and instanced
subsystem creation is tested. The tests for subsystems yet to be registered are
commented out.
Most subsystems are now created via the subsystem manager using the global
subsystem registrations.
The FGGlobals add_subsystem() and add_new_subsystem() methods have been removed
as the subsystem manager addition and creation function interface now exceeds
the functionality of these helper functions.
- The program name is fgfs_test_suite, not run_test_suite.
- Add three examples for particularly useful tasks; be explicit about
how to discover available test names.
- std::endl flushes the stream every time it is used; better use '\n'
in most places (more efficient and takes less space on screen). :-)
- Fix a little regression introduced in commit d2f4807fa2: changing
the standby frequency disabled the low-pass filter for the next call
to updateReceiver(); this must happen when the selected frequency is
changed but not when the standby frequency is changed. This is covered
by the recently-added unit test NavRadioTests::testVORSignalQuality.
- Optimization of the older code: no need to perform a navaid search()
when only the standby frequency is changed.
When the selected frequency is changed or when leaving GPS slave mode,
disable the low-pass filter applied to signal quality. Otherwise, the
following may happen for instance:
- the active frequency corresponds to a navaid whose signal is well
received;
- user makes it so that the Morse code for the navaid ID can be heard;
- user then changes the selected frequency to one that doesn't belong
to a navaid that is close enough to be usable;
- yet, as soon as the frequency is changed, the Morse code for the ID
of the newly selected navaid (if any), even if it is way too far for
its signal to be received, will be very clearly heard for about one
second---and likely truncated.
This is because before this commit, after the frequency change, the
low-pass filter applied to signal quality made the code behave as if the
signal, supposedly coming from the new navaid, were still strong---which
of course doesn't correspond to physical reality. This fixes the bug
reported at [1].
[1] https://forum.flightgear.org/viewtopic.php?f=25&t=40890#p405708
The splash window name was only being set for the default / legacy
camera setup, however if the camera group is set up explicitly in the
configuration XML the splash window wouldn't get set and the splash
would no longer get displayed.
This is fixed by selecting the first referenced window name from a
camera.
A better fix (more closely matching the prior behaviour) would be to
create a splash camera for each created window, however this is proving
difficult to test due to instability with multiple windows, so this fix
will suffice in the mean time.
Fixes: bb0d7fc0a7 ("src/Viewer: Move splash to cam group camera")
Reported-by: Durk Talsma <durktals@gmail.com>
When FG encounters an unknown property id in a MP packet, it discards
the remainder of the packet. This happens when adding new MP properties:
older clients will discard the property and anything that comes after.
This is normally not an issue because newer properties are placed at the
end of the packet.
However MP bool array properties (sim/generic/bool[*]) are transmitted
at the very end of a packet, meaning they get broken (for backward
compatibility) each time a property is added to the protocol.
Fix this by placing them earlier in the packet, with the same ordering
rules as other properties.