1
0
Fork 0
Commit graph

11787 commits

Author SHA1 Message Date
James Turner
caad29e7c8 Add error reporting to common failure points.
Not exhaustive by far, but adds many of the common failure points
witnessed on Sentry.
2021-02-20 20:06:27 +00:00
James Turner
a0ff4adbc6 Tweaks to sentry integration
Report menu item activation, and define a RAII helper for setting
the XML error reporting state.
2021-02-20 20:05:51 +00:00
James Turner
c85916d88d Add error reporting subsystem
Requires corresponding SimGear commit
2021-02-20 20:05:03 +00:00
James Turner
cab0dc12a1 Remove a lingering Boost usage 2021-02-20 19:59:13 +00:00
Scott Giese
dd60a041b1 Maintenance: Yasim
unused static const char* warning.
Eliminate the variable since it is the only one defined.
2021-02-20 11:12:15 -06:00
Julian Smith
32a066f810 Fixed replay-from-url bug.
Need to use simgear::HTTP::FileRequestRef shared pointer, otherwise
HTTPFileRequest will delete it after the transfer.

Also changed callback to a lambda to match reinstated simgear API.
2021-02-20 13:54:04 +00:00
Julian Smith
309e28c6d7 src/Viewer/viewmgr.cxx: removed asserts on inputs from aircraft/nasal code.
The fgfs executable is the unit within which it makes sense to check
preconditions with assert. We are not in control of aircraft code in the same
way.

This allows debug build of test-suite to check handling of out-of-range view
numbers.
2021-02-19 22:27:34 +00:00
Julian Smith
ca423e0e3e src/Aircraft/replay.cxx: downgrade recording indexing diagnostic. 2021-02-19 10:21:21 +00:00
Julian Smith
5b2fd572e4 src/Main/options.cxx: fixed Windows build error - use SGTimeStamp::sleepForMSec(), not sleep(). 2021-02-19 10:21:21 +00:00
Scott Giese
0019b22046 Code Maintenance - nullptr checking 2021-02-18 23:52:46 -06:00
Scott Giese
86ff18e0e6 Replay: Resolve missing mutex header 2021-02-18 23:12:31 -06:00
Julian Smith
5a70245ba9 src/Aircraft/replay.*: modified to match change to simgear::HTTP::FileRequest::setCallback().
We now use a function pointer instead of a lambda.
2021-02-18 23:21:01 +00:00
Julian Smith
f3679f121d Allow replay of Continuous recordings if --load-tape is given a URL.
E.g. for --load-tape=http[s]://foo.com/foo/bar/wibble.fgtape, we download in
the background to a file called foo.com_[MD5]_wibble.fgtape, where [MD5] is an
8-character hash of /foo/bar.

We assume any existing file contains valid data and only download any remaining
data (by specifying an http Range header).

Also, when loading/downloading and replaying continuous recordings at startup,
we set the aircraft and airport from the recording.

src/Aircraft/replay.cxx
src/Aircraft/replay.hxx
    FGReplay::loadContinuousHeader()
        Loads properties from Continuous recording's header, distinguishing
        between failure due to incorrect header, or due to a truncated file.
    FGReplay::indexContinuousRecording()
        Contains Continuous recording indexing code, in a form that can be used
        in background while we are downloading.
    Added a mutex to protect m_continuous_in_time_to_frameinfo, which can now
    be modified in background as Continuous recording is downloaded.
src/Main/fg_init.cxx
src/Main/options.cxx
    fgOptLoadTape():
        Modified to handle --load-tape=<url>. We start download, and read
        the header before returning, so that we can force the FDM to use the
        recording's aircraft instead of the user's default. Limit recording
        download rate if /sim/replay/download-max-bytes-per-sec is set, by
        calling new filerequest->setMaxBytesPerSec().
2021-02-18 09:32:15 +00:00
James Turner
02e0d17dbc Fix MSVC unused-var warning 2021-02-15 09:33:30 +00:00
jano
4a4117b9ab make the mp protocol send rate independant from time accel,
based on mp protocol clock.
2021-02-15 09:27:36 +00:00
jano
a28bf28ee0 Throttle Hz aligned to time-grid, add initial offset.
Allows sync of two or more FG session, if wall clock are in synch.
2021-02-15 09:11:46 +00:00
jano
7dfbcf0918 Make the steady clock and MP clock init at modelHz boundary.
This removing any fractional (of a modelHz step) part when initialising.
This allow us to sync time in different FG instances, if FPS allow.
2021-02-15 08:58:51 +00:00
legoboyvdlp R
bf26817d53 Splash screen: add counter displaying how many MBs are left to extract 2021-02-14 17:07:18 +00:00
James Turner
00dbd23bec Fix unit-tests for particles lifetime.
Missed call to ParticlesGlobalManager::clear on scenery shutdown
2021-02-14 16:40:14 +00:00
Julian Smith
31ec727872 Added record/replay of extra properties, with specific support for window size/position and view settings.
Recording of extra properties is only supported in Continuous recordings.

Modified Continuous recording format to allow future forwards
compatibility. See docs-mini/README-recordings.md for details. This breaks
compatibility with previously-generated Continuous recordings, but this only
affects next.

To reduce overhead we record all extra property values in the first frame and
then later frames contain only extra property changes. When replaying, if the
user jumps backwards we replay all extra property changes since the start of
the recording. Similarly if the user jumps forwards, we replay any intervening
extra property changes.

Recording extra properties:
    This is enabled by:
        /sim/replay/record-extra-properties

    The extra properties that are recorded are identified by the property
    paths in the values of /sim/replay/record-extra-properties-paths/path[]
    properties. We record the entire tree for each specified path.

Recording of main window position size:
    We have specific support for record and replay of main window position/size.

    This is enabled by:
        /sim/replay/record-main-window

Recording of main window view:
    We have specific support for recording the view type and direction/zoom
    settings.

    This is enabled by:
        /sim/replay/record-main-view

    We record the /sim/current-view/ property tree, excluding some subtrees
    that continuously vary but are not required for replaying of the view.

When replaying, we allow separate control of what extra property changes are
replayed, with:

    /sim/replay/replay-extra-property-changes
    /sim/replay/replay-extra-property-removal
    /sim/replay/replay-main-window-position
    /sim/replay/replay-main-window-size
    /sim/replay/replay-main-view

We work around some problems caused by the use of tied properties when
replaying changes to view-number.

Window position issue:

    When replaying window position and size changes, things get a little tricky
    because osgViewer::GraphicsWindow::setWindowRectangle() takes a position
    for the entire window, but osgGA::GUIEventAdapter::RESIZE events contain
    the position of the interior of the window; for example the y values will
    differ by the height of the window's titlebar. This can cause windows to
    move progressively further down each time they are positioned or resized.

    There doesn't seem to be a way of finding the size of a window's
    furniture directly. So instead this commit adds a new method
    osgGA::GUIEventAdapter::setWindowRectangleInteriorWithCorrection() which
    wraps osgViewer::GraphicsWindow::setWindowRectangle(). We listen for the
    following osgGA::GUIEventAdapter::RESIZE event and calculate corrections
    for x and y position that are used for subsequent calls.

docs-mini/README-recordings.md:
    Updated to document new Continuous format.

scripts/python/recordreplay.py:
    New script to test various aspects of record/replay.

Other:

    We now create convenience softlink to most recent continuous recording, using
    SGPath::makeLink(). Note that SGPath::makeLink() currently does nothing on
    Windows.

    Changed format of Continuous recordings to contain a single property tree
    in header. This is much simpler than having separate Config and Meta trees.
