1
0
Fork 0
Commit graph

16046 commits

Author SHA1 Message Date
James Turner
06c03a0672 Tolerate Aircraft/ prefix in preview paths
Reuqested by Jonathan R, allow Aircraft/<acft-dir>/foo paths to work
for preview iamges.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2644/
2021-08-31 08:57:18 +01:00
Julian Smith
74dd221e60 src/Viewer/splash.cxx: removed CompositeViewer startup message. 2021-08-29 23:13:32 +01:00
Fernando García Liñán
83b0a31b76 Canvas cameras are slave cameras instead of scene graph cameras
This was a long-standing issue where Canvas cameras were rendered
multiple times, once per slave camera. In the case of the Classic
pipeline they were being rendered twice.

Making them slave cameras has the issue of them not being shared
across GraphicsContexts anymore, so it's not possible to see Canvas
displays in extra CameraGroup windows. This is fixed by using OSG
context sharing feature and sharing the initial windows' context
with all subsequent windows.
2021-08-27 18:34:19 +02:00
Julian Smith
11426c8177 src/Scripting/NasalSys.cxx: simplified FGNasalSys::logNasalStack(). 2021-08-26 22:24:12 +01:00
Julian Smith
22ad6a892d docs-mini/README.digitalfilters: document pid-controller/startup-current. 2021-08-26 22:24:12 +01:00
James Hogan
e25a560591
CameraGroup: Add compositor reload callbacks
Add a compositor reload callback object to CameraInfo, with callbacks
for just prior and after the CameraInfo's compositor is reloaded by
reloadCompositors().

This will allow VR cameras to be reconfigured after a reload.
2021-08-23 16:00:52 +01:00
James Hogan
9e430b3fc2
CameraGroup: Add removeCamera()
Add removeCamera() method to CameraGroup to find and remove a single
CameraInfo.

This will allow cameras created for VR to be dynamically reconfigured.
2021-08-23 16:00:52 +01:00
James Hogan
7a096d9835
CameraGroup::buildCamera(): Return CameraInfo*
Make CameraGroup::buildCamera() return the new CameraInfo* so the caller
can make adjustments.
2021-08-23 16:00:52 +01:00
James Turner
45d969f319 Add tests cases around bug 2616
Can't reproduce this, but capturing in a unit-test just to make sure.

SF-Ticket: https://sourceforge.net/p/flightgear/codetickets/2616/
2021-08-21 13:09:39 +01:00
Michael Danilov
985abe8d43 Typo in "Addon-config: don’t overwrite autosaved props" (ticket 2059) 2021-08-20 16:53:37 +02:00
James Turner
4bf88a0b67 Extend unit-test for route-manager waypoint selection
SF-Ticket: https://sourceforge.net/p/flightgear/codetickets/2372/
2021-08-20 12:08:17 +01:00
James Turner
049b3dcba6 Fix Map initial position
Since 'center on aircraft' is now persistent, we need to expliictly init
this value when showing the map. Thanks to Michael Danilov and Colin
Geniet for the fix.

SF-Id: https://sourceforge.net/p/flightgear/codetickets/2637/
2021-08-20 11:26:13 +01:00
Michael Danilov
732548bcb1 HUD: make vertical gauges look the same as horizontal ones (ticket 2374). 2021-08-19 18:00:52 +02:00
Michael Danilov
abbfa6578c Property browser: show values assigned to property folders in non-verbose mode as well (ticket 2479). 2021-08-19 17:47:20 +02:00
portree_kid
96b9cfabe0 Improved searching of Runway exits 2021-08-16 12:27:47 +01:00
James Turner
4b7ef90b31 YASim: Add Lift/Drag to test output
Patch from Huntley Palmer
2021-08-11 11:40:16 +01:00
James Turner
86899de63b Fix some comments in the runway_remap change 2021-08-11 11:38:14 +01:00
Julian Smith
7ed93e4e64 src/Viewer/sview.*: fixed various issues with extra view windows.
Reversed the affect of mouse in some legacy views, e.g. Helicopter and Pilot
views now move in expected direction for mouse drags. Also increased scale
of movement to make things similar to the default view system.

In chase view etc, apply mouse movements after damping of aircraft orientation,
previously mouse movements were getting damped.

