mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-30 08:24:11 +01:00
15 lines
551 B
Matlab
15 lines
551 B
Matlab
source = gyro;
|
|
clear data
|
|
data.freq = source(:,3)';
|
|
data.time = unwrap_time(source(:,end))'/1000;
|
|
data.rate = 1/mean(diff(data.time))
|
|
tau = 1/data.rate * round(logspace(0,7,200))
|
|
[retval, s, errorb, tau] = allan(data,tau,'gyro')
|
|
|
|
% [~,~,gyro_residual] = regress(gyro(:,1)-mean(gyro(:,1)),[gyro(:,4)-mean(gyro(:,4)), (1:size(gyro,1))']);
|
|
% data.freq = gyro_residual;
|
|
% data.time = unwrap_time(source(:,end))'/1000;
|
|
% data.rate = 1/mean(diff(data.time))
|
|
% tau = 1/data.rate * round(logspace(0,7,200))
|
|
% [retval, s, errorb, tau] = allan(data,tau,'gyro')
|