Quote:
Originally Posted by Bongle
We adjusted our WindRiver accelerometer class so that it implemented an averaging filter. It takes the last 20 samples and averages them. It delays its responsiveness somewhat, but it also removes much of the noise that the accelerometer displays.
We know that there is a GetAverageVoltage function, but it didn't seem to be doing any actual averaging, so we averaged GetVoltage instead.
|
Don't forget to turn on the oversampling / averaging.
A good start for how many bits of oversampling you want is:
log2 { ( 500,000 Samples / Second from the 9201 ) / (8 channels) / (X Samples per second that the PPC wants to process )}
If your code executes 1000 times per second, 6 bits is about right.
If your code executes 50 times per second (with the Driver Station updates), 10 bits is about right.