Calculating the Angle of Projection

  • Thread starter Thread starter Archer2338
  • Start date Start date
  • Tags Tags
    Angle Projection
Click For Summary

Homework Help Overview

The discussion revolves around calculating the angle of projection for a projectile in a gaming context, specifically for a shell in Garry's Mod. The original poster seeks to determine the angle needed to hit a specified distance, given known parameters such as initial velocity, gravitational acceleration, and range. However, they note that air resistance complicates the calculation.

Discussion Character

  • Exploratory, Assumption checking, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the use of a specific equation for angle calculation but express concerns about its applicability due to air resistance. They explore how air resistance affects projectile motion and question how to incorporate it into their calculations.

Discussion Status

Participants are actively exploring the complexities of air resistance and its impact on projectile motion. Some have suggested looking into the physics of drag and its variability with velocity. There is an ongoing inquiry into how to adjust the basic equations to account for these factors, with no clear consensus yet on a method.

Contextual Notes

There are uncertainties regarding the game's physics engine and how accurately it simulates air resistance. Participants are considering the implications of different drag equations and their potential effects on the projectile's trajectory.

Archer2338
Messages
2
Reaction score
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.
 
Physics news on Phys.org
Archer2338 said:

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.

In reality it is a bit complicated. I might look here.

http://en.wikipedia.org/wiki/Drag_(physics )

The problem is with air resistance is it varies with velocity, the faster you go, the harder the air pushes. And it depends on property of the fluid (in this case air) and the object.
So you have to make a guess what the programmers decided as you did. If they decided to use some physics then the wiki article explains some of the complexities.
 
Last edited by a moderator:
pgardn said:
In reality it is a bit complicated. I might look here.

http://en.wikipedia.org/wiki/Drag_(physics )

The problem is with air resistance is it varies with velocity, the faster you go, the harder the air pushes. And it depends on property of the fluid (in this case air) and the object.
So you have to make a guess what the programmers decided as you did. If they decided to use some physics then the wiki article explains some of the complexities.

Okay, I did a little bit of more digging around. The equation used is:

frontal area of the bullet * velocity^2)/Constant

So I don't know whether this equation only applies to the bullet when it leaves the barrel and slows the same amount each time, or the drag force changes during the bullet's trajectory.

How would I apply those into the base non-air resistance equation? I assume I would be able to find the velocity of the bullet, both estimated and real time (tracking the bullet itself), but how would I incorporate that drag equation to find out the angle I need to hit something at X distance?
 
Last edited by a moderator:
Archer2338 said:
Okay, I did a little bit of more digging around. The equation used is:

frontal area of the bullet * velocity^2)/Constant

So I don't know whether this equation only applies to the bullet when it leaves the barrel and slows the same amount each time, or the drag force changes during the bullet's trajectory.

How would I apply those into the base non-air resistance equation? I assume I would be able to find the velocity of the bullet, both estimated and real time (tracking the bullet itself), but how would I incorporate that drag equation to find out the angle I need to hit something at X distance?

That equation should have some variable involving time. If it is a measure of the force of the air on the bullet or the acceleration, those would change through time due to air resistance based on velocity squared.

On the second part you might have to experiment. You could aim straight at the target and see how far below you miss. Then you know how much below the target it fell so you might be able to use that to know how far above you need to aim. ON the other hand, if you did adjust this way, you would most likely spend more time in the air so that would mess everything up...

You really need to stick this back into the kinematics equations in the horizontal since air resistance would play the biggest role in the horizontal. In other words you would have acceleration in the vertical from gravity (and a little bit from air presumably) and in the horizontal (all from air resistance). In the simple projectile problems air resistance is left out of the horizontal motion.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
5
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 9 ·
Replies
9
Views
1K
Replies
3
Views
1K
  • · Replies 36 ·
2
Replies
36
Views
4K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 23 ·
Replies
23
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K