Skip to content

OverviewΒΆ

This page summarizes the primary classes for this project and how they fit together at runtime.

Core WorkflowΒΆ

  • Calculator: High-level entry point to compute trajectories. Accepts a Shot (scene) and returns a HitResult with trajectory rows and helpers.
  • Shot: Details a shooting scenario – Ammo, Atmo, Weapon, Wind, and angles (look/slant, relative, cant).
  • HitResult: Wrapper for accessing and displaying calculated results, including a list of TrajectoryData (which are detailed characteristics of points on the ballistic trajectory).

Projectile & EnvironmentΒΆ

classDiagram
    class Shot {
        look_angle
        relative_angle
    }
    class Ammo {
        mv
        temp_modifier
    }
    class Atmo {
        altitude
        temperature
        pressure
        humidity
    }
    class Wind
    class Weapon {
        zero_elevation
        sight_height
        twist
    }
    class DragModel
    class Sight

    Shot o-- Ammo
    Shot o-- Atmo
    Shot o-- "0..n" Wind
    Shot o-- "0..1" Weapon
    Ammo o-- DragModel
    Weapon o-- "0..1" Sight

The classes that comprise a Shot:

  • Ammo: Wraps muzzle velocity, including optional powder temperature sensitivity, together with a DragModel.
    • DragModel: Physical details of a projectile, including aerodynamic drag as a function of velocity. (Drag is typically modelled via Ballistic Coefficient and standard drag tables – G1, G7, etc.)
  • Atmo: Standard or custom atmosphere.
  • Wind: Piecewise-constant winds by distance.
  • Weapon: Gun specifications (sight height, rifle twist rate, zero elevation, Sight details).

EnginesΒΆ

Calculation engines implement different algorithms for integration and targeting. All inherit from BaseIntegrationEngine.

Selected API references

pyballistic.interface.Calculator
pyballistic.conditions.Shot
pyballistic.munition.Ammo
pyballistic.conditions.Atmo
pyballistic.munition.Weapon
pyballistic.trajectory_data.HitResult
pyballistic.trajectory_data.TrajectoryData