1
0
Fork 0
Commit graph

15804 commits

Author SHA1 Message Date
portree_kid
ce7b5eb094 AI Aircraft not taking off because TowerController signOff was not called. 2022-06-20 21:32:52 +02:00
portree_kid
5a3528f782 Fix segfaults in AI code 2022-06-19 10:28:54 +02:00
Roman Ludwicki
0942cb0b7f Use the correct GUI members for the Data Distribution Service example 2022-06-12 13:42:26 +01:00
James Turner
a46d71930a Launcher: add settings for TerraSync DNS
Add advanced settings to speciofy the TerraSync DNS server.
This shoud allow some work-around of problems with some
ISP DNS.
2022-06-07 23:17:13 +01:00
Julian Smith
28d7308985 src/Viewer/viewmgr.*: fixed bug when /sim/aircraft contains '.' chars.
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.
2022-06-05 19:43:46 +01:00
James Turner
55c9c61fc3 Launcher: add logging around aircraft installs
Trying to understand ‘aircraft not found’ errors around packaged
aircraft
2022-06-01 11:50:38 +01:00
James Turner
8517eda0c9 Ground-cache: throw on NaN inputs
Attempt to provoke FDM NAN issues more directly (eg in Sentry reports),
rather than waiting on SGCardToGeod, etc to blow up inside the
ground cache.

SF-Id: https://sourceforge.net/p/flightgear/codetickets/2743/
2022-06-01 11:50:38 +01:00
James Turner
8ae98ea543 IAXClient OpenAL: clean up our buffers
Avoid a console warning from OpenAL-soft about leaked buffers on
shutdown, by ensuring IAXClient backend does matching cleanup 
for the buffers it allocates.
2022-06-01 11:50:38 +01:00
portree_kid
d571bc6f76 AI Improvements
* 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
2022-05-31 21:23:34 +02:00
Lars Toenning
1a364684e9 Adjust unittest to new SGCallback 2022-05-31 10:18:50 +01:00
James Turner
dbe2734e2c Launcher and startup support for TACANs
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.
2022-05-31 10:18:16 +01:00
James Turner
43e0b3be48 CMake: fix missing header
Original fix by Mariusz Matuszek, adapted by me.
2022-05-25 11:16:44 +01:00
Lars Toenning
71c92c754d Remove FGMakeUpperCase listener
After discussing the problems, it was decided to remove this feature (https://sourceforge.net/p/flightgear/flightgear/merge-requests/295/).
2022-05-25 11:03:52 +01:00
James Turner
7d78c40086 Remove upper-casing of route-manager input
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.
2022-05-25 10:43:08 +01:00
Lars Toenning
5051d90487 Use std::function for callbacks 2022-05-25 10:38:20 +01:00
Erik Hofman
83694eabde Turn OpenVSP CSV forces and moments data into tables 2022-05-23 08:19:10 +02:00
James Turner
fb36cea04c Skip NasalClipboard on test-suite builds
Ticket: https://sourceforge.net/p/flightgear/codetickets/2740/
2022-05-17 14:33:35 +01:00
Jonathan Redpath
c3162c0233 Add failing test for SWIFT8 at YBCS 2022-05-16 14:58:53 +01:00
Jonathan Redpath
564884d27c Test suite: restore cross-platform compatibility by removing unix-specific headers and explicitly casting unsigned ints / unsigned longs 2022-05-16 14:02:11 +01:00
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