2021-02-13 11:38:52 +00:00
Julian Smith
1ff0ce2222 src/Viewer/sview.*: added support for damping in rotate steps. 2021-02-13 11:38:52 +00:00
Colin Geniet
9008b3194f AI: Fix unit problems for AIBase::vs
It was supposed to be in ft/min, but everything except AIAircraft was
using it as ft/sec. Change the name to AIBase::vs_fps and ensure the
same unit is used everywhere.
2021-02-11 09:27:36 +00:00
James Turner
130cd2ae41 Fix crash spotted on Sentry 2021-02-11 09:26:38 +00:00
James Turner
ab95c8149a Change code to use copyProperties 2021-02-10 13:42:50 +00:00
Guillaume Deshors
0bca9e75b0 take into account headtracking offsets in the view 2021-02-10 12:49:47 +00:00
Erik Hofman
7847418005 Differentiate between snow and wetness. Snow shows with every amount of precipitation but rain puddles only start showing up above 50mm of rain per day. 2021-02-10 11:32:12 +01:00
Stuart Buchanan
2dbf915393 WS30: Remove listener for lod-max-range 2021-02-09 10:31:46 +00:00
Erik Hofman
4894497ce2 Update the way the snow thickness is calculated, otherwise there will never be snow 2021-02-07 16:03:08 +01:00
James Turner
ba8b25db5f Update particles API again
Rename methods to make it clear they do additional work
2021-02-07 11:36:06 +00:00
James Turner
0cc465d39f Tweak Natural-earth loading to reduce DB contention
Reduce ‘SQLITE BUSY’ issues with multiple running copies of FG
2021-02-05 11:14:34 +00:00
James Turner
b915d02f55 Fix crash in AI/Traffic code
Sentry-Id: FLIGHTGEAR-139
2021-02-04 16:11:08 +00:00
James Turner
2ae51b69b0 Sentry: fix UUID init 2021-02-04 11:49:25 +00:00
James Turner
3e9a9e3730 Attempt to log bad allocation errors at source
Use a std::set_new_handler to capture allocation failures at their
origin, instead of in the main loop exception handler
2021-02-04 11:49:25 +00:00
James Turner
7214d95040 Sentry: suppress more XML errors from reports
DOn’t report Ground-net or traffic schedule XML errors, and add
another XML message whitelist entry.
2021-02-04 11:49:25 +00:00
James Turner
7f5f7e0b11 Sentry: add reporting for common path errors
Adding bread-crumbs preceding common failures seen on Sentry, around
addon and aircraft loading.
2021-02-04 11:49:25 +00:00
James Turner
b86baa68c0 Launcher: quit if OpenGL 2.1 isn’t available
Avoid crashing if no OpenGL drivers are available, instead show a
warning message to alert the user.

Sentry-Id: FLIGHTGEAR-76
2021-02-04 11:49:25 +00:00
James Turner
85f870f607 macOS: don’t crash if menu items are used early
Because we create the menubar earlier on macOS, the user can select
items before Nasal is loaded, causing a crash.
2021-02-04 11:49:25 +00:00
James Turner
f5410cee9c Sentry: whitelist one more XML message 2021-02-04 11:49:25 +00:00
James Turner
9e07b57c45 Launcher: additional bread-crumbs around catalogs 2021-02-04 11:49:25 +00:00
James Turner
203a9fe918 Launcher: fix a QML bug setting animation easing 2021-02-04 11:49:25 +00:00
James Turner
f45f41d4ec Guard against crash reported by Sentry
Avoid inserting null FGPositioned entries into the recent items
list, since this causes a crash in the model code

Sentry-Id: FLIGHTGEAR-1BM
2021-02-04 11:49:25 +00:00
Automatic Release Builder
6b6defbead Add getting-started tips to the launcher
QML implementation of getting started tips, with a nice styled
background box. Tips are defined+positioned inline, and displayed
when their enclosing scope is active.
2021-02-04 11:49:25 +00:00
James Turner
89de1defa0 Launcher: fix crash on slow update check
Cancel the update check HTTP request when the launcher ends, so we
don’t crash if the response arrives.

Sentry-Id: FLIGHTGEAR-DYT
2021-02-04 10:39:34 +00:00
James Turner
64b03b70a8 Clear ATCDialog instance on reset
Showed up as a variety of crashes on Sentry, due
to a stale instance of this object hanging around
after reset.

Sentry-Id:FLIGHTGEAR-T5
2021-02-04 10:38:26 +00:00
James Turner
6caadf2450 Sentry: reduce reporting spam for shader/Metar
Tune the exception logic to avoid many spurious reports from manually
entered METAR, and from missing shaders being probed repeatedly.
2021-02-04 10:37:55 +00:00
James Turner
9f18ccd425 Catch XML errors loading rwyuse.xml 2021-02-04 10:35:44 +00:00
James Turner
3fd54b2477 macOS: detect and warn if running translocated
Translocation forces us to rebuild the nav-cache each launch, and might
mess up some other details, so let’s warn the user they should copy
the app to Applications or similar.
2021-02-04 10:34:59 +00:00
Automatic Release Builder
31bb36b347 Increase log-level of language messages
This is to help in-field debug of incorrect language selection, eg
as reported by Sidi Liang
2021-02-04 10:31:08 +00:00
Automatic Release Builder
f1ab977ceb Avoid double-invoke of Launcher Fly! button
If the user double-clicks, and their system is slow, the action can
fire twice, which then breaks because we add options twice.

Sentry-Id: FLIGHTGEAR-HKV
2021-02-04 10:30:59 +00:00
James Turner
d57bc67420 Particles: changes to support new API in SimGear
Matches corresponding SimGear rewrite of global particle manager code.
2021-02-03 21:11:00 +00:00
Guillaume Deshors
3e2233cba7 create a new prop to control OSG autoadjust of aspect ratio when stereo view is split 2021-02-03 09:43:29 +00:00
Stuart Buchanan
54acb84f6f WS30: Add better controls for LOD
Use SGSceneFeatures to set VPB properties
2021-02-02 15:17:44 +00:00
Erik Hofman
f700d46452 Slightly alter the way th season property is calculated. 2021-02-01 16:18:17 +01:00
Julian Smith
3233f85833 src/Viewer/renderer.cxx: Avoid warning about initialisation of virtual base class.
In VisibleSceneInfoVistor's copy constructor, explicitly initialise virtual
base class osg::Object.
2021-01-30 12:48:06 +00:00
Julian Smith
2e782100c8 src/Aircraft/initialstate.cxx: fixed typo in diagnostic when --state=... is not found. 2021-01-30 12:48:06 +00:00
Julian Smith
fb027e0193 src/Scripting/nasal-props.cxx:f_setValueHelper(): improved diagnostic.
Added s_val_description() which returns string describing a naRef.
2021-01-30 12:48:06 +00:00
Julian Smith
8672a60699 src/Viewer/sview.cxx: minor improvements to Step view's tower views.
Move forward 1 metre in tower view look from, to slightly improve view of
ground near tower.

Removed incorrect attempt to move towards target in other tower views, that
didn't work.
2021-01-30 12:47:52 +00:00
Julian Smith
c59d9e039d src/Viewer/sview.cxx: in Step views, scale panning by fov/window_size, to allow fine control even at high zoom.
This means that the image on screen moves by the same distance as the mouse
(for small movements), regardless of window size or zoom level. Current mouse
drag handling in extra view windows is poor though - mouse is constrained by
screen size.

