LP-67 Change label and tooltips to EasyTune name
[librepilot.git] / matlab / revo / allan_gyro.m
blobe0752cf1fa2de302108fed2ad7d6ba8782167acb
1 source = gyro;
2 clear data
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')