Fixing presets: Difference between revisions

Jump to navigation Jump to search
no edit summary
mNo edit summary
No edit summary
Line 25: Line 25:
The way this was intended to work is that if you want to start on the ground, you should set the altitude to -9999.
The way this was intended to work is that if you want to start on the ground, you should set the altitude to -9999.
Exposing the raw /sim/presets properties to the end user leaves a lot of room for them to make mistakes.
Exposing the raw /sim/presets properties to the end user leaves a lot of room for them to make mistakes.
{{cquote|
There's also more to the problem.  If we're restoring a saved flight then everything's fine, since all of the FDM state is already valid. If, on the other hand, we're starting in the air, then we need a general trimming routine like the one Tony wrote for JSBSim and LaRCsim to avoid violent oscillations at startup.<ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg09856.html |title= Presets menu|author=David Megginson |date=Mon, 18 Nov 2002 14:44:41 -0800}}</ref>|David Megginson}}


{{cquote|
{{cquote|
Line 44: Line 48:


{{cquote|
{{cquote|
There's also more to the problem. If we're restoring a saved flight then everything's fine, since all of the FDM state is already valid. If, on the other hand, we're starting in the air, then we need a general trimming routine like the one Tony wrote for JSBSim and LaRCsim to avoid violent oscillations at startup.<ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg09856.html |title= Presets menu|author=David Megginson |date=Mon, 18 Nov 2002 14:44:41 -0800}}</ref>|David Megginson}}
Write the initial conditions directly into the main property tree. We would need to hold onto a few properties to say which setting to use (say, for location), but this system in general should work much better, since cannot predict what properties any given vehicle might need to preserve on a reset. Essentially, a reset is nothing more than an in-memory save/restore.<ref>
{{cite web |
url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg18879.html |
title= Re: Helicopters: wow!|
author=David Megginson |
date=Mon, 24 Nov 2003 08:50:37 -0800}}</ref>|David Megginson}}


{{cquote|
{{cquote|

Navigation menu