this should lessen your pain
find the square root of
(dg)/(sin (2a))
gives your velocity to hit the target
d=distance
g= accleration due to gravity (32f/s^2 or 9.8 m/s^2 on earth)
sin =
sine, the trig function
2a= 2 times your angle of firing
if you are always feeding a distance (in standard units), and set your angle of fire to a constant (and backward solve for the speed of the motor) you will change speed in proption to distance