Removed SviewStepFinalToTarget. SviewStepFinal now automatically aims at target
if new posdir.target_is_set flag is true.

Improved double views: Avoid duplicate SviewStepCopyToTarget step. Disabled
mouse drag handling - was gives weird results and is not required or
helpful. Be more consistent in using target position if available, otherwise
eye position; for example using a Helicopter view to create a double view now
uses the target of the helicopter view, not the eye point, which works much
better.

Removed internal use of SviewStepFinal from SviewStepDouble - used to be
special case.

Split mouse drag handling out of SviewStepRotate into new SviewStepMouseDrag.

Simplified last-pair code - both last-pair and last-pair double find position
and target in the same way.
2021-08-06 21:48:32 +01:00
Julian Smith
d860a79901 src/Main/fg_commands.cxx: reduced extra-view diagnostics. 2021-08-06 19:20:34 +01:00
Julian Smith
281fe6d47d Fixed some snprintf buffer size warnings and added comments about possibly unused variables. 2021-08-06 19:20:18 +01:00
James Turner
18e7bfc4b0 Fix tests build 2021-08-04 15:10:18 +01:00
legoboyvdlp R
01216e4c19 Add ability to override airport runway definitions by creating a rwy_override.xml file which allows procedures to be loaded for airports which have new runway numbering 2021-08-04 10:27:40 +01:00
James Turner
20155df3f6 Sentry: don't catch cmd-line aircraft init failures
Only worry about mis-config which occur when using the
launcher, since basically all non-launcher ones look to be user errors.
2021-08-04 09:53:13 +01:00
James Turner
fc40caf40e Launcher: remove obsolete variable
Also imrpvoe abandoning behaviour of the natural earth loader.
2021-08-04 09:51:23 +01:00
James Turner
f72983e1a6 TrafficL Avoid crash on invalid active runway
Work-around + log message when the AI flight has an invalid
arrival runway.
2021-08-04 09:08:32 +01:00
James Turner
dab9e6ba5f Launcher: fix Fly! menu enablement 2021-08-04 09:08:32 +01:00
James Turner
e58a06465c AI ATC: only use audio if enabled in the dialog
Patch by Stefan Frank, check the dialog checkbox setting before sending
messages to audio rather than text output.
2021-08-04 09:08:32 +01:00
James Turner
a79e6e46da GUI: don't warn on empty dialogs 2021-08-04 09:08:32 +01:00
PlayeRom
622ae7d329 Change "click here" links into links telling what you click 2021-08-04 09:08:31 +01:00
James Turner
073784fa03 Catch exceptions in FDM init more precisely
Rather than letting these rise to the global handler, do a more
targeted message.
2021-08-04 09:08:31 +01:00
Julian Smith
f6a11ced91 src/Viewer/FGEventHandler.cxx: reduced noisy diagnostic with custom camera-group.
Looks like SviewGetEventViewport() often returns null when using custom
camera-group?
2021-08-03 15:37:37 +01:00
Julian Smith
d91bc730b6 test_suite/unit_tests/Autopilot/testPidController*: test startup_current=0 or 1. 2021-08-02 22:38:11 +01:00
Julian Smith
333c790086 src/Autopilot/pidcontroller.* added params for control of startup behaviour.
Added <startup-current> param. Default is false which preserves previous
behaviour where internal state is initialised to zero. Otherwise we initialise
internal state using the current error value, which can reduce oscillations.

Added <startup-its> param, default is zero. For the first <startup-its>
iterations we don't update the output, which can be used to cope with initial
bad data from earlier controllers.

Also refactored the code to hopefully make it clearer and modified debug
logging to output all info in a single statement and on a single line for
clarity.

For example avoid initial oscillations with:

    <pid-controller>
        ..
        <startup-current>true</startup-current>
        ...
    </pid-controller>
2021-08-02 22:38:11 +01:00
Julian Smith
8d2205ca2e src/Autopilot/digitalfilter.cxx: show subsystemId() in debug output. 2021-08-02 22:38:11 +01:00
Julian Smith
17d40cdd80 src/Viewer/FGEventHandler.cxx: fixed multi-window event-handling bug.
Ever since support for CompositeViewer was added in f62e5b9ce3,
FGEventHandler::eventToViewport() has been always calling
window_builder->getDefaultWindow() so it could decide whether an event was for
the main window or not. But if a custom camera-group was specified, there would
be no existing window called 'FlightGear' so getDefaultWindow() would create
one, which then interfered with event handling.

