A ballistic computer numerically integrates the shell's equations of motion under
gravity, quadratic air drag and crosswind, then reports the predicted impact point —
exactly what WWII-era mechanical firing tables and modern digital fire-control
computers do before a real shot is fired.
ax = -k*v*vx + wind_accel
ay = -g - k*v*vy
az = -k*v*vz
v = sqrt(vx²+vy²+vz²), k = dragCoeff
pos += vel*dt (semi-implicit Euler)
- Fire — launches a new shell using the current solution; a ghost trail of the last shot stays visible for comparison.
- Muzzle velocity — initial speed leaving the barrel.
- Elevation angle — barrel angle above horizontal; the classic 45° maximizes range in vacuum, but drag shifts the optimum lower.
- Drag coefficient — strength of quadratic air resistance opposing velocity.
- Crosswind — steady lateral wind that deflects the shell off the firing line.
Real artillery computers (from WWII analog "Kerrison" predictors to modern digital
fire-control systems) solve this same system continuously, correcting for
temperature, propellant charge and Coriolis effects to land rounds on target from
tens of kilometres away.