1
0
Fork 0
Commit graph

15785 commits

Author SHA1 Message Date
James Turner
3f670c84b1 VSCode applied formatting. 2022-05-16 12:15:05 +01:00
James Turner
15cb5ab075 Fix Windows: include needed for getpid() 2022-05-16 12:14:13 +01:00
James Turner
0df1109d93 Fix warnings / breakage from previous change. 2022-05-11 21:24:37 +01:00
Lars Toenning
961c57b576 Add missing include
Fixes compilation for GCC 12.1
2022-05-11 13:04:11 +01:00
PlayeRom
446299ddaf Fix using SI units like speed in km/h and altitude in meters for flight plan in Launcher. 2022-05-10 16:40:06 +01:00
Julian Smith
6edf68107e src/FDM/YASim/Gear.cpp: use SG_LOG instead of assert fail if contact is incorrect.
Have seen the assert fail when resetting location.
2022-05-08 12:58:58 +01:00
PlayeRom
e72beb3b81 Add Polish translation to org.flightgear.FlightGear.desktop file 2022-05-02 18:19:44 +02:00
Serkan ÖNDER
0dab12281a Add Turkish translations to org.flightgear.FlightGear.desktop 2022-05-02 00:04:50 +02:00
Julian Smith
b40cc51611 src/Viewer/viewmgr.cxx: log video encoding sws_scale() timing info with /sim/video/log_sws_scale_stats. 2022-05-01 15:28:01 +01:00
Julian Smith
d2d3bd5edc src/Viewer/: crude control over thread-cpu affinities on linux.
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.
2022-05-01 15:24:38 +01:00
Julian Smith
a59c94f8be src/Viewer/renderer.cxx: use /sim/thread-cpu-affinity to control thread-cpu affinity.
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
2022-04-30 00:14:00 +01:00
Erik Hofman
0923400e35 Expose the machwave active and offset properties 2022-04-29 15:08:10 +02:00
Erik Hofman
06530a325b Add a utility to recenter all models within a configuration file 2022-04-25 11:59:35 +02:00
Erik Hofman
679d26c272 Very early start of a utility to convert OpenVSP CSV files into JSBSim XML files. 2022-04-25 11:59:35 +02:00
Bertrand Coconnier
60ce826874 Sync'ed with JSBSim v1.1.11
- 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.
2022-04-23 19:18:42 +02:00
James Turner
06063ed82a Fixes for Wake turbulence changes
- add missing <string> include
- fix tests
2022-04-20 10:23:31 +01:00
Bertrand Coconnier
83cad5797e Intercept errors in the matrix inversion routine and report the faulty aircraft in the log. 2022-04-16 13:45:10 +02:00
Bertrand Coconnier
3441c5ef3a Remove floats equality test with zero and fix memory leaks. 2022-04-16 13:26:17 +02:00
Lars Toenning
2ccd9bfb30 [swift] Pass struct to updatePlanes() instead of multiple vectors 2022-04-06 07:53:51 +01:00
Lars Toenning
e35c24af99 Update swift license headers 2022-04-06 07:53:51 +01:00
Lars Toenning
3b40f704fd Add swift unittests 2022-04-06 07:53:51 +01:00
Lars Toenning
9ec7d6b855 swift cleanup 2022-04-06 07:53:51 +01:00
James Turner
7a0be3f000 GUICompat: fix binding activation, close callback
With this change, binding can be activated mostly-correctly from
the compatability layer. Closing still isn't working quite right, more
changes to follow.
2022-03-24 10:36:06 +00:00
James Turner
abb394935d Use type-safe subsystem access 2022-03-24 10:34:12 +00:00
James Turner
a9e09a0ae4 Remove obsolete pre-OSG 3.4 code 2022-03-24 10:34:04 +00:00
Julian Smith
da946fb14c src/FDM/YASim/FGFDM.cpp: allow backwards compatibility of gear contact points/surfaces.
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'.
2022-03-21 15:31:08 +00:00
Julian Smith
5fb8c39057 src/FDM/YASim/YASim.cxx: add gear[]/spring and gear[]/damping properties. 2022-03-21 15:31:08 +00:00
Julian Smith
26695b448c test_suite/unit_tests/FDM/CMakeLists.txt: fixed incorrect header name. 2022-03-20 12:46:11 +00:00
Julian Smith
683501e3bd test_suite/unit_tests/FDM/: added test of new YASim torus gear system.
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
2022-03-19 23:14:58 +00:00
Julian Smith
011b1cc726 src/FDM/YASim/: added support for torus-shaped gear contact surface.
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).
2022-03-19 23:14:58 +00:00
Julian Smith
417332f265 src/FDM/YASim/yasim-test.cpp: Minor improvements to help text. 2022-03-19 23:14:58 +00:00
Julian Smith
04ee8d95f5 src/Viewer/splash.cxx: added some missing braces for clarity. 2022-03-19 23:14:58 +00:00
Richard Harrison
662dad0848 Fix MP Pilot List disappearing
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.
2022-03-17 11:51:52 +01:00
Richard Harrison
360c64c7b7 Remove threaded Nasal garbage collection refs #2674 Nasal corruption:
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.
2022-03-13 21:37:42 +01:00
Richard Harrison
d678d108ce Splash: add visibility condition to images
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.
2022-03-11 18:38:24 +01:00
James Turner
b91b6c4516 Fix Camera ownership for GUI-Manager
We can't assume the default/primary Camera for the View, is the GUI
camera, so add explicit setting to get tooltips and popups working
again.
2022-03-11 12:50:08 +00:00
Richard Harrison
5db4b5c871 Splash-logo fixes for max-width and position
PC9-M looked wrong; reported by Erik
2022-03-10 20:21:17 +01:00
Richard Harrison
bc9291cb02 Splash: fix logic for nightly build.
I thought it would be right to display a nightly build warning for self build also - but now I've changed my mind as it is an irrelevance.
2022-03-10 15:54:29 +01:00
Richard Harrison
e3c2a39420 Define splash screen from property tree
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.
2022-03-10 15:12:34 +01:00
Richard Harrison
de41907532 Use helper method for OSGText alignment mapAlignment 2022-03-10 15:12:34 +01:00
James Turner
4e6f9e6239 Nasal startup: allow more control over loading
Allow excluding scripts entirely based on the startup load properties.
2022-03-09 16:52:19 +00:00
James Turner
0e079a7ebe More #ifdefs around PUI in the UI code 2022-03-09 16:52:19 +00:00
James Turner
7613cb3ce7 Canvas GUIMgr: remove coupling on FGRenderer 2022-03-09 16:52:19 +00:00
James Turner
52731a7c04 Nasal: expose Canvas SpaceItem directly
Allow a SpacerItem to be explicitly created.
2022-03-09 16:52:19 +00:00
James Turner
77501672df Nasal expose propertyValue as a helper
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.
2022-03-09 16:52:19 +00:00
James Turner
cbd5ef9e7b GUI: XML to Nasal bridge, to keep PUI dialogs working
(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.
2022-03-09 16:52:19 +00:00
James Turner
5e0cb1b6e3 Remove some obsolete startup log messages 2022-03-09 16:52:19 +00:00
James Turner
e1cc22090d C++: use override in CanvasSystemAdapter header 2022-03-09 16:52:19 +00:00
James Turner
79f38a5742 Expose new GridLayout to Nasal
Requires up-to-date SimGear which includes the new header.
2022-03-09 16:52:19 +00:00
James Turner
a324ba4b41 Multiplayer: use standard position accessors
Replace manual property query with the standard position
accessors from FGGlobals.
2022-02-26 17:43:15 +00:00