New function for averaging samples from gyro