Would be good to do this for standard views as well, but the code in view.cxx
is more complex so haven't been able to figure out how.
2021-01-30 12:46:13 +00:00
James Turner
ffbf37d198 Marker beacons: support correct timing, audio sync.
Allow the option to have the marker beacon instrument use either the
correct timing, or ‘always on’ when the beacon is in range. Try to
ensure the audio is synchronised with the visual property. by using
the same timing values.

Also avoids losing sync when using the ‘audio-btn’ toggle, and increases
the update rate to allow accurate timing. Finally, switch from tied
properties to regular ones, so listeners on the beacon properties are
updated directly.
2021-01-28 21:00:51 +00:00
Julian Smith
1f5a84df0c src/Viewer/sview.hxx: updated doc comments - various limitations removed a while ago. 2021-01-27 23:24:42 +00:00
Stuart Buchanan
35c0f7d028 WS30: Property configuration VPB
Configure the VPB elevation mesh via properties:

/scenery/elevation-mesh/sample-ratio controls the elevation
mesh sampling, allowing reduction in mesh size

/scenery/elevation-mesh/vertical-scale is just for fun and
scales the mesh vertically making mountains taller.

/scenery/elevation-mesh/constraint-gap-m controls how much below
airports etc. elevation vertices are forced to be.
2021-01-27 20:03:49 +00:00
James Turner
d10d9dfadd Ensure /sim/aircraft is only the leaf ID
Keep the (possibly) fully-qualified ID in /sim/aircraft-id property

This should fix aircraft which rely on /sim/aircraft to be the
variant name.

Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2502/
2021-01-24 15:01:45 +00:00
Julian Smith
c031abe8d2 Partial fix for reset when using --composite-viewer=1.
[Marked as 'Partial' because, for me, reset eventually runs out of memory with
both composite-viewer and non-composite-viewer.]

fgStartNewReset(): pass existing composite_viewer to FGRenderer constructor so
that it is used after reset instead of us creating a new instance. Also reuse
existing osgViewer::View.

In FGRenderer::init(), don't create new osgViewer::CompositeViewer if
this->composite_viewer is already set.
2021-01-23 16:27:12 +00:00
Julian Smith
42eacf6928 src/Main/fg_init.cxx: open popup message if going readonly because of existing fgfs process.
Should avoid confusion, e.g. because terrasync being disabled.
2021-01-23 16:27:12 +00:00
Julian Smith
25e56ceee7 src/Main/main.cxx: added diagnostic if initTerrasync() fails because /sim/fghome-readonly is true. 2021-01-23 16:27:12 +00:00
James Turner
8ec91b3220 Launcher: remove obsolete winter/ALS settings 2021-01-23 14:40:00 +00:00
James Turner
73b14cd69d GPS: fix crash when failing to build RNav controller
Sentry-Id: FLIGHTGEAR-FFX
2021-01-23 14:40:00 +00:00
Erik Hofman
41587d61ee A reinit of the FGFX class left all the previous samples in the sample group in a stale state. The sample group code is robust enough to handle such a situation but they still occupy memory. So stop the inherited sample group explicityly at reinit to free the samples. 2021-01-23 12:01:47 +01:00
Erik Hofman
ed94db3e18 Remove another instances of Conditional jump or move depends on uninitialised value(s) as reported by valgrind 2021-01-22 11:07:20 +01:00
Erik Hofman
168a50756e Remove two instances of Conditional jump or move depends on uninitialised value(s) as reported by valgrind 2021-01-22 11:00:48 +01:00
Erik Hofman
b4f0e43ccc Remove season selection 2021-01-22 11:00:21 +01:00
James Turner
9e77cdf6cb Add some real TimeManager tests. 2021-01-19 17:35:12 +00:00
Slawek Mikula
354d7d02d2 #2177 - launcher - added flightplan info to summary window:
- Summary.qml - new row with Flight Plan info
- LauncherController.hxx, Launcher.qml - signals to show flightPlan & 
  exposing flight plan object
- FlightPlan.qml - add red color to information about airport mismatch
- FlightPlanController.cxx, FlightPlanController.hxx - description
  handling, support to loading flight-plan from command line argument 
  'flight-plan', saving last used dir when loading/saving flightplans
2021-01-18 12:38:58 +00:00
Colin Geniet
4f4a81d12b Submodels: Fix initial position offset
Fixes https://sourceforge.net/p/flightgear/codetickets/2521/

For submodels with rotation offsets, the rotation was applied to the
translation offset.
This is incorrect: translation offsets should be in the aircraft local
frame, and thus are not affected by submodel rotation offsets.
2021-01-18 11:45:31 +00:00
Stuart Buchanan
85f3183232 Fix Shuttle AI scenario 2021-01-17 19:13:42 +00:00
Stuart Buchanan
82356aefca Remove Rembrandt command-line options 2021-01-17 14:40:15 +00:00
Stuart Buchanan
1579258320 WS3.0: Remove setLODScale property
This scales all LOD ranges and was added in an attempt
to control WS3.0 LOD ranges.  However it badly impacts
WS2.0 draw distances, and is not the right solution
for WS3.0.  So removing.
2021-01-14 20:08:15 +00:00
Stuart Buchanan
24e50def19 WS3.0: Remove duplicate elevation constraints
Elevation constraints are now added by the ReaderWriterSTG
for all OBJECT entries, so aren't explicitly required for
the .icao loader.  This also allows us to clean up the BVH
generation, as the constraint is added after the model loading
is completed and the BVH policy applied.
2021-01-14 11:33:56 +00:00
Stuart Buchanan
cb90785810 WS3.0: Place airports based on apt.dat entry
Previously WS3.0 airports could be placed via .stg
file.

Now they are OBJECT entries rather than OBJECT_STATIC
and the placement information is taken from the apt.dat file.

Also added as elevation constraint for WS3.0 terrain.
2021-01-13 20:29:00 +00:00
Erik Hofman
bb21d4a870 Better handle Spring coloring of the scenery. It is a bit abrupt, but then again so is the start of the growing season. 2021-01-10 15:21:55 +01:00
Eatdirt
4c1f921156 Remove the Moon and Sun illusion effects 2021-01-10 13:03:33 +00:00
Eatdirt
e385fa4ecc Fix apparent size of Moon and Sun (too large by a factor of two) 2021-01-10 13:03:20 +00:00
Bertrand Coconnier
d3a11d72bb Always set useDefault to false when calling SGPropertyNode::tie()
Setting useDefault to true is equivalent to using unitialized variables we are getting whatever is currently in the memory whether it is relevant or not.
2021-01-09 18:51:50 +01:00
Bertrand Coconnier
12996087de Fixed the initialization of the struct addrinfo. 2021-01-09 17:53:28 +01:00
James Turner
d1f35253e2 Tooltips: wait for commands to be registered
Avoid invoking the tooltip commands prematurely on startup. Requires
corresponding FGData update.
2021-01-08 19:34:07 +00:00
James Turner
3b3e69e358 Quiet some noisy log messages 2021-01-08 19:33:10 +00:00
James Turner
9b25e25935 Remove an unnecessary SG_ALERT 2021-01-07 09:57:47 +00:00
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
Stuart Buchanan
b35eb24ca5 WS30: Improved material atlas
Add
- texture size
- shininess
- diffuse
- specular

