ASTROSIM: A MINOR CELESTIAL BODY ENVIRONMENTS SIMULATION SUITE.
Authors:   Deimos Space S.L.U., Tres Cantos (Madrid), Spain, Peñarroya Pelayo , Hermosín Pablo , Centuori Simone , Hinüber Lars 
Published: January 2024

In the last decades, missions to minor celestial bodies have gained importance, brought forward by missions like Rosetta, OSIRIS-Rex, Hayabusa, or, more recently, DART. These missions are proof that the interest of the space sector in these bodies is growing, and that they are becoming more accessible, aided by the evolution of the technology and autonomous methodologies required.
To assist with the analyses needed for the design of these missions, an effort needs to be made to improve the models used for simulations in such environments.
Astrodynamics Simulator (AstroSim) is a software tool developed at Deimos Space S.L.U., meant to be used for mission analysis and navigation around small bodies. The tool started as an orbital propagator including the typical central gravity forces and perturbations to be encountered in small-body environments. Gravitational forces can be modelled with many different methodologies, from simpler implementations, such as point-mass modelling, to more complex ones like spherical harmonics or polyhedron-based models.
On the other hand, the perturbations included in AstroSim include third-body gravity (unlimited bodies), and Solar Radiation Pressure (SRP). Third body gravity models consider the bodies included as point-masses and take the ephemeris from SPICE, which is internally linked to AstroSim using SPICE’s python module. SRP models use a conical shadowing model that considers umbra, penumbra, and even the rare case of antumbra (annular eclipse) conditions.
AstroSim has been recently validated against General Mission Analysis Tool (GMAT), which is a Commercial Off-The-Shelf (COTS) tool used for mission analysis. A very exhaustive campaign was performed, where the different dynamical models were independently tested using 100 random initial states and propagating them for 7 days under different perturbations. Errors after a week of propagation are in the order of magnitude of tenths of centimetres for the worst cases (spherical harmonics, and polyhedron-based models).
Additionally, to high-fidelity trajectory propagation, AstroSim offers a wide range of capabilities, such as navigation analysis, Image Processing (IP), image rendering, landing simulation including contact dynamics, Hazard Detection and Avoidance (HDA), or event detection. To integrate these functionalities, different python libraries and third-party software have been used.
For instance, image rendering is achieved using Blender and pyrender. The former is an open-use license Video Effects (VFX) suite strongly supported by the community. It offers different features including 3D modelling, UV unwrapping, texturing, raster graphics editing, fluid and smoke simulation, particle simulation, soft body simulation, sculpting, rendering, motion graphics, or compositing, for instance. This makes Blender very attractive for image rendering since it is capable of producing images that resemble what an optical payload would achieve. Pyrender is a Python module capable of rendering images very similarly to Blender, usually much faster. However, Blender offers other advantages that can be directly exploited in a small-body environment simulator. One of them is its contact dynamics engine, which enables rigid-body simulations where collisions and deformations are taken into account, which is exploited in AstroSim to perform contact dynamics simulations for landing sequences.
Another of these functionalities is the HDA algorithms included in astroHarm, which are based on Convolutional Neural Networks (CNNs) and use FastAI and PyTorch to build and train the networks needed to conform the three layers developed: shadow detection, feature detection, and slope estimation. These three prediction layers conform a passive system since they take as input only optical observations. Active systems, on the contrary, make use of active instruments, such as Light Detecting And Rangings (LIDARs), for instance, to estimate surface steepness and roughness. Having access to only optical observations makes the slope estimation very challenging, but the networks are capable of predicting hazards (high slopes) presenting accuracies above 70% for true positives.
AstroSim was first presented at the AIAA/ASS SciTech 2022 in San Diego (CA), where a preliminary version of the suite was introduced. After that, it was used to produce other conference papers and publications. In this paper, the main functionalities of the tool are described and its architecture is showcased. Firstly, AstroSim is introduced as a modular suite developed in Python, to which different functional blocks can be easily added by exploiting the language’s high versatility and Object-Oriented Programming Language (OOP) style. Then, the results of the validation campaign are included, where the accuracies that the tool is capable of reaching are shown in detail. Examples of the different modules are provided, including astroHarm, a module to obtain the spherical harmonic coefficients from polyhedral shape models; astroHda, an Artificial Intelligence (AI)-based module that uses CNN to detect hazards for a landing simulation (such as shadows, features, or high slopes); or astroRender, a module that uses Blender to render images that can be used for optical navigation and to simulate landings accounting for the contact dynamics of the impact. Finally, the projects and publications to which AstroSim has contributed to are presented, to put into perspective how the tool can be exploited, and conclusions are drawn.