Code: Select all
sampleProviderGyro = new LinearCalibrationFilter(new MeanFilter(sensorGyro.getAngleAndRateMode(), 30));
or if I can use it bare and do a .reset() at the beginning while the EV3 is still, and not have to worry about it. Does the LinearCalibrationFilter calibrate both the angle and angleRate values? (or again, is that already built in to EV3GyroSensor)
Question 2: MeanFilter - I wasn't sure if I'm using this right. If I have a thread that spin-reads from the sensor, is it reading faster than the sensor can provide values? Slower? Perhaps blocking on new values being available? Should I use the MeanFilter 30 from above and not worry about it? Is 30 good?