• Welcome to Valhalla Legends Archive.
 

The ultimate projectile interception system!

Started by Banana fanna fo fanna, April 12, 2006, 10:44 PM

Previous topic - Next topic

Banana fanna fo fanna

I know enough calc and physics now to do it, I think. RoboCode is a Java thing that lets you code robots that can shoot at each other and move around. I want to write a system that scans incoming bullets and shoots them out of the sky before they can hit me (Star Wars, anyone?)

I'm writing code for a stationary robot with a rotationally movable turret that moves at a rate of pi/9 radians/frame. Essentially, I know my own position (X0 Y0) and my turret's inital angle (theta0). I'm looking for the number of radians (positive or negative) I have to turn my turret and fire when it gets there in order to intercept the incoming bullet. My bullets travel at 19.7 units/frame.

Let's pretend I know several pieces of information about the incoming bullet (in reality, they are based on some pretty hefty assumptions, but let's pretend). I know its angle (theta1), speed (S1), and position it was fired from (X1, Y1).

The interception system may be needed any time (delta t) after the bullet has been fired.

I'm having trouble, though, I've created this beastly system of equations. I'm calling these two values the interception x and y coordinates where the bullets will collide. Remember, I'm solving for delta theta0:



However, Mathematica doesn't like it; says it's unsolvable. Help? Am I doing something wrong?

Rule

#1
I've only had time to skim your post, so I may have misinterpreted something. 

It seems that your unknowns are delta t and delta theta_0?
X1' and Y1' are also unknowns?  How are you supposed to solve for 4 unknowns
from 2 equations?

I must have misread your problem...


edit: Couldn't you just figure out delta theta_0 from theta0 and theta1 (given)?