from material.xml into the fragment shader via sampler1D.
2020-12-08 21:13:35 +00:00
Fernando García Liñán
017bb8a042 Do not change the near/far values of the GUI camera 2020-12-08 15:02:13 +01:00
Fernando García Liñán
d95964071d Better handling of near/far values in multiple camera setups 2020-12-08 14:10:24 +01:00
Erik Hofman
86befa6e5e Why on earth didn't the compiler get this error? 2020-12-08 09:55:53 +01:00
Erik Hofman
2d652adddc Fix a stupid off by one mistake 2020-12-08 09:47:22 +01:00
Erik Hofman
6baae3e00b Do not exceed the maximum climate code 2020-12-08 09:36:01 +01:00
James Turner
b61d189071 Add more bootstrap logging for Win7 weirdness 2020-12-07 17:11:17 +00:00
James Turner
7aa160c4e3 Write max-texture-units to properties 2020-12-07 17:11:17 +00:00
James Turner
83c8c7e0c3 RunwayPrefs: fix an edge case (at KORD)
If we reject all preferences due to missing runways, don’t end up
with un-initialized values.
2020-12-07 17:11:17 +00:00
Erik Hofman
e9e1607fce Fix a possble buffer overflow due to a rounding error 2020-12-07 15:10:20 +01:00
Julian Smith
d0db698c7b Correct any positive value of user and multiplayer chase-distance-m.
Chase distances are supposed to be negative. Otherwise in external views
vertical mouse moves have reversed behaviour when changing view angle. E.g.
see:

    https://sourceforge.net/p/flightgear/codetickets/2454

src/MultiPlayer/multiplaymgr.cxx
    Fix +ve chase-distance-m for multiplayer aircraft.
src/Viewer/viewmgr.cxx
    Fix +ve chase-distance-m for user aircraft.
2020-12-05 21:29:01 +00:00
Scott Giese
43c530b660 Modernize: std::string_literals 2020-12-05 14:25:59 -06:00
James Turner
b41e3694b6 Sentry: install new SimGear callback
Requires matching SG change to expose the callback. Allows SimGear 
to explicitly report an error (without any dependency on Sentry of
course)
2020-12-03 21:38:57 +00:00
Automatic Release Builder
8f9f0cbb19 Change default Windows download-dir to
$HOME/FlightGear/Downloads

Add a launcher warning about this, to request users to relocate existing
files, they already downloaded.
2020-12-02 17:36:12 +00:00
James Turner
7279b51785 Traffic: harden RunwayGroup::setActive
When incorrect rwyprefs.XML input is provided, don’t crash in this
method, just skip the incomplete entries.

Ticket: https://sourceforge.net/p/flightgear/codetickets/2439/
2020-12-02 17:29:33 +00:00
James Turner
602360cdeb Add graphics-presets logic (as a subsystem)
Gives the ability to define graphics settings via an XML file at
startup or later during runtime. Tracks if changes to graphics settings
required additional actions (eg, scenery reload or restart of the sim)

When a preset is active, and properties are modified, the system will
detect this and mark the preset as edited.
2020-11-30 15:45:13 +00:00
Erik Hofman
4947b18371 Comment out the weather updating code for now 2020-11-30 10:18:48 +01:00
Nathaniel Warner
f5e277fc5a Remove unnecessary include 2020-11-29 15:04:48 -08:00
Nathaniel Warner
512f1ba3d9 Use observer_ptr in OrthophotoManager 2020-11-29 15:01:23 -08:00
Scott Giese
f03358d4f8 Merge branch 'next' of https://git.code.sf.net/p/flightgear/flightgear into next 2020-11-27 18:00:06 -06:00
Nathaniel Warner
4ddc3dc8aa Fix orthophotos not being cleaned up on scenery reload 2020-11-27 17:54:55 -06:00
James Turner
443b4fa900 Different fix for ticket 2108, avoiding another issue
Original bug: https://sourceforge.net/p/flightgear/codetickets/2108/
New bug: https://sourceforge.net/p/flightgear/codetickets/2430/
2020-11-27 18:51:27 +00:00
Stuart Buchanan
4e46548250 Set minimum expiry time on STG nodes. 2020-11-26 22:59:39 +00:00
Julian Smith
a69e56043a src/Viewer/sview.cxx: fixed incorrect heading and roll when cloning some lookfrom views.
Bug happened with views that specify non-zero heading or roll.
2020-11-25 21:31:05 +00:00
Julian Smith
a094b822f8 Revert "src/Viewer/splash.cxx: also show info about CompositeViewer if disabled."
This reverts commit 1cf5b2ab44.
2020-11-25 21:31:05 +00:00
Colin Geniet
fa09c3a6e2 Submodels: Fix wind being applied twice on init
For FGAIBallistic objects affected by wind, speed vector denotes airspeed.
However, submodels initialize the speed vector using ground speed of the
parent aircraft, instead of its airspeed.

In effect, this means that wind is added to the initial airspeed,
or 'wind is applied twice on initialization'.
This was very noticeable when releasing a submodel with strong sidewind:
the submodel immediately starts drifting laterally at the speed of wind.

Fix the issue by subtracting wind vector from initial speed in
FGSubmodelMgr::transform for submodels affected by wind.
2020-11-24 10:35:01 +00:00
James Turner
43d32e809c Metar parsing: more input validation
Trying to avoid parsing an empty string.

Sentry-Id: FLIGHTGEAR-132
2020-11-24 09:08:50 +00:00
Nathaniel Warner
88a8cada51 Rebase photoscenery patch on next 2020-11-23 17:53:35 -06:00
Erik Hofman
b73413d52e Part 2: Work towards the option of interpolating between climate tiles by combining all climate related ground level parameters in one structure and calculating the sea level tile from the (not yet interpolated) ground level tile. Read the elevelation of the climate tile from the köppen database image which now contains the climate class in the red channel and the ground elevation in the green channel. 2020-11-22 19:29:35 +01:00
Erik Hofman
9cac817ad9 Work towards the option of interpolating between climate tiles by combining all climate related ground level parameters in one structure and calculating the sea level tile from the (not yet interpolated) ground level tile. Read the elevelation of the climate tile from the köppen database image which now contains the climate class in the red channel and the ground elevation in the green channel. 2020-11-22 15:01:43 +01:00
Julian Smith
bd0452c793 src/Viewer/renderer.cxx: disabled CompositeViewer assert that fired on shutdown after --help. 2020-11-22 08:24:49 +00:00
Julian Smith
1cf5b2ab44 src/Viewer/splash.cxx: also show info about CompositeViewer if disabled. 2020-11-22 07:45:17 +00:00
Erik Hofman
e1cf9eff49 Instead of using our own logic of calculating sea level parameters from ground level parameters, switch to using the FGEnvironmetn class instead. 2020-11-21 15:47:10 +01:00
Julian Smith
f62e5b9ce3 CompositeViewer: Support for multiple view windows using osgViewer::CompositeViewer.
Overview:

    Previously Flightgear always used a single osgViewer::Viewer(), which
    inherits from both osgViewer::ViewerBase and osgViewer::View, giving a
    single view window.

    If CompositeViewer is enabled, we instead use a osgViewer::CompositeViewer
    which contains a list of osgViewer::View's. Each of these View's can have
    its own eye position, so we can have multiple different views of the same
    scene.

    Enable at runtime with: --composite-viewer=1

