|
From: Wayne B. <kil...@co...> - 2016-12-14 21:53:31
|
I've been working a bit with James on the state overly system. I have made some progress but I have created as many questions as I have answers. One thing that seems apparent is the data that is saved to .fgfs/aircraft-data/c172p.xml, or Window's equivalent, by whatever means, is loaded after the data saved to the /sim/state/overlay tree. That still needs to be addressed as the data in .fgfs/aircraft-data/c172p.xml is loaded automatically. So to use the saved state right now I have to transfer the values in the /sim/state/overlay tree to the actual FDM or local aircraft properties after /sim/signals/fdm-initialized happens. I'm pretty sure this is not how it was intended to work. I think the overlay properties are meant to automatically set their corresponding local fdm and aircraft properties. Also we have the sim presets to work with (http://wiki.flightgear.org/Preset_Properties), I am unclear how these are suppose to work with the state overlay system, or if they are? They can be set using a cmdline switch such as --vc=100 sets the /sim/presets/airspeed-kt which is used for the approach startup state. Again, I doubt this is meant to be used this way as it kind of conflicts with the --state=approach method of loading the /sim/state/overlay tree. Then there is also the launcher which in this example of setting up a state called "approach" you have a GUI choice of "On final approach at distance of" which sets you up, paused at a predetermined distance and elevation, from the end of the runway. All other properties to achieve a stable glide slope to the runway threshold need to be initialized using either the state overlay method or the /sim/presets method. By using a combination of these 3 methods I was able to get the c172p running, on approach to an airport. But I am pretty sure it is not how it is meant to be accomplished. One of my first questions was going to be, is there a list of the cmdline flags which correspond to the available /sim/presets properties? ie: --vc=100 sets the /sim/presets/airspeed-kt property That is the only one I know because James offered a guess as to what it was. But thinking that the /sim/presets really shouldn't have anything to do with the state overlay method, this really shouldn't be of concern (even though I would still like to see or create a mapping). A critical question for me moving forward then is, if you can't or shouldn't use the /sim/presets to set up the aircraft state because they require a cmdline flag to be set VS a /sim/state/overlay parameter set, what fdm/aircraft properties do we use to set things like airspeed or any of the properties that need to be set for certain conditions. I personally don't have a good grasp on what in the property tree is available, and not a tied or write protected property, to accomplish this. Where do I need to look to get this answer. This is all assuming we get past load() overwriting parameter set by /sim/state/overlay, keeping in mind we don't control when load() is called, only on what is written to .fgfs/aircraft-data/c172p.xm which we use for other things. I suggest the possibility of leaving it up to the aircraft developers to set up whatever states they deemed appropriate and allow that to be passed to the launcher in the form of a drop down. We already have access to virtually everything we need to create and save a state on the aircraft/FDM side of things (see Space Shuttle for an example of that). Yes, that is done by the use of -set file entry points, but could just as easily be able to be accomplished by catching a, launcher set, state flag that can be caught at fdm-init and acted upon accordingly. That give you the most flexibility but I see it also might open up a can of worms. I also don't have any issues with continuing down the current path of setting up some predefined standard states that all aircraft should adhere to. I'm unclear about how that is intended to be done? I hope this all make sense. Please feel free to set me straight on anything I may have wrong or am not understanding. I want to continue to help with this effort but currently I am kind of stuck without some answers or a clear direction forward. Thanks, Wayne |