]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/attitude_indicator.cxx
Positioned/Cache tweaks to support PoIs.
[flightgear.git] / src / Instrumentation / attitude_indicator.cxx
index ca93cd15ae347d22af9e590c347812925ef27194..de79e811df38e939f610c9b55d92569a0abb743f 100644 (file)
@@ -6,6 +6,10 @@
 // TODO:
 // - better spin-up
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <simgear/compiler.h>
 
 #include <iostream>
@@ -61,6 +65,16 @@ AttitudeIndicator::init ()
     _roll_int_node = node->getChild("internal-roll-deg", 0, true);
     _pitch_out_node = node->getChild("indicated-pitch-deg", 0, true);
     _roll_out_node = node->getChild("indicated-roll-deg", 0, true);
+
+    reinit();
+}
+
+void
+AttitudeIndicator::reinit ()
+{
+    _roll_int_node->setDoubleValue(0.0);
+    _pitch_int_node->setDoubleValue(0.0);
+    _gyro.reinit();
 }
 
 void