Corrected error in getGyroAngle function