function [time, acc, t]=InterpretData(filename,dt)

if exist([filename(1:end-4) '.mat' ])
    
    load (filename(1:end-4))
    fprintf ('Already recoverd - loaded from previous recovery')

    if abs(mean(diff(time))-dt)/dt >0.1
        fprintf (' /!\\ sampling distribution does''t correspond to input dt ')

    end
else
    
    fid = fopen(filename);
    fline = fgetl(fid);
    
    fprintf ('Reading')
    k=1;
    while ~feof(fid)
        
        fline = fgetl(fid);
        a = str2double(strrep(strsplit(fline,';'),',','.'));
        if length(a)>3
            A(k,1:3) = a(2:4);
            if ~isnan(a(1))
                t(k:k+9)= a(1) + [0:9]*dt;
            end
        else
            if length(a)>6
                A(k,4:6) = a(5:7);
            else
                A(k,1:6) = nan;
            end
        end
        k=k+1;
        if ~mod(k,1000); fprintf ('.'); end
        if ~mod(k,1000*50); fprintf ('.\n'); end
    end
    fclose(fid);
    fprintf ('done.')
    
    time = (0:length(A)-1)*dt;   % in seconds
    acc  = A(:,[1 2 3]);  % in g
    t(end) = [];
%    gyr  = A(:,[4 5 6]);  % in °/s
    
    save (filename(1:end-4),'time','acc','t')
end