Board index FlightGear Development New features

A fairly useful feature

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

A fairly useful feature

Postby Thorsten » Wed Oct 26, 2016 5:37 pm

Added this to the Shuttle today after figuring out how to write property lists to file and where I am allowed to do that.

Image

Saves into one of five slots with an optional description and a timestamp for reference which are shown when you click on the slot. Still rather experimental, but it can even resume powered flight under auto-guidance.
Thorsten
 
Posts: 11375
Joined: Mon Nov 02, 2009 8:33 am

Re: A fairly useful feature

Postby wlbragg » Wed Oct 26, 2016 6:21 pm

Nice, how does this differ from a replay tape?
I've often wondered if there was a way to use portions of the replay system to make a save state feature.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5194
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: A fairly useful feature

Postby dg-505 » Wed Oct 26, 2016 6:45 pm

Really cool :D

What's I would find quite interesting: Why does your feature work for JSBSim aircraft (like the Shuttle) but not the "My control" function of the replay system?
IIRC I read somewhere that JSBSim doesn't like to get "interrupted".....
It's not just a hobby. I'ts a passion: FLYING !!

DHC-6 Twin Otter development
User avatar
dg-505
 
Posts: 619
Joined: Mon Jun 02, 2014 2:36 pm
Location: Bonn, Germany
Version: next
OS: Ubuntu 18.04 Bionic

Re: A fairly useful feature

Postby Thorsten » Thu Oct 27, 2016 5:36 am

Nice, how does this differ from a replay tape?
I've often wondered if there was a way to use portions of the replay system to make a save state feature.


I'm not exactly sure what the replay does (I've never used it myself) - my understanding is that it records a stream of properties. The save/resume aims at writing down a state and resuming it, i.e. no time history to it.

The state of an aircraft is more than a collection of properties, because it also has to do with what Nasal loops may be running or what Nasal variables have what values.

Also (and that possibly touches dg-505's question) - properties of the kinematic state that are useful for recording are not necessarily the ones JSBSim accepts as input for the re-init. For instance for a replay you probably want to record ground-relative speeds, whereas for inserting something into an orbit per commandline you need to specify inertial speeds in body coordinates.

JSBSim only accepts a fairly limited set of properties as input and derives the rest from them - so you need to figure out which ones to save to file. Also, some JSBSim components can't in my experience simply be set to a value (and I've tried quite some trickery) - they want to take their time to evolve into the target state. Recording and setting properties doesn't help, the JSBSim needs to be equipped with a custom initialization function in these cases which is called by the routines.

I suppose there's a reason why FG doesn't have a general save/resume feature, because there's lots of aircraft-specific work needed.
Thorsten
 
Posts: 11375
Joined: Mon Nov 02, 2009 8:33 am


Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest