In: Physics
Use Excel, Matlab, LAbVIEW or other software
What do we need?
▪ Assumptions: Negligible air
resistance, no wind effects,
▪ Governing equations: projectile equations (equations of motion)
▪ Problem: Define what you are trying to investigate.
▪ find the optimal firing parameters (firing angle, muzzle
velocity) to hit a target that is a distance away and you are
shooting from a hill.
Start calculating and optimizing.
Vo = 10 ft/sec
Yo = 100 ft
g = 32 ft/sec^2
t = time, vary that parameter
from 0 seconds until Y = 0 ft
Find the angle, Theta, for which the range (X whenY = 0 ft) is the largest.
Explain why this “optimal” angle is not 45 degrees as we have learned from other exercises?
Equations:
x= Vo Cosxt (1)
Vx=Vocosx (2)
Y= 1/2gt^2 +Vosinxt +Yo (3)
Vy= Vosinx+gt (4)
In the code below, we can inversitage the optimum muzzle velocity, maximum horizontal distance, vertical distance using parameters like firing angle, initial velocity and projectile motion equations.
MATLAB CODE AND OUTPUT:
At firing angle 30 degree:
At firing angle = 45 degree
At firing angle 50 degree:
Therefore, the optimum firing angle is 45 degrees, because at 45 the projectile covers maximum distance.
MATALB CODE:
copy it to the matlab script and just it, you will get option to input your firing angle and initial velocity,
Code begins:
clear all
clc
v0=input('Enter the value of intial velocity in feet/sec :')
g=32;
y0=100;
theta=input('Enter the value of angle in degrees:')
T=(2.*v0*(sind(theta)))./g;
t=0:0.01:T;
vx=v0.*(cosd(theta));
vy=v0.*(sind(theta))-(g.*t);
x=v0.*(cosd(theta)).*t;
y=v0.*(sind(theta)).*t-(0.5).*g.*(t.^2)+y0;
plot(x,y);
grid on
title('PROJECTILE MOTION')
xlabel('Horizontal Distance')
ylabel('Vertical Distance')
Code ends.
Upvote, if the answer was helpful. Thanks and have a nice & safe day.