Wednesday, March 9, 2011

Turret Estimation

Workin on my program some more:

So I've come up with a bit more code, and a few more interesting problems. I think I've figured out how to use my vectors correctly. I can use velocity vectors and position vectors to estimate the locations of objects. It's great.

The problem I've come up with is how to figure out where to rotate my turret to in order to fire. Because I have a few variables I need to keep track of, and keep in mind.

1. The projectiles statistics: the bullet or shell to be fired by the turret has a velocity vector and position vector. Once I move into a 3d space I may include a mass in here. But besides that, velocity is a straight float, why? Because I don't know which x y components to give the vector because I don't know the theta. so, a straight number like 2.5 m/s or something, allows me to estimate where to shoot the bullet. This will make sense once I describe my idea for this.
2. The target objects estimated path using the pings. This gives me a velocity vector and a position vector for the target.
3. The current heading, or theta of the turret.

So, my method, is briefly describe in the picture below.

I ran atrial of it last night, and it appeared to be working, but I do need to iron out some kinks in the simulation

No comments:

Post a Comment