137 1684 1 PB
137 1684 1 PB
137 1684 1 PB
net/publication/313519224
CITATIONS READS
9 2,605
3 authors:
Andras Sobester
University of Southampton
97 PUBLICATIONS 4,334 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Willem Eerland on 22 February 2017.
SOFTWARE METAPAPER
The Cambridge Rocketry Simulator can be used to simulate the flight of unguided rockets for both design
and operational applications. The software consists of three parts: The first part is a GUI that enables
the user to design a rocket. The second part is a verified and peer-reviewed physics model that simulates
the rocket flight. This includes a Monte Carlo wrapper to model the uncertainty in the rocket’s dynam-
ics and the atmospheric conditions. The third part generates visualizations of the resulting trajectories,
including nominal performance and uncertainty analysis, e.g. a splash-down region with confidence bounds.
The project is available on SourceForge, and is written in Java (GUI), C++ (simulation core), and Python
(visualization). While all parts can be executed from the GUI, the three components share information via
XML, accommodating modifications, and re-use of individual components.
Figure 1: A schematic representation of the three components and the corresponding programming languages.
uncertainty due to the presence of wind to increase conditions, returning the expected performance to the
the accuracy on the confidence bounds on the land- user. While RockSim Pro does display confidence bounds
ing location. Rogers [16] applies an uncertainty analy- around the predicted landing location to the user, it is
sis not only to predict the impact point, but also to only available to USA citizens.
guide the rocket such that it avoids objects and reaches The Cambridge Rocketry Simulator has four advantages
the target location without collision. With the excep- over these software packages. Firstly, it is free and open-
tion of the analytical solution, all research is done via source [6]. Secondly, the physics model is verified, peer-
a six-degrees-of-freedom rocket model and parameters reviewed, and published [5]. Thirdly, by using a Monte
describing the projectile’s properties. Carlo wrapper, it incorporates uncertainties in both rocket
There are various software packages that facilitate con- dynamics and atmospheric conditions, making it possible
ceptual studies of rocket design, including commercial to produce a splash-down area with confidence bounds.
solutions such as RockSim [1], open-source solutions Finally, the atmospheric model supports a 3-dimensional
such as OpenRocket [13], and even computer games wind vector, air density, and air temperature, all as a func-
such as the Kerbal Space Program [18]. All these pack- tion of altitude. These atmospheric data may be populated
ages simulate the performance of a rocket under nominal from a recent meteorological forecast to maximize the
Figure 2: GUI for designing a rocket. It contains all the basic components required to design a rocket.
Eerland et al: Cambridge Rocketry Simulator – A Stochastic Six-Degrees-of-Freedom Rocket Flight Simulator Art. 5, p. 3 of 6
Figure 3: Mean trajectories of both stages of a two-stage rocket including a staged parachute descent. The 1 and 2 σ
bounds of confidence in landing position are also shown.
accuracy of predictions. And with the introduction of the the output of the simulator, the rocket trajectories, have
third version of the Cambridge Rocketry Simulator, as pre- been used in the trajectory modelling research described
sented in this paper, parts of the Graphical User Interface by Eerland, Box, and Sóbester [11].
(GUI) from Open-Rocket [13] are integrated to assist the The remainder of this paper covers the implementa-
user in their rocket design. The software package is useful tion and architecture, quality control, the availability, and
in predicting the trajectories of rockets in academic activi- reuse potential of the software.
ties [3, 19, 7, 10], or when sampling the atmosphere using
sounding rockets. Without the prediction of the trajecto- Implementation and architecture
ries, or more specifically, the confidence bounds of the The software package consists of three components, each
landing location, you may never get permission from the written in a different language to suit their individual pur-
aviation authorities to launch your rocket [9]. Furthermore, pose: A GUI, a simulator, and a visualisation module. A
Figure 4: Landing position confidence bounds from Figure 3 along with the individual landing locations of
25 Monte Carlo iterations.
Art. 5, p. 4 of 6 Eerland et al: Cambridge Rocketry Simulator – A Stochastic Six-Degrees-of-Freedom Rocket Flight Simulator
schematic representation of the three components, and In all systems the simulator can be set-up by checking out
how they interact, is presented in Figure 1. the code repository. Detailed instructions on how to start
The GUI used to design the rocket is coded in Java, the program and continue development are included in
where the start-up file SwingStartup.java is located at the documentation.
gui/swing/src/net/sf/openrocket/startup/. This starts the
design page as seen in Figure 2, where the user can select Programming language
the different components to build the rocket. More details Java ≥ 1.7
about the GUI, and the corresponding internal structure Python ≥ 2.7
can be found in Niskanen [14]. The example here shows C++ ≥ C++ 98
a two-stage rocket. Once the rocket is designed, all the
parameters are passed to the simulator core (written in Additional system requirements
C++) via an Extensible Markup Language (XML) data- No special requirements.
sheet. These parameters are required in the simulation,
and consist of the moments of inertia, centre of pressure, Dependencies
drag coefficient, and the thrust curve. A full list of param- The following C++ library is a required dependency:
eters and a description of the components are available in
the user guide user_guide.pdf, which is located at doc/. Boost ≥ 1.58
The core of the physical simulation, the rocketc source
code, is located in cpp/ which includes a Makefile that The following Python libraries are a required dependency:
compiles the binary and moves it to the simulator
folder, found in simulator/. The Java GUI calls the simu- numpy ≥ 1.5
lation binary, after which the simulation starts by read- matplotlib ≥ 1.1
ing the input XML generated by the Java code. The XML scipy ≥ 0.16.0
file SimulationInput.xml can be found in the Data folder at
Data/. Upon completion of the simulation an output XML List of contributors
file SimulationOutput.xml is generated in the same folder. 1. Willem Eerland (developer).
This output of the simulation is then input to the 2. Simon Box (developer).
Python visualization code which is located in Plotter/. 3. The project includes sources from OpenRocket [13]
This presents the user with an overview of the flight tra- (GNU GPL).
jectories and the splash-down area. The splash down-area
includes confidence bounds, as seen in Figures 3 and 4. Software location
When running the software under Linux, the three Archive
folders, simulator/, Data/, and Plotter/, are expected to Name: Zenodo
be located in the users home directory ∼/.camrocsim/. Persistent identifier: https://doi.org/10.5281/zenodo.
Therefore, to prepare the system for execution from 161850
source code, a script called prepare_linux.sh is included in Licence: GPL v3
the repository. This copies the three relevant folders to Publisher: Zenodo
this location. The information presented in this section, Version published: 3.1
and build instructions for Windows, are available in the Date published: 19/10/2016
README.md file found in the repository.
Code repository
Quality control Name: SourceForge
The performance of the simulator has been evaluated by Persistent identifier: https://sourceforge.net/p/cam-
comparison to telemetry data recorded in rocket flights as rocsim/code/ci/b888389c281788805b2680190dcda3b
described by Box, Bishop, and Hunt [5]. 706dd8327/
The performance and stability of the GUI and the visual- Licence: GPL v3
iser have been tested in two rounds of user-testing, includ- Version published: 3.1
ing cross-platform testing, which was done on Ubuntu Date published: 19/10/2016
14.04 Trusty Tahr and Windows 10.0 (Build 10240).
Furthermore, there are unit tests available for the Language
GUI and simulator, using JUnit for the GUI (Java), and English
GoogleTest for the simulator (C++). Instructions on how
to run these are included in the README.md file. (3) Reuse potential
The modular design of the Cambridge Rocketry Simulator’s
(2) Availability source code makes it inherently reusable. The GUI may be
Operating system reused for applications where rocket design is required
The Cambridge Rocketry Simulator is able to function on but simulation and visualization are not. The simulator
any operating system that supports a standard Java and itself – as described above – is a stand-alone program call-
Python installation, which includes Linux and Windows. able from the command-line, accepting a XML simulation
Eerland et al: Cambridge Rocketry Simulator – A Stochastic Six-Degrees-of-Freedom Rocket Flight Simulator Art. 5, p. 5 of 6
input file as its single parameter. Therefore this can be 7. Buchanan, G et al 2015 “The Development of Rocketry
ported into other applications. Capability in New–Zealand World Record Rocket and
Furthermore, individual classes of the simulator have First of Its Kind Rocketry Course”. In: Aerospace 2.1,
reuse potential. For example the RKF45.cpp class is a gen- p. 91. ISSN: 2226–4310. DOI: https://doi.org/10.3390/
eral ordinary differential equation solver which imple- aerospace2010091
ments the fourth/fifth order Runge-Kutta algorithm with 8. Chudinov, P S 2003 “Analytical investigation of point
Fehlberg step-size control [15]. This may be used in any mass motion in midair”. In: European Journal of Physics
dynamics simulation application. 25.1, p. 73. DOI: https://doi.org/10.1088/0143-
Similarly, the vmaths.cpp class may be used for modelling 0807/25/1/010
the six-degrees-of-freedom dynamics of rigid bodies. In 9. Commercial Space Transportation 2007 Supplemental
particular the implementation of quaternions in this class Application Guidance for Unguided Suborbital
is helpful for modelling unconstrained rotation without Launch Vehicles (USLVs). Tech. rep. Federal Aviation
the need to deal with the singularities that arise when Administration (FAA), URL: https://www.faa.gov/.
using Euler angles [2]. 10. Courtney, M and Courtney, A 2009 “Measuring
To assist users and developers, there is a user guide thrust and predicting trajectory in model rocketry”.
(user_guide.pdf) available in the doc/ directory. This includes In: arXiv preprint, arXiv:0903.1555. URL: https://arxiv.
information on the required structure of the XML files, org/abs/0903.1555.
and instructions on how to launch the simulator and plot- 11. Eerland, W J, Box, S and Sóbester, A 2016 “Modeling
ter via the command line. the dispersion of aircraft trajectories using Gaussian
The website Cambridge Rocketry [4] is devoted to pro- processes”. In: Journal of Guidance, Control, and
ducing open-source software for simulating high power Dynamics. DOI: https://doi.org/10.2514/1.G000537.
rockets, where besides the Cambridge Rocketry Simulator, eprint: http://eprints.soton.ac.uk/399818/.
an Octave/Matlab version of the simulator core named 12. Gomez, F J and Miikkulainen, R 2003 “Active
the Cambridge Rocketry Toolbox is available. The pre- Guidance for a Finless Rocket Using Neuroevolution”.
ferred method for contributors to contact the develop- In: Genetic and Evolutionary Computation – GECCO
ers is via the SourceForge webpage https://sourceforge. 2003: Genetic and Evolutionary Computation
net/p/camrocsim/, where questions can be asked on the Conference Chicago, IL, USA, July 12–16, Proceedings,
forum, and the developers may be contacted directly. Part II. Ed. by Cantú-Paz , E. et al. Berlin, Heidelberg:
Springer, July, pp. 2084–2095. ISBN: 978-3-540-
Acknowledgements 45110-5. DOI: https://doi.org/10.1007/3-540-
The authors thank the two anonymous reviewers whose 45110-2_105
comments and suggestions helped improve this manu- 13. Niskanen, S 2015 OpenRocket. URL: http://
script and software. openrocket.sourceforge.net (visited on 31/01/2017).
14. Niskanen, S 2013 OpenRocket technical documentation.
Competing Interests Tech. rep. URL: http://openrocket.sourceforge.net
The authors have no competing interests to declare. (visited on 31/01/2017).
15. Press, W, Teukolsky, S, Vetterling, W and Flannery, B
References 2007 Numerical Recipes. Cambridge University
1. Apogee 2008 RockSim v9. URL: http://www. Press.
apogeerockets.com (visited on 31/01/2017). 16. Rogers, J 2014 “Stochastic Model Predictive Control
2. Baraff, D 1997 “An introduction to physically based for Guided Projectiles Under Impact Area Constraints”.
modeling: Rigid body simulation I – Unconstrained In: Journal of Dynamic Systems, Measurement, and
rigid body dynamics”. In: SIGGRAPH ’97 Tutorial notes. Control 137.3 (Oct.), pp. 034503–8. DOI: https://doi.
3. BBC 2011 Rocket launch for Bolton students on Mull org/10.1115/1.4028084
of Galloway. URL: http://www.bbc.co.uk/news/ 17. Sahu, J 2008 “Time-accurate numerical prediction
uk-england-manchester-14760906 (visited on of free-flight aerodynamics of a finned projectile”. In:
31/01/2017). Journal of Spacecraft and Rockets 45.5, pp. 946–954.
4. Box, S 2011 Cambridge Rocketry. URL: http:// DOI: https://doi.org/10.2514/1.34723
cambridgerocket.sourceforge.net (visited on 18. Squad 2011 Kerbal Space Program. URL: http://www.
31/01/2017). kerbalspaceprogram.com (visited on 31/01/2017).
5. Box, S, Bishop, C and Hunt, H 2010 “Stochastic 19. TU Delft 2016 DARE: Delft Aerospace Rocket
six-degree-of-freedom flight simulator for passively Engineering. URL: http://dare.tudelft.nl (visited on
controlled high-power rockets”. In: Journal of 31/01/2017).
Aerospace Engineering 24.1, pp. 31–45. DOI: https:// 20. Yuan, T, Bar-Shalom, Y, Willett, P and Hardiman, D
doi.org/10.1061/(ASCE)AS.1943-5525.0000051. 2014 “Impact point prediction for thrusting
eprint: http://eprints.soton.ac.uk/73938/. projectiles in the presence of wind”. In: Aerospace
6. Box, S and Eerland, W J 2016 Cambridge Rocketry and Electronic Systems, IEEE Transactions on 50.1,
Simulator. URL: https://sourceforge.net/p/ pp. 102–119. DOI: https://doi.org/10.1117/
camrocsim/ (visited on 31/01/2017). 12.930875
Art. 5, p. 6 of 6 Eerland et al: Cambridge Rocketry Simulator – A Stochastic Six-Degrees-of-Freedom Rocket Flight Simulator
How to cite this article: Eerland, W J, Box, S and Sóbester, A 2017 Cambridge Rocketry Simulator – A Stochastic Six-Degrees-
of-Freedom Rocket Flight Simulator. Journal of Open Research Software, 5: 5, DOI: https://doi.org/10.5334/jors.137
Copyright: © 2017 The Author(s). This is an open-access article distributed under the terms of the Creative Commons
Attribution 4.0 International License (CC-BY 4.0), which permits unrestricted use, distribution, and reproduction in any medium,
provided the original author and source are credited. See http://creativecommons.org/licenses/by/4.0/.