Hi Jon,

Well I've found that the if the "/sim/preset/altitude-ft" is set to -9999 then
the trimming works normally.  This property is set by no less than three
different functions now and there are a few others that have commented out
code for setting this preset.  On the surface this whole presets thing appears
to be quite a mess.

Anyway, maybe someone familiar with the ground trimming can explain what
happens differently when a ground elevation of -9999 is fed into the FGInterface.

Here are the property values shortly after startup of c172-3d at KSFO:

/position/altitude-ft = 8.765015
/position/altitude-agl = 4.577331

/sim/presets/altitude-ft = 4.158417

The position values look fine.  One interesting problem is that the
"/sim/presets/altitude-ft" is set to the "ground elevation" during a normal
"on the ground" (as opposed to in the air) startup.

So what happens is that on reset, the ground elevation gets plugged into the
FDM as a starting altitude,  and the altitude is then too low (by a few to
several feet depending on the aircraft).

Then the aircraft gets violently popped up in the air and depending on
something in the ac's config, it either settles back down or it flips over, or
in the case of the 737 it slowly rolls back and over.

There's a patch at the end of this that works around the issue by adding yet
another setter for the preset altitude,  but I would much rather see something
improved in the ground trimming that makes it a little less problematic.

This has been an ongoing issue with the trimming code in JSBSim.  Is it
possible to fix it?  I take it the ac is "bouncing" like a hard landing or
something like that.

Best,

Jim


cvs diff: Diffing src/GUI
Index: src/GUI/gui_local.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/GUI/gui_local.cxx,v
retrieving revision 1.11
diff -u -r1.11 gui_local.cxx
--- a/src/GUI/gui_local.cxx     31 Mar 2004 21:10:32 -0000      1.11
+++ b/src/GUI/gui_local.cxx     3 Apr 2004 21:07:43 -0000
@@ -45,7 +45,6 @@
     build_rotmatrix(GuiQuat_mat, curGuiQuat);
 }

-
 void reInit(puObject *cb)
 {
     // BusyCursor(0);
@@ -70,6 +69,10 @@

     globals->restoreInitialState();

+    if ( fgGetBool("/sim/presets/onground") ) {
+        fgSetDouble("/sim/presets/altitude-ft", -9999.0 );
+    }
+
     // update our position based on current presets
     fgInitPosition();




_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to