The fix is to change the global WindowBuilder::defaultWindowName to match
sim/rendering/camera-group/gui/window/name when we are handling a custom
camera-group, which ensures that when FGEventHandler::eventToViewport() calls
window_builder->getDefaultWindow(), it gets the main window, not a new window
called 'FlightGear'.
2021-08-02 22:38:11 +01:00
Stuart Buchanan
c542e0d427 WS30: Stop trees from growing on roads, rivers 2021-08-02 17:11:34 +01:00
Stuart Buchanan
a8aa77b1b2 WS30: Fix crash on reset caused by VPBTechnique 2021-08-01 20:52:25 +01:00
Stuart Buchanan
a3b01a1c1e Fix infinite loop on negative speed. 2021-08-01 20:51:18 +01:00
James Turner
5ef5ff1b37 Fix an issue where libEvent is not available
Ensure compilation with DBus but without libEvent still works
2021-07-31 19:21:18 +01:00
James Turner
d47442a8b2 Control over reporting of fatal errors 2021-07-31 17:23:46 +01:00
James Turner
66b5c4259e Sentry: use new SimGear reporting control 2021-07-31 17:23:46 +01:00
James Turner
a156c5a14d Error reporting: check custom scenery before FGData
Some people put custom scenery inside FGData, re-order to catch
that case.
2021-07-31 17:23:46 +01:00
James Turner
0a6c4aaf7a Launcher: fix aircraft hanagr paths
Avoid a warning by explicitly appending Aircraft suffix.
2021-07-31 17:23:46 +01:00
Julian Smith
ef96808a18 src/Main/ErrorReporter.cxx: fixed couple of warnings. 2021-07-31 10:29:11 +01:00
Julian Smith
581e7980b3 src/Network/props.cxx: use std::setprecision(16) when sending double values. 2021-07-31 10:29:11 +01:00
Julian Smith
f5243e7e7d scripts/python/recordreplay.py: improved testing of normal recordings.
Set telnet_hz to 100 to reduce delay when making a recording - this avoids
problem where telnet round-trip time could result in recording being 1-2s
longer than we expected, leading to test failures.
2021-07-31 10:29:11 +01:00
Julian Smith
930c77b69f src/Aircraft/replay.cxx: fix bug with end of replay end when recording multiplayer.
With Normal recordings, if we are recording multiplayer aircraft, we continue
appending to the in-memory recording while replaying, so we need to stop when
we reach the original end of recorded frames.
2021-07-31 10:29:11 +01:00
Julian Smith
6eaff10ef4 Improved normal-recording time-keeping.
New properies so recordreplay can know extent of current in-memory normal
recording:

    sim/replay/record-normal-begin
    sim/replay/record-normal-end

This is required since scripts/python/recordreplay.py improved checking of
recording length when replaying.

scripts/python/recordreplay.py
src/Aircraft/replay.cxx
src/Aircraft/replay.hxx
2021-07-31 10:29:11 +01:00
Julian Smith
7d414886e0 Added support for compressed continuous recordings.
src/Aircraft/replay.*:
    If /sim/replay/record-continuous-compression is true, we compress each
    frame's data as a separate raw zlib stream.

    Requires latest simgear's simgear/io/iostreams/zlibstream.cxx for
    decompression with ZLibCompressionFormat::ZLIB_RAW. Haven't figured out how
    to extend simgear's code to provide a compressing ostream so for now we
    have our own local compression code.

    We open popup and set sim/replay/replay-error=true if we fail to read
    compressed data.

scripts/python/recordreplay.py:
    Added test of compressed continuous recordings.

docs-mini/README-recordings.md:
    Added information about compressed format.
2021-07-31 10:29:11 +01:00
Julian Smith
08390be391 src/AIModel/: use Simgear's unit conversion constants, e.g. SG_KT_TO_FPS. 2021-07-31 10:29:11 +01:00