Get distance covered by a wheel using a gyroscope placed on it

gyroscopeMATLABwheel

I have to calculate the distance covered by a wheelchiar using data gathered from a gyroscope that was placed on one of the driving wheels.
I know the total length of the corridor we used for the measurement was 8.4 meters, but I would like to know the distance that the wheelchair covered when the velocity was constant (or almost constant).
The radius of the wheel is 0.17m and the distance between the gyroscope and the centre of the wheel was 0.08m.
The Gyroscope gives me the velocity in deg/s and this is how the plot looks.enter image description here

The sampling frequency of the gyroscope is 75Hz and this is the code I wrote in Matlab to unwrap the angle:

Gyr_Z1(isnan(Gyr_Z1)) = 0 % substitute Nan with 0

splrate = 1/75;

values = zeros(length(Gyr_Z1),1); %create empty vector

for (i=2 : length(Gyr_Z1))

  values(i) = values(i-1) + Gyr_Z1 (i)*splrate;

end

And this is the bit of code I am using to get the distance covered by the wheel:

for (i=1 : length(Gyr_Z1))

    values(i) = 2*pi*.17*values(i)/360;

end

But when I plot the results this is what I get
enter image description here

So as you can see from the picture the path of the plot looks correct as wheelchair appears to travel at a steady velocity as the Gyroscope graph indicates, but the values are clearly wrong. The length of the corridor was approximately 8.4 meters.
I know I am making a mistake somewhere (and is likely something quite trivial), but I can't see where. Is anybody able to tell me what I am doing wrong?
Thanks!

Best Answer

Your gyro isn't giving degrees per second. The total plot is over 13 seconds duration, at an average of about 4 degrees per second, that's about 52° total, but the wheel circumference is only just over 1 metre. I think it is giving radians per second, 52 radians is about 8.3 full rotations, which will give you the right answer.