Disclamer: I am using the following code to help guide me through a projectile motion problem.
function projectile(theta,v0,dt,tf)t = 0:dt:tf;vx = v0*cos(theta);vy = v0*sin(theta);vx(1) = vx;vy(1) = vy;v = sqrt((vx^2)+(vy^2));v(1) = v;x(1) = 0;y(1) = 0;B2divm = 0.00004;g = 9.81;for i = 1:length(t)-1 v = sqrt((vx(i)^2)+(vy(i)^2)); x(i+1) = x(i) + vx(i)*dt; vx(i+1) = vx(i) - (B2divm*v*vx(i))*dt; y(i+1) = y(i) + vy(i)*dt; vy(i+1) = vy(i) - g*dt - (B2divm*v*vy(i))*dt;endplot(x,y,'r')end
I follow and reasonably understand the code, except for the use of the constant 'B2divm=0.0004'.
I strongly suspect that 'B2divm' above has something to do with Drag and air density, but I just don't know.
Anybody know what it means? How it's derived?
Thanks!!
Best Answer