clearvars -except msg1
close all

radiusFT = (8 + 2/12) / 2;
ft2m = .3048;
radiusM = radiusFT * ft2m;
circlePeriod = 17.66 / 3;    
samplePeriod = 1/100;

linVelocMPS = 2 * pi * radiusM / circlePeriod;

calcAcMPS2 = linVelocMPS^2 / radiusM;

Ax = msg1.accel(1000:4000,1);
Ay = msg1.accel(1000:4000,2);
Az = msg1.accel(1000:4000,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

