1
0
Fork 0

Make the indicator a little less jumpy.

This commit is contained in:
david 2003-01-26 20:57:57 +00:00
parent 95e3e9d28b
commit 7470eadbe7

View file

@ -8,6 +8,11 @@
#include <Main/util.hxx> #include <Main/util.hxx>
// 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 () TurnIndicator::TurnIndicator ()
{ {
} }
@ -64,9 +69,7 @@ TurnIndicator::update (double dt)
// Lag left, based on gyro spin // Lag left, based on gyro spin
rate = -2.5 + (factor * (rate + 2.5)); rate = -2.5 + (factor * (rate + 2.5));
rate = fgGetLowPass(_last_rate, rate, dt*RESPONSIVENESS);
// Add a lag, based on gyro spin
rate = fgGetLowPass(_last_rate, rate, dt/factor);
_last_rate = rate; _last_rate = rate;
// Publish the indicated rate // Publish the indicated rate