3 data.freq = source(:,3)';
4 data.time = unwrap_time(source(:,end))'/1000;
5 data.rate = 1/mean(diff(data.time))
6 tau = 1/data.rate * round(logspace(0,7,200))
7 [retval, s, errorb, tau] = allan(data,tau,'gyro')
9 % [~,~,gyro_residual] = regress(gyro(:,1)-mean(gyro(:,1)),[gyro(:,4)-mean(gyro(:,4)), (1:size(gyro,1))']);
10 % data.freq = gyro_residual;
11 % data.time = unwrap_time(source(:,end))'/1000;
12 % data.rate = 1/mean(diff(data.time))
13 % tau = 1/data.rate * round(logspace(0,7,200))
14 % [retval, s, errorb, tau] = allan(data,tau,'gyro')