If specified we start video encoding when replay starts, and stop video
encoding when we reach recording end.
This is supported with --load-tape on the command line and from the 'Load tape'
dialogue.
src/Aircraft/continuous.cxx
src/Aircraft/continuous.hxx
If stopping replay with auto create video, then stop video encoding and
restore original /sim/time/fixed-dt if we changed it.
src/Aircraft/replay-internal.cxx
src/Aircraft/replay-internal.hxx
When starting replay, call view_mgr->video_start() and set
/sim/time/fixed-dt if specified.
src/Aircraft/replay.cxx
src/Aircraft/replay.hxx
loadTape(): added bool create_video and double fixed_dt args.
src/Main/options.cxx
Added new command-line options --load-tape-create-video and
--load-tape-fixed-dt=<double> to allow auto create video and fixed-dt when
replaying.
The main FGReplay subsystem class now contains just the public API for
record/replay, plus a pointer to instance of new ReplayInternal implementation
class. Also moved some Continuous-specific code into new source file.
src/Aircraft/CMakeLists.txt
Updated for new files.
src/Aircraft/continuous.cxx
src/Aircraft/continuous.hxx
New, code specific to Continuous record/replay.
src/Aircraft/flightrecorder.hxx
Minor changes.
src/Aircraft/replay-internal.cxx
src/Aircraft/replay-internal.hxx
New, contains implementation of record/replay.
src/Aircraft/replay.cxx
src/Aircraft/replay.hxx
Modified to be just concerned with public record/replay API. The
implementation now defers to the ReplayInternal instance. Added support for
auto create-video when loading Continuous recording.
src/Main/fg_init.cxx
resetStatisticsProperties() is now in FGReplay, not FGReplayData - the
latter is not in the replay.hxx header any more.
Uses simgear::VideoEncoder().
Added video-start and video-stop commands. We allow specification of container,
codec, quality, speed and bitrate.
src/Main/fg_commands.cxx
Added video-start and video-stop commands.
src/Viewer/viewmgr.cxx
src/Viewer/viewmgr.hxx
Added video_start() and video_stop().
If in simple-time mode and /sim/time/fixed-dt is non-zero, we always increment
FDM time by fixed amount each frame, regardless of frame rate. Allows creation
of high quality videos even on slow hardware.
src/AIModel/AICarrier.cxx
Avoid warning about unused angle_tdp variable.
src/AIModel/AIFlightPlanCreate.cxx
Increased a buffer size that was giving warning with snprintf(). Also
always use sizeof(buffer) instead of duplicating the explicit size.
- Fixed an error which prevented the equatorial and polar radii from <planet> to be propagated to the initial conditions.
- The planet radii in <planet> can now be specified by the tags <equatorial_radius> and <polar_radius> which are more self explanatory than <semimajor_axis> and <semiminor_axis> (which are still valid).
- Improved the error messages returned by FGTable: the file name and line number where the error occurred are now printed.
- Check the number of <input> tags for flight controls such as <pure_gain> (GitHub issue #497). This avoids a crash when some or all <input> elements are missing.
- JSBSim now accepts 2 sign conventions for the cross product inertia (xy, xz, yz) in <mass_balance> (GitHub Pull Request #502). The sign convention is specified by the parameter negated_crossproduct_inertia which defaults to true for backward compatibility.
- Turbine engines can now windmill even before they start (GitHub issue #494 and Pull Request #509).
- Fixed a sign error in the computation of aero/h_b-mac-ft (GitHub Pull Request #508 )
- Fixed a bug where FGTable instances were not untied from the property manager during their destruction. This could lead to segmentation faults when the property manager was later destroyed.
- Exceptions raised by FGTable are now instances of the TableException class.
src/AIModel/AIFlightPlan.cxx:
Clarify expression with extra round brackets.
src/AIModel/AIFlightPlanCreate.cxx:
Increased buffer size to match longest possible string.
src/FDM/JSBSim/input_output/FGOutputFG.cpp:
Use cast to avoid comparison of int with enum.
For performance replay, we need to ensure that replaying recordings will
replay changes to the view and main window size, if they are present in the
recording. [Replay of these changes can be disabled in the "File/Flight
Recorder Control" dialogue.]
scripts/python/performance_replay.py
New, script for replaying a recording in Flightgear and gathering
statistics.
scripts/python/recordreplay.py
Minor change.
src/Aircraft/replay.cxx
src/Aircraft/replay.hxx
If /sim/replay/log-frame-times is true, populate
/sim/replay/log-frame-times/dt[] with frame times while replaying.
Previously VPB tiles were loaded by the STG file loader.
This was not ideal as the VPB tile granularity is 1x1 degree
while the STG file loader is 20x20km.
This change makes the tile manager load VPB tiles explicitly
on range, and allows better prioritization of the underlying
terrain.
If /sim/highlighting/enabled is true, we highlight animated objects under the
pointer, and also highlight other objects that are animated by the same or
related properties.
The intent here is to be able to give a visual indication of what cockpit
controls do or what cockpit controls affect particular aircraft objects - for
example moving the pointer over the flaps will highlight the flaps and also
highlight any controls or rotary indicators in the cockpit that are associated
with the flaps.
To make this work, we have to discover associations between properties. This
is currently done for YASim (e.g. associations between /controls/flight/flaps
and /surface-positions/flap-pos-norm) and autopilot filters (e.g. with
the 777, digital filters associate /controls/flight/rudder-nul with
/fcs/fbw/yaw/rudder-ratio-out). We don't currently gather associations between
properties in JSBSim
We also detect associations between dialogs, menus and keypresses and
properties, which is used to populate /sim/highlighting/current with
information about dialogs, menus and keypresses that are associated with the
currently highlighted nodes' properties.
Details:
src/GUI/Highlight.cxx
src/GUI/Highlight.hxx
src/GUI/CMakeLists.txt
src/Main/fg_init.cxx
New subsystem called 'highlight', with support for registering and
recovering links between menus, dialogs, keypresses and OSG node
animations.
Provides a function Highlight::highlight_nodes() which highlights
related nodes using internal NodeHighlighting class, and populates
/sim/highlighting/current with information about related dialogs, menus and
keypresses.
The NodeHighlighting class works by making nodes use an alternative
StateSet which shows up as a distinct material on screen. We remember each
highlighted node's original StateSet so that we can un-highlight. We update
the material parameters using a listener for /sim/highlighting/material,
which allows some control over the appearence of highlighted nodes.
src/FDM/flight.cxx
src/FDM/flight.hxx
Added virtual method FGInterface::property_associations() which returns
property associations from the FDM. Default implementation returns empty
set. Implemented in YASim, but not (yet) in JSBSim. Uses a simple function
pointer at the moment to avoid requring FDMs to use recent C++ features.
src/FDM/YASim/FGFDM.cpp
src/FDM/YASim/FGFDM.hpp
src/FDM/YASim/YASim.cxx
src/FDM/YASim/YASim.hxx
Gathers information about property associations on startup such as
/controls/flight/flaps => /surface-positions/flap-pos-norm, then
YASim::property_associations() overrides default implementation to return
these associations.
src/Autopilot/analogcomponent.cxx
src/Autopilot/analogcomponent.hxx
src/Autopilot/digitalfilter.cxx
src/Autopilot/inputvalue.cxx
src/Autopilot/inputvalue.hxx
Filters now gather information about their input/output properties and
register with Highlight::add_property_property(). For example this makes
highlighting work on the 777, where pilot controls affect control surfaces
only via filters.
src/GUI/new_gui.cxx
Scan menus, keypresses and dialogs and register associations with
Highlight::add_*().
src/GUI/property_list.cxx
src/GUI/property_list.hxx
src/GUI/FGPUIDialog.cxx
Added <readonly> flag to property-list. If set, we don't show .. or . items
and don't respond to mouse/keyboard.
Used by fgdata's new Highlighting dialogue.
src/Model/acmodel.cxx
src/Model/acmodel.hxx
Visit the user aircraft's scene graph when it is loaded, gathering
information about osg::Node's that are animated by properties, and register
these associations with Highlight::add_property_node().
src/Viewer/renderer.cxx
When scanning for pick highlights, use Highlight::highlight_nodes() to
highlight animated objects under the pointer and related objects.