Given the distance a projectile needs to travel, the initial velocity, and acceleration due to gravity, how can I calculate the launch angle?
you should know that and
where is the initial velocity, is the horizontal component of the initial velocity and is the vertical component of the initial velocity. we obtained these equations by using trig ratios on the various direction vectors.
now, work in feet, since you didn't specify. so acceleration due to gravity is -32 feet per (second squared). also, s(t) is the default for the position function, v(t) is the default for the velocity function and a(t) is the default for the acceleration function.
thus, dealing with the vertical component:
since we have
assuming the initial height is zero, clearly
so, ----------- this is a formula that gives us the height at time .
dealing with the horizontal component:
since, , we have
since we have
---------- this is a formula for the horizontal distance traveled.
now, all of that is standard procedure, you should practice it a lot and thus be able to do all that pretty quickly with minimum thinking (always a good idea on an exam ), but here's getting to the problem
if is the horizontal distance traveled, then we wan
also, for this same , we want (since we want the object to hit the ground at this time. (of course if we are not going to the ground, just set .
..........this is when we start, we don't want this
now remember, these 's are the same, so we can equate them. thus, we have
there has to be an easier way to get to that formula. but i am not in a thinking mood now, obviously. i just followed a standard method
EDIT: there, skeeter has the shorter way he ends up using formulas that i derived. i should have remembered those formulas!
This isn't a huge deal. I actually don't need an easy way to get this formula just as long as it works. This is actually for a video game programming class which I need this formula for in order to write code that works properly. I took physics over 2 years ago and have forgotten A LOT.
A quick question though: where did the -16 come from in step 2? Is this just (acceleration due to gravity)/2 and if so can I plug in 9.81/2 if i am using meters as my units?
the -16 comes from integrating -32t. the integral of t is (t^2)/2, that 2 divided into the -32 to give -16
anyway, if you are using a program, just program the formulas that skeeter gave. pretty all my boxed formulas but the last one is given by some physics formula. why re-invent the wheel?