#include <Main/util.hxx>
-TurnIndicator::TurnIndicator ()
+// Use a bigger number to be more responsive, or a smaller number
+// to be more sluggish.
+#define RESPONSIVENESS 0.5
+
+
+TurnIndicator::TurnIndicator () :
+ _last_rate(0)
{
}
TurnIndicator::bind ()
{
fgTie("/instrumentation/turn-indicator/serviceable",
- &_gyro, &Gyro::is_serviceable);
+ &_gyro, &Gyro::is_serviceable, &Gyro::set_serviceable);
fgTie("/instrumentation/turn-indicator/spin",
&_gyro, &Gyro::get_spin_norm, &Gyro::set_spin_norm);
}
// Lag left, based on gyro spin
rate = -2.5 + (factor * (rate + 2.5));
-
- // Add a lag, based on gyro spin
- rate = fgGetLowPass(_last_rate, rate, dt/factor);
+ rate = fgGetLowPass(_last_rate, rate, dt*RESPONSIVENESS);
_last_rate = rate;
// Publish the indicated rate