# How to calculate acceleration vector of a moving object to intercept a stationary object

The short version: I'm moving on a certain straight-line trajectory (two dimensions only, thank goodness), and I want to intercept a stationary object, with constraints on maximum acceleration and maximum speed. I can't seem to come up with a formula to do it.

The long version: I'm writing a computer game to entertain myself. I've figured out a lot of the equations I need, but this one is stumping me. I think it's a basic missile guidance problem in 2D with a stationary target, but I can't work it out, and I haven't found anything online to...guide me.

Edit: I forgot to mention, my game (so far) has no gravity and no friction. Not even real mass, just acceleration and velocity vectors.

I'm at point (Xs, Ys), moving at constant velocity (XVs, YVs), not accelerating. I want to go as quickly as possible to the target, which is stationary at point (Xb, Yb). I don't need to slow down on the approach, I just want my trajectory to intersect the point. And I don't have to be moving at top speed when I get there, I just want to get there. Here's how I'm thinking about the acceleration and speed constraints:

My max speed is MSs, and my max acceleration +/-MAs (I'm not sure how to express this properly. I mean, √(Xsa^2 + Ysa^2) <= MAs, where Xsa and Ysa are the x/y of my acceleration vector). Is there a way to calculate the necessary acceleration (Xsa, Ysa) to get me to my target? I mean, I'm sure there is a way, but I can't find it.

I found a paper on missile guidance with a couple of promising equations, but I'm not sure how to translate them into what I need. When I plug in the numbers I have, I get back nonsense, so I think I'm just misreading the equations. I have some algebra and trig, and some very basic calculus, but no physics background.

The simpler the answer, the better. Or if it's a complex answer, a link to an explanation of the math would be most helpful.

• – sammy gerbil Aug 20 '16 at 0:43
• @sammygerbil Thanks, I'm looking at it, but I'm not sure how to put the pieces together. I forgot to mention in my original question that I don't have any gravity. So the equations that have g in the denominator are problems. Any thoughts? – SaganRitual Aug 20 '16 at 1:12
• – sammy gerbil Aug 20 '16 at 1:25
• What you describe is more complicated than you might think. There are many guidance laws designed to optimize such problems in different situations. Are you willing to write an optimizer to solve the problem, or do you need a closed form solution? (I'm not sure if there is a closed form solution) – Cort Ammon Aug 20 '16 at 1:30
• Gravity is just acceleration fixed in magnitude and direction. So if you have an initial velocity and a target point, and a maximum acceleration in a fixed direction which you can choose, then your problem is essentially the same as a projectile launched on an inclined plane. The same solution should work for you... However, you also have a maximum speed, which might invalidate my earlier solution in your case. – sammy gerbil Aug 20 '16 at 1:31