Hi to all,
I tried to do cannon projectiles for a game.I know the destination point where the cannon should land and also have a option of selecting the speed it travels say from 60 Kph to 100 Kph.I need to know the angle of elevation.How can i find the angle (theta) for the projectile .MY Launching position is higher than the landing position.Please help me fix this.Angle of elevation change based on the speed variable.Thanks in advance.

You need to solve the simultaneous equation for t and theta:

x = v * cos(theta) * t (1)
y = y0 + v * sin(theta) * t - 1/2 * g * t*t (2)

In the above x = target distance from the projectile, v = velocity, y0 = initial height of the projectile above the ground(target), g = gravity.
Solve t = t_final when y = 0, plug t_final into eq.(1) to get theta. I don’t think the solution has a closed form.

Like I said, it cannot be solve in a closed form. You need to solve it NUMERICALLY, given your target distance, initial height of the projectile, and projectile velocity.