load('\\atlas\ProjectLibrary\CPF\CharlieWatkins\VectorNav VN-100s IMU\Data\ambientDeltaV100Hz\ambientDeltaV100Hz.mat');

dv_x = dtv.deltaVelX;
dv_y = dtv.deltaVelY;
dv_z = dtv.deltaVelZ;
dt = dtv.deltaTime;

t_secs = 0:.01:(length(dv_x)-1)/100.0;

figure(1);
subplot(3,1,1);
plot(t_secs, dv_x);
title('Delta V in x direction');
xlabel('Time (s)');
ylabel('Delta V (m/s)');
subplot(3,1,2);
plot(t_secs, dv_y);
title('Delta V in y direction');
xlabel('Time (s)');
ylabel('Delta V (m/s)');
subplot(3,1,3);
plot(t_secs, dv_z);
title('Delta V in z direction');
xlabel('Time (s)');
ylabel('Delta V (m/s)');

%Use delta V's to estimate velocity

v_x = cumsum(dv_x.*dt);
figure(2);
plot(t_secs, v_x);
title('Estimated X Velocity');
xlabel('Time (s)');
ylabel('Velocity (m/s)');