R2D Tank - 1981 VG was released on:
USA: 1981
% Definitions R2D = 180/pi; % rad to deg D2R = pi/180; % deg to rad F2M = 0.3040; % feet to meter m = 45.46; % kg g = -9.8; % gravity (m/s^2) j = sqrt(-1); dt = 0.001; %1000Hz R1 = 15*F2M; %m R2 = 15*F2M; % Initial conditions xBall = [0; 0]; % theta/omega % Machine initial conditions Torque = (-1)*m*g*R1; % N-m Pmotor = 1119000; % W Tbreak = (4404 / 0.738)*2.3; % break torque in N-m % Ball I = m*(R1^2); for launch=0:1:20 times_launched = launch + 1; % Main loop iter = 0; for time=0:dt:1 % Index iter = iter + 1; % Torque generation and check if( (xBall(2,1)) < ((Pmotor)/Tbreak) ) Torque = Tbreak; else Torque = (Pmotor)/xBall(2,1); end % From 0 degrees to 90 degrees if ((xBall(1,1)*R2D) >= 0 ) ((xBall(1,1)*R2D) < 90) % Calculate net torque Tgrav = ( m*g*cos(xBall(1,1)))*R1; Tnet = Torque + Tgrav; % Calculate instantaneous angular acceleration alphaB = Tnet/I; % Calculate the derivative of the state xdot = [ xBall(2,1); alphaB ]; % Integration of the state xBall = xBall + xdot*dt; % Dependent states pBall = R1*( cos(xBall(1,1)) + j*sin(xBall(1,1)) ); vBall = xBall(2,1) * R1; Power = (Tnet/R1) * vBall; elseif ( ((xBall(1,1)*R2D) >= 90) ((xBall(1,1)*R2D) <= 180) ) % Calculate net torque Tgrav = ( m*g*cos( xBall(1,1)) )*R1; Tnet = Torque + Tgrav; % Calculate instantaneous angular acceleration alphaB = Tnet/I; % Calculate the derivative of the state xdot = [ xBall(2,1); alphaB ]; % Integration of the state xBall = xBall + xdot*dt; % Dependent states pBall = real(vBall) * time; Power = (Tnet/R1) * vBall; end; DATA(iter,:) = [ iter time xBall' alphaB Tnet xBall(1,1)*R2D ... real(pBall) imag(pBall) real(vBall) imag(vBall) vBall Power ]; end; end; %% Trajectory of Projectile (y vs. x) figure(1); plot( DATA(:,8), DATA(:,9), '.' ); title ('Trajectory (y vs. x) of projectile during launch') xlabel('x') ylabel('y') %% Range (x) vs. time figure(2); subplot (211), plot(DATA(:,2), DATA(:,8), '.' ); title ('Range(x) as a function of time') ylabel('Range(x)') %% Altitude (y) vs. time subplot (212), plot(DATA(:,2), DATA(:,9), '.' ); title ('Altitude(y) as a function of time') xlabel('time') ylabel('Altitude(y)') %% Velocity (x and y components) vs. time figure(3); subplot (211), plot(DATA(:,2), DATA(:,10), '.' ); title ('Velocity (x and y) as a function of time') ylabel('Velocity(x)') subplot (212), plot(DATA(:,2), DATA(:,11), '.' ); xlabel('time') ylabel('Velocity(y)') %% Velocity (total) vs. time figure(4); plot(DATA(:,2), DATA(:,12), '.' ); title ('Velocity(total) as a function of time') xlabel('time') ylabel('Velocity (total))') %% Power vs. time figure(5); plot(DATA(:,2), DATA(:,13), '.' ); title ('Power as a function of time') xlabel('time') ylabel('Power')
How far can we see across the water to the horizon?Let r = the Earth's radius = 3963 milesLet h = height of a person in milesLet d = distance seen to the horizon in milesThe sight line of a person to the horizon would be on a line passing through their eyes and tangent to the Earth at the seen horizon.Since the radius of any circle is perpendicular to the tangent, the tangent and the radius make the legs of a right triangle. The radius plus the person's height (in miles) are the hypotenuse. We can then use the Pythagorean Theorem. Be careful to convert the person's height into miles.c2 = a2 + b2thus ( r + h )2 = d2 + r2then d2 = ( r + h )2 - r2d = sqrt ( ( r + h )2 - r2 ) )Examples: A person with eyes 6 feet off the surface would see approximately 3 miles. From the Bank of China building (1033 ft tall) you would see approximately 39.4 miles.Remember that mathematics is an approximate representation of the world around us. These numbers must be taken in that light. For instance, these numbers does not take into account atmospheric interference. We are also making the assumption that the Earth is a uniform sphere with a uniform radius of 3963 miles.