The projectile is integrated frame-by-frame under gravity, quadratic
air drag opposing its velocity, and a steady crosswind. The dashed grey
curve is the ideal drag-free parabola for comparison โ the gap between
the two shows exactly how much energy drag removes from the flight.
a = g + wind_accel โ (CdยทฯยทA / 2m) ยท |v| ยท v
x(t+dt) = x(t) + v(t)ยทdt
range = x at the moment y returns to 0
- Launch angle โ elevation of the barrel above the horizontal; range peaks near 45ยฐ only in vacuum, lower with drag.
- Muzzle velocity โ initial speed leaving the barrel.
- Drag coefficient โ how strongly air resistance decelerates the shell; 0 reproduces the vacuum parabola exactly.
- Crosswind โ lateral wind that deflects the shell sideways over the flight, visible as curvature away from the vertical firing plane.
This is the same numerical approach real fire-control computers use:
since drag makes the equations of motion have no closed-form solution,
they step the trajectory forward in small time increments rather than
using the textbook range formula.