• This Forum is for adults 18 years of age or over. By continuing to use this Forum you are confirming that you are 18 or older. No content shall be viewed by any person under 18 in California.

Monte-Carlo Match Simulator

Was bored last weekend so I wrote a ballistics solver and turned it into a Monte-Carlo match simulator.

You configure your load (BC, MV, caliber/diameter, drag model), pick a target and distance, then set the random variables: inherent rifle accuracy, muzzle-velocity standard deviation, and wind variability (stdev in mph for different wind components). The simulator fires many shots and shows the distribution of impacts plus an estimated score (including X-counts).

Live demo: https://chasep255.github.io/BallisticsToolkit/target-sim/target-sim.html.

For the technically curious: the ballistic engine is written in C++ and compiled to WebAssembly for fast, client-side performance. It’s a 3-DOF solver (no spin/gyro effects yet) integrated with a Runge-Kutta method, and the web UI is vanilla JavaScript. Build from source requires Emscripten and CMake; see the repo.

GitHub: https://github.com/chasep255/BallisticsToolkit.

If anyone wants to dig in: I’d welcome feedback on the physics model (especially how to best incorporate spin/stability and yaw-drag terms). I also want to try to add a more realistic wind model. Maybe simulate different crosswinds and other effects. Might want to turn it into some sort of video game.
 

Upgrades & Donations

This Forum's expenses are primarily paid by member contributions. You can upgrade your Forum membership in seconds. Gold and Silver members get unlimited FREE classifieds for one year. Gold members can upload custom avatars.


Click Upgrade Membership Button ABOVE to get Gold or Silver Status.

You can also donate any amount, large or small, with the button below. Include your Forum Name in the PayPal Notes field.


To DONATE by CHECK, or make a recurring donation, CLICK HERE to learn how.

Forum statistics

Threads
166,905
Messages
2,225,177
Members
80,047
Latest member
Thisisdenny
Back
Top