From 7470eadbe7600e18f22845b74b38b1ec7f57438c Mon Sep 17 00:00:00 2001 From: david Date: Sun, 26 Jan 2003 20:57:57 +0000 Subject: [PATCH] Make the indicator a little less jumpy. --- src/Instrumentation/turn_indicator.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Instrumentation/turn_indicator.cxx b/src/Instrumentation/turn_indicator.cxx index 7e56b5b34..6cdaef9dc 100644 --- a/src/Instrumentation/turn_indicator.cxx +++ b/src/Instrumentation/turn_indicator.cxx @@ -8,6 +8,11 @@ #include
+// Use a bigger number to be more responsive, or a smaller number +// to be more sluggish (the base time is 1.0). +#define RESPONSIVENESS 0.25 + + TurnIndicator::TurnIndicator () { } @@ -64,9 +69,7 @@ TurnIndicator::update (double dt) // 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