This is a specification for an exterior ballistics software that can be used to calculate damage at long range in tabletop RPGs like Phoenix Command or GURPS where that sort of question arises with some degree of frequency. It takes in physical characteristics of a projectile (diameter, length, mass, etc.) and uses an ODE method to calculate velocity after a period of time has passed. I'd recommend either C++ or pure C for the programme as, particularly if you are generating tables for many types of projectiles, it can get very computationally intensive.For the specification, start with the formula for drag force, $F_d = \frac{1}{2}\rho v^{2}C_{D}A$, so $\frac{\rho v^{2}C_{d}A}{2m} = a$. The issue is $C_D$, which must be determined empirically. We have an advantage in that drag curves all look more or less the same in terms of shape and proportionality (multiply the drag coefficient on a G7 drag curve by about 1.9 and you will likely be pretty close to the drag coefficient at that mach number on a G1 drag curve). Thus, we define our generic drag curve as on the below table. When a bullet is between mach numbers you have the option of linearly interpolating between them, which is less realistic but easier to write code for and will run faster, or using a more complex formula such as Lagrangian or Newtonian Interpolation, which are more accurate but slower. The typical air density (rho) at sea level is 1.225kg/m$^3$. A typical speed of sound at sea level is about 340 m/s.
Mach number | C_D0.00 | 0.1500.40 | 0.1500.50 | 0.1550.60 | 0.1650.70 | 0.1800.80 | 0.2150.85 | 0.2500.90 | 0.3100.92 | 0.3500.95 | 0.4200.98 | 0.5001.00 | 0.5401.02 | 0.5601.05 | 0.5701.10 | 0.5651.20 | 0.5401.30 | 0.5201.40 | 0.5051.50 | 0.4901.60 | 0.4801.80 | 0.4652.00 | 0.4552.50 | 0.4403.00 | 0.4304.00 | 0.420This is then modified by three form factors; one from the nose, from the tail, and one from the length of the projectile. The product of these form factors is the Ballistic Form Factor of a round. The form factor from projectile length is equal to $1.3(\frac{\text{Projectile length}}{\text{Projectile diameter}})^{-\frac{5}{29}}$. Multiply $C_D$ found on the table above by Ballistic Form Factor to find the actual $C_D$ at a given mach number.Nose | Form factorTangent ogive (pointed) | 0.81Secant ogive (pointed) | 0.90Round nose | 1.00Conical nose | 1.05Hollowpoint | 1.15Tail | Form factorBoattail | 0.8Rebated boattail | 0.9Flat | 1.0Fletched/fin-stabilised | 1.1The programme then needs to repeat the process of calculating $a$ from drag force and projectile mass at a given velocity, subtracting acceleration * timestep from v (Euler's method, using RK4 produces more accurate results but is slower), and stepping forwards time by timestep seconds until some arbitrarily low velocity or other criteria is met.
>>97386354Based actual nerd.
>>97386354These old drawings used to explain concepts seem to do it so well. The idea is simple to begin with I admit, but look at that thing, how could I ever forget the terms now after seeing that?