CamPyRoS - A 6DOF Rocket Trajectory Simulator

https://zenodo.org/badge/308847422.svg

CamPyRoS (Cambridge Python Rocketry Simulator) is a Python package which provides fully featured rocket trajectory simulation including features like:

  • 6 degrees of freedom (3 translational, 3 rotational)

  • Monte Carlo stochastic analysis

  • Aerodynamic heating model

  • Use of live wind data

  • Variable mass and moments of inertia models

Getting started

Currently not all dependancies are supported by the same install methods so the easiest install doesn’t contain the full functionality. To install the core library:

1
pip install git+https://github.com/cuspaceflight/CamPyRoS.git

The “wind” and “statistics” modules will not run. Statistics has a dependancy not fully supported by windows, to install it:

pip install ray on most platforms, for Windows problems see here.

Wind depends on a library called iris which can only be installed with conda:

1
conda install iris, iris_grib

Note

Note: after some more testing this won’t work for anyone on Windows, I am in the process fo sorting this out (the problem is a codec dependancy which there is no way for us to fix) by writing an library to read the other GFS distrobution method, see getgfs. You can still run and contribute without using the wind module.

This may then demand you install another library when you try to run it:

1
pip install eccodes-python

Alternativly you can download this repository and move it to either your system path or somewhere you will exclusivly use it from then:

1
2
  conda env create -f enviroment.yml -n <name>
  conda activate <name>

From within the downloaded folder.

Usage

The repository contains some examples you can run: - example.ipynb or example.py : Launch of a simple rocket (the Martlet 4). - Stats Model Example.ipynb : Example of how to use the statistics model and stochastic analysis. - Aerodynamic Heating Example.ipynb : Example of how to run an aerodynamic heating simulation.

Helping out

If you would like to contribute please have a look at the guidelines

In progress

  • GUI: An incomplete (and outdated) GUI has been made using Tkinter, and is in gui.py.

  • Slosh modelling: Some slosh modelling functions have been put together in slosh.py, based on the following source - The Dynamic Behavior of Liquids in Moving Containers, with Applications to Space Vehicle Technology.

  • Wind variability: Statistical analysis of historic wind forecasts and obervations are analysed to create a Guassian difference profile to vary the wind in the statistical models (see wind-stats branch for a very poorly documented insight to current progress)

Potential for expansion

Cite as

Daniel Gibbons, & Jago Strong-Wright. (2021, February 11). cuspaceflight/CamPyRoS: First release! (Version V1.0). Zenodo. http://doi.org/10.5281/zenodo.4535672

Technical Documentation

Full technical documentation is coming soon

Index and moduals