1
0
Fork 0
Commit graph

11450 commits

Author SHA1 Message Date
James Turner
a8351bd544 Reset: avoid terraSync warning
Avoid the old value being set, which causes the ‘terrasync-dir not
saved’ warning to appear incorrectly on reset.
2021-01-07 09:57:30 +00:00
James Turner
a4aa7595c0 GPS: bool return from RNAVWayptController::init
avoids an exception throw when the controller fails to init, which
avoids us breaking the stack when called via setMode, etc. Showed
up as error reports on Sentry.
2021-01-07 09:56:41 +00:00
James Turner
af387107a3 CPDLC updates from Henning 2021-01-06 15:46:56 +00:00
Henning Stahlke
527f58d353 Refactored CPDLP. 2021-01-06 15:46:56 +00:00
James Turner
06bd0708b9 Festival: Fix volume/pitch/speed after preamble
Fix from Antonello: when we send a premable to Festival, we need to
set the parameters afterwards. Re-order the code so this occurs
automatically.
2021-01-06 14:06:27 +00:00
James Turner
a9323432d0 Change JSBSim MatrixException base type
Make this exception inherit std::runtime_exception, so that it’s
caught by the ‘normal’ exception cases in FG boostrap.cxx

This is the only exception I can find in the codebase, which does not
inherit from either std::exception or std::string, so this is to fix
‘unknown exception’ errors reported in the wild.

Sentry-Id: FLIGHTGEAR-1C
2021-01-04 11:34:48 +00:00
James Turner
984e88bddd LaRCSim / UIUC fixes to make the Wright flier work
We had missed some places which needed a config.h include, to ensure
ENABLE_UIUC is set.
2021-01-04 10:56:42 +00:00
James Turner
34d4462327 Fix Festival support in FGVoice
Send a real (Lisp) command to check if Festival is running, instead
of SayText. Antonello (RedGriffin) reports this works better.
2021-01-04 10:29:20 +00:00
James Turner
f5eadf2e37 Event-input: Change reporting of failure to open
Don’t use an exception here, not needed and makes for noise on the
reporting backedning.
2021-01-01 22:40:24 +00:00
Julian Smith
e1caf04b41 src/AIModel/AIManager.hxx: added comment about loadScenarioCommand()'s return value. 2021-01-01 17:54:10 +00:00
Julian Smith
380ecdf8ba src/Viewer/viewmgr.*: added asserts, diagnostics and checking for out-of-range view numbers.
It seems that some aircraft sometimes incorrectly pass view indices rather
than numbers resulting in out-of-range access to FGViewMgr::views[]; See
flightgear-devel thread with subject "View crash (after loading errors)".

