Skip to main content
hero-dark

CI PyPI Python 3.9+ C++ License: MIT

ballistic-solve is a high-performance C++ library with Python bindings for computing ballistic trajectories and firing solutions. It solves intercept problems for moving targets while modeling real-world physics including gravity, drag, wind, and atmospheric variations.

Key Features

  • Real-world physics — Account for gravity, air resistance, wind, and atmospheric conditions
  • Moving targets interception — Calculate firing solutions to intercept targets with any motion pattern
  • High performance — Fast C++ core with Eigen for real-time trajectory computation

Installation

pip install ballistic-solve

Quick Start

import numpy as np
from ballistic_solve import Ballistic, Environment, Projectile

environment = Environment.earth_standard()
projectile = Projectile.gsh30_round()

ballistic = Ballistic(environment, projectile)

def target_position(t):
    p = np.array([1200.0, 150.0, 5200.0])
    v = np.array([270.0, 20.0, -5.0])
    a = np.array([0.0, -15.0, -2.0])

    return p + v * t + 0.5 * a * t**2

solution = ballistic.solve_earliest(
    target_position=target_position,
    platform_position=np.array([0.0, 0.0, 5000.0]),
    platform_velocity=np.array([250.0, 0.0, 0.0]),
    projectile_speed=860.0,
    time_range=(0.0, 5.0)
)

if solution:
    print(f"Fire direction: {solution.direction}")
    print(f"Time to intercept: {solution.time:.3f}s")
    print(f"Interception error: {solution.error:.4e}m")
    print(f"Computation time: {solution.computation_time * 1e3:.2f}ms")
else:
    print("No solution")

Dependencies

  • Eigen — Vectorized linear algebra and Levenberg-Marquardt optimization
  • Boost — Adaptive-step ODE integration and root-finding

License

MIT © Ariyudo Pertama

Metadata

Release files for ballistic-solve 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ballistic-solve 0.2.2
File Size Uploaded Provenance Actions
ballistic_solve-0.2.2.tar.gz 366.4 kB Without provenance Details for ballistic_solve-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ballistic-solve 0.2.2
File Interpreter ABI Platform Actions
ballistic_solve-0.2.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for ballistic_solve-0.2.2-cp313-cp313-win_amd64.whl

Total release size: 848.6 kB

Release files / ballistic_solve-0.2.2.tar.gz

Download URL ballistic_solve-0.2.2.tar.gz
Size 366.4 kB
Tags Source
SHA-256 checksum
How to use checksums
111e97ce7973a817554d68af69593b0538f435ea7350d0abdfce34698832ad2f
BLAKE2b-256 checksum
How to use checksums
8808562d3d67ef94f326f0c9527ca510ebd12be2b90ee5b3d52d9273d0569420
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / ballistic_solve-0.2.2-cp313-cp313-win_amd64.whl

Download URL ballistic_solve-0.2.2-cp313-cp313-win_amd64.whl
Size 482.2 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
c2c0a264212698957b4b94185ab56a2dcd82dad710bd73362988a9afeeff13cb
BLAKE2b-256 checksum
How to use checksums
05cd86a46042733e20bfa980e144329aecc0a9c6668eeccdc97c2ddea485204e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Security for ballistic-solve 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page