1
0
Fork 0
Commit graph

15136 commits

Author SHA1 Message Date
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
af3afb55db Fixed test-suite build error on OpenBSD.
assertEquals<> template requires first two args to be the same type, and old
code assumed that time_t was a long int.
2021-02-13 23:04:35 +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
39f3a83a7e macOS joystick: reduce warnings on some devices
Don’t SG_WARN when we see an unhandled HID page or element, it’s not
necessary.
2021-02-04 10:31:17 +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
Scott Giese
0058ef27c5 TerraSync: Rate Limiter
Sourceforge seems to have an agressive API rate limiter set at approximately 50 requests/minute.
2021-01-31 21:58:41 -06:00
Torsten Dreyer
7621569834 terrasync.py: add option to use basic authentication 2021-01-31 14:25:06 +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