With this commit, if we are given an incorrect view number, we output a
diagnostic with SG_ALERT, assert fail, and cope with the problem. Arguably we
could do something more serious such as opening a popup or throw an exception.
2021-01-01 17:54:10 +00:00
Julian Smith
b38a5c95d4 src/FDM/JSBSim/input_output/FGfdmSocket.cpp: avoid warning about zero initialisation. 2021-01-01 17:54:10 +00:00
Julian Smith
abfb90db32 src/Airports/runwayprefs.cxx: avoid signed/unsigned comparison warning. 2021-01-01 17:54:10 +00:00
Julian Smith
ae1c4afea6 src/Autopilot/digitalcomponent.cxx: fixed misleading indentation. 2021-01-01 17:54:10 +00:00
Julian Smith
b7d7edc49e src/Autopilot/analogcomponent.cxx: fixed misleading indentation. 2021-01-01 17:54:10 +00:00
Julian Smith
8cead7e59b Improved error indication from FGIO::parse_port_config() and FGIO::add_channel().
E.g. for multiplay, we return (FGProtocol*) nullptr on success.
2021-01-01 17:54:10 +00:00
James Turner
c478a80c5c Launcher: don’t set empty METAR
When an invalid custom METAR is entered, don’t pass it to FlightGear
2020-12-30 17:01:29 +00:00
Erik Hofman
bcdcef6d2e Eatdirt: Implement parallax effects for the Moon at the rendering stage and not with the ephemeris. 2020-12-30 11:14:03 +01:00
James Turner
8320b37ce6 Fix Windows build failure 2020-12-28 14:53:35 +00:00
James Turner
9f4f4136f7 JSBSim: FGCondition: throw better exceptions
Add more description when FGCondition throws an exception, since
these are somewhat frequently occurring ones.
2020-12-28 14:10:43 +00:00
James Turner
7b87b061da Add coherent noise filter to the AP 2020-12-26 18:54:35 +00:00
Automatic Release Builder
769dcb1454 Launcher: FlightPlann: fix ‘view route’ enable 2020-12-22 10:34:58 +00:00
Automatic Release Builder
499dc79584 NavCache: add duplicate rebuild protection for Unixes 2020-12-22 10:34:58 +00:00
Automatic Release Builder
bab80744f6 Add a fatal message when GraphicsContext creation fails
Avoids crashing shortly afterwards with no window, and might help a
few users realise their problem is outdated graphics drivers.
2020-12-22 10:34:58 +00:00
Automatic Release Builder
e7801a65b3 Sentry: add a bread-crumb when user overrides read-only lock 2020-12-22 10:34:58 +00:00
Automatic Release Builder
a85a02069f Launcher: allow different texts for Fly! button
Requested by Michael Danilov for Russian translation
2020-12-22 10:34:58 +00:00
James Turner
0d0b8d01d2 Sentry: track reset status via a tag
Allow easy grouping of reports by ‘did we do a reset, ever’
2020-12-22 10:34:58 +00:00
James Turner
df34cb3cd9 Sentry: whitelist another XML error 2020-12-22 10:34:57 +00:00
Automatic Release Builder
5ad9eafca7 Sentry: improve how we report extra data 2020-12-22 10:34:57 +00:00
Julian Smith
d9e535913e src/Viewer/sview.*: Added damping to chase views. 2020-12-21 23:42:45 +00:00
Julian Smith
cbe3ae5618 src/Viewer/sview.*: added damping to SviewStepAGL. 2020-12-21 23:42:44 +00:00
Julian Smith
0ede0401b7 src/Viewer/sview.*: Added SviewStepAGL for Tower View AGL. 2020-12-21 23:42:44 +00:00
Julian Smith
c3836923cb Added limited support for event handling to extra view windows.
We now attach global event handler to extra view windows so key presses are
handled as normal.

And the main event handler for mouse movements now calls new SviewMouseMotion()
which pans/tilts extra view windows in response to right-button mouse-drag.
2020-12-21 23:42:44 +00:00
Julian Smith
cb258f3d36 src/Main/main.cxx: Allow dynamic control of sglogdeltas using a property.
We install listener for /sim/sg-log-deltas which calls logDeltaSet().
2020-12-21 23:42:44 +00:00
Colin Geniet
50efe12f25 Fixes Issue #2480 - JSBSim assertion failed on Location > Select Airport 2020-12-21 23:11:39 +01:00
James Turner
783212b954 Traffic: add a trivial test of createPushback
No validation yet, but creates all the needed pieces and doesn’t crash.
2020-12-21 13:25:15 +00:00
James Turner
a80d273222 Scenario loading: don’t report XML errors
User-defined scenarios are common, don’t report XML errors to the backend
for these since it generates a lot of noise.

Sentry-Id: FLIGHTGEAR-BNW
2020-12-18 15:20:13 +00:00
James Turner
bb2ef62b5a Sentry: whitelist another XML error 2020-12-18 15:11:33 +00:00
James Turner
0e545d711c Attempt to handle NaNs more elegantly
Check for NaNs after each FDM iteration, and freeze the sim if found.
Report this condition to the user and to the reporting backend, along
with the last valid position.

Probably needs some refinement, this is just a first guess.

Sentry-Id: FLIGHTGEAR-AM
2020-12-18 13:58:33 +00:00
James Turner
4f7d84ed73 Avoid crash when OSG event context is nil
Seems to relate to certain window managers and focus policies.

Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2218/
Sentry-Id: FLIGHTGEAR-30J
2020-12-18 12:17:42 +00:00
James Turner
a092902483 If loading plain text route, check for an XML header
Avoids errors when we try to parse an XML file as plain text.

Sentry-Id: FLIGHTGEAR-J6
2020-12-17 10:51:07 +00:00
James Turner
d7155bde38 Attempting to fix crash with the Wright-flyer
Some users crash in the UIUC code during init; this change is to try
to understand why.

