1
0
Fork 0
Commit graph

11034 commits

Author SHA1 Message Date
Vit Hanousek
cc8b981301 Fix const attribute at eletric motor 2020-04-05 19:49:17 +02:00
Stuart Buchanan
dc6fb53596 Correct defaults FLOLS angle from 3 to 3.5 degrees
Adjusted to match the FLOLS model and code.

On carrier approaches 0.5 degress makes a surprising
level of difference!
2020-04-04 18:03:20 +01:00
Stuart Buchanan
5d75933bac add /fdm/yasim/respect-external-gear-state
Previously YASim set /controls/gear/gear-down during startup
depending on whether the aircraft was on the ground or in the air.
As YASim initialization takes place after the overlay is applied,
this over-rode any setting from the overlay.

This change adds a property which can be used by an overlay to
ensure that its /controls/gear/gear-down configuration is not
over-ridden.
2020-04-04 14:55:51 +01:00
Julian Smith
26168e5175 src/GUI/FavouriteAircraftData.cxx: add #include of <memory> to fix compile error. 2020-04-04 11:19:46 +01:00
James Turner
e596eb3716 Launcher: move favourites to its own storage class
This allows viewing/changing favourite-ness from the details view.
2020-04-04 09:20:23 +01:00
James Turner
330422faf3 C++ modernisation tweaks 2020-04-04 08:06:15 +01:00
James Turner
42a8adb07e Traffic: use new-style subsystem lookup 2020-04-04 08:06:15 +01:00
James Turner
1d8cad58db Mouse input: tidy some logic 2020-04-04 08:06:15 +01:00
Richard Harrison
cb08eb6d6d Fix for range animations in the scenery
Reinstate lod/rough and lod/bare and therefore fix the use of range animations that implement hardwired LOD.

Initially I was reluctant to do this - but after a lot more research I'm no longer convinced that range animations cause a huge performance hit and so we can keep this fix until either the scenery is fixed or the situation becomes clear.

Ideally this fix should be reviewed prior to the next LTS release; or maybe after the next LTS release - but in future reviewed it must be
2020-04-04 00:55:12 +02:00
Stuart Buchanan
e0fb27037b Carrier launcher: Usability improvements
- Support for <description> under <entry> in AI scenario
- Carrier icon consistent with UI
- Location "ship" icon toggles between ships and airports.
2020-04-03 21:43:19 +01:00
Stuart Buchanan
6b17604ba8 Carrier launcher: Allow setting altitude 2020-04-03 20:37:37 +01:00
Stuart Buchanan
8a782ea386 Updated Aircraft Carrier iconography for Launcher 2020-04-03 16:16:11 +01:00
Stuart Buchanan
e1f9f6707c Add carrier-take-off and carrier-approach overlays
Adds support for carrier variants of the take-off
and approach overlays, with Automatic selection if
requested.
2020-04-03 16:06:55 +01:00
James Turner
968fbd82e0 Fix typo breaking mag-compass and others 2020-04-03 09:57:13 +01:00
James Turner
f24b886ce4 Launcher: fix favourites loading
Also fix some warnings, closer to no output from the launcher.
2020-04-02 16:13:12 +01:00
gallaert
1ce36af298 - When HLA is enabled in Simgear, HLA is also enabled in Flightgear
making the build between Simgear and Flightgear consistent.
- Fix an issue with lib/lib64 path between CentOS/RedHat distributions
  and Debian derived distributions.
- Fix a compilation issue with HLA in the Flightgear code.
2020-04-01 21:02:24 +01:00
James Turner
5b14d6e495 HID : split out raw logging from event logging.
This makes developing XML config files much easier
2020-04-01 20:43:50 +01:00
James Turner
8bedd52e2b HID: allow raw-descriptor parsing in the XML
Also fix deadband computation (do it after min-max ranging)
2020-04-01 16:32:21 +01:00
James Turner
005ddf7c98 Optimisation: avoid property name lookups 2020-04-01 16:20:29 +01:00
James Turner
4addaa9b00 Fix a warning 2020-04-01 15:30:15 +01:00
James Turner
ca97866dd3 Fix a warning 2020-04-01 15:30:06 +01:00
James Turner
96be636240 Fixing up HID event input on Mac/Windows
Removing old macOS separate input - the HID version is better in
every way.
2020-04-01 15:29:58 +01:00
Jakub Kákona
b4746123bd Merge remote-tracking branch 'upstream/next' into next 2020-04-01 15:51:23 +02:00
James Turner
2904321959 Launcher: favourite aircraft support 2020-04-01 10:47:29 +01:00
James Turner
3060cf10c6 Remove a logging call. 2020-03-31 13:56:01 +01:00
James Turner
8ddf4d6699 Fix reset-data-path dialog logic
Use correct root path key in QSettings, everywhere
Use the direct Win32 API until Qt wrapper is fixed.
2020-03-26 17:35:01 +00:00
James Turner
0483f2996a Simplify Launcher thumbnail display code
Remove old code paths in the AircraftModel/LocalCache, especially
2020-03-26 17:35:01 +00:00
Erik Hofman
a27dfe1feb Move more modern C++ idioms and use std::unique_ptr for moving data ownership around 2020-03-26 09:55:11 +01:00
Lars Toenning
d4b1e42b83
Fix playback duration during replay
Fixes #1856
Playback starts at endTime - duration if checkbox is set to active. Duration and checkbox status will be saved for umcoming sessions.
2020-03-25 17:21:14 +01:00
James Turner
7811b11565 Fix Yasim ground interface recursion bug
The base (non-FlightGear) implementation of YASim ground getBody 
would always call itself. Fortunately we always replace it with the
FG-specific subclass (FGGround).
2020-03-24 22:37:23 +00:00
James Turner
7fe641f3b3 Clang: fix some warnings 2020-03-24 22:37:23 +00:00
James Turner
2c056507ce Launcher: reduce timeout for HTTP updates
This helps download performance from inside the launcher
2020-03-24 22:37:23 +00:00
James Turner
e6e9a091e1 Merge /u/fgarlin/flightgear-src/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/192/
2020-03-24 20:42:16 +00:00
Fernando García Liñán
6f676ee85b Compositor: Added $FG_ROOT/Compositor/Effects as a resource provider. 2020-03-24 19:44:05 +01:00
Richard Harrison
9034ed5d46 Splash Screen fixes:
Specify type for options that are passed into the readRefImageFile (ref: devlist Andreas Mueller 14/03)
2020-03-23 18:10:57 +01:00
James Turner
5dc2f20848 Launcher: fix scanning of aircraft dirs on startup
https://sourceforge.net/p/flightgear/codetickets/2195/
2020-03-23 16:33:39 +00:00
James Turner
86e81735c5 Launcher: fix a typo 2020-03-23 10:06:31 +00:00
James Turner
cb830b70ff Launcher: add setting for texture-cache 2020-03-23 10:06:31 +00:00
Julian Smith
1e330f9445 src/Viewer/ViewPropertyEvaluator.cxx: cope with root node being bool.
Aircraft rah-66 has a bug where it sets root node to type BOOL, which breaks
ViewPropertyEvaluator::getDoubleValue's handling of default values - the string
value of the node is no longer an empty string so we ended up returning 0.0 or
1.0 instead of default_.

