The Cambridge Rocketry Simulator is designed for use with unguided rockets including model rockets, High Power Rockets (HPR), and sounding rockets. Typically, these will perform a sub-orbital flight, collect some data, and deploy a parachute for recovery to Earth. The software models the flight dynamics of the rocket in six-degrees-of-freedom and of the parachute descent in three-degrees-of-freedom. It has a range of uses. Firstly, it can guide the design process. For example, it allows the engineer to select the appropriate size motor for a desired apogee; or to design the fins for an appropriate margin of stability; or to optimise the timing of stage separation or parachute deployment. Secondly, it enables the operator to predict the landing location, which helps in determining the required launch safety exclusion zone, as well as facilitating the retrieval of the reusable components of the rocket. In order to map uncertainties in the dynamics and the atmospheric conditions into confidence bounds around the predicted landing location, a Monte Carlo approach is combined with a numerical integration scheme.
Most research performed on predicting the trajectories of projectiles is done by numerical integration. The exception is the work of Chudinov , who predicts the trajectories by applying an analytical solution. While this approach is beneficial in terms of computation costs, the prediction is limited to modelling a point mass with a quadratic drag force. At the other end of the spectrum, there are advanced simulators such as that described by Sahu , where the authors use advanced coupled computational fluid dynamics/rigid body dynamics to predict the rocket behaviour even as it enters supersonic speeds. However, as the additional computational cost is significant due to the calculation of unsteady aerodynamics associated with supersonic flight, it is computationally costly to perform an uncertainty analysis of parameters via a Monte Carlo method. While there are other methods available for non-linear uncertainty propagation, the Monte Carlo method is capable of handling large state spaces and arbitrary input distributions, making it the most widely used approach. That does not take away that advanced simulations remain invaluable when testing the performance of new control methods, as performed by Gomez and Miikkulainen , who test their control method for a finless rocket via simulations. Uncertainty propagation is also useful for Impact Point Prediction (IPP), where the impact point of a projectile is determined while it is in-flight. Yuan et al.  incorporates the uncertainty due to the presence of wind to increase the accuracy on the confidence bounds on the landing location. Rogers  applies an uncertainty analysis not only to predict the impact point, but also to guide the rocket such that it avoids objects and reaches the target location without collision. With the exception of the analytical solution, all research is done via a six-degrees-of-freedom rocket model and parameters describing the projectile’s properties.
There are various software packages that facilitate conceptual studies of rocket design, including commercial solutions such as RockSim , open-source solutions such as OpenRocket , and even computer games such as the Kerbal Space Program . All these packages simulate the performance of a rocket under nominal conditions, returning the expected performance to the user. While RockSim Pro does display confidence bounds around the predicted landing location to the user, it is only available to USA citizens.
The Cambridge Rocketry Simulator has four advantages over these software packages. Firstly, it is free and open-source . Secondly, the physics model is verified, peer-reviewed, and published . Thirdly, by using a Monte Carlo wrapper, it incorporates uncertainties in both rocket dynamics and atmospheric conditions, making it possible to produce a splash-down area with confidence bounds. Finally, the atmospheric model supports a 3-dimensional wind vector, air density, and air temperature, all as a function of altitude. These atmospheric data may be populated from a recent meteorological forecast to maximize the accuracy of predictions. And with the introduction of the third version of the Cambridge Rocketry Simulator, as presented in this paper, parts of the Graphical User Interface (GUI) from Open-Rocket  are integrated to assist the user in their rocket design. The software package is useful in predicting the trajectories of rockets in academic activities [3, 19, 7, 10], or when sampling the atmosphere using sounding rockets. Without the prediction of the trajectories, or more specifically, the confidence bounds of the landing location, you may never get permission from the aviation authorities to launch your rocket . Furthermore, the output of the simulator, the rocket trajectories, have been used in the trajectory modelling research described by Eerland, Box, and Sóbester .
The remainder of this paper covers the implementation and architecture, quality control, the availability, and reuse potential of the software.
The software package consists of three components, each written in a different language to suit their individual purpose: A GUI, a simulator, and a visualisation module. A schematic representation of the three components, and how they interact, is presented in Figure 1.
The GUI used to design the rocket is coded in Java, where the start-up file SWINGSTARTUP.JAVA is located at GUI/SWING/SRC/NET/SF/OPENROCKET/STARTUP/. This starts the design page as seen in Figure 2, where the user can select the different components to build the rocket. More details about the GUI, and the corresponding internal structure can be found in Niskanen . The example here shows a two-stage rocket. Once the rocket is designed, all the parameters are passed to the simulator core (written in C++) via an Extensible Markup Language (XML) data-sheet. These parameters are required in the simulation, and consist of the moments of inertia, centre of pressure, drag coefficient, and the thrust curve. A full list of parameters and a description of the components are available in the user guide USER_GUIDE.PDF, which is located at DOC/.
The core of the physical simulation, the ROCKETC source code, is located in CPP/ which includes a Makefile that compiles the binary and moves it to the simulator folder, found in SIMULATOR/. The Java GUI calls the simulation binary, after which the simulation starts by reading the input XML generated by the Java code. The XML file SIMULATIONINPUT.XML can be found in the Data folder at DATA/. Upon completion of the simulation an output XML file SIMULATIONOUTPUT.XML is generated in the same folder.
This output of the simulation is then input to the Python visualization code which is located in PLOTTER/. This presents the user with an overview of the flight trajectories and the splash-down area. The splash down-area includes confidence bounds, as seen in Figures 3 and 4.
When running the software under Linux, the three folders, SIMULATOR/, DATA/, and PLOTTER/, are expected to be located in the users home directory ~/.CAMROCSIM/. Therefore, to prepare the system for execution from source code, a script called PREPARE_LINUX.SH is included in the repository. This copies the three relevant folders to this location. The information presented in this section, and build instructions for Windows, are available in the README.MD file found in the repository.
The performance of the simulator has been evaluated by comparison to telemetry data recorded in rocket flights as described by Box, Bishop, and Hunt .
The performance and stability of the GUI and the visualiser have been tested in two rounds of user-testing, including cross-platform testing, which was done on Ubuntu 14.04 Trusty Tahr and Windows 10.0 (Build 10240).
Furthermore, there are unit tests available for the GUI and simulator, using JUnit for the GUI (Java), and GoogleTest for the simulator (C++). Instructions on how to run these are included in the README.MD file.
The Cambridge Rocketry Simulator is able to function on any operating system that supports a standard Java and Python installation, which includes Linux and Windows. In all systems the simulator can be set-up by checking out the code repository. Detailed instructions on how to start the program and continue development are included in the documentation.
Java ≥ 1.7
Python ≥ 2.7
C++ ≥ C++ 98
No special requirements.
The following C++ library is a required dependency:
The following Python libraries are a required dependency:
Persistent identifier: https://doi.org/10.5281/zenodo.161850
Licence: GPL v3
Version published: 3.1
Date published: 19/10/2016
Persistent identifier: https://sourceforge.net/p/camrocsim/code/ci/b888389c281788805b2680190dcda3b706dd8327/
Licence: GPL v3
Version published: 3.1
Date published: 19/10/2016
The modular design of the Cambridge Rocketry Simulator’s source code makes it inherently reusable. The GUI may be reused for applications where rocket design is required but simulation and visualization are not. The simulator itself – as described above – is a stand-alone program callable from the command-line, accepting a XML simulation input file as its single parameter. Therefore this can be ported into other applications.
Furthermore, individual classes of the simulator have reuse potential. For example the RKF45.CPP class is a general ordinary differential equation solver which implements the fourth/fifth order Runge-Kutta algorithm with Fehlberg step-size control . This may be used in any dynamics simulation application.
Similarly, the VMATHS.CPP class may be used for modelling the six-degrees-of-freedom dynamics of rigid bodies. In particular the implementation of quaternions in this class is helpful for modelling unconstrained rotation without the need to deal with the singularities that arise when using Euler angles .
To assist users and developers, there is a user guide (USER_GUIDE.PDF) available in the DOC/ directory. This includes information on the required structure of the XML files, and instructions on how to launch the simulator and plotter via the command line.
The website Cambridge Rocketry  is devoted to producing open-source software for simulating high power rockets, where besides the Cambridge Rocketry Simulator, an Octave/Matlab version of the simulator core named the Cambridge Rocketry Toolbox is available. The preferred method for contributors to contact the developers is via the SourceForge webpage https://sourceforge.net/p/camrocsim/, where questions can be asked on the forum, and the developers may be contacted directly.
The authors thank the two anonymous reviewers whose comments and suggestions helped improve this manuscript and software.
The authors have no competing interests to declare.
Apogee (2008). RockSim v9, URL: http://www.apogeerockets.com (visited on 31/01/2017).
BBC (2011). Rocket launch for Bolton students on Mull of Galloway, URL: http://www.bbc.co.uk/news/uk-england-manchester-14760906 (visited on 31/01/2017).
Box, S (2011). Cambridge Rocketry, URL: http://cambridgerocket.sourceforge.net (visited on 31/01/2017).
Box, S, Bishop, C and Hunt, H (2010). “Stochastic six-degree-of-freedom flight simulator for passively controlled high-power rockets”. Journal of Aerospace Engineering 24(1): 31–45, DOI: https://doi.org/10.1061/(ASCE)AS.1943-5525.0000051 eprint: http://eprints.soton.ac.uk/73938/.
Box, S and Eerland, W J (2016). Cambridge Rocketry Simulator, URL: https://sourceforge.net/p/camrocsim/ (visited on 31/01/2017).
Buchanan, G et al. (2015). “The Development of Rocketry Capability in New–Zealand World Record Rocket and First of Its Kind Rocketry Course”. Aerospace 2(1): 91.2226–4310DOI: https://doi.org/10.3390/aerospace2010091
Chudinov, P S (2003). “Analytical investigation of point mass motion in midair”. European Journal of Physics 25(1): 73.DOI: https://doi.org/10.1088/0143-0807/25/1/010
Commercial Space Transportation (2007). Supplemental Application Guidance for Unguided Suborbital Launch Vehicles (USLVs). Tech. rep. Federal Aviation Administration (FAA). URL: https://www.faa.gov/.
Courtney, M and Courtney, A (2009). “Measuring thrust and predicting trajectory in model rocketry”. arXiv preprint, arXiv:0903.1555. URL: https://arxiv.org/abs/0903.1555.
Eerland, W J, Box, S and Sóbester, A (2016). “Modeling the dispersion of aircraft trajectories using Gaussian processes”. Journal of Guidance, Control, and Dynamics, DOI: https://doi.org/10.2514/1.G000537 eprint: http://eprints.soton.ac.uk/399818/.
Gomez, F J and Miikkulainen, R (2003). Cantú-Paz, E et al. “Active Guidance for a Finless Rocket Using Neuroevolution”. Genetic and Evolutionary Computation – GECCO 2003: Genetic and Evolutionary Computation Conference, Proceedings, Part II. July 12–16, Chicago, IL, USABerlin, Heidelberg: Springer, July 2003pp. 2084–2095, 978-3-540-45110-5DOI: https://doi.org/10.1007/3-540-45110-2_105
Niskanen, S (2015). OpenRocket, URL: http://openrocket.sourceforge.net (visited on 31/01/2017).
Niskanen, S (2013). OpenRocket technical documentation. Tech rep. URL: http://openrocket.sourceforge.net (visited on 31/01/2017).
Rogers, J (2014). “Stochastic Model Predictive Control for Guided Projectiles Under Impact Area Constraints”. Journal of Dynamic Systems, Measurement, and Control Oct 2014137(3): 034503–8, DOI: https://doi.org/10.1115/1.4028084
Sahu, J (2008). “Time-accurate numerical prediction of free-flight aerodynamics of a finned projectile”. Journal of Spacecraft and Rockets 45(5): 946–954, DOI: https://doi.org/10.2514/1.34723
Squad (2011). Kerbal Space Program, URL: http://www.kerbalspaceprogram.com (visited on 31/01/2017).
TU Delft (2016). DARE: Delft Aerospace Rocket Engineering, URL: http://dare.tudelft.nl (visited on 31/01/2017).
Yuan, T, Bar-Shalom, Y, Willett, P and Hardiman, D (2014). “Impact point prediction for thrusting projectiles in the presence of wind”. Aerospace and Electronic Systems, IEEE Transactions 50(1): 102–119, DOI: https://doi.org/10.1117/12.930875