Sentry-Id: FLIGHTGEAR-SA
2020-12-17 10:51:07 +00:00
Fernando García Liñán
ae41eba3da Support reloading Compositor instances at runtime via a fgcommand 2020-12-17 06:36:25 +01:00
Julian Smith
d04c1a00f2 src/Canvas/canvas_mgr.cxx: fix for segv in simgear unit tests.
Make CanvasMgr::init() not attempt to call flightgear::getGUICamera() if
there's no default camera set up yet.
2020-12-16 21:19:01 +00:00
James Turner
62cdd30810 Fix a GPS bug identified by Jonathan Redpath
When in LEG mode, and within the intercept cone, but further away from
the leg waypoint than the leg origin, we were computing a bogus
abeam point and hence a bogus desired track.

Detect this situation, and invert the computed along-track-distance,
so the computed abeam point is actually near where we are, and not ahead
of us.
2020-12-14 21:04:50 +00:00
James Turner
7a3f8276a6 Add unit-tests for Route-manager commands
Fix some bugs in insert-waypt command discovered during the testing
(w00t, tests FTW)
2020-12-14 11:45:46 +00:00
James Turner
72f1b84837 Improve waypointFromString logic
- exclude POIs and some other types from the ident match, to avoid
  confusing results
- improve how the search vicinity is computed when inserting a leg,
  which is the common case for a route with a destination set. Use
  the midpoint of the leg ending at the insert position, as the optimal
  search vicinity
- move the waypointFromString code into route.cxx, since it is mostly
  independent of a FlightPlan instance
- extend the tests to cover the bug which flagged these issues

Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2372/
2020-12-13 17:55:32 +00:00
James Turner
b2622458cc Autopilot: tolerate whitespace in XML strings
Prevent errors from property code when leading / trailing whitespace
occurs in the autopilot XML, in a property path. Use strutils::strip
to remove whitespace.

Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2445/
2020-12-12 16:39:04 +00:00
Julian Smith
988e377ec9 Improved Sview system to allow specification of views from Nasal using properties.
SviewCreate() now takes a SGPropertyNode* config which contains all information
needed to specify the view, including window size and position.

By default views are defined using a series of <step>...</step> nodes which map
to SviewStep* classes internally.

Alternatively, existing extra-view functionality is supported using
type='current', 'last_pair' or 'last_pair_double', plus one can use old-style
<view>...<view> nodes with type='legacy'.

See src/Viewer/sview.hxx for details and examples.

The extra-view commands view-clone, view-last-pair and view-last-pair-double
now pass the supplied SGPropertyNode* through the underlying FGViewMgr to
SviewCreate().

Improved handling of +/- heading and pitch values. For example some legacy
views have inverse relationship between heading-offset-deg and the actual
heading offset, so we now only multiply by -1 early on when handling these
legacy views, and SviewStepRotate does not negate.

Fixed Helicopter view direction bug with multiplayer aircraft - need to use
global /sim/current-view/heading-offset-deg, even for multiplayer aircraft.

Fixed incorrect handling of roll in pilot view - when adding in extra changes
of heading, pitch and roll to things like Helicopter view, simply adding to
heading, pitch and roll doesn't work if aircraft roll is not zero. Instead we
need to do the calculation with SGQuatd, so have added optional rotation params
to SviewStepFinal.

Added support for legacy Tower view look from.

Details:

    src/Main/fg_commands.cxx
    src/Viewer/viewmgr.cxx
    src/Viewer/viewmgr.hxx

        Added 'view-new' command.

        All recently-added view commands now pass the SGPropertyNode* arg to
        globals->get_viewmgr() and from there to SviewCreate().

    src/Viewer/sview.cxx
    src/Viewer/sview.hxx

        SviewStepAircraft and SviewStepNearestTower uses new Callsign
        class for tracking multiplayer aircraft by callsign instead of
        /ai/models/multiplayer[] number, so we cope when multiplayer aircraft
        are renumbered by network outages.

        Double views are now implemented as a final view step, instead of
        in a separate class derived from SviewView. So all views are
        implemented using SviewViewEyeTarget, and there is arguably no
        need for the separate SviewView base class.

        SviewViewEyeTarget now has a single list of steps, instead of separate
        lists for eye and target, because the use of SviewStepCopyToTarget makes
        separate lists unnecessary.
2020-12-12 14:09:39 +00:00
Julian Smith
e7e2895573 src/Model/modelmgr.cxx: fixed minor clang warning about indentation. 2020-12-12 14:09:39 +00:00