- #1
Archer2338
- 2
- 0
Homework Statement
Well, I was trying to find an equation that would let me calculate what angle I have to put my gun at to get the projectile to hit a specified distance. Not actual homework, but something I'm trying to do for a game (Garry's mod)
So the initial velocity of the shell (Muzzle velocity), gravitational acceleration, and range is known.
Homework Equations
I found this off wikipedia:
θ= 1/2 arcsin(G*R/V^2)
With G being gravitational pull, R being the range, and V being the initial velocity.
Problem is, that does not take into account air resistance in the game, which does affect the shell I am firing.
The Attempt at a Solution
See above... So I used that equation, but the shell falls short of its target, meaning that air resistance is slowing it down. How would I calculate the angle of projection to launch a shell R distance with air resistance?
Also, I doubt the game calculates air resistance extremely realistically. It would probably look like this:
(de)Acceleration due to air res. = (Velocity^2*Offset)/Mass of shell
with Offset being some constant that stays the same regardless of the mass of the shell.
Signed up for this forum for this question, and I would be very thankful to anyone that replies.