Deriving formula to calculate theta for artillery

  • Context: Undergrad 
  • Thread starter Thread starter super6logan
  • Start date Start date
  • Tags Tags
    deriving Formula Theta
Click For Summary
SUMMARY

The discussion centers on calculating the angle (theta) for artillery in an online shooter game, utilizing a derived formula based on projectile motion. The formula presented is =(DEGREES(ASIN((9.81*A1)/(400^2))))/2, where A1 represents the target range. The user suspects that the projectile velocity of 400 m/s may be incorrect, as the output for a 650m range yields an unrealistic angle. The conclusion emphasizes the need to measure actual range in-game and adjust the assumed projectile velocity accordingly, as the range is proportional to the square of the velocity.

PREREQUISITES
  • Understanding of projectile motion and basic physics principles
  • Familiarity with Excel formulas and functions
  • Knowledge of trigonometric functions, specifically sine and arcsine
  • Basic concepts of game mechanics related to artillery
NEXT STEPS
  • Research the effects of air resistance on projectile motion in gaming scenarios
  • Learn how to derive and manipulate projectile motion equations
  • Explore advanced Excel functions for simulating projectile trajectories
  • Investigate methods for measuring and validating in-game distances and angles
USEFUL FOR

This discussion is beneficial for game developers, physics enthusiasts, and players interested in optimizing artillery mechanics in shooting games.

super6logan
Messages
3
Reaction score
0
I play an online shooter game with artillery that players can use. As best I can tell, the shell exits the artillery at 400m/s, I don't know if that's correct because units aren't listed in the code but it sounds logical. I know the distance to target as well, I only need to know what angle to aim the barrel to hit to target. Here's the formula I've derived as it looks in excel with A1 being the cell with the target range:
=(DEGREES(ASIN((9.81*A1)/(400^2))))/2
and in an equation, r as range to target:
(sin-1((9.81R)/(4002))/2=\Theta

The problem is that if I plug a range like 650m into it the output in excel is 1.14201, an impossible number but I know that the artillery can hit ranges over 700m. Does this imply that the 400m/s V0 I have is wrong?
 
Last edited:
Physics news on Phys.org
The formula is correct, but the projectile velocity is probably much lower (maybe 400 km/h?). I assume the game does not consider air resistance (you can check this by observing the symmetry of the trajectory). You should use your formula for range(angle) to calculate theoretical range (with your guess for projectile velocity). Then you measure the actual range at that angle in the game. Since the range is proportional to the square of the
projectile velocity, you simply divide your guess for projectile velocity by the square root of
the ratio between calculated range and measured range. For example: if your calculated range is 9 times too large, you divide projectile velocity by 3.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
6K
  • · Replies 35 ·
2
Replies
35
Views
7K
  • · Replies 4 ·
Replies
4
Views
1K
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
6K
Replies
1
Views
2K