My name is Michael, and I am trying to create a small video game. I am only in high school, so my math skills lack which is why I am here to find help from nice people!
I am trying to find an equation for an angle a rifle should shoot at to successfully hit a zeroed in target. This picture visually represents what I am trying to accomplish: http://prntscr.com/7kowbo. I am trying to find the angle I need to fire the bullet at to hit point 2.
variables we know in the equation: Zero Range: 300units, Units the scope is above the barrel: 1.5units, Degree change per 50units: 1
variables to solve for: angle at which the bullet needs to leave to hit the zeroed point (point 2 on the picture)
The complicated thing about this is that the sight rests above the barrel so the gun will need to shoot differently for scopes of different heights. Also, they can be zeroed in at different ranges.
I hope I did well at explaining! Please, if you need clarification ask me! Thank you so much for helping!
According to the picture, I am solving for the line of departure angle needed to hit point 2 coming back down. The actual point of departure is 1.5units below the beginning of the line of sight. That change might be so small its negligible though.
If you're modelling the curvature of the projectile as a constant change in direction per distance traveled, the resulting motion would (I believe) be an arc of a circle (with the awesome side-effect of being a full circle if the target will be outside your maximum range). If the rate of change of direction is constant, that should mean that the radius of the circle is always constant (say $R$).
Then if the distance to the target is $d$, the direct angle upward you'd need to shoot would be $\tan^{-1}\left(\frac{d/2}{R}\right)$. If the rifle scope is a distance $h$ above the rifle, you'll need to subtract the relative angle difference, of $\tan^{-1}\left(\frac{h}{d}\right)$.