Package: kesspy
KessPyKessPyInstallationRequirementsGetting StartedResult Data FormatContributingLicenseTODOKessPy is a Python library that uses the NASA Standard Breakup Model to simulate explosion and collision events in orbit, which is important for managing space debris and preventing collisions with other orbiting objects. It is a Python wrapper around Kessler.rs, a Rust implementation of the NASA Standard Breakup Model, which provides significant performance gains over purely Python-based implementations. More information about Kessler.rs can be found on its GitHub page athttps://github.com/reecehumphreys/kessler.IMPORTANT: Until this package reaches version 1.0, the API is subject to change and the accuracy of results cannot be guaranteed.InstallationKessPy runs on Python 3.6 or higher (Python 3.8 is recommended):
Currently the package is available using pip:pipinstallkesspyA conda distribution will be made available when the project is stableRequirementsKessPy requires the following packages:numpyGetting StartedTo get started with KessPy, you can use the following example code to simulate an explosion event and generate debris:importnumpyasnpfromkesspyimportSatellite,ExplosionEvent,run_explosion# Define the initial position, velocity, mass, characteristic length, and kind of a satellite.pos=np.array([6.702e6,0.0,0.0],np.float32)# position vector [m] relative to Earth's centervel=np.array([0.0,7.666e3,0.0],np.float32)# velocity vector [m/s]'mass=4.98e3;# [kg]characteristic_length=0.1;# [m]# Create a new satellite with the given parameterssat=Satellite(pos,vel,mass,characteristic_length)# Create a new explosion event with the satelliteevent=ExplosionEvent(sat)# Run the simulation with the explosion eventdebris=run_explosion(event)# Print some statistics about the debrismean_area=np.mean(debris[:,4,0])mean_mass=np.mean(debris[:,5,0])print(f"{debris.shape[0]}Pieces of debris generated.")print(f"Mean mass:{mean_mass}")print(f"Mean area:{mean_area}")In this example, we define the initial position, velocity, mass, characteristic length, and type of a satellite. We then create a new Satellite object with these parameters, and use it to create an ExplosionEvent. Finally, we run the simulation with the run_explosion function, which generates debris data that we can analyze.Result Data Formatindexdatatype0SatType (for internal use)enum1positionnp.array (, 3), containing floats2characteristic lengthfloat3area to mass ratiofloat4areafloat5massfloat6velocitynp.array (, 3), containing floatsThe returned debris is an (n, 7, 3) numpy array. However, only the position and velocity use the third axis as those quanities are vectors.>All other fields have 3 copies of their respective data. This was done as a performance optimization for numpyContributingIf you find a bug or have a feature request, please open an issue on the KessPy
GitHub repository:https://github.com/reeceHumphreys/kesspy/issuesIf you'd like to contribute to the project, feel free to fork the repository and
submit a pull request.LicenseKessler is distributed under the terms of the MIT license. See the LICENSE file
for details.TODOUpdate the documentation to reflect the new APIAdd tests for the new API