On Sonntag, 4. April 2004 17:49, Jim Wilson wrote:
> Mathias FrÃhlich said:
> > Well, my first guesses were wrong, but I have found what JSBSim does now:
> >
> > The code in question is in FGJSBSim::do_trim():
> >
> > if ( fgGetBool("/sim/presets/onground") )
> > {
> > fgic->SetVcalibratedKtsIC(0.0);
> > fgtrim = new FGTrim(fdmex,tGround);
> > } else {
> > fgtrim = new FGTrim(fdmex,tLongitudinal);
> > }
> >
> > At initialization time /sim/presets/onground is true, at reset time it is
> > false.
> > It lookes like tGround triming also adjusts the height of the aircraft so
> > that it does not get pushed into the air by the gear springs. Whereas
> > tLongitudinal triming does not adjust the altitude.
> >
> > Just taking tGround triming all the time fixes the reset issue. But this
> > is obviously not the right fix here.
>
> Did you trace this in a debugger? fgGetBook("/sim/preset/onground") is
> definately true at the time the reset key is hit....otherwise that hack I
> posted earlier would not work.
I just printed this with a cout.
And yep, I wondered too because of the patch you posted last time.
I am not too familiar with flightgear as such, but I guess, like written
before, that /sim/preset/onground is reset to false past your patch checks
for this property. Then past it is reset your change to the altitude value
might cause /sim/preset/onground to be set to true again, which does not
happen if the altitude is not set to -9999.
Try it yourself, just add
cout << "onground: " << fgGetBool("/sim/presets/onground") << endl;
at the entry of void FGJSBsim::do_trim(void) in FGJSBSim.cpp and run
flightgear ... (yesterdays flightgear CVS)
Greetings
Mathias
--
Mathias FrÃhlich, email: [EMAIL PROTECTED]
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel