Calculating Launch Angle Given Distance with Added Height (which itself depends on launch angle)

2.5k Views Asked by At

In my physics class we have learned to calculate a desired launch angle to allow a projectile to hit a target given the target’s distance away and the initial velocity.

Now in this case the initial velocity of the projectile occurs at the axis of rotation of the so called “cannon” that is launching the projectile. But what if the initial velocity occurs at the tip of the cannon? When the launch angle changes, so does the launch height and the distance to the target.

With this added information, I was NOT able to solve for the desired launch angle using the kinematic equations of motion. Is this problem possible to solve?

As requested by a comment, here is the equation I couldn’t solve for $\theta$:

$$d - r \cos(\theta) = \frac{ v \cos(\theta) }{-g} \cdot \left( -v \sin(\theta)\pm \sqrt{\bigl(v \sin(\theta)\bigr)^2 + 2g \bigl( h + r \sin(\theta) \bigr) \vphantom{\Big|}}\right)$$

This question has been asked before here but not answered.

3

There are 3 best solutions below

1
On

In the simple case

$x(\theta, t) = v (\cos \theta) t\\ y(\theta, t) = v (\sin \theta)t - \frac 12 g t^2$

Where $v$ is your launch velocity. $\theta$ is your launch angle, $t$ is time, and $g$ is your gravitational constant.

Based on the picture, you have the cannon at some initial altitude, $y_0$.

$x(\theta, t) = v (\cos \theta) t\\ y(\theta, t) = v (\sin \theta)t - \frac 12 g t^2+y_0$

Then end of your cannon is just one more translation.

$x(\theta, t) = v (\cos \theta) t + d\\ y(\theta, t) = v (\sin \theta)t - \frac 12 g t^2+y_0 + h$

But it might help if you see that $\frac {h}{d} = \tan \theta$

and the length of the barrel $l = \sqrt {h^2+ d^2}$

$x(\theta, t) = v (\cos \theta) t + l\cos\theta\\ y(\theta, t) = v (\sin \theta)t - \frac 12 g t^2+y_0 + l\sin\theta$

4
On

We can still account for this!

Let's note down all relevant information.

Our initial height can be $h_0$, and then we can call the cannon length $r$.

We have that our INITIAL height is $h_0+r\sin(\theta)$.

In addition, if the target is distance $d$ away, the distance the cannon must travel is $d-r\cos(\theta)$.

I think that's fair.

Let's make one quadratic that expresses height in terms of time. We want to get the point where height=$0$, because that's where it hits the ground.

We have that $-\frac{1}{2}gt^2+vt\sin(\theta)+(h_0+r\sin(\theta))=0$

We also need to record the horizontal distance it travels, so we know how far the cannonball went.

We know that the horizontal speed must be $v\cos(\theta)$, so we know that $vt\cos(\theta)=d-r\cos(\theta).$

Things to note: $h_0,v,g,r$ all constants.

Same with $d$. So really, we have a system of equations in $t$ and $\theta$.

Two-equations, two-variables. You got this!

1
On

So in your case, the initial velocity occurs at the tip of the barrel, which implies that the starting height and distance to the target changes based on the cannon's angle $(\theta)$. If we take $l$ to be the length of the cannon and $h$ to be the cannon's starting height, then we can formulate two equations:

Starting height of projectile = $l\cdot \sin(\theta)+h$

Distance lost between projectile and target = $l\cdot \cos(\theta)$

The next step is to take the projectile's initial launch velocity $(v_{initial})$, and split this up into the vertical and horizontal vectors. We need to keep in mind that gravity causes the vertical velocity to decrease by $\approx9.81\,m/s$ every second, while the horizontal velocity stays unaffected if we neglect air resistance:

Vertical velocity = $v_{initial}\cdot \sin(\theta)-9.81t$

Horizontal velocity = $v_{initial}\cdot \cos(\theta)$

Now we can use these velocity equations to create formulas for the projectile's height and distance traveled. The horizontal velocity is constant, so all we need to do is multiply it by time to get distance traveled (remember to add the additional distance gained from the cannon barrel length):

Horizontal position = $(v_{initial}\cdot \cos(\theta))t+l\cdot \cos(\theta)$

On the other hand, the vertical velocity is constantly changing, so we first need to write an equation for the average vertical velocity in any desired time interval. Since the change is linear, we can do this simply by adding the initial and final vertical velocities of that time interval, then dividing by two:

Average vertical velocity = $\frac{(v_{initial}\cdot \sin(\theta)) + (v_{initial}\cdot \sin(\theta)-9.81t)}{2}$

Simplified form: $v_{initial}\cdot \sin(\theta)-\frac{1}{2}9.81t$

Now we multiply this by time to get height traveled (again remember to add the additional height gained from the cannon's starting height and barrel length):

Vertical position = $(v_{initial}\cdot \sin(\theta)-\frac{1}{2}9.81t)t+l\cdot \sin(\theta)+h$

From this point on, I think it would be much easier to solve for $\theta$ if we had values for the other variables which we could plug in. Let's say:

$v_{initial}=15\,m/s$

Length of cannon barrel: $l=2\,m$

Height of cannon: $h=3\,m$

Now we get:

Horizontal position (distance) = $15\cos(\theta)t+2\cos(\theta)$

Vertical position (height) = $(15\sin(\theta)-\frac{1}{2}9.81t)t+2\sin(\theta)+3$

We would also need to know the position of the target. Let's say the target is at ground level ($0$ meters) and $21$ meters horizontal of the cannon. Then, we would need to find an angle $\theta$, for which:

$15\cos(\theta)t+2\cos(\theta)=21\\ (15\sin(\theta)-\frac{1}{2}9.81t)t+2\sin(\theta)+3=0$

Basically, the first equation tells us how long it takes for the projectile to reach $21$ meters horizontal of the cannon base, and the second equation tells us how long the projectile takes to reach ground level, for a certain angle $\theta$. Intuitively, I could tell that there would be two possible solutions (one shot angled close to horizontal, and the other shot at a much steeper angle). I tried to solve the system of equations to get the two values of $\theta$, but eventually got stuck. I then decided to input the equations into a graphing calculator, which saved me from having to solve manually.

https://www.desmos.com/calculator/bp8szuzo0j

Now, in order to hit the target's bullseye, the time it takes for the projectile to reach a $21$ meter distance must be the same time it takes to reach a $0$ meter height. That means, we need to figure out an angle where the green line and the positive black line overlap perfectly. If you move the angle slider completely across the full $180^\circ$ range, you'll see that there are two angle values for which the green and black lines cross each other. Those angle values are approximately $14.57^\circ$ and $64.078^\circ$.

I also made another graph that allows you to manipulate all the other independent variables, such as initial velocity, barrel length, cannon height, distance/height of target, etc. This graph shows you the general form of the equations used.

https://www.desmos.com/calculator/gv9asl4f7w