What's the velocity vector to hit a ground target.

In summary, the programmer is trying to calculate a 3D velocity vector which will make a projectile follow an ARC between two points on the ground, firing with a fixed speed. Every shot comes out at the same speed. The angle in the xy plane is given by tan\phi, and the angle in world space is given by phi. The equation for the velocity v can be found by solving for x and y using the coordinates for the target, and then substituting in the values for v.
  • #1
glenrhodes
2
0
I'm a computer programmer, but I'm having trouble with this one. I need help figuring out how to calculate a 3D velocity vector which will make a projectile follow an ARC between two points on the ground, firing with a fixed speed.

I have a cannon at point a (x, y, z)
I have a target on the ground at point b (x, y, z)

I'm trying to figure out vx, vy, vz so that the cannonball will land exactly on point b. There is no wind resistance. Gravity and muzzle velocity are fixed. Every shot comes out at the same speed. What vx, vy and vz would cause a projectile fired from point a to arc up and then down to hit point b precisely?

Thanks very much,
Glen
 
Physics news on Phys.org
  • #2
Ok, I'm going to take a shot at this one.

There are two angles involved here, one in the xy plane and one that controls the angle at which the cannonball is shot. The one in the xy plane is given by
[tex]\tan\phi=\frac {y_b-y_a} {x_b-x_a}[/tex]
All this equation is telling you to do is point the cannon at the target.

To work out the vertical angle at which to fire is a bit harder, so we can reduce it to a two dimensional problem.For an angle [tex]\Theta[/tex], velocity [tex]v[/tex] and gravitational acceleration [tex]g[/tex] the cannonball will follow a parabola given by the DEs
[tex]
\frac {dy} {dt} = v\sin\theta -gt[/tex]
[tex]\frac {dx} {dt} = v\cos\theta
[/tex]

Eliminating time gives

[tex]
y=x\tan\theta -\frac {gx^2} {2v^2}\sec^2\theta[/tex]

Now we replace [tex]x[/tex] and [tex]y[/tex] with the x,y coordinates of your target [tex]X,Y[/tex], and solve for [tex]v[/tex].
Without going through all the steps (since this is my first time using latex), we get.
[tex]v = \sqrt(\frac {gX^2} {X\sin2\theta - Y\cos^2\theta})[/tex]
This equation will give you a velocity if you sub in the coordinates for your target and choose an angle. You should note that there is a range of angles and velocities that will hit the target.

This is not a complete solution to your original problem but should get you on the right track.
 
  • #3
I see what you're saying. Once we've rotated towards the target, then it's just a matter of creating the 2D equation that finds the value for theta. Once I have v, then I'll rotate back into world space using phi - and that will be my vector.

Thanks so much for your help!
Glen
 

Related to What's the velocity vector to hit a ground target.

1. How do you calculate the velocity vector to hit a ground target?

To calculate the velocity vector, you will need to know the target's distance, direction, and speed. Then, using the laws of motion and trigonometry, you can determine the necessary velocity and angle to hit the target.

2. What factors affect the velocity vector needed to hit a ground target?

The velocity vector can be affected by various factors such as wind speed and direction, gravity, and the shape and weight of the projectile being used. These factors must be taken into account when calculating the velocity vector.

3. Is there a specific formula for determining the velocity vector to hit a ground target?

Yes, there are several formulas that can be used to determine the velocity vector. One common formula is the projectile motion equation, which takes into account the initial velocity, acceleration, and time to calculate the final velocity and angle needed to hit the target.

4. How do you adjust the velocity vector if the target is moving?

If the target is moving, you will need to factor in its speed and direction when calculating the velocity vector. The velocity and angle will need to be adjusted accordingly to account for the target's movement.

5. Can the velocity vector be calculated for moving targets at different heights?

Yes, the velocity vector can be calculated for targets at different heights. The angle and velocity will need to be adjusted to account for the target's height, as well as any other factors that may affect the trajectory of the projectile.

Similar threads

Replies
1
Views
964
Replies
36
Views
20K
  • Introductory Physics Homework Help
Replies
17
Views
2K
Replies
6
Views
1K
Replies
2
Views
3K
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Mechanics
Replies
1
Views
682
Replies
12
Views
1K
Back
Top