Changes to allow use of osgViewer::CompositeViewer:

    Previously FGRenderer had this method:

        osgViewer::Viewer* getViewer();

    This has been replaced by these two new methods:

        osgViewer::ViewerBase* getViewerBase();
        osgViewer::View* getView();

    If CompositeViewer is not enabled (the default), the actual runtime state
    is unchanged, and getViewerBase() and getView() both return a pointer to
    the singleton osgViewer::Viewer() object.

    If CompositeViewer is enabled, getViewerBase() returns a pointer to a
    singleton osgViewer::CompositeViewer object, and getView() returns a
    pointer to the first osgViewer::View in the osgViewer::CompositeViewer's
    list.

    The other significant change to FGRenderer() is the new method:

        osg::FrameStamp* getFrameStamp()

    If CompositeViewer is not enabled, this simply returns
    getView()->getFrameStamp(). If CompositeViewer is enabled it returns
    getViewerBase()->getFrameStamp(). It is important that code that previously
    called getView()->getFrameStamp() is changed to use the new method, because
    when CompositeViewer is enabled individual osgViewer::View's appear to
    return an osg::FrameStamp with zero frame number).

    All code that uses FGRenderer has been patched up to use the new methods so
    that things work as before regardless of whether CompositeViewer is enabled
    or not.

    We make FGRenderer::update() call SviewUpdate() which updates any extra
    views.