The fix is to special-case BOOL. Have also special-cased handling of the root
node, as this is a fairly important part of how ViewPropertyEvaluator works.
2020-03-22 19:26:28 +00:00
James Turner
5f0c10d94d Fix incorrect write() return code handling 2020-03-20 22:24:44 +00:00
James Turner
6849311d49 Own the SGReaderWriterOptions object
Prevents it being unintentionally freed during the read call, causing
a crash depending on the OSG version (some versions take a kung-fu
death grip)
2020-03-20 18:43:21 +00:00
James Turner
162ba266d0 Fix a warning 2020-03-20 11:40:47 -07:00
James Turner
26b527f151 Fix Linux compilation 2020-03-20 11:40:32 -07:00
James Turner
177fc565da Launcher: initial carrier support
Allow selecting carriers from scenarios, and starting at either a
parking position, or a distance offset from the FLOLS (effectively
a crude ‘on-final’)

Extend the —carrier startup option to accept a runway ident of FLOLS,
in conjunction with the existing —offset-distance argument.
2020-03-20 15:51:47 +00:00
James Turner
f903cdfa50 Linux/macOS: use flock() to implement exclusive launch.
Previous implementation wasn’t correct, use a better one now. In the
case of a non-clean exit we will leave a stale .pid file in FG_HOME,
but we clear stale files on the next launch.
2020-03-20 12:08:35 +00:00
James Turner
a22d7943a4 Launcher: set package locale based on user language
This should in theory enable localised strings in catalogs, but need
to validate the full workflow here.
2020-03-17 11:46:26 +00:00
James Turner
ffbbe54cbc Launcher: create popup windows on demand
This avoids some flickering issues on macOS, and reduces resource use 
generally.
2020-03-17 11:14:11 +00:00
James Turner
cf8ec5998e Launcher: disable grid mode for update tab
Since the UI doesn’t work well in grid mode, and the list of updates
is limited, force list mode for the updates tab.

https://sourceforge.net/p/flightgear/codetickets/2172/
2020-03-17 10:00:17 +00:00
James Turner
d52f1b5d47 Improve in-sim launcher behaviour
Restrict the UI to the pieces which make sense.
2020-03-17 10:00:17 +00:00
James Turner
7688007c68 Guard against potential cause of crash:
https://sourceforge.net/p/flightgear/codetickets/2138/
2020-03-17 10:00:12 +00:00
Julian Smith
25a64b2cba src/Viewer/view.cxx: View::recalcLookAt(): Use new view[]/config/eye-fixed tag.
We only look at config/eye-lon-deg-path etc if eye-fixed is true. This tag
should be set to true for all views where the eye position is fixed - e.g. all
Tower views plus Fly-By view in fgdata:defaults.xml.

