clear all;
theta = [0 0.130899694 0.305432619 0.479965544 0.654498469 0.829031395 1.00356432 1.178097245 1.35263017 1.527163095 1.701696021 1.876228946 2.050761871 2.225294796 2.399827721 2.574360647 2.748893572 2.923426497 3.097959422 3.272492347 3.447025273 3.621558198 3.796091123 3.970624048 4.145156973 4.319689899 4.494222824 4.668755749 4.843288674 5.017821599 5.192354525 5.36688745 5.541420375 5.7159533 5.890486225 6.065019151 6.239552076 6.283185307]; radius = [0.57 0.57 0.565 0.555 0.555 0.555 0.555 0.555 0.555 0.555 0.555 0.555 0.565 0.575 0.59 0.61 0.635 0.665 0.69 0.715 0.755 0.785 0.83 0.865 0.905 0.955 1 1.055 1.095 1.125 1.165 1.2 1.255 1.3 1.335 1.38 1.405 1.415]; Rb = 0.555; s = [0 0 0 0 0 0 0.0156 0.0313 0.0469 0.0625 0.0938 0.125 0.1563 0.1875 0.25 0.2813 0.3438 0.4063 0.4375 0.5 0.5313 0.5938 0.625 0.6563 0.7188 0.75 0.8125 0.8438 0.85 0.8594 0.86]; x = [0 0 0 0 0 0 0.05 0.08 0.12 0.15 0.15 0.15 0.15 0.15 0.15 0.18 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.17 0.15 0.15 0.11 0.07 0.03 0]; v = x; theta2 = [0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 296]; radius2 = zeros(length(theta2),1); for k = 1:length(theta2) r(k) = (Rb + s(k))*sind(theta2(k))+v(k)*cosd(theta2(k)); q(k) = (Rb + s(k))*cosd(theta2(k))-v(k)*sind(theta2(k)); radius2(k) = sqrt(r(k)^2+q(k)^2); end figure(1); theta = theta*180/pi; theta = wrapTo360(theta - 64); theta = theta*pi/180; polarplot(theta,radius,'-o'); hold on; title('Ready to Fly Cam Radius (in)'); theta2 = theta2*pi/180; polarplot(theta2,radius2,'-s'); legend('Measured Directly','Calculated from Displacement Plot & Contact Points','Location','southoutside'); hold off; figure(2); plot(theta2,r); hold on; title('Ready to Fly: r (in)'); xlabel('Angle (rad)'); ylabel('r (in)'); hold off; figure(3); plot(theta2,q); hold on; title('Ready to Fly: q (in)'); xlabel('Angle (rad)'); ylabel('q (in)'); hold off;