# Deriving formula to calculate theta for artillery

1. Feb 18, 2009

### super6logan

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: Feb 18, 2009
2. Feb 19, 2009

### Lojzek

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.