# Initial velocity to launch a projectile to a given destination at a different height.

1. May 8, 2012

### jgratton

1. The problem statement, all variables and given/known data
I need to calculate the initial velocity required to launch a projectile at a given angle from point A to point B. The only force acting on the projectile after launch will be gravity – zero air resistance. The projectile is launched within a simulated, virtual environment with the following dimensions: x, y, z and time.

I have had success when point A and point B are at the same height; however, once point B is at a different height, my calculations become less precise – well, wrong in fact.

Known variables:

$d$ : magnitude of the displacement vector
$g$ : gravity
$\theta$ : launch angle
$y_0$ : launch height

2. Relevant equations

I researched the following formula for finding the range of a projectile on uneven ground. The parameters are all available to me, except the initial velocity that I need to solve for.

$d = \frac{v_i \cos\theta}{g}(v{_i} \sin \theta + \sqrt{(v_i \sin\theta)^2 + 2gy_0})$

3. The attempt at a solution
I attempted to solve for initial velocity. I am fairly confident that the equation has been rewritten correctly, but not 100%:

$v_i = \sqrt{\frac{d^2g}{2\cos\theta^2(y_0+d \tan\theta)}}$

The problem I face is that the projectile does not reach the target - it always falls short.

I have experimented with a different equation for when the the launch height and the target height are the same and this works perfectly:

$v_i = \sqrt{\frac{dg}{\sin2\theta}}$

Concentrating on the simpler scenario where both points are at the same height, only the latter equation works - ensuring that simulations for both scenarios have exactly the same inputs.

Could anyone help me understand why this is the case? Have I got the wrong equations?

2. May 9, 2012

### LawrenceC

Re: Initial velocity to launch a projectile to a given destination at a different hei

Plug the correct velocity in the equation for d, the range, and you'll see that you get the correct distance. This implies that you have an error in solving for velocity when you rearranged the equation for d.

3. May 9, 2012

### LawrenceC

Re: Initial velocity to launch a projectile to a given destination at a different hei

Your formula for d also works. I have a ballistics program that gives the same result your equations predict. Only conclusion now is that the problem is in the simulation.

Example I used was velocity = 100 ft/sec, g=32.2 ft/sec^2, theta=50.0 degrees, h = 19.4 ft. Solving for d, I get 321.4 ft. Going the other way, I get 100 ft/sec for v when I plug in d = 321.4. And both agree with my ballistics program that numerically integrates the equations with drag coefficient set to zero.

By the way, the time of flight for above data is 5.00 seconds.