Fire projectile to hit a moving object

In summary, the author is trying to solve a problem where they need to calculate the angle at which to shoot an object in order to hit a target. They state that before posting this message, they have been able to figure out how to hit a moving target while gun is stationary by doing the following: 1. Figure out the length of the radius between target and gun as a function of time, where gun is always at the origin and not moving. 2. I can then divide that by the magnitude of projectile speed to get a quadratic that gives the time of intersection with the target and get the angle of R at that time. They
  • #1
RuneStrife
3
0
This is not a homework problem so i didn't post it in that section, however, it is homework-problem-ish in that it's a problem for a non-school-related programming simluation project I'm working on that I can't solve. If appropriate, please move to that section.

Overview: I'm working on programming a simulation that requires 'shooting' projectile-type objects at other moving objects. How can I calculate the angle at which to shoot the object to hit?

Details:

Imagine you're holding some gun-type object that shoots projectiles at velocity Vd in straight lines. You are moving with Speed Vp at angle Theta_p, in a straight line. Another object, which we will name the target, is located a distance R away from you at an angle Theta_tp, and is moving in a straight ine with velocity Vt at angle Theta_t.

I need to calculate the angle Theta_a I should aim the gun in order to hit the target. The target is moving so you need to lead it with your shot to compensate. Also, the projectile will inherit your velocity on top of its own since you are also moving, which will further modify the angle you need to shoot at.

It seems to me that the strategy should be that I find a point in space which will be occupied by both the projectile and the target. I know all the points in space that the target will take along its linear path, and the times at which it will take all points. However, because the total velocity of the projectile varies based on the angle you shoot it (e.g. the magnitude of the velocity vector will be different depending on what Theta_a you decide to shoot at), I'm not sure how to figure out where to shoot it.

Any help would be appreciated!

In addition, if it is easy, a solution to a target moving in a circular path with radius R (same R as the distance between you and it, so it's making a perfect circle around you) would be appreciated!

Thanks!
 
Physics news on Phys.org
  • #2
Pretend as though your origin is stuck to the gun, add the negative of the guns velocity to the target (same magnitude, just reverse direction), this really will simplify things for you.
Now you can separate the target's velocity into an x-component ([itex]V_{target}\cos \theta_{target}[/itex]) and a y-component ([itex]V_{target}\sin \theta_{target}[/itex]) and solve these simultaneously with the "bullet's" motion relative to the gun.
 
  • #3
Thanks for the reply. In fact this has been exactly my approach so far. Before posting this message, I've been able to figure out how to hit a moving target while gun is stationary by doing the following:

1. Figure out the length of the radius between target and gun as a function of time, where gun is always at the origin and not moving.

2. I can then divide that by the magnitude of projectile speed to get a quadratic that gives the time of intersection with the target and get the angle of R at that time.

My problem is that when the gun moves, the magnitude of the projectile speed would vary as a function of the angle you shoot at, because it would inherit the gun's velocity vector (constant angle) plus its own velocity (at the angle to aim) so to calculate the gun's velocity magnitude I'd need to already have the angle I'm looking for.

However, after some thinking I'm going to try to redo the problem through vector addition instead of converting stuff to scalar magnitudes and such, which may (or may not) simplify things.
 
  • #4
I think your problem of intercepting a moving object can be solved by using the methods of missile guidance trajectories. Here is an article you may be able to use. See:

http://www.jhuapl.edu/techdigest/TD/...mbo_Homing.pdf

“Figure 2. Planar engagement geometry. The planar intercept problem is illustrated along with most of the angular and Cartesian quantities necessary to derive modern guidance laws.”
 
  • #5
Actually i was able to solve the problem using the equation:

|T-G-t*(VT-VG)|=D*t

where T and G are target and gun position vectors, VT and VG are velocity vectors for target and gun, D is the projectile default velocity, and || is the magnitude of the sum of those vectors (add the x and y components as above, square them, add that, take the square root, divide by D).

This should give me t to intersect, and then I can plug that into those X and Y components (from the equation above) and take the atan() of those to get the angle.

Now I moved onto the next step of the problem which is to compare normal inheritance to Directional inheritance, defined such that the projectile only inherits the projection of the gun's velocity on the vector along which it is fired (which is not the vector along which it moves).

Any help with this would also be appreciated. Currently I've modified the vector components in the above equation such that VP components have been changed from:

(VG*cos(Theta_G)i, VG*sin(Theta_G)j)

to:

(VG*cos(Theta_T-Theta_G)^2)i, (VG*cos(Theta_T-Theta_G)sin(Theta_T-Theta_G))j

where Theta_T is the angle defined by the radius drawn from (0,0) to the target and Theta_G is the same thing for the gun.

Does this seem correct, and if not, how to proceed?
 
Last edited:

What is a fire projectile?

A fire projectile is a type of projectile that is designed to be launched or thrown towards a target. It is typically made of a flammable material and has the ability to ignite or create a fire upon impact.

What is the purpose of using a fire projectile to hit a moving object?

The purpose of using a fire projectile to hit a moving object is to cause damage or destruction to the target. This can be achieved by either physically impacting the object or by setting it on fire.

What factors should be considered when aiming a fire projectile at a moving object?

When aiming a fire projectile at a moving object, factors such as the speed and trajectory of the object, wind direction, and distance from the target should be taken into consideration. The angle and force of the launch should also be carefully calculated.

Can a fire projectile effectively hit a fast-moving object?

Yes, a fire projectile can effectively hit a fast-moving object if it is launched at the correct angle and with enough force. However, it may be more difficult to accurately hit a fast-moving target compared to a slower-moving one.

What are the potential dangers of using fire projectiles to hit moving objects?

The potential dangers of using fire projectiles to hit moving objects include the risk of starting unintended fires, causing collateral damage, and potential injury to bystanders. It is important to carefully assess the situation and take proper safety precautions when using fire projectiles.

Similar threads

Replies
4
Views
994
  • Mechanics
Replies
6
Views
853
  • Mechanics
Replies
6
Views
916
Replies
6
Views
3K
Replies
8
Views
2K
Replies
7
Views
678
Replies
8
Views
1K
Replies
7
Views
1K
  • Mechanics
Replies
18
Views
2K
Back
Top