This allows b26 turret views to work without requiring modifications to the
aircraft (which would break usage with older releases of fgfs).
2020-03-16 21:08:48 +00:00
Julian Smith
368443a4b3 src/Viewer/view.cxx: Fixed Walker Orbit view.
The fix is to add handling of target-lon-deg-path etc in View::recalcLookAt.
2020-03-16 21:08:48 +00:00
Julian Smith
db255233f7 src/Viewer/ViewPropertyEvaluator.*: added getBoolValue(). 2020-03-16 21:08:48 +00:00
Julian Smith
1e07dab5c5 src/Viewer/ViewPropertyEvaluator.cxx: fix getSequenceDoubleValue()'s handling of default value.
If node's string value is '' then return <default_> - used to return 0.0 which
is incorrect.
2020-03-16 21:08:48 +00:00
James Turner
a3d75e8573 Voice synth: reduce some log output levels 2020-03-16 11:07:35 +00:00
Julian Smith
904e55d657 src/MultiPlayer/multiplaymgr.cxx: use SGPropertyNode_ptr to avoid explicit delete.
As suggested by James Turner
2020-03-15 15:30:05 +00:00
James Turner
2dcf9c30bb Further path -> UTF8 fixes for Windows
Requires corresponding SimGear change. With this last round, we work
with FGData on non-Latin1 path on Windows. (Final fixes are for
Nasal io.readfile, which needed io.stat to work, and SGSky allowing
correct SGPath use)
2020-03-15 15:00:55 +00:00
James Turner
36ba1e3dce UTF-8 support: replace Nasal io.stat with our own.
Replace the default io.stat with one which uses our validator, and
uses SGPath to call _wstat on Windows. This does mean we return less
information in the stat() result, but it seems nothing actually uses
the result apart from checking if the file exists.
2020-03-14 21:01:45 +00:00
Erik Hofman
fb348d1a8a Fix a false compiler warnig about brackets not protecting the next if statement 2020-03-14 14:04:22 +01:00
Richard Harrison
b049865cb2 fixes #2123 Relocation splash distorted.
Mark images loaded from splash with origin of splash to prevent use of DDS texture cache and therefore fix distortion by preventing rescale to power of two
2020-03-13 18:30:56 +01:00
James Turner
9389c6564f Nasal geodinfo: warn when scenery is not loaded 2020-03-13 16:46:54 +00:00
James Turner
8edcaa4853 Merge /u/ltoenning/flightgear_sim/ branch fix/2146 into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/190/
2020-03-13 13:53:30 +00:00
James Turner
7e9930e871 Move fnt code from PLIB into 3rdparty
This enables us to fix TXF loading to use UTF8 paths, required for
handling non-ASCII paths on Windows.
2020-03-13 12:21:56 +00:00
Lars Toenning
2c9d64dcc6
Fix broken sound mute function
Fixes #2146
2020-03-13 11:13:30 +01:00
James Turner
e492ddd5a0 Event more local8Bit -> UTF8 fixes 2020-03-13 09:53:49 +00:00
James Turner
27410761f3 Lots of UTF8 path correctness fixes 2020-03-12 14:23:44 +00:00
James Turner
5b41f374c6 L10N fixes: handle UTF8 paths in more places.
Still not complete, but now we set the command line args to be UTF-8 on
Windows, we can strip out more of the ‘local 8-bit’ places (which
screw up, generally).
2020-03-12 10:51:49 +00:00
Erik Hofman
3cb05a9207 Do not try to initialize all 16 joysticks every frame if they where not found previously. Try it once every second instead. 2020-03-12 10:31:38 +01:00
Julian Smith
ab7e7ec7b4 src/Main/globals.cxx: don't load /ai/models/ from autosave.xml file.
This cleans things up if earlier 'next' build as added spurious property items
to autosave.
2020-03-11 21:49:15 +00:00
Julian Smith
20a9953130 src/MultiPlayer/multiplaymgr.cxx: Don't load complete -set.xml of multiplayer aircraft.
When loading -set.xml, we load into temporary 'set' node,
then copy across only set/sim/view[]/config/* values into
/ai/models/multiplayer[]/set/sim/view[]/config/.

This ensures that we have just the information required for multiplayer views,
and avoids problems where some properties in /ai/models/multiplayer[]/ were
being archived to autosave_*.xml and loaded in later flightgear sessions.
2020-03-11 21:49:15 +00:00
James Turner
c12824bc94 Basic Canvas tests, including image pixel ops 2020-03-11 17:14:38 +00:00
James Turner
e509711075 Fix some warnings from current Apple clang
- remove some unused vars
- remove use of std::mem_fn / std::bind2nd
2020-03-10 17:02:08 +00:00
James Turner
40a85cae28 Launcher: fix some warnings, maybe a crash
Avoid binding loop warning, and change logic around re-starting the
aircraft dirs scan, to hopefully clarify the crash Brendan and others
are seeing.
2020-03-10 16:10:55 +00:00
Lars Toenning
e2135369ce Minor code fixes 2020-03-10 14:08:29 +00:00
Lars Toenning
aca625eda2 [swift] Fetching ground elevation for interpolation 2020-03-10 14:08:29 +00:00
Lars Toenning
34915125a1 [swift] Fix frequency casting regression 2020-03-10 14:08:29 +00:00
Lars Toenning
f4b60ccd90 [swift] Code cleanup 2020-03-10 14:08:29 +00:00
Lars Toenning
182df4e6ae [swift] Fix segfault on stopping server 2020-03-10 14:08:29 +00:00
Lars Toenning
ee0d03b4d0 [swift] Fix memory leak in traffic-service 2020-03-10 14:08:28 +00:00
Lars Toenning
eb3fba1871 [swift] Adding swift aircrafts to TCAS 2020-03-10 14:08:28 +00:00
Lars Toenning
d14073cd24 [swift] Adding aircraft to property tree and map 2020-03-10 14:08:28 +00:00
Lars Toenning
e6a9515b59 [swift] Enhancing version compatibility check 2020-03-10 14:08:28 +00:00
Lars Toenning
fc0a8b1c60 [swift] Fix message node 2020-03-10 14:08:28 +00:00
Lars Toenning
0423472f74 [swift] Sending ground elevation 2020-03-10 14:08:28 +00:00
Lars Toenning
cab6581d3d [swift] Pointers to nodes for get/set data
Calling fgSetXY/fgGetXY takes to long (especially when calling the often needed properties a few times per second in main loop).
Switching to pointers for these nodes, initialized within service-class constructor.
2020-03-10 14:08:28 +00:00
James Turner
3f14d53286 FlightPlans: fix save/load of restrictions, deleting legs from Nasal
- Fix Leg ownership to avoid segfaults when deleting them via Nasal
- Modify FP save/load code so restrictions and holds are correctly
  saved and restored

Extend the tests to cover these cases.
2020-03-10 14:00:40 +00:00
James Turner
de172de5b3 Launcher: Fix a typo breaking path re-ordering 2020-03-10 10:28:56 +00:00
James Turner
a405d0508b Fix a dumb allocation bug on Windows 2020-03-09 16:28:22 +00:00
James Turner
410c249ba8 Launcher: enable/disable all add-on types
Allow enable/disable in the UI of everything in the ‘add-ons’ page of
the launcher.
2020-03-09 16:16:50 +00:00
Erik Hofman
32d6f75305 Process the buttons even if the axes are not declared initialized 2020-03-07 09:22:22 +01:00
Slawek Mikula
517cf19ec6 - ATC radio list - adding selectors to radio R1/R2 for corresponding frequencies 2020-02-25 13:08:06 +00:00
James Turner
8126db050a Merge /u/geoffmc/flightgear/ branch msvc-build3 into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/182/
2020-02-24 13:12:15 +00:00
James Turner
219ceacc7a macOS Catalina device filtering 2020-02-24 13:09:36 +00:00
James Turner
ff70578d57 Launcher: Fix a QML warning on startup 2020-02-24 11:33:05 +00:00
James Turner
f14b8ba6d4 Validate Nasal makeTimer arguments
When the callback arguments can’t be validated,
catch is and actually report a failure, instead of creating a
non-functional timer object
2020-02-24 11:33:05 +00:00
James Turner
a3731875a1 Make Launcher ratings settings persistent 2020-02-24 11:33:05 +00:00
Stuart Buchanan
1f0c21a371 Warn when Nasal module not set in defaults.xml 2020-02-19 20:32:22 +00:00
Erik Hofman
e4c393ba9c Revert delayed running of fdmex for in-air starts since it does more damage than good. 2020-01-31 10:03:31 +01:00
James Turner
12cd2d8e9b Merge /u/legoboyvdlp/flightgear-src/ branch fix-segfault into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/188/
2020-01-30 10:42:18 +00:00
jano
395a654692 make the aiship speed respect strictly the target speed when close enough, should improve drifting carrier on mp 2020-01-28 11:03:20 +01:00
jano
c770358f13 added the velocity for the ufo, used in lag compensation 2020-01-28 11:03:20 +01:00
Erik Hofman
6df768fa5f Store the initial axis values and if just one of them changes declare the joystick initialized 2020-01-27 18:12:09 +01:00
legoboyvdlp R
b920a09fcf Correct whitespace in NasalPositioned.cxx; fix segfault in NasalPositioned by adding null check in the legGhostGetMember method; add test case for segfault 2020-01-27 16:27:46 +00:00
Stuart Buchanan
f6285bc528 Fix directional lights for AMD
Some AMD drivers do not like triangles for point sprites, which
breaks directional lights.  This works around this by allowing
users to set /rendering/triangle-directional-lights=false which
falls back to the non-directional implementation of a point.
2020-01-27 09:30:09 +00:00
Erik Hofman
65a20b5829 Read the raw values and check them against the saturation value, if one of them is larger then initialization of the joystick is still in progress. 2020-01-27 09:15:53 +01:00
Erik Hofman
2d0b44ee63 If js is valid (again), create a new instance of jsJoystick so removing an joystick from and USB port and attaching it again get the joystick in a working order. 2020-01-26 17:44:19 +01:00
Erik Hofman
d4459c8205 Fix a typo 2020-01-26 14:30:24 +01:00
Erik Hofman
3405ea2aaa Joystick axes can get initialized to extreme values, at least on Linux. Hold of working with the axis values until all values have become sane at least once 2020-01-26 14:10:07 +01:00
Bertrand Coconnier
973bf32074 [JSBSim] Added the ability to log properties in a CSV file. 2020-01-25 16:05:30 +01:00
Erik Hofman
cf5bfc5dd9 On-ground trimming needs fdmex active while in-air trimming does not for reliable operation. This might be a problem within the trimming routines but for now this works. 2020-01-23 11:54:33 +01:00
Erik Hofman
1cc0d9e97f Fold of running JSBSim until after the trimming routine. 2020-01-22 14:54:11 +01:00
Erik Hofman
123eb41819 Copy the initial properties a second time after initilization. 2020-01-22 14:53:27 +01:00
Erik Hofman
2d2d5dbb76 Switch to C++11 threads, mutexes and lock_guards. Switching to C++11 condition_variables requires some more thought. 2020-01-22 13:45:28 +01:00
Erik Hofman
94b12aa992 Postpone running the simulation until after initialization and do an extra trim right after creation to properly initialize the output parameters. 2020-01-18 14:29:17 +01:00
jano
db295a9afc introduction of a zero lag mode when pilots are synched in time, eg using ntp. 2020-01-14 11:10:28 +01:00
Jakub Kákona
1822d003db Add electric engine support to YASim. 2020-01-11 23:02:33 +01:00
Geoff McLane
03ed61509c Use CMAKE_MSVCIDE_RUN_PATH to allow the add_custom_target to run
This is only for a MSVC build - sets the runtime path for the exe run in
the following 'add_custom_target( ... run fgrcc ...)' ...

	modified:   src/EmbeddedResources/CMakeLists.txt
2020-01-11 20:27:21 +01:00
Bertrand Coconnier
90a04a4baa [JSBSim] Relax the assert when trying to clip with max < min.
Throwing an exception was too harsh. Instead the clipping is ignored and a warning message issued.
2019-12-30 00:30:26 +01:00
Scott Giese
a9365cd34e Embedded Resources: Fix for Ninja 1.9
Refactor to break circular references.
New custom target generates the resource files.
FGFS and Test_Suite targets declare a dependency to the generated files.
2019-12-26 01:26:44 -06:00
James Turner
be628b36b7 Allow add/remove of IO channels at runtime
Commands:

	add-io-channel
	remove-io-channel
2019-12-19 00:00:41 +00:00
James Turner
f76709a853 Save settings on Launcher window close.
Patch by Slawek Mikula, from:
https://sourceforge.net/p/flightgear/codetickets/2158/
2019-12-17 22:47:50 +00:00
James Turner
ba36bd90e0 Launcher respects —enable-fullscreen arg
Patch by Slawek Mikula from:
https://sourceforge.net/p/flightgear/codetickets/2162/
2019-12-17 22:40:25 +00:00
James Turner
c48c1a06e8 Look for protocols in aircraft paths
Modified from patch by Slawek Mikula
2019-12-17 22:34:19 +00:00
James Turner
fad9f7068f Expose canvas::Image pixel funcs to Nasal 2019-12-17 22:06:35 +00:00
Scott Giese
93a1d5e2d1 Fix HUD scale 2019-12-15 18:58:19 -06:00
Scott Giese
51f6a25a04 Obsolete: dynamic exception 2019-12-15 16:39:49 -06:00
Scott Giese
a14923cea0 Maintainability: Anticipate future types 2019-12-15 16:38:45 -06:00
Scott Giese
c97ad0182b Prevent buffer unterminated buffer 2019-12-15 16:37:44 -06:00
Bertrand Coconnier
e1ecab0a15 [JSBSim] Do not initialize properties that already exist.
That, among other things, triggered a bug where the aircraft spawned with gears up whatever the initial setting was.
2019-12-15 11:53:45 +01:00
Bertrand Coconnier
2f5edf6558 [JSBSim] Supplement to the fix for the initialization issue.
One of the output node was lost in the process. Tested it myself with the Space Shuttle: this additional commit makes the error disappear.
2019-11-17 19:25:56 +01:00
Bertrand Coconnier
9782d9e65a [JSBSim] Tentative fix for initialization issues reported in the ML.
Nodes might be uninitialized when a channel is initailly disabled. To work around that issue, the initialization of the output nodes is forced at creation.
2019-11-17 17:51:19 +01:00
Bertrand Coconnier
88ca381e83 [JSBSim] An improvement and 2 bug fixes
- Electric engines RPM is now exported in UDP sockets.
- The sign of the XZ inertia has been fixed in the property inertia/ixz-slug_ft2 (was just an output error, the correct XZ inertia was used internally). Thanks to Nikolai Verner Christensen for reporting the bug.
- The parameter <ignitionn2> was wrongly affected to N1. Bug reported by Nikolai Verner Christensen and fixed by Jonathan Redpath. Thanks to them.
2019-11-17 12:33:28 +01:00
Bertrand Coconnier
b4bb24f10e [JSBSim] Fixed the displacements resulting from modifications of the mass distribution while the aircraft is sitting on ground (bug GH #230 reported by Gijs de Rooy). 2019-11-10 16:10:47 +01:00
Edward d'Auvergne
4105b70f74 Options: Only set the logging priority if the command line option is supplied.
This prevents the changing of the logstream priority as set by the test suite
permanently to "alert" during the execution of tests.  Setting a default value
of SG_ALERT is not required as this is the simgear logstream default anyway.
2019-11-08 13:59:17 +01:00
Edward d'Auvergne
0f0361efb8 Options::setupRoot: Removal of the logic that fg_root is currently not set.
This allows the test suite to preset fg_root using its own bootstrapping logic.
2019-11-08 13:59:16 +01:00
Julian Smith
f4fcf43ffa src/Environment/metarproperties.cxx: better formatting for METAR description.
Pass tabstops=-1 to getDescription() makes it use single space for tabs, which
gives better output when used with proportional font.
2019-11-06 19:56:30 +00:00
Erik Hofman
9644966dfd Also add pressure to the mix 2019-11-04 15:19:10 +01:00
Erik Hofman
c739d47793 Parse the current temperature and humidity to the sound code for proper sound velocity and distance attenuation (with ditance based frequency response filtering). AeonWave only. 2019-11-04 14:57:43 +01:00
Julian Smith
88644185b3 src/Main/metar_main.cxx: added -s option to decode explicit METAR string without contacting server. 2019-10-31 22:53:41 +00:00
Julian Smith
4b1cfbc5ed src/Main/metar_main.cxx: use SGMetar::getDescription(). 2019-10-31 22:49:09 +00:00
Julian Smith
191f53ff5e src/Environment/metarproperties.*: put human-readable metar description into properties.
We set /environment/metar/description to human-readable description of metar,
for use by fgdata's weather dialogue, using simgear FGMetar's new description()
method.
2019-10-31 16:50:01 +00:00
James Turner
68a72f22f2 Fix a copy-paste-bug in a Nasal error 2019-10-20 13:08:47 +01:00
James Turner
26b9cce6a3 Quiet false-positive tied-listener warnings
Use a new SGPropertyNode flag, LISTENER_SAFE, to white-list properties
where we do correctly fire listeners, and test this flag when listening
from Nasal, to avoid the warning.
2019-10-20 13:08:47 +01:00
James Turner
a18dda21ef Fix a GCC warning: catching exception by value 2019-10-20 13:08:47 +01:00
James Turner
3bb7a25580 Merge /u/daniel-me/flightgear/ branch pg-fix2 into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/180/
2019-10-19 11:12:34 +00:00
James Turner
0e082d5c46 Tweaking macOS HID code to avoid a Catalina crash
Not certain what’s going on here, this is testing a theory that
deleting a HID queue which has never been started, might behave badly.
2019-10-17 00:01:59 +01:00
James Turner
45fbdaa9c9 Starting tests for RNAV/procedures
One test so far, attempting to reproduce a bug I see with the 737.

Note these tests are skipped unless you have procedures available
and set a magic env var to find them.
2019-10-16 23:28:52 +01:00
Daniel Meissner
315d38566e YASim: Fix to the Prandtl/Glauert and Wavedrag features. Simplifies the model and resolves NaNs and sim crashes in supersonic flight 2019-10-16 22:59:16 +02:00
Bertrand Coconnier
73b7e94358 [JSBSim] Bug fixes
* Functions <random/> and <urandom/> are no longer considered constant.
* <clipto type="cyclic"> now clips negatives values correctly.
2019-10-13 14:18:09 +02:00
James Turner
18c19885c6 Improvements to Nasal hold API
Ensure changes from Nasal are picked up by delegates (such as GPS) when
they are made. Add a route-manager test which sets and exits a hold
using Nasal.

As part of this, update the test API to make it easy to run Nasal from
a test.
2019-09-24 11:29:05 +01:00
James Turner
12cccf043a Nasal interface to hold waypoints 2019-09-23 23:01:12 +01:00
James Turner
5ce8a942bf RNAV / GPS hold support
The GPS/RNAV system can now fly holds, both left and right-handed.
The correct entry is selected, and hold count can be selected.
Also there's lots of lovely test cases.
2019-09-23 23:01:12 +01:00
James Turner
15c101efe4 GPS detects being repositioned
Avoid screwing up the derived / trend data when we are repositioned;
detect instantaneous position changes and don’t update the trend
data in this case.
2019-09-23 23:01:12 +01:00
James Turner
45df8f51b2 Move GPS sequencing into Nasal (optionally)
GPS now lets the delegate handle the sequencing behaviour, by
setting a new config property. The default GPS delegate (in Nasal)
now sets this property.

This requires a corresponding FGData update.
2019-09-20 13:05:57 +01:00
James Turner
833cc61293 GPS intercept tests 2019-09-20 09:50:55 +01:00
James Turner
2434c037c8 Improve Leg mode course/track computation 2019-09-19 17:27:13 +01:00
James Turner
2fe91430a3 Fix direct-to course -deviation sign 2019-09-18 23:42:39 +01:00
James Turner
2d89cb2390 Nasal: Log names of stranded persistent timers 2019-09-18 23:42:39 +01:00
James Turner
dbbebc8f7e Tolerate missing scenery (happens in unit tests) 2019-09-18 23:42:39 +01:00
James Turner
810d2e0b13 Set default GPS overflight sequence distance 2019-09-18 23:42:39 +01:00
James Turner
30b8bdc081 Fix warnings from newer Clang 2019-09-18 23:42:39 +01:00
James Turner
317e9f8cc0 Fix some GPS issues discovered while testing
- set wp[1] properties immediately (don’t require an update cycle)
 - direct-to course-error is correct when init-ing the Direct-To; it
   was previously wrong when beginning the DTO, due to invalid course
   between identical SGGeods.
2019-09-18 23:42:38 +01:00
James Turner
12ac14be0e Change a warning level 2019-09-18 23:42:38 +01:00
James Turner
492707a756 Flightplan-nasal alias a name for readability 2019-09-18 23:42:38 +01:00
James Turner
3b34158998 Fix member/local var mismatch in RNAV code 2019-09-18 23:40:36 +01:00
James Turner
a3e66d1ae3 Fix GPS ident overflow bug 2019-09-18 23:40:36 +01:00
James Turner
e15d67e637 TestPilot helper in the test API
Use this in the GPS tests.
2019-09-18 23:40:36 +01:00
Scott Giese
8120dcb4c9 Fix compile issue on Win10 VS2019 2019-09-16 23:33:28 -05:00
Daniel Meissner
44e1f43e91 YaSim: add compressibility effects (Prandtl/Glauert correction factor on surface elements and
FlowRegime to wing definitions). (Daniel)
//amended according to James hints: change initializer to float constants, fix indention issues, add Math::polynomial and use it in Surface. (Henning)
2019-09-06 16:11:10 +02:00
Julian Smith
335547160c src/Main/fg_init.cxx: use /sim/log-file-line to control output of file:line in logs.
We call sglog().setFileLine() in response to changes to /sim/log-file-line.
2019-09-04 10:55:43 +01:00
Julian Smith
10414fada4 src/GUI/new_gui.cxx: NewGUI::setStyle(): remove old nodes before copying across new style.
Previously old nodes that weren't in the new style, would be left in place,
leading to a confusing mix of styles sometimes.
2019-09-04 10:55:43 +01:00
Julian Smith
f3d1135320 Various fixes for building on OpenBSD. 2019-09-04 10:55:43 +01:00
Julian Smith
331ef3232f src/Input/FGEventInput.cxx: FGEventInput::AddDevice(): fix incorrect use after delete.
Moved delete of inputDevice to after its use in a SG_LOG diagnostic.
2019-08-31 14:19:16 +01:00
xDraconian
6ce33fcb5c Merge /u/ferranobon/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/171/
2019-08-28 02:52:57 +00:00
legoboyvdlp R
eafe5dadc0 Modify the update rate of the closest airport with METAR to 10 seconds. 2019-08-27 20:42:23 +01:00
Scott Giese
1ede51f3f6 Improved OSG Version detection. 2019-08-26 17:45:16 -05:00
Bertrand Coconnier
4f5f0f63fd [JSBSim] <table> independent vars are now late bounded.
The existence of the property that is used for <table> independent vars is now checked during execution rather than when the XML definition is parsed. This relaxes the order in which filters, table and more generally flight controls need to be declared in the XML definition files.
2019-08-17 13:58:31 +02:00
Julian Smith
47eda6e539 src/Viewer/viewmgr.cxx:FGViewMgr::FGViewMgr(): avoid possible SEGV in previous commit.
It seems that sometimes /sim/current-view/view-number doesn't yet exist.
2019-08-14 16:00:44 +01:00
Julian Smith
f71624e170 src/Viewer/viewmgr.cxx: allow aircraft to set initial view number.
E.g. fgaddon/Aircraft/Icaro_MRX13/Icaro_Laminar_13_MRX-set.xml sets
/sim/current-view/view-number to 9.

It seems that recent View changes broke this, but this fix is in unchanged
code.
2019-08-14 11:07:32 +01:00
Richard Harrison
fa0fb9bc06 Merge /u/cgdae/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/173/
2019-08-13 03:56:33 +00:00
Julian Smith
e6cfb56de0 src/Viewer/view.cxx: fix for regression in handling of /sim/current-view/?-offset-m.
Prior to the recent multiplayer view changes, /sim/current-view/?-offset-m
contained the current view's offsets from /sim/view[]/config/?-offset-m. The
multiplayer view changes modified things to set /sim/current-view/?-offset-m
to zeros, and instead use /sim/view[]/config/?-offset-m. This was so
that multiplayer views could be implemented simply by prefixing with
/ai/models/multiplayer[]/set/ to get the right offsets.

We still added in /sim/current-view/?-offset-m, but these were usually zero.

However some aircraft write to /sim/current-view/?-offset-m, and assume that
values must include the /sim/view[]/config/?-offset-m. E.g. the spaceshuttle
does this in order to simulate SRB shaking. This results in the offset being
included twice, which breaks things.

So this commit restores the original handling of /sim/current-view/?-offset-m
by doing an additional subtraction of /sim/view[]/config/?-offset-m. It also
avoids resetting /sim/current-view/?-offset-m to zeros when the view changes.

This results in views working for user aircraft, user aircraft that do custom
view handling, and multiplayer aircraft.
2019-08-12 17:59:49 +01:00
Bertrand Coconnier
0b56397562 Sync'ed JSBSim
- [Backward compatibility breakage] Gyros are now measuring rotation rates instead of rotational accelerations. Gyros that measure rotational accelerations do not exist in the real world.
- Output properties of flight control elements are no longer tied. This saves a lot of spurious warning messages and allows direct references of the same properties among several flight controls.
- Water vapor in the atmosphere is now managed through its mass fraction rather than its partial pressure. The former being the physical quantity that is conserved when pressure and temperature vary.
- Check that there are at least 3 contacts before trying to trim on ground.
- ECEF to ECI frame conversion has been moved from FGLocation to FGPropagate and FGInitialConditions since not all FGLocation need to manage that.
- Gravity computations have been moved to FGInertial because it is where all the constants to compute gravity are stored. This reduces the amount of data transmitted between FGInertial and FGAccelerations.
- Added optional transmission of the simulation time for FG UDP interface
- Code cleanup and use more C++11 idioms (override, constexpr, range-based for loop, etc.)
2019-08-10 13:10:28 +02:00
Julian Smith
377d1c9464 src/Viewer/view.cxx: improved zooming in Tower View AGL.
We now keep the aircraft in view when zooming, sacrificing the view of the
ground. I.e. we move the bottom of the view upwards, while keeping the top of
the view unchanged.
2019-08-10 00:02:44 +01:00
Julian Smith
1facdee3f6 src/Viewer/view.cxx: In Tower View AGL, fixed handling of aircraft with no chase-distance.
Recent changes to ViewPropertyEvaluator mean that
ViewPropertyEvaluator::getDoubleValue() doesn't handle default values very
well, so we were ending up with chase-distance of zero, not the default -25,
leading to over-zooming.
2019-08-09 14:02:29 +01:00
Julian Smith
4f4a793f80 src/Environment/environment_mgr.cxx: update nearest tower more frequently.
Changed interval from 30s to 10s - it appears to take only around 0.1ms so this
seems ok and improves the user experience.

---------------------
2019-08-09 12:56:19 +01:00
Julian Smith
a89fbc40aa src/Viewer/view.*: avoid confusing zooming artifacts in Tower View AGL mode.
Un-caching of scenery appears to happen fairly often, and means that we fail
to find height of ground under aircraft, so we now go back to the last found
value instead of using zero.
2019-08-09 12:56:19 +01:00
Julian Smith
e3b3f40f0a src/Viewer/view.*: in Tower View etc, use tower nearest to the multiplayer aircraft. 2019-08-09 12:56:19 +01:00
Julian Smith
c2f542b085 src/Environment/environment_mgr.cxx: find nearest airport/tower to viewed multiplayer aircraft.
This allows Tower View etc to use nearest tower when vewing remote multiplayer
aircraft.

Also force an update of nearest airport whenever multiplayer view changes, to
reduce delay before Tower View works.
2019-08-09 12:55:24 +01:00
Julian Smith
da5fe03851 src/Viewer/ViewPropertyEvaluator.*: added support for dumping info about a single spec. 2019-08-08 11:31:44 +01:00
Julian Smith
83e98653c7 src/Viewer/view.cxx: fix fly-by view offset.
Need to treat /sim/view[]/config/root="" as "/".
2019-08-08 11:30:30 +01:00
Julian Smith
3b77ca4ce8 src/Viewer/view.: removed some now-unused code. 2019-08-08 11:30:12 +01:00
Ferran Obón Santacana
a0f47c151c Fix shadowing of static variable in ITM adiff() function 2019-08-07 16:02:45 +02:00
Julian Smith
af538746ac src/Viewer/viewmgr.cxx:FGViewMgr::setView(): don't call update(0).
This fixes transient view corruption when view is changed (e.g. by v or V).
2019-08-05 07:33:26 +01:00
Julian Smith
92c934f410 src/Viewer/ViewPropertyEvaluator.*: fixed bug with non-existent property nodes.
The fix is to call globals->get_props()->getNode with create=true, so that we
get to hear about changes to property nodes that do not currently exist.
2019-08-05 07:33:26 +01:00
Julian Smith
f00cfeaa02 src/Viewer/view.cxx: use /sim/current-view/view-number-raw.
Requires latest fgdata, and fixes problem with non-sequential view numbers,
e.g. on 777.
2019-08-05 07:33:26 +01:00
Torsten Dreyer
ca2072bf74 silence a warning (initialization order) 2019-08-01 17:34:11 +02:00
Torsten Dreyer
2ba77f7f73 ints can't be NULL 2019-08-01 17:29:12 +02:00
Torsten Dreyer
d34bcf0422 whitespace formatting issues. No functional change 2019-08-01 17:26:43 +02:00
Scott Giese
f55d7c3c37 [ViewPropertyEvaluator] assert does not compile. 2019-07-29 10:31:33 -05:00
Richard Harrison
e8a50475ec Mutiplayer: increase log level for potential problems;
This is partly experimental to see how often these occur; but also errors in MP packets should be more visible to the developer.
2019-07-29 14:33:45 +02:00
Julian Smith
d71f8daa86 Revert "src/MultiPlayer/multiplaymgr.cxx: don't overwrite /sim/multiplay/visibility-range-nm if already set."
This reverts commit 4a067e721f.
2019-07-27 15:42:17 +01:00
Julian Smith
f770dc1c50 src/Viewer/viewmgr.cxx: FGViewMgr::unbind(): call new ViewPropertyEvaluator::clear().
Frees all ViewPropertyEvaluator's SGPropertyNode_ptr's.
2019-07-27 08:47:28 +01:00
Julian Smith
dfb94c6cc6 src/Viewer/view.*: use new ViewPropertyEvaluator system.
Allows recently-modified multiplayer View code to run without overheads.
2019-07-27 08:47:28 +01:00
Julian Smith
bf29e469b0 src/Viewer/ViewPropertyEvaluator.*: added ViewPropertyEvaluator system.
Evaluates and caches nested properties.
2019-07-27 08:47:17 +01:00
Julian Smith
e778848dcb src/Viewer/view.cxx: fixed breakage of /sim/current-view/internal.
Breakage was introduced by the Tower AGL / multiplayer view changes.
2019-07-26 18:59:59 +01:00
Bertrand Coconnier
2fe0137e92 [JSBSim] Fixed a actuator SEGFAULT when triggering "hardover" without specifying <clipto>. 2019-07-24 23:15:40 +02:00
Julian Smith
f666a551b3 src/Viewer/view.cxx: Fix bad initialisation of SGVec3d's.
SGVec3d's default constructor leaves the fields uninitialised, which seems to
sometimes break fg with lots of NaN-related diagnostics.

The fix is to use SGVec3d::zeros() instead.

Also call resetOffsetsAndFOV() from the View::View() constructor, to ensure
that things are set up consistently.
2019-07-22 14:05:54 +01:00
Julian Smith
9a67910899 src/MultiPlayer/multiplaymgr.cxx: don't create view 8.
View 8 used to be new Tower View AGL view, but this interfered with hard-coded
aircraft view numbers. So fgdata now has removed Model View, meaning Tower
View AGL uses Model View's old number (7), which keeps sequential view numbers
unchanged.
2019-07-20 22:04:35 +01:00
James Turner
ed0a009224 Merge /u/cgdae/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/166/
2019-07-18 20:21:36 +00:00
James Turner
f643100dad Avoid a warning when inserting nil into a FP
This avoids the warning when procedure construction fails, and we have
a nil result rather than an empty vector as the arg.
2019-07-15 14:37:29 +01:00
Julian Smith
5990ba92f8 src/MultiPlayer/multiplaymgr.cxx: use std::initializer_list instead of C array.
After review. This simplifies iterating.
2019-07-04 13:16:22 +01:00
Julian Smith
2888eb00de Various fixes to view/multiplayer code after review.
src/MultiPlayer/multiplaymgr.cxx
src/MultiPlayer/multiplaymgr.hxx
    removed starts_with() and ends_with() - already provided in simgear::.
    removed output() fn for SGPropertyNode, as unused.
    added makeStringPropertyNameSafe().
    FGMultiplayMgr::addMultiplayer(): use std::find_if() to find model file.
    added FGMultiplayMgr::subsystemName().
src/Viewer/view.cxx
src/Viewer/view.hxx
    removed getDoubleValue() as not required.
    moved agl code into new View::handleAGL() fn.
    renamed View::Damping::setGet() => View::Damping::updateTarget().
2019-07-04 13:16:22 +01:00
Julian Smith
a0ee3a4cc4 src/Viewer/renderer_legacy.cxx: fixed compiler warning about initialisation ordering. 2019-07-04 13:16:22 +01:00
Julian Smith
4a067e721f src/MultiPlayer/multiplaymgr.cxx: don't overwrite /sim/multiplay/visibility-range-nm if already set.
This allows it to be set e.g. in ~/.fgfsrc with --prop.
2019-07-04 13:16:22 +01:00
Julian Smith
5772325bc6 Allow most default views to work on multiplayer aircraft as well as the user's aircraft.
Currently this works for all the default views except for Tower Look From (for
which it doesn't really make sense) and Fly-by View.

We now search for and load a -set.xml that matches the model .xml,
when new multiplayer aircraft is set up. This allows us to find view
offsets etc, e.g. allowing cockpit and helicopter views to work with
multiplayer aircraft. Properties from the -set.xml are placed into
/ai/models/multiplayer[]/set, so for example viewing offsets are in
/ai/models/multiplayer[]/set/sim/view[]/config/target-{x,y,z}-offset-m. We also
copy the aircraft's chase-distance into the view config params, similar to how
fgdata:defaults.xml does for the user's aircraft. And we also fill in views'
missing offsets from the Helicopter View config; e.g. this enables the new
Tower View AGL to show aircraft correctly centred, despite aircraft currently
not having this view defined in their -set.xml. [We don't currently attempt to
cache or reuse -set.xml data.]

Have ensured that view position responds to mouse movement in the same way for
viewing the user's aircraft as for multiplayer aircraft (previously, Model View
reversed the affect of vertical mouse movements).

Added new Tower AGL view. Behaves similarly to Tower view, but automatically
scales and pans vertically in order to always show the vertical range
extending from just above the aircraft down to the ground immediately below
the aircraft. We use aircrafts chase-distance as an indication of size. We
damp the ground level value to reduce the viewing jumping around too much
e.g. if the aircraft flies over buildings. The amount of damping is set by
fgdata:defaults.xml's lookat-agl-damping value.

Fixed problem where Tower View eye position moves slightly as target
aircraft heading changes. This was caused by us unnecessarily applying the
aircraft-centre correction to the eye position.

src/FDM/flight.cxx: also make /orientation/true-heading-deg. This allows
local orientation to be used like multiplayer orientation, which only
has /ai/models/multiplayer[]/orientation/true-heading-deg. [A better fix
might be to replace all occurrencies of /orientation/true-heading-deg with
/orientation/heading-deg, but this would be a rather large commit.]

Details:

src/Viewer/view.*: removed View::updateData() as is no longer required.

src/MultiPlayer/multiplaymgr.cxx: use helicopter view target offsets as
defaults. E.g. in tower view agl, aircraft won't currently be defining these
offsets. More generally, this allows aircraft to define target offsets only in
helicoter view.

src/FDM/flight.cxx
    FGMultiplayMgr::FillMsgHdr(): Added tie of /orientation/true-heading-deg to
    get_Psi_deg, so it duplictes the existing /orientation/heading-deg.

src/MultiPlayer/multiplaymgr.cxx
src/MultiPlayer/multiplaymgr.hxx
    FGMultiplayMgr::addMultiplayer(): look for and load -set.xml that matches
    the model. Patch various view-related things up in similar way to what we
    do for the user's aircraft, so that multiplayer views work.

    Made FGMultiplayMgr::getMultiplayer() public, so it can be used by
    src/Viewer/view.cxx.

src/Viewer/view.cxx
src/Viewer/view.hxx
    View::View(): Added lookat_agl, lookat_agl_damping params for new Tower
    View AGL. Preserve user's field-of-view in separate variable so that Tower
    View AGL can modify the actual field of view independently.

    Added view_index param so that we can find multiplayer view[]/config/
    properties.

    getViewOffsets(): new fn that finds view offsets for user aircraft or
    multiplayer aircraft.

    View::recalcLookFrom() View::recalcLookAt: Lots of changes to allow things
    to work with multiplayer aircraft. View::recalcLookAt() can now do Tower
    View AGL.

    View::Damping: support for damping, used by Tower View AGL. Might be good
    to use this for other damping.

    View::updateData(): removed, as calculations are now all done inside
    View::recalc*().

    put properties {x,y,z}-offset-m into new View::_adjust_offset_m member
    instead of _offset_m. This avoids confusion between a view's offsets and
    the offsets added in by the user via the 'Adjust View Position' dialogue.

src/Viewer/viewmgr.cxx
    FGViewMgr::init(): pass view number to
    flightgear::View::createFromProperties().
2019-07-04 13:16:22 +01:00
Edward d'Auvergne
34a6cb3c74 SGSubsystem classes: Registration of all subsystems. 2019-07-01 14:51:32 +02:00
Edward d'Auvergne
d259c70560 SGSubsystem classes: Addition of staticSubsystemClassId() to all subsystems. 2019-07-01 14:51:32 +02:00
Edward d'Auvergne
0eb8716d45 Autopilot components: Switch to using the subsystem name.
The _name, get_name(), and set_name() variables and functions have been removed.
The Component::get_name() function is now handled by Subsystem::subsystemId(),
and Component::set_name() replaced by SGSubsystem::set_name().  The
Component::_name variable is replaced by SGSubsystem::_subsystemId.
2019-07-01 14:27:30 +02:00
Edward d'Auvergne
332c240b38 SGSubsystemGroup: Removal of the subsystem group naming.
This is a partial reversion of 5253215065, the
changes of which are incompatible with the subsystem class IDs.
2019-07-01 14:27:30 +02:00
Edward d'Auvergne
fb5c36fc82 SGSubsystem classes: Renaming of the subsystem ID variables and functions. 2019-07-01 14:27:30 +02:00
Edward d'Auvergne
7a6e63ddb9 SGSubsystem classes: Subsystem and subsystem group API declaration standardisation.
This is a cleanup commit.
2019-07-01 14:27:30 +02:00
Edward d'Auvergne
60a2444766 SGSubsystem classes: Whitespace standardisation of the declarations.
This is a clean up commit prior to the subsystem API standardisation to simplify
the diffs.  It includes all SGSubsystem and SGSubsystemGroup derived classes.
2019-07-01 14:27:28 +02:00
James Turner
8428cd2a44 Revert "CommRadio: fix tuning 25Khz and 75Khz channels"
Revert this change - I will re-add the unit-tests again, but we need
a different approach for 8.3 stations, than what I did here.

This reverts commit 91cc83abb5.
2019-07-01 06:29:05 +01:00
James Turner
91cc83abb5 CommRadio: fix tuning 25Khz and 75Khz channels
In 8.3 mode, ensure that 25 and 75Khz channels can be tuned using the
abbreviated syntax (eg 118.02 for 118.025). 

As part of this, add test coverage of the CommRadio for basic and 8.3-
mode operation.
2019-06-27 15:45:53 +01:00
James Turner
4905aa255c Arrival procedure routing fixes
Deal with some cases in STAR -> approach routing better:

- when the IAF is the initial wpt of the approach primary sequence, 
  just accept this instead of warning. This is common in some XML
  files from Navigraph, for example EDDF

- don’t duplicate the IAF into the wpts returned by Approach::route
2019-06-24 16:37:56 +01:00
Torsten Dreyer
0d8d2addcf Autopilot member initialization order (removes warning) 2019-06-17 11:57:55 +02:00
Scott Giese
efcbdcfec2 [security] Prevent buffer overrun. 2019-06-15 21:30:54 -05:00
Scott Giese
47e3e7baed [Emesary] Fix compile on Linux. 2019-06-14 21:45:11 -05:00
James Turner
cfae6d2c9f CommRadio: fix power and noise/squelch
- when add-noise is false, mute noise completely
- if the CommRadio is not powered by the generic electrical system,
  work by default (as was previously the case)
2019-06-11 23:26:51 +01:00
Richard Harrison
6ebc91d3f7 Added mainloop frame notifications
Using Emesary Global Transmitter the following events are notified

* Frame Begin
* Frame End
* Mainloop started
* Mainloop stopped

This integrates with the background threaded Nasal Garbage collection (simgear:nasal/cppbind/NasalEmesaryInterface.hxx) and is also controlled by the properties as follows

* /sim/nasal-gc-threaded (true) - use background threaded GC
* /sim/nasal-gc-threaded-wait (false) - at the start of the frame wait for the previous GC thread to complete.

I initially thought that the wait at the start of the frame would be necessary; however in 100 or so hours of flight without the await for completion at the start of frame no threading problems (or any other problems) were shown; so nasal-gc-threaded-wait is defaulted to false which gives a slight boost in performance.

So what this does is to it removes the GC pause of 10-20ms every 4 seconds (test using the F-15). This change doesn't really give much extra performance per frame because normally GC is only performed when needed.
2019-06-11 14:38:38 +02:00
Richard Harrison
8c4334e3ae Increase severity of warning when trying to add a setlistener onto a tied property
- before this it was all to easy to miss being at DEBUG level and this is quite an important problem to be aware of for model developers
2019-06-11 14:38:38 +02:00
James Turner
4f4166e540 Use the global ATC sample group for the CommRadio
Remove the custom sample-group, and use the standard one, for the
comm-radio ATIS voice and noise.
2019-06-06 10:03:40 +01:00
James Turner
1a3daf39a0 ATC volume and settings passed to the group
Note sure this is strictly the correct place to do this, but it’s
where we do it for avionics, so following for now.
2019-06-06 10:03:40 +01:00
James Turner
3c56e74d07 Httpd: Avoid console spam by WS ping/pong frames 2019-06-05 17:41:07 +01:00
James Turner
0bea6153b0 Event input: button fire repeat 2019-06-05 17:41:07 +01:00
James Turner
5ffe96237f Fix a warning 2019-06-05 17:41:07 +01:00
James Turner
309aaa794f Flite always compiled now. 2019-06-03 16:51:08 +01:00
James Turner
688f49b487 Convert comm-radio to AbstractInstrument 2019-06-03 15:24:02 +01:00
James Turner
aad582f2c3 MarkerBeacon uses AbstractInstrument 2019-06-03 14:32:38 +01:00
James Turner
a26c671200 Migrate transponder to AbstractInstrument 2019-06-03 13:49:48 +01:00
James Turner
ff009bc58f Remove ‘X Double-scroll’ workaround
Remove this since it’s causing some other issues, let’s see if it
really still an issue on different platforms.
2019-06-03 11:54:25 +01:00
Ganael Laplanche
66e6afb449 Avoid crashing when udev_device_get_parent() returns a NULL pointer 2019-05-29 12:06:07 +02:00
James Turner
bd2c524b21 HID input: more debug output 2019-05-27 16:06:27 +01:00
James Turner
d8b6fbfef0 macOS / DBus : avoid abort on startup
Don’t do the fgOSDisableScreensave DBus stuff on macOS - there is no
global DBus daemon configured by default.
2019-05-27 16:05:19 +01:00
James Turner
88a78dd314 Remove last hard-coded default airport ID
Neither Torsten nor I can recall why we continued to hard-code this,
so make it dynamic for now. When we remember why we hard-code it,
we can add a BigComment from future-James to future-future-James about
why not to do this again :)
2019-05-27 11:42:53 +01:00
James Turner
4ed410dc09 Adjust code for some older GCC versions
Implicit conversion from raw-pointer to std::unique_ptr<T> was failing,
use a stub replacement for std::make_unqiue to wrap this up cleanly.
2019-05-27 11:38:37 +01:00
James Turner
c6feaafe2a Merge /u/fgarlin/flightgear-src/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/164/
2019-05-22 12:54:52 +00:00
Fernando García Liñán
fa4ef2ab52 Added a property to indicate compositor support 2019-05-20 23:44:16 +02:00
Fernando García Liñán
b9e3ed67f0 Compositor: Fixed intersection checking for hotspots 2019-05-20 22:53:16 +02:00
Erik Hofman
8e2b2ff327 Add cstring 2019-05-20 14:17:36 +02:00