if(1 ==2)
t0 = 1621;
for i= 0:18
    i
    fileName = [num2str(t0 + i), 'Dec29-09.csv'];
    subData = csvread(fileName);
    if i == 0
        data = subData;
    else
        data = vertcat(data, subData);
    end
end
end

ramZ = data(:,3);
trajZ = data(:,2);
ramTime = data(:,1);
Zerror = trajZ - ramZ;

numSamples = length(ramZ);
dT = ramTime(2:numSamples) - ramTime(1:numSamples-1); 
ramVelocity = .0254 * (ramZ(1:numSamples-1) - ramZ(2:numSamples)) ./ (dT/1000); 

% iGo data header: uSecsSinceReset	uSecsElapsed	DesiredDepth	ActualDepth	m_P	m_D	m_I	m_V	m_U	m_TotalTension
iGoData=dlmread('profiler_20091229_153050Mod.dat', '\t', 1, 0);
desDepth = iGoData(:,3);
actDepth = iGoData(:,4);
tension = iGoData(:,10);
iGoTime = iGoData(:,1) / 1000000;
