Instant Replay

From FlightGear wiki
(Redirected from Flight Recorder)
Jump to navigation Jump to search
The instant replay dialog.

Instant Replay allows you to view for example your last landing from different views and perspectives afterwards.

Additionally the instant replay feature allows saving and replaying past flights.

Usage

FlightGear maintains an in-memory recording of the current session. To avoid running our of memory, only the last minute or so is recorded in full detail, and older data is gradually pruned.

The in-memory recording can be saved to a file.

Starting and controlling replay of normal recording

  • Press Ctrl-r or select Instant Replay from the View menu to start the replay. Replay starts immediately.
  • Press p or click pause to pause/resume the replay.
  • Use the left/right arrow keys, or the <<, >> buttons to skip. You can also use the mouse and drag the time slider.
  • Use the up/down arrow keys, or the +, - buttons to change replay speed. You can replay at slow-motion, real-time or fast-forward speed.
  • Enable the Loop checkbox to continuously repeat the playback. When you configure a duration (in seconds) then only the last few seconds are continuously replayed.

Stopping replay

  • Press Escape or the End Replay button to stop replay and return to the position prior to starting replay.
  • Alternatively, click the My Controls! button to take over control at any point. With this feature you can use the replay system to go back in time, regain control and then continue the flight from a past position. This is useful to train particular flight phases, such as flying the same approach again and again, maybe using different weather/wind conditions.

Saving and loading replay tapes

Though Main Menu > File > Save Flight Recorder Tape and Load Flight Recorder Tape you can save and load flight recorder tapes.

When saving the tapes you can add a description of the flight.

Record/replay on next

The extended Flight Recorder Control dialog on next.

There are various additions to record/replay on next:

  • Extended File/Flight Recorder Control dialogue.
  • Periodic generation of a recovery snapshot, allowing resumption after a flightgear crash.
  • Continuous recording system:
    • Continuous recording to file without any loss of detail.
    • Optionally record/replay extra information:
      • Multiplayer aircraft.
      • Main window size.
      • Main window position.
      • Main window view.
  • Aircraft override:
    • When loading a Continuous recording at startup, we override the aircraft and starting airport to match what is in the recording.
  • Replay of Continuous recordings from URL:
    • Extends the --load-tape command-line option, for example: --load-tape=http://foo.com/bar.fgtape

Details

  • A recovery snapshot is actually a single-frame continuous recording, and will be called <aircraft-type>-recovery.fgtape.
    • Load on the command line with --load-tape=<aircraft-type>-recovery.
    • Then do Ctrl-R to see the replay dialogue.
    • And click on My Controls.
    • Notes:
      • Some aircraft do not support My Controls.
      • Loading a recovery file from within Flightgear via the Flight Recorder Control dialogue is usually not useful because the recovery file will have been overwritten by the current Flightgear session.
  • Continuous recording to file uncompressed is e.g. 100MB for an hour's recording near EDDF.
  • Support for compression of Continuous recordings was pushed to next on 2021-7-31 (FlightGear commit 7d414886e00e).
  • Replay of Continuous recordings from URL:
    • Downloads to local file in the background while replaying.
    • Reuses local file if present, appending to it in the background if it was a partial download.
    • Local file is in directory specified by property /sim/replay/tape-directory.

For details on recording file formats, see: flightgear/docs-mini/README-recordings.md

FG 2.6.0 and later

Note
Cquote1.png the "my controls" button is currently intentionally disabled for JSBSim and for YASim helicopters. Only works with YASim aircraft so far.
Cquote2.png
The instant replay dialog.

FG 2.6.0 introduced a new replay system which can be adapted to individual aircraft and provides better recordings/playbacks. It also introduces a new GUI as well as a dedicated file format for serializing flights to disk: Fgtape.

Cquote1.png the flight recorder tapes are only 1 or 2 hours max... at one time i wanted to do one for a cross-country flight but when i saved it i only got the last hour or two
Cquote2.png

FG 2.4.0 and earlier

The instant replay dialog for FG2.4.0 and earlier.

For FG 2.4.0 and earlier, a simple dialog box is presented with a couple of options (duration of replay and view type).

  • A value of 0 for duration will replay the entire flight. The default value is 90 seconds (similar to MSFS). If you want something different, just type the number of seconds desired in the text box.
  • The view option is a drop-down box with three options corresponding to Cockpit, Chase and Tower views. No matter what this is initially set to, the view type can be changed as normal with v/V and ctrl-v to cycle forwards or backwards through all the available views or return to default Cockpit view.

To return to normal flight, press 'p' twice (pause/unpause). This returns you to the point where you selected Instant Replay. You cannot back up 30 seconds or so and try that landing again. Also, it is currently not possible to save the replay buffer to a file to load and replay a flight later on.

Note: only data directly related to your aircraft is saved and played back, AI objects, multiplayer aircraft or any random features will not be replayed.

Cquote1.png The replay system uses three buffer levels: short term memory records 60

seconds at full frame rate, mid term buffer records another 10 minutes
at 2fps, and the long term buffer holds 1 hour at 1/5fps. As I stated
earlier, I'm not changing the buffering scheme itself. However, the
buffer durations and rates are exposed by properties now. So, if you had
enough memory, you could increase the buffer sizes or change their rates.


Cquote2.png
Cquote1.png You should be able to extend the recording limit by changing the /sim/reply/duration property (e.g. by clicking on View -> Instant Replay and changing the duration in the textbox next to the "Loop" checkbox).
— Alessandro Menti (Feb 20th, 2016). Re: [Flightgear-devel] flight recorder time limit.
(powered by Instant-Cquotes)
Cquote2.png


Feature requests

Cquote1.png If the F/R data was written to disk immediately, so it doesn't have to take up valueable RAM, would make it possible to record nearly indefinitely (depending on disk space). And delete this data like a tmp-file on shutdown, if it isn't stored somewhere else...
— chris (Feb 20th, 2016). [Flightgear-devel] flight recorder time limit.
(powered by Instant-Cquotes)
Cquote2.png
Cquote1.png This should be quite doable, the FlightRecorder code is quite self-contained. Also it uses thining of the history buckets so actually I think for multi-hour data, maybe it just needs a coarser (maybe one sample per 5 seconds?) bucket of larger sie. If you want to look at the code I’m happy provide guidance on enhancing it.
— James Turner (Feb 21st, 2016). Re: [Flightgear-devel] flight recorder time limit.
(powered by Instant-Cquotes)
Cquote2.png

[Something similar to this is on next - see above.]

Related content

Wiki articles

Forum topics

Readme file

Source code