Theory If we neglect the air resistance, the flight path of a projectile launche
ID: 3735180 • Letter: T
Question
Theory If we neglect the air resistance, the flight path of a projectile launched at an initial speed vo and an angle of departure relative to the horizontal is a parabola (see Fig. 1) Figure 1: Flightpath of a projectile If we assume that the projectile is launched from the surface of the Earth, i.e., at yo-0, then the altitude of the projectile as a function of time is , where g-9.81 m/sis the gravitational constant, is time (in seconds), and V-Vo sin (in meters per second). The distance of the projectile from the launching position as a function of time is x(t)-Ut, where U-vo cos The velocity of the projectile in the horizontal direction, i.e., parallel to the x-axis, IS u(t)U, and the velocity in the vertical direction, i.e., parallel to the y-axis, is If we include the effects of air resistance, then the altitude of the projectile as a function of time can be approximated as where k is the coefficient of resistance (with the unit 1/s). The distance of the projectile relative to the initial position as a function of time is kt The velocity of the projectile in the horizontal direction is u(t)Uekt, and in the vertical directionExplanation / Answer
ANSWER:
flightpath.m
%function to calcuate the flight path
function [y1,x1,Acc,v1]=flightpath(v0,thetaVal,kValue,time)
%set the gravity constant
gravity = 9.81;
%set the v value
v1=v0*sind(thetaVal);
%set the cos theta value
U=v0*cosd(thetaVal);
%check the value k
if (kValue == 0)
%calcuate y value
y1=((-1/2)*gravity*(time.^2))+(v1.*time);
%calcuate y value
y1=y1./1000;
%calcuate x value
x1=U.*time;
%calcuate x value
x1=x1./1000;
%calcuate the acceleration
Acc=U;
%set the v1
v1=(-gravity.*time)+v1;
else
%calcuate y value
y1=(((-gravity.*time)./kValue)+(((kValue*v1+gravity)/kValue^2).*(1-exp(-kValue.*time))));
%calcuate y value
y1=y1./1000;
%calcuate the acceleration
Acc=U*exp(-kValue.*time);
%calcuate x value
x1=(Acc/kValue).*(1-exp(-kValue.*time));
%calcuate x value
x1=x1./1000;
%calcuate v value
v1=(v1*exp(kValue.*time))+((gravity/kValue).*(exp(-kValue.*time)-1));
end
end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.