2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.