PDA

View Full Version : Projectile Motion: 3D Firing Solution Vector


Nickc523
Jul19-04, 04:10 AM
Hi, what I am trying to do is create a targeting computer for a computer simulation.

The end result is to find the vector in which a projectile must be fired to collide with the target. The target will either have a constant acceleration or none at all, and the projectile will instantaneously accelerate to it's velocity, and will have no acceleration after that. In this simulation there are no forces that interact with the objects.

All of the information about the target will be available, along with the position and velocity of the projectile. The only thing that needs to be calculated is the vector between the point of collision and the projectile. I am assuming that the projectile will have sufficient velocity to collide with the target.

My approach so far has been to use the kinematic equations to find this vector, by trying to solve for the z and y angles seperatly to the point of collision. Unfortunatly I can't get either of them down to a single variable to solve for! I either get stuck with the time from launch to collision and and an angle, or the final velocity of the target at collision and an angle! I have considered trying to use brute force to find the collision vectors, but I'm sure there is a better way.

Can anyone please help me?

tomkeus
Jul19-04, 06:39 AM
When projectile is moving with constant speed, the condition for collision is \frac{\overrightarrow{r_2}-\overrightarrow{r_1}}{r_2-r_1}=\frac{\overrightarrow{v_2}-\overrightarrow{v_1}}{v_2-v_1}, where v_1,r_1 are velocity and speed of your rocket, and v_2, r_2 are velocities of projectile. You can easy generalise upper condition when projectile is moving with acceleration.

Nickc523
Jul19-04, 12:06 PM
I'm sorry I didn't pay attention more in physics class :frown: but what does the variable R represent? and on the numerator of the right hand equation, I am assuming those are velocity vectors for the projectile and the target? And on the denominator of the right hand equation, the variables are simply the speed the projectile and target are traveling along their vectors?

NateTG
Jul19-04, 04:03 PM
You might not be describing things correctly, but accoding to your description the projectile moves in a straight line
the projectile will instantaneously accelerate to it's velocity, and will have no acceleration after that.
Now, for targets that are moving with a constant velocity it's relatively simple. Constantly accelerating targets make things a bit more complicated -- I did that problem in calculus class a while ago, and it took me a page or two of work.

Nickc523
Jul19-04, 05:04 PM
Yes, both the projectile and the target will be moving in a straight line, and for now, I would just be happy if I could find a solution in which the target wasn't accelerating. I will try to describe what I am trying to do a bit better.
Everything in parenthesis will be a variable.

Imagine a turret out in space. Now the turret can rotate along two angles, left and right (PAz) and up and down (PAy). The goal is to write a fire control program for the turret, so that it would be capable of tracking an object, and firing a projectile at it. The projectile would start from the center of the turret, (Xop, Yop, Zop) and once fired would instantaneously accelerate to it's speed (Vp). A vector velocity of the projectile can be found once the turret rotational angles (PAz and PAy) are found. The target would start out at the coordinates (Xot, Yot, Zot) and would have a velocity (Vt) and vector velocity (Vxt, Vyt, Vzt).

Basically you can think of this as two lines. One is the track of the target, the other is the track of the projectile. At any one point, the turret must be pointed towards a collision point, the intersection of the two lines. My problem has been finding the vector of this projectile line. Once I have the projectile line vector, it would be simple to break it down into the two angles I need, (PAz, and PAy).

Right now I have been unable to come up with an equation to find this projectile vector, or the two angles it is broken down into. I have had some success in using a brute force approach, in which I would calculate the track of the projectile from a large number of angles, and find the closest the projectile would get to the target following the track in order to find a collision. This is very cpu intensive though, depending on how accurate you want to angles to be.

NateTG
Jul19-04, 05:23 PM
If the latex stuff were working for me, I would put this out more explicitly, but you should already know that the sum of the target and muzzle velocities must be colinear with the initial position vector for the target.

If you know that the muzzle velocity is some particular value, you should be able to use that extra information to eliminate one of the variables.