High-Performance Rust Crate for External Ballistics
Latest Documentationballistics-engine is a comprehensive Rust library for high-performance ballistics calculations. Designed for accuracy, speed, and ease of use, it provides everything from basic trajectory calculations to advanced aerodynamic modeling including 4DOF (Four Degrees of Freedom) simulations with aerodynamic jump, spin drift, and Coriolis effects.
Written in Rust for maximum speed and memory safety. Optimized algorithms deliver accurate results in microseconds.
Supports G1, G7, and custom drag models. Includes transonic corrections, atmospheric effects, and wind modeling.
4DOF trajectory integration, aerodynamic jump, spin decay, pitch damping, and precession/nutation effects.
Export to C, Python (PyO3), and WebAssembly. Use the same engine across multiple platforms and languages.
Validated against real-world doppler radar data. Extensively tested with 850+ unit and integration tests.
Dual-licensed under MIT and Apache-2.0. Contributions welcome on GitHub.
Add ballistics-engine to your Cargo.toml:
[dependencies]
ballistics-engine = "0.13"
Example usage:
use ballistics_engine::trajectory_solver::solve_trajectory;
use ballistics_engine::DragModel;
let result = solve_trajectory(
0.505, // BC (Ballistic Coefficient)
2800.0, // Muzzle velocity (ft/s)
DragModel::G7,
1000.0, // Range (yards)
0.0, // Zero range
1.5, // Sight height (inches)
0.0, // Shooting angle
59.0, // Temperature (°F)
29.92, // Pressure (inHg)
0.0, // Humidity (%)
0.0, // Wind speed (mph)
90.0, // Wind angle (degrees)
);
println!("Drop: {:.2} inches", result.drop_inches);
Explore the complete API documentation organized by module:
ballistics.rs - Main project website with interactive demos
ballistics.sh - Terminal-based ballistics calculator
ballistics.foo - Multi-language WASM playground
ballistics.app - Mobile ballistics application