- #1
jgratton
- 1
- 0
Homework Statement
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:
[itex]d[/itex] : magnitude of the displacement vector
[itex]g[/itex] : gravity
[itex]\theta[/itex] : launch angle
[itex]y_0[/itex] : launch height
Homework 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.
[itex]d = \frac{v_i \cos\theta}{g}(v{_i} \sin \theta + \sqrt{(v_i \sin\theta)^2 + 2gy_0})[/itex]
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%:
[itex]v_i = \sqrt{\frac{d^2g}{2\cos\theta^2(y_0+d \tan\theta)}}[/itex]
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:
[itex]v_i = \sqrt{\frac{dg}{\sin2\theta}}[/itex]
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?