ballistics-engine 0.26.0

High-performance ballistics trajectory engine with professional physics
Documentation
{
  "id": "analytic_vacuum_angled_apex_range",
  "description": "Zero-drag vacuum parabola launched at 35 deg. Checks apex height (at half-range), return-to-launch-height range, and the two matching times of flight against the closed-form. Exercises the non-trivial two-axis (x and y both time-varying) integration.",
  "source": {
    "kind": "analytic",
    "citation": "Closed-form projectile motion, g = 9.80665 m/s^2, no drag. Launch angle t=35 deg, v0=250 m/s. Apex height = (v0 sin t)^2/(2g) at downrange x_apex = v0^2 sin t cos t / g; full range R = v0^2 sin(2t)/g where the projectile returns to launch height; tof to apex = v0 sin t / g, tof to R = 2 v0 sin t / g.",
    "retrieved": "2026-07-15"
  },
  "inputs": {
    "muzzle_velocity_mps": 250.0,
    "bullet_mass_kg": 0.010886,
    "bullet_diameter_m": 0.0078232,
    "bullet_length_m": 0.03048,
    "bc_value": 0.5,
    "bc_type": "G1",
    "muzzle_angle_rad": 0.6108652381980153,
    "shooting_angle_rad": 0.0,
    "twist_rate_in": 0.0,
    "temperature_c": 15.0,
    "pressure_hpa": 1013.25,
    "humidity_frac": 0.0,
    "zero_drag": true
  },
  "expectations": [
    {"observable": "drop_m", "range_m": 2994.4368769722, "value": 1048.3636369745, "tol_abs": 0.02,
     "tolerance_justification": "Apex height. RK4/RK45 integrate the quadratic exactly; residual is linear interpolation of the parabola near its flat peak over ~2 m station spacing (~0.1 mm). 2 cm ceiling absorbs step placement."},
    {"observable": "tof_s", "range_m": 2994.4368769722, "value": 14.6221297882, "tol_abs": 0.001,
     "tolerance_justification": "Horizontal speed constant, so t is exactly linear in x; 1 ms guard."},
    {"observable": "drop_m", "range_m": 5988.8737539444, "value": 0.0, "tol_abs": 0.01,
     "tolerance_justification": "Return to launch height (drop = 0). Interpolation of the parabola across ~2 m spacing near the crossing is ~0.1 mm. 1 cm ceiling."},
    {"observable": "tof_s", "range_m": 5988.8737539444, "value": 29.2442595765, "tol_abs": 0.001,
     "tolerance_justification": "t exactly linear in x; 1 ms guard."}
  ]
}