Extra view windows:

    If CompositeViewer is enabled, one can create top-level extra view windows
    by calling SviewCreate(). See src/Viewer/sview.hxx for details.

    Each extra view window has its own simgear::compositor::Compositor
    instance.

    Currently SviewCreate() can create extra view windows that clone the
    current view, or view from one point to another (e.g. from one multiplayer
    aircraft to the user's aircradt) or keep two aircraft in view, one at a
    fixed distance in the foreground.

    SviewCreate() can be called from nasal via new nasal commands "view-clone",
    "view-last-pair", "view-last-pair-double" and "view-push". Associated
    changes to fgdata gives access to these via the View menu. The "view-push"
    command tags the current view for later use by "view-last-pair" and
    "view-last-pair-double".

    Extra view windows created by SviewCreate() use a new view system called
    Sview, which allows views to be constructed at runtime instead of being
    hard-coded in *-set.xml files. This is work in progress and views aren't
    all fully implemented. For example Pilot view gets things slightly wrong
    with large roll values, Tower View AGL is not implemented, and we don't
    implement damping. See top of src/Viewer/sview.cxx for an overview.

OpenSceneGraph-3.4 issues:

    OSG-3.4's event handling seems to be incorrect with CompositeViewer -
    events get sent for the wrong window which causes issues with resize and
    closing. It doesn't seem to be possible to work around this, so closing
    extra view windows can end up closing the main window for example.

    OSG-3.6 seems to fix the problems.

    We warn if CompositeViewer is enabled and OpenSceneGraph is 3.4.
2020-11-21 13:27:02 +00:00
Erik Hofman
578f414c42 Convert wind speeds to meter per second (from kilometers per hour) since that turns out to be the meteorological standard unit for wind speeds. 2020-11-21 09:43:39 +01:00
Erik Hofman
45b6f87351 Set the wind speed based on latitude and climate code 2020-11-20 16:29:19 +01:00
Erik Hofman
0baf9f2ff3 Add wind direction based on viewe latitude. Add a number of retriever functions for weather parameters. 2020-11-19 17:17:55 +01:00
Erik Hofman
6a97b1724a Add a function to construct a METAR string from climate data 2020-11-19 14:17:43 +01:00
Erik Hofman
ef9636c8e5 Use local gravity, Use a more accurate way to calculate saturation vapor pressure. 2020-11-19 11:21:25 +01:00
Erik Hofman
98a94ecac4 Also calculate air pressure and density (while we're at it) 2020-11-19 08:29:40 +01:00
Erik Hofman
108f2d4328 Swith to the terrain presampling code for a more stable ground elevation if it is enabled. 2020-11-19 08:29:40 +01:00
Fernando García Liñán
b3e4c25358 Fix CameraGroup relative cameras 2020-11-18 14:31:06 +01:00
Automatic Release Builder
3dd4971056 Launcher: skip missing add-ons in collectArgs
Avoid passing missing add-ons to FlightGear. Since we only write a
cleaned list back to QSettings upon some user change, we can persist
bad paths.

Sentry-Id: FLIGHTGEAR-NG
2020-11-18 09:52:56 +00:00
James Turner
e8c8495d7b NavCache: clean up the tables check query
This very first query was left un-finalized, which apparently blocks
another process from obtaining the exclusive lock needed to
COMMIT. Found using the trace funtions, phew.

Sentry-Id: FLIGHTGEAR-8C
Sentry-Id: FLIGHTGEAR-8F
2020-11-18 09:52:56 +00:00
James Turner
5273c03c6c NavCache: tolerate missing branch nodes
Since we don't insert nodes in read-only mode, we need to
tolerate their absence when loading.
2020-11-18 09:52:56 +00:00
Fernando García Liñán
78a89b3507 Remove unused files 2020-11-17 19:43:08 +01:00
Richard Harrison
b41bc317dd DDS-TC identify images coming from Canvas
This is to allow the DDS texture cache to take appropriate action (such as not compressing these images to ensure that the aspect ratio is good).
2020-11-17 19:09:06 +01:00
Erik Hofman
35da4231dd Use a different way to calculate relative humidiity across the year and adjusted for daytime. 2020-11-17 15:54:43 +01:00
Fernando García Liñán
b0a64e119a Restore Launcher renderer settings to pre-Compositor state 2020-11-16 18:37:05 +01:00
Erik Hofman
627fd24fc1 Switch from season specific interpolator functions to generic interpolator functions and do the season/day specific offset calculation in dedicated helper functions. Add a daytime effect of three hours, so temperatures get it's highest peak at 15:00. 2020-11-16 15:48:27 +01:00
Fernando García Liñán
255d193bc8 Make Compositor default
- Removed the ENABLE_COMPOSITOR CMake flag.
- Removed /sim/version/compositor-support.
- Removed miscellaneous branching to check if the Compositor is enabled.
- Removed custom resource loader since Compositor Effects are now located in $FG_ROOT/Effects.
- Removed splash screen warning.
- Only use the Compositor versions of CameraGroup and FGRenderer.
- Fix redout/blackout not appearing under certain circumstances.
2020-11-16 13:25:29 +01:00
Erik Hofman
1c923ea1d0 Specify the annual sea water temperature with a month delay compared to the air temperature and use it to calculate ice cover. 2020-11-15 17:50:01 +01:00
Stuart Buchanan
566428d5b9 WS3.0: Buld airports at 0 elevation.
Previously the center of the airport was defined with the correct
elevation, but the runways etc. were built at 0 elevation.

This makes everything at 0 elevation so we can set the elevation
in the STG file for the moment.
2020-11-15 11:20:41 +00:00
Erik Hofman
f0b24af3f1 Fix an off by one problem which is left from a failed attempt to interpolatre between classes 2020-11-15 09:31:26 +01:00
Erik Hofman
dd59119570 Store the region name of the material in the region parameter 2020-11-15 09:30:27 +01:00
Erik Hofman
2b981b7ea7 Calculate the day-light factor from the sun latitude and viewer latitude. Use it the calculate the mean temperatures. Fix a problem were non seasonal parameters where using seasonal interpolators. 2020-11-14 13:43:53 +01:00
Erik Hofman
e450917611 Fix a bug in the season offset code. 2020-11-13 15:03:26 +01:00
Erik Hofman
9479839cd4 When the temperature gets low, rain turns into snow. Also make autumn a factor instead of a switch to slowly adjust the autmun slider betweenclimates. 2020-11-12 15:16:44 +01:00
Automatic Release Builder
5b08a780f6 Sentry: add some extra bread-crumbs 2020-11-12 09:35:37 +00:00
Automatic Release Builder
21e6c06a0c Fix a glitch in adding the default catalog 2020-11-12 09:35:32 +00:00
Automatic Release Builder
1583ad3b03 FlightPlans: don’t report XML errors on load
Assume FlightPlan content might be user sourced; don’t worry about
reporting errors for it.
2020-11-12 09:35:26 +00:00
Automatic Release Builder
bedcc81d98 Missed check for a readProperties file check
Sentry-Id: FLIGHTGEAR-5X
2020-11-12 09:35:19 +00:00
Automatic Release Builder
74e27eec16 SetupRootDialog: fix download URI 2020-11-12 09:35:03 +00:00
Automatic Release Builder
81150ff6a1 Sentry: don't report more XML errors
Don't report XML errors when parsing Nasal-loaded content,
or n the launcher when scanning aircraft information.
2020-11-12 09:34:18 +00:00
Automatic Release Builder
be50f64821 FlightPlan: don’t use exceptions for load errors
Avoid spamming Sentry when loading problem flight-plans.
2020-11-12 09:34:10 +00:00
James Turner
6f8c786e1a Sentry: add another XML-error ignore rule 2020-11-12 09:33:35 +00:00
James Turner
685a44ed53 Sentry: combine repeated log messages
Should make the breadcrumbs easier to read.
2020-11-12 09:33:25 +00:00
James Turner
ce65b84c20 TerraSync: wait on Models as well
Avoid starting tile load until Models is done sync-ing, since this
causes may missing file errors.
2020-11-12 09:33:15 +00:00
James Turner
c63594acec Launcher: abandon NautralEarth loading on ‘fly!’
Otherwise we waste time trying to commit loaded data during FG main
startup, which causes races on the NavCache, and is pointless.
2020-11-12 09:33:07 +00:00
James Turner
3c1594ead4 Launcher add-ons: drop missing paths on load
Don’t probe for, or pass, missing paths to FlightGear. Since we don’t
show such paths in the UI, they hang around forever, causing exceptions

Sentry-Id: FLIGHTGEAR-NG
2020-11-12 09:32:58 +00:00
James Turner
e62c64859c Launcher FirstRun: add ‘scroll to bottom’ hint 2020-11-12 09:31:44 +00:00
James Turner
d29f25c391 Launcher: missed translations MichaelD spotted 2020-11-12 09:30:23 +00:00
James Turner
ca103e7fce UI NumericalEdit: tweak marings 2020-11-12 09:30:12 +00:00
Automatic Release Builder
87d2b03b71 Sentry: add another message ignore rule 2020-11-12 09:26:57 +00:00
Erik Hofman
caac9fbd75 Switch to time based detection of autumn. The sun latitude detection is just too flaky. 2020-11-11 14:38:45 +01:00
Erik Hofman
cc0a683627 Remove debugging statements 2020-11-11 13:19:59 +01:00
Erik Hofman
3253a2e5fe Make it possble to assign an offset to the seasons. Slowly adjust environment parameters too. Fix some calculations. 2020-11-11 11:58:21 +01:00
James Turner
2683a27513 NavCache: make Transaction a no-op when read-only.
Avoid BEGINing a transaction when we’re in read-only mode, since this
is not wise.
2020-11-10 23:43:44 +00:00
James Turner
134e06af68 Avoid NavCache races on multiple copies rebuilding
If impatient users start multiple copies of FlightGear when a cache
rebuild is required, we can get into a mess. Use an additional
named mutex on Windows to avoid this situation, and block the secondary
copies until the primary instance has completed its cache rebuild.

Sentry-Id: FLIGHTGEAR-8D
Sentry-Id: FLIGHTGEAR-FY
2020-11-10 23:25:04 +00:00
James Turner
2d7e7b3df6 Waypoints: use bool returns for load errors
Avoid using exception throws for malformed input, makes error
reporting very noisy when user-generated flight plans are loaded.
2020-11-10 23:18:03 +00:00
Erik Hofman
f3f50cef35 Support instant changes when relocating more then one degree lat+lon 2020-11-10 14:49:03 +01:00
Erik Hofman
73c7793efa Make FGClimate a proper subsystem for the environment manager. Average out climate parameters between climate classes and add the climate classification code to the proprty tree, as well as the description. 2020-11-10 13:56:01 +01:00
Erik Hofman
658aa4a764 Add a climate section under the /environment properties. Add relative humidity, mean temperature and dewpoint for sea level and set the snow level based on the mean temperatures. Fix some issues for high-altitude airports (SLLP). 2020-11-09 11:46:34 +01:00
Stuart Buchanan
0982b2827a WS3.0: Initial commit of WS3.0 rendering 2020-11-08 22:43:49 +00:00
Erik Hofman
f21b9b651b Fix ocean humidity calculation, adjust humidity based on altitude and calculate sea level temeprature based on ground level temperature and altitude. 2020-11-08 15:54:54 +01:00
Erik Hofman
6e34ea5ab5 Relative humidity is low when the temperature is high and vice versa. This also makes it time-of-day dependent 2020-11-08 13:13:04 +01:00
Erik Hofman
3384a85650 Clean up the code, impement relative humidity (and related to that dew point) and better implement arid climates 2020-11-08 10:28:23 +01:00
Erik Hofman
1ae2e4c4cd Implement a set of non-lineair seasonal interpolstion fnctions and use them. 2020-11-06 13:49:16 +01:00
Erik Hofman
e3a7ab6cb3 Implement temperature and precipitation for temperate and continental climates 2020-11-05 16:05:53 +01:00
Erik Hofman
39602d98d5 * Updates as suggsted by James.
* Fall back to Ocean climate if the koppen-geiger image is not found.
* Fixes to temperature calculations based on viewer and sun lat and lon.
* Fix season and day progress factors, add an autumn progress factor.
* Set the environment parameters like ice-cover, dust-cover and wetness:
  for now always active, should be a menu option in the future.
* Add a compile-time option to dump a climate report to the console.
2020-11-05 10:09:30 +01:00
James Turner
5386051413 MP-DNS: cancel pending request on close. 2020-11-04 22:32:30 +00:00
Erik Hofman
04ff8a5e5e Add the climate class to the build, for now it's not altering anything. 2020-11-03 14:41:38 +01:00
Erik Hofman
370a412ee6 Add an early implementation of a Köppen-Geiger climate subsystem which can be used to provide to plausible weather and enviroment settings based on latitude and longitude with a resolution of 3x3 km. 2020-11-03 11:54:34 +01:00
Julian Smith
bf7d8bbbb3 src/Main/positioninit.cxx: don't open popup if unable to position on taxiway.
Have downgraded from SG_POPUP to SG_ALERT.
2020-11-02 10:53:38 +00:00
Julian Smith
cf55c5f4f5 src/GUI/new_gui.cxx: disable rescan of style files because causes problems. 2020-11-02 10:53:38 +00:00
Julian Smith
6c1387e35b src/Instrumentation/commradio.cxx: don't use and/or keywords because breaks on windows. 2020-11-01 14:46:14 +00:00
James Turner
3cbbbe3df4 Sentry: fix a merge error when enabled. 2020-11-01 11:18:55 +00:00
Julian Smith
d34f7dc451 src/Main/positioninit.cxx: open popup if we can't find taxiway to avoid starting on runway. 2020-11-01 09:29:20 +00:00
Julian Smith
fd723c0497 src/FDM/YASim/Propeller.cpp: set thrust to zero if feathered. 2020-11-01 09:29:20 +00:00
Julian Smith
2e35b01c89 src/FDM/YASim/FGFDM.cpp: show negative thrust in engines/engine[]/thrust-lbs
We previously only showed the magnitude of the thrust; this patch uses the sign
of first element of thrust vector. Makes things less confusing if an engine is
stopped or otherwise causing drag rather than thrust.
2020-11-01 09:29:20 +00:00
Julian Smith
3591bd8631 Be able to control atis speech pitch, volume and speed.
Uses these properties:
    /sim/atis/speed
    /sim/atis/volume
    /sim/atis/pitch

Values 1.0 behave as default. Other values are used to multiply default
settings.

Changes don't take affect immediately. But changing com frequency seems to
often cause an update which will then pick up the new values.
2020-11-01 09:29:20 +00:00
Julian Smith
1a4d3785c4 src/Main/fg_commands.cxx: incremented diagnostic if profiling not available. 2020-11-01 00:03:03 +00:00
Julian Smith
b78ef0c1ab src/Scripting/NasalSys.cxx: fix call to sglog() to pass function="".
Nasal function names are not persistent strings so are not handled correctly by
sg_log_delta code.
2020-11-01 00:03:03 +00:00
Julian Smith
68938ddb4b src/GUI/QtLauncher.cxx: fix call to sglog() to pass __FUNCTION__. 2020-11-01 00:03:03 +00:00
Julian Smith
63fe407d80 src/ATC/trafficcontrol.hxx: fixed warning about const return value with no affect. 2020-11-01 00:03:03 +00:00
Julian Smith
710a11eeda src/Viewer/splash.cxx: show when download speed is zero. 2020-11-01 00:03:03 +00:00
Julian Smith
aa1e0e1d1d src/Main/main.cxx: fixed warning in OpenBSD-specific code. 2020-11-01 00:03:03 +00:00
Julian Smith
a6a7ce3e4b src/Main/bootstrap.cxx: avoid warning on openbsd. 2020-11-01 00:03:03 +00:00
Julian Smith
34e749bc15 src/Main/bootstrap.cxx: disable custom segfault handler on OpenBSD. 2020-11-01 00:03:03 +00:00
Julian Smith
d7614c184c LiveMetarProperties::handleMetarData: increased diagnostics.
Increased diagnostics from SG_WARN to SG_ALERT, to mitigate confusion if METAR
is out of date etc.

Will add a better mechanism for reporting errors at some point.
2020-11-01 00:03:03 +00:00
Julian Smith
4ec80297bf src/Viewer/FGEventHandler.cxx: NewGUI::setStyle(): added code to rescan style files.
Changing style will reload style from filesystem, so one can edit styles and
see results without restarting fg.

Note that this duplicates initial populating of /gui/styles/ from
defaults.xml's <sim><gui>...</gui></sim> section, so it's a bit of a hack.
2020-11-01 00:02:43 +00:00
Julian Smith
43468727ad Added command 'dialog-toggle' - toggles display of dialogue.
E.g. useful for keyboard shortcuts.
2020-10-31 17:23:28 +00:00
Julian Smith
3c9fae3016 src/Aircraft/replay.cxx:loadTape(): use specified path if it ends with .fgtape.
Used to always prepend /sim/replay/tape-directory and append .fgtape. But it's
convenient to be able to specify exact path.
2020-10-31 17:23:28 +00:00
Julian Smith
e2f2299286 src/Main/options.cxx:fgOptLoadTape(): call fgOSExit() if we fail to load tape.
If user specified --load-tape then failure to load it should be fatal to avoid
confusion. It also avoids needlessly overwriting a valid recovery tape if
/sim/replay/recovery-period is set.
2020-10-31 17:23:28 +00:00
Julian Smith
bdfd42ebd4 src/Aircraft/replay.cxx: try to ensure parent dir of recovery tape.
Avoids unexpected absence of a recovery tape.
2020-10-31 17:23:28 +00:00
Julian Smith
270cada516 src/MultiPlayer/multiplaymgr.cxx: fix multiplayer replay when not connected to multiplayer server.
Previously when replaying a recording, we would not show any recorded
multiplayer aircraft if we were not connected to a multiplayer server.
2020-10-31 17:23:28 +00:00
Julian Smith
f04f902b66 src/GUI/MessageBox.cxx:modalMessageBox(): If no gui, use SG_POPUP to ensure message is printed to terminal. 2020-10-31 17:23:28 +00:00
Bertrand Coconnier
801ec1f7a6 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.
Reintroducing the commit 90a04a that has been inadvertently removed.
2020-10-31 18:06:21 +01:00
Bertrand Coconnier
53fac332c1 Fixes for OpenBSD.
Took the opportunity to switch to the more portable call 'fctnl(... O_NONBLOCK ...)' instead of 'ioctl(... FIONBIO ...)' for all UNIX-like OSes.
2020-10-31 14:29:22 +01:00
Bertrand Coconnier
bb0b69bc41 Fixes assertion failures reported by Julian smith.
These were due to the ground callback instance of FlightGear not setting the ellipse parameters of the 'contact' location. this commit make JSBSim immune to that scenario.
2020-10-31 14:11:14 +01:00
Bertrand Coconnier
388d66b6a6 Sync'ed JSBSim
Includes the following new features and bug fixes:
- The <random> function now uses C++ std::default_random_engine
- WGS84 is now used everywhere in JSBSim (previously a mix of spherical/WGS84 earcth was used resulting in inaccuracies).
- A new <planet> XML element can be used to tweak the planet characteristics (such as semimajor/smemiminor axes, gravity, etc.)
- The FGGroundCallback instance is now managed by FGInertial with a dynamic pointer std::unique_ptr<>. JSBSim was previously using a static pointer which was causing memory access failures when several instances of JSBSim were used or when an instance was replaced by a new one (the structure pointed to by the static pointer was then lost when the old instance was destroyed).
- Removed calls to exit() and replaced them by exceptions that can be caught by FlightGear (should avoid FlightGear from being ungracefully stopped by an error found by JSBSim).
- Sockets interface: replaced the usage of obsolete functions gethostbyname()/gethostbyaddr() by getaddrinfo().
- FGColumnVector3 and FGMatrix33 can now be initialized by C++ std::initializer_list
- Disable the delays implemented in some flight control components during trimming (was sometimes preventing the trim algorithm from converging to a solution).
- Fixed the magnetometer initialization (was not updated during the first 1000 time steps)
- More conversions to C++11 features (nullptr, override, std::unique_ptr<>, etc.).
2020-10-30 13:52:56 +01:00
James Turner
f4298d676f Fix for RMB/MMB interaction with picking
When RMB drag-to-look is active, ignore all other mouse downs, which
might otherwise trigger picks to start.

Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2108/
2020-10-29 23:20:48 +00:00
Automatic Release Builder
6d2f1d33d8 Launcher: fix L10N issues found by Michael D
Address parts of the issues mentioned in:
https://sourceforge.net/p/flightgear/codetickets/2386/
2020-10-29 21:21:40 +00:00
James Turner
29d171e73a Launcher: port the QQC2 check to next
Since we require QQC2 on next, make it a critical warning.
2020-10-29 21:21:00 +00:00
James Turner
e028c52e42 NavCache: fix writes to a read-only DB
When in read-only mode, we were still allowing writes during the
octree building, which is bad. Add the missing check.

Sentry-Id: FLIGHTGEAR-8F
2020-10-29 21:13:47 +00:00
James Turner
4075ea02e9 Launcher: Fix scrollbar for next 2020-10-29 21:12:36 +00:00
James Turner
0dfdf63399 Clear atomic listeners too
This is part of trying to reduce possible causes of the property
crash on shutdown.
2020-10-29 17:28:05 +00:00
James Turner
3af8d11e1b Fix for renamed file 2020-10-29 16:26:36 +00:00
James Turner
801ddc59f8 Fix for missing 2D panel
Should be back-ported to 2020.3

Sentry-Id: FLIGHTGEAR-5X
2020-10-29 16:24:53 +00:00
Automatic Release Builder
77d7476ba6 Fix route-path crashes on empty
This could be triggered by doing ‘view route’ in the launcher flight-
planning code, wit no route defined.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
f8aea84541 Launcher: nicer back button.
Avoid localisation issues for the back button, by switching to an 
icon.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
9855e89109 Launcher: Validate restored aircraft state on load
Otherwise a stray state can enter the logic, unless the user
re-selects it.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
f0e2a297ae Launcher: Fix excessively large mouse area
The notifications catch are was blocking the summary pane; fix the
size to follow the active notifications.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
d75f05d4c0 ATC_mgr fix: clear user aircraft ATC on reposition
Avoids a stale controller causing crashes after a reposition. Triggered
by C172 tutorials.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
9f3f1a8f58 Launcher: Fix translation tag Michael D spotted. 2020-10-29 16:24:41 +00:00
Automatic Release Builder
5b3f0e5cbb Sentry: generate a UUID for report tracking
Because we don’t have any user-identifier, generate a UUID so that
we can filter reports by it.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
f78d644a61 Launcher: fix feedback adding default catalog
When adding the default catalog from the aircraft browse tab, 
the list on the add-ons page didn’t refresh correctly.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
8c371cf3bb Launcher: Separate recent-foo data by version
Since our data encoding is incompatible between 2018 and 2020, use
different settings keys so running both versions in parallel is easier.
Without this, each version screws up the data for the other.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
9776c56faa Fix a crash (race condition) closing the launcher
When local aircraft scanning is slow, we can end up clearing
the locale while a scan is in progress, which crashes. Ensure we
abandon any in-progress scan when closing the launcher.

Sentry-Id: FLIGHTGEAR-CH
2020-10-29 16:24:41 +00:00
Automatic Release Builder
df42c6f026 Launcher: UI feedback for hangar migrations
Add pop-up notification when we migrate to a new version of a hangar.
Convert the ‘new version available’ message to use a pop-up
notification as well.
2020-10-29 16:24:39 +00:00
Stuart Buchanan
c71f281a58 Launcher: First Run capitalization and grammar. 2020-10-29 16:23:26 +00:00
Automatic Release Builder
3e72fb230f Sentry: block XML parse errors from the launcher
Avoid filling up the logs when the launcher parses broken aircraft XML;
wait until the user actually pick one to fly with, before reporting
XML errors.
2020-10-29 16:23:26 +00:00
Automatic Release Builder
fc037de312 NavDataCache: don’t duplicate FG_ROOT/Scenery path
Check if the path is in the list, before adding it again.
2020-10-29 16:23:26 +00:00
Automatic Release Builder
397aad1d1d Autopilot XML: Improve logging around NaNs
The current NaN message is very noisy, and not very information. Try
to improve that, to avoid filling up the logs.
2020-10-29 16:23:26 +00:00
Automatic Release Builder
e4c0e71424 Environment: Doesn’t need to be a warning 2020-10-29 16:23:26 +00:00
Automatic Release Builder
b35b8c6147 Splash screens: support more, and JPEGs 2020-10-29 16:23:26 +00:00
Automatic Release Builder
19aa0332f2 loadxml() command: add ‘quiet’ bool option
This is to avoid console/log spam from jetways.nas in particular,
which uses loadxml to probe for file existence, every 10 seconds. But
in general it seems useful to have this potentially be quiet, since
there is a result code.
2020-10-29 16:23:26 +00:00
Automatic Release Builder
378fc54b61 Launcher: first-run wording tweaks
As discussed on the devel list, also switch to HTTPS.
2020-10-29 16:23:20 +00:00
Automatic Release Builder
9de60e5729 Change error reporting for -set.xml parsing
Avoid exceptions in the ‘not actually a -set.xml’ case, since this
occurs somewhat frequently.

Sentry-Id: FLIGHTGEAR-3W
2020-10-29 16:22:35 +00:00
Automatic Release Builder
e0df583c14 Launcher: fix appearance of disabled add-ons.
Spotted by Michael Danilov
2020-10-29 16:22:35 +00:00
Automatic Release Builder
38f44e0928 Traffic: fix some crashes detected by Sentry
Sentry-Id: FLIGHTGEAR-68
Sentry-Id: FLIGHTGEAR-67
2020-10-29 16:22:35 +00:00
Automatic Release Builder
f4f261a068 Guard against data errors in rwyprefs.xml
AirportDyanmics::innerGetActiveRunway can unfortunately return an
empty string even when it return ‘true’. Check for this in the wrapper,
and switch to the fallback, to avoid returning a bogus runway to
other parts of the code.

Sentry-Id: FLIGHTGEAR-39
2020-10-29 16:22:35 +00:00
Automatic Release Builder
4ac8523bed SetupRootDialog: avoid calling exit()
This causes QApplication to become unhappy and crash, so use a
graceful exit via a new return code and FG_OPTIONS_EXIT instead.

Sentry-Id: FLIGHTGEAR-6B
2020-10-29 16:22:35 +00:00
Automatic Release Builder
582d539a1a Launcher: overhaul local -set.xml parsing
Fix the include context when -set.xml are parsed by the launcher to
extract states and other data. Ensure aircraft paths are available
and handled consistently with normal -set.xml parsing. Without this,
many -set.xmls fail to parse.

Sentry-Id: FLIGHTGEAR-4H
Sentry-Id: FLIGHTGEAR-3B
Sentry-Id: FLIGHTGEAR-3R
Sentry-Id: FLIGHTGEAR-3Q
Sentry-Id: FLIGHTGEAR-3F
Sentry-Id: FLIGHTGEAR-2R
Sentry-Id: FLIGHTGEAR-65
Sentry-Id: FLIGHTGEAR-42
2020-10-29 16:22:35 +00:00
Automatic Release Builder
2b54078023 Additional Sentry message ignores: add AC3D
These make the reports very noisy for no value.
2020-10-29 16:22:35 +00:00
Automatic Release Builder
7597887e60 Fix Sentry issue: FGCom crash on exit
FGCom was added to the wrong group, leading it to be shutdown after
FGSoundManager, and hence, after OpenAL wad closed, which causes
crashes.

Sentry-Id: FLIGHTGEAR-66
2020-10-29 16:22:35 +00:00
Automatic Release Builder
d252740307 Adjust for changed SGXMLSound API
Detect bool return value from init(), use this to allow calmer
failures. Requires corresponding SG commit.
2020-10-29 16:22:35 +00:00
Automatic Release Builder
632d5bc836 Launcher: first-run & help updates
Adjust the wording and links for these pages, after a review session
with Stuart and others. Include a link to the manual and short-ref
from the local installation.
2020-10-29 16:22:35 +00:00
Automatic Release Builder
78c659ec87 Launcher: fix some minor glitches in Aircraft list
- updating of 'no results' box
- sizing of the headers when empty
- double-click to select of the search box when focused
2020-10-29 16:22:33 +00:00
Automatic Release Builder
9748b57971 Launcher: add update checker UI 2020-10-29 16:21:47 +00:00
Automatic Release Builder
1ef6578ad4 Fix scrolling of Launcxher FirstRun
Johnathan R pointed out that for wider windows, the button was
invisible, fix this will a scrollbar.
2020-10-29 14:54:04 +00:00
Automatic Release Builder
f8222da1da Launcher: add help page
Collect some standard information directly in the launcher. Text to be
reviewed, this is just a first draft.
2020-10-29 14:53:51 +00:00
Automatic Release Builder
4c48faf2c7 Remove log warning from geodinfo(), it's too noisy 2020-10-29 14:53:36 +00:00