]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/heading_indicator_fg.cxx
#577: blinking not working for static HUD labels
[flightgear.git] / src / Instrumentation / heading_indicator_fg.cxx
index 23d49da7446b598ea00fba18260e15d94db0cea9..dfa099c51e6c4a9d1cb6a4224cf2244bd5364d17 100644 (file)
@@ -5,6 +5,10 @@
 //
 // This file is in the Public Domain and comes with no warranty.
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <simgear/compiler.h>
 #include <iostream>
 #include <string>
@@ -14,6 +18,7 @@
 #include <Main/fg_props.hxx>
 #include <Main/util.hxx>                           
 
+using std::string;
 
 HeadingIndicatorFG::HeadingIndicatorFG ( SGPropertyNode *node )
     :
@@ -117,7 +122,7 @@ HeadingIndicatorFG::update (double dt)
 
                                 // Next, calculate the indicated heading,
                                 // introducing errors.
-    double factor = 0.1 / (spin * spin * spin * spin * spin * spin);
+    double factor = 100 * (spin * spin * spin * spin * spin * spin);
     double heading = _heading_in_node->getDoubleValue();
 
                                 // Now, we have to get the current
@@ -128,7 +133,7 @@ HeadingIndicatorFG::update (double dt)
     if ((heading - _last_heading_deg) < -180)
         _last_heading_deg -= 360;
 
-    heading = fgGetLowPass(_last_heading_deg, heading, dt / factor);
+    heading = fgGetLowPass(_last_heading_deg, heading, dt * factor);
     _last_heading_deg = heading;
 
        heading += offset;