Not a bad way to go, but we average for about 15 seconds at 150hz.
We do check the drift of the integrated gyro in the pit and
redo the average whenever it starts drifting too much.
Eugene
Quote:
Originally Posted by Chris Hibner
We do ours immediately before every match by using the disabled_mode flag. In other words, we're running a moving average right up until they enable the robots. Since everyone is required to be off the field for the last few seconds before the match start, you're pretty much guaranteed to get have the robot undisturbed and still, and you get the bias as close to what you're going to have in the match.
The code is more or less:
Code:
static char runBais = 1;
if (disabled_mode && runBias)
{
// run moving-average bias code
}
else
{
// the bias has now been captured and is held
// don't let the bias run again if the robot is disabled for a short period of time
runBias = 0;
// run integral code
}
|