WEAPONTESTER
The Math

How the trajectory engine works

This page documents the model used in /build and /range. It is not the most complex model in existence — that's Hornady 4DOF or pure 6DOF aero — but it is calibrated to match published JBM tables at ranges out to ~1500 yards for typical precision-rifle calibers.

Modified Point Mass (MPM)

We treat the bullet as a point mass with a drag coefficient that varies with Mach number. The integrator steps the equations of motion (gravity + drag + wind) forward in small time slices and records position, velocity, and energy at each output range.

G1 vs G7 drag tables

G1 was historically standard for flat-base bullets; G7 fits modern boat-tail match projectiles much better. Where a manufacturer publishes both, we prefer G7. Both tables are from the McCoy / JBM canonical data.

Atmosphere

Air density is computed from temperature, station pressure, humidity, and altitude using the ICAO standard atmosphere with humidity correction. Density alone moves drag — at 4,000 feet on a hot day, your .308 will shoot meaningfully flatter than at sea level on a cold morning, even with the same load.

Wind

We model a vector wind with a configurable direction. A 90° crosswind gives the full advertised drift; a headwind contributes nothing to lateral movement (and only a small amount to vertical via reduced forward speed). Internally, every shot's drift is the integral of lateral acceleration over time of flight.

Spin drift

A right-twist barrel produces a small rightward yaw that becomes a meaningful drift (3–10 inches at 1000 yards on a .308). We use Bryan Litz's approximation:

SD (in) = 1.25 × (Sg + 1.2) × TOF^1.83

Where Sg is the Miller stability factor (computed from twist, bullet length, mass, and atmospheric density) and TOF is time of flight in seconds.

What we don't model (yet)

Validation

Every release runs unit tests against published JBM trajectories for benchmark loads (.308 168gr SMK at 2650, 6.5 CM 140gr ELD-M at 2710, etc.) and asserts agreement to within ~5% on drop and drift at typical ranges. If you spot a discrepancy, file a bug.