Technical Papers

RocketPy: Six Degree-of-Freedom Rocket Trajectory Simulator

Abstract

RocketPy is a new open-source Python library specialized in trajectory simulations of sounding rockets and high-powered rockets. Having a modular structure and being built on top of a six degree-of-freedom flight dynamics model that includes detailed mass variation effects, RocketPy allows for accurate trajectory prediction of different rocket configurations. Additionally, weather data from several meteorological agencies, such as reanalysis, forecasts, and ensembles, are an innovative feature directly integrated into the library, providing precise information about atmospheric conditions for each simulation. The software was successfully validated for three rockets developed by different universities, with apogee predictions showing deviations of the order of 1% when compared to actual flight data. Furthermore, due to its modular nature, RocketPy can be easily employed in optimization studies and Monte Carlo analyses. The latter was a key aspect of this work, enabling the calculation of landing dispersion ellipses based on input uncertainties. Since running several Monte Carlo analyses is computationally expensive, a new algorithm was proposed to significantly speed up results based on rejection sampling. The code described here and made available online enhances the state of the art represented by several widely used software and can serve as a framework for future research on rocket dynamics, control, flight optimization, and dispersion analysis.