Ballistics Algorithm
13-Sep-94 10:15:36
Sb: #42581-Ballistics Algorithm
Fm: Arnie Cachelin 71332,3717
To: William Barnes 73060,65
It's pretty easy to do a numerical integration on the motion for an
object:
Take initial X,V and a small time step dt. and some acceleration rate a
(= g/m for the real world)
for(t=0;t<Tmax; t+=dt)
{
V += a*dt
X += v*dt
printf("at time %f, object is at X=%f, travelling at %f m/s\n",t,X,V)
}
You'll have to do this for x,y,z coordinates, and remember that a final
total V is added like a vector not just Vx+Vy+Vz.