Make ring buffer size large enough for desired oversampling (gyro/accel=5, mag/baro=20).
Simplify scale factor calculation to avoid errors (corrected error in gyro SF).