]> git.mxchange.org Git - flightgear.git/blobdiff - src/Systems/static.cxx
Fix a couple of 64-bit warnings identified by GCC.
[flightgear.git] / src / Systems / static.cxx
index e8447121c14caf51946e97acbb96fefe7a60d4b6..f58d1ce3cd457a675caa914515a2eaef4bf0a4b0 100644 (file)
@@ -37,6 +37,15 @@ StaticSystem::init ()
     _serviceable_node = node->getChild("serviceable", 0, true);
     _pressure_in_node = fgGetNode("/environment/pressure-inhg", true);
     _pressure_out_node = node->getChild("pressure-inhg", 0, true);
+
+    reinit();
+}
+
+void
+StaticSystem::reinit ()
+{
+    // start with settled static pressure
+    _pressure_out_node->setDoubleValue(_pressure_in_node->getDoubleValue());
 }
 
 void
@@ -56,7 +65,6 @@ StaticSystem::update (double dt)
         double trat = _tau ? dt/_tau : 100;
         double target = _pressure_in_node->getDoubleValue();
         double current = _pressure_out_node->getDoubleValue();
-        // double delta = target - current;
         _pressure_out_node->setDoubleValue(fgGetLowPass(current, target, trat));
     }
 }