Ballistics
I started writing about ballistics on this site in September 2024 with a calculus exercise on a .308 trajectory. The posts below are in the order the work happened: the physics, a round of Python simulation experiments, the Rust engine those experiments turned into, the machine learning layered on top of it, and the phone app it now ships in.
The physics
- Modeling Ballistic Trajectories with Calculus and Numerical Methods (September 2024): a .308 Winchester trajectory with air resistance, worked through calculus and numerical integration.
- Simulating Interior Ballistics: 5.56 NATO Ammunition in Python (April 2025): what happens inside the barrel, from primer ignition to muzzle exit.
- Ballistic Coefficients (April 2025): what G1 and G7 coefficients measure, and why the choice of drag model matters.
- Simulating Buckshot Spread (May 2025): #00 buckshot pellets in flight, simulated and plotted in Python.
- Why Differential Equations Are the Secret Language of the Real World (May 2025): how a teenage interest in ballistics turned into differential equations.
Simulation experiments
- Ballistics Simulation: Hybrid Physics and Machine Learning (April 2025): ODE simulations plus Random Forest regression to predict muzzle velocity.
-
Accelerating Large-Scale Ballistic Simulations with torchdiffeq and PyTorch (May 2025): SciPy's
solve_ivpagainsttorchdiffeqon large parameter sweeps. - Exploring Exterior Ballistics: Python and TensorFlow in Action (May 2025): projectile motion with drag, modeled in TensorFlow.
- Optimizing Scientific Simulations: JAX-Powered Ballistic Calculations (May 2025): the same trajectory integration in JAX.
The engine
- Building a Professional-Grade Ballistics Calculator (July 2025): the Python and Rust hybrid that made the solver 28 times faster.
- Open Sourcing a High Performance Rust-based Ballistics Engine (August 2025): pulling the Rust core out into a standalone library with bindings for iOS and Android.
- MCDRAG: Legacy Ballistics from 1974 BASIC to Modern Web (August 2025): R.L. McCoy's drag estimator, ported from BASIC to Rust and WebAssembly.
- Real World Validation: How User Feedback Improved the Ballistics Engine CLI (January 2026): an early adopter's field testing of the command-line solver, and what it changed.
- The Bullet Doesn't Go Where You Point It (August 2026): drop, spin drift and the Earth's rotation, and why almost none of the bugs in the engine were physics bugs.
- The Config Language That Was Already There (August 2026): a ballistics REPL written in Lattice instead of yet another configuration format.
- rockets-engine: Giving the Ballistics Engine a Motor (October 2026): powered flight, staging and recovery on top of the engine's drag kernel, checked against exact solutions and OpenRocket.
Machine learning on top of the physics
- Smart Ballistics: Bullet Stability When Data Is Missing (August 2025): the Miller stability formula plus a Random Forest for bullets with incomplete specifications.
- Transfer Learning for Transonic Drag Prediction (September 2025): a two-stage model for drag near Mach 1, where fixed-percentage methods exceed 100% error.
- Transfer Learning for Predictive Custom Drag Modeling (October 2025): predicted drag curves at 3.15% mean absolute error.
- Physics-First ML: Why AI Should Correct, Not Replace, Scientific Models (January 2026): small, bounded corrections to physics instead of a model that replaces it.
- Discretizing Continuous ML Models (January 2026): turning learned coefficient corrections into offline lookup tables.
The app
- Ballistics Insight on Android: A Solver That Admits What It Assumed (October 2026): the engine on a phone through a single JNI function, and a truing fit that reports its own error bars.
The engine underneath the app is open source.
Ballistics Insight
The open-source ballistics engine from these posts, on your phone: drop and wind holds for your own load and the day's conditions, with your saved loads and shooting logs. Calculations run on the device, so they work offline. It's free to install on iPhone, iPad and Android, and Pro is a one-time purchase.