merge gyro code to accl library