clearvars -except msg1
close all

radiusFT = 12;
ft2m = .3048;
radiusM = radiusFT * ft2m;
circlePeriod = 16;    %Need to double check this
samplePeriod = 1/50;

linVelocMPS = 2 * pi * radiusM / circlePeriod;

calcAcMPS2 = linVelocMPS^2 / radiusM;

Ax = msg1.accel(1000:6000,1);
Ay = msg1.accel(1000:6000,2);
Az = msg1.accel(1000:6000,3);

sampleTime = samplePeriod * (1:length(Ax));
figure
plot(sampleTime, Ax)
title('Body Accel X (meters/sec) vs Time (sec)');
figure
plot(sampleTime, Ay)
title('Body Accel Y (meters/sec) vs Time (sec)');
figure
plot(sampleTime, Az)
title('Body Accel Z (meters/sec) vs Time (sec)');

meanAx = mean(Ax);
meanAy = mean(Ay);
meanAz = mean(Az);

Aerror = (abs(calcAcMPS2) - abs(meanAy)) / calcAcMPS2

