]> git.mxchange.org Git - flightgear.git/commitdiff
Csaba HALASZ: fix IVSI instrument problem
authormfranz <mfranz>
Sat, 3 Nov 2007 21:02:28 +0000 (21:02 +0000)
committermfranz <mfranz>
Sat, 3 Nov 2007 21:02:28 +0000 (21:02 +0000)
"I have been investigating the Concorde IVSI problem. I came to the
conclusion that the trouble is that the environment altitude and thus
the pressure (which is calculated from that) is lagging by 1 frame.
Normally that wouldn't be a problem, but the IVSI calculates rate of
change and it will use the new dt with the old value difference,
thereby arriving at bad results if dt changes (and it does)."

src/Main/fg_init.cxx

index fc2fc7ec67be29d5ee96fc2ae5607b7281fc33ae..07effac561a312cbab482acd13b8a0c1c30358d4 100644 (file)
@@ -1650,6 +1650,15 @@ bool fgInitSubsystems() {
     // model or control parameters are set
     fgAircraftInit();   // In the future this might not be the case.
 
+
+    ////////////////////////////////////////////////////////////////////
+    // Initialize the weather subsystem.
+    ////////////////////////////////////////////////////////////////////
+
+    // Initialize the weather modeling subsystem
+    globals->add_subsystem("environment", new FGEnvironmentMgr);
+
+
     ////////////////////////////////////////////////////////////////////
     // Initialize the aircraft systems and instrumentation (before the
     // autopilot.)
@@ -1695,14 +1704,6 @@ bool fgInitSubsystems() {
     fgInitTimeOffset();                // the environment subsystem needs this
 
 
-    ////////////////////////////////////////////////////////////////////
-    // Initialize the weather subsystem.
-    ////////////////////////////////////////////////////////////////////
-
-    // Initialize the weather modeling subsystem
-    globals->add_subsystem("environment", new FGEnvironmentMgr);
-
-
     ////////////////////////////////////////////////////////////////////
     // Initialize the lighting subsystem.
     ////////////////////////////////////////////////////////////////////