|
Re: Calculating Angle to fire at
I don't know whether the question was sufficiently answered as far as calculating the angle goes. I certainly agree that with the trig involved and the other factors like air resistance and spin it's probably not going to be the way to go, but there is a simpler way to get theta than "A = 1/2 * (asin( (((g * x^2) / (Vo^2)) +y) / sqrt(x^2 + y^2) ) - atan2(-y/x))" ~Matt Adams.
Asumming:
Y = hieght to center of hoop
V = constant velocity
X = distance to goal from end of firing mechanism
Yo = height at which projectile leaves the firing mechanism
Vox = cos(A) * V
Voy = sin(A) * V
Y = Yo + Voy * t - 4.9 * t^2,
T = x/Vox,
Voy = Vox * tan(A);
Y = Yo + (Vox * tan(A)) * (X / Vox) - 4.9 * X^2 / Vox^2
Y = Yo + X * tan(A) - 4.9 * X^2 * sec(A)^2 / V^2
0 = Yo * V^2 - Y * V^2 + X * V^2 * tan(A) - 4.9*X^2 * (1 + tan(A)^2)
0 = (-4.9*X^2*tan(A)^2) + (X * V^2 * tan(A)) + ( V^2 (Yo - Y - 4.9X^2))
so just plug that into the quadratic formula with:
a = -4.9 * X * X
b = X * V * V
c = V * V * (Yo - Y - (4.9 * X * X) )
arctan( (-b + sqrt(b * b - 4 * a * c)) / (2 * a) )
Though it has been said that you will have to take into account the variables of air resistance and spin among others, this should give some people a good idea of where to start and fine tune from.
Hope this was at least somewhat helpful.
|