Skip to content

Rocket COP Calculator

This project provides a Python class to calculate a rocket's Center of Pressure (COP) using the subsonic Barrowman method. It is designed to be a simple, reusable tool for model rocket analysis.

Quick Start

View the source on GitHub

Run the example script to see it in action:

python example.py

This will calculate the COP and display an interactive 3D visualization of the rocket.

Or use the CalculateCOP class directly:

from calculator import CalculateCOP

params = {
    'nose_type': 'ogive',
    'Ln': 12.5,
    'd': 5.54,
    'dF': 5.54,
    'dR': 5.54,
    'Lt': 0.0,
    'Xp': 0.0,
    'CR': 10.0,
    'CT': 0.0,
    'S': 5.25,
    'LF': 6.5,
    'R': 2.77,
    'XR': 9.0,
    'XB': 27.0,
    'N': 3,
}

cop = CalculateCOP(**params)
print(f"Center of Pressure: {cop.net_COP():.2f} units from nose tip")

# Generate 3D visualization
cop.visualize_rocket()

3D Visualization

The library includes an interactive 3D visualization feature that shows the complete rocket geometry with the calculated Center of Pressure marked as a blue dot.

Visualization Screenshot:

3D Rocket Visualization

See the API Reference for parameter details and visualization options.

Theory & References

The Center of Pressure is calculated using the Barrowman equations, considering nose, transition, and fin contributions. For stability, the COP should be behind the rocket's center of gravity (CG) by at least one body diameter ("one caliber stability").

For a diagram and detailed explanation of each variable, see the Barrowman Equations page.

CI/CD Status

This project is automatically tested and deployed using GitHub Actions.