KSP Trajectory Optimizer.
This project is a reduced-scope version of one of my other (currently incomplete) projects, as an intermediate stepping stone.
This tool computes trajectories between celestial bodies in KSP based on on-rails two-body patched conics, incorporating trajectory correction maneuvers for a variety of mission scenarios, such as:
- Ballistic Hohmann transfers for other planets
- Gravity assist flyby routes
Computationally-intensive code is implemented in C, with a Python wrapper made using cffi.
C code follows mostly C89, with some C99 features used. It has been tested against the latest versions of GCC (on Linux) and MSVC (on Windows 10).
Installation
The simplest way to install is from PyPI:
pip install trajectorize
This will install the latest stable version of the package, and may include pre-compiled binaries for your platform.
The package is still in development, so you may want to install from the latest commit on the main branch instead:
Run pip install git+https://github.com/itchono/trajectorize to install the package from source.
You will need to have Python 3.8+, and a C compiler installed to compile the C code if installing from source. You will also need a C compiler installed if there are no pre-compiled binaries for your platform. If you're on Windows, you can find details about installing a C compiler here.
The following platforms/compilers have been tested:
| Platform | Compiler |
|---|---|
| Windows 10 | MSVC 14.16 (Visual Studio 2017) |
| Ubuntu 20.04 LTS (Dev Machine) | GCC 9.4.0 |
Demos
Right now, full functionality is incomplete. There are, however, some cool demos showing off the capabilities of the package.
Full Model of KSP Planetary System and Ephemerides
python -m trajectorize.demos.kerbol_system_anim
Calculation of Ballistic Interplanetary Transfers Using Lambert's Problem
python -m trajectorize.demos.kerbin_duna_transfer
Propagation of Two-Body Trajectories Using Universal Keplerian Elements
python -m trajectorize.demos.orbit
Calculations of Optimal Transfers, Porkchop Plots
python -m trajectorize.demos.single_transfer Kerbin Duna --capture_alt 60000
Inspirations
- Interactive illustrated interplanetary guide and calculator for KSP, by Olex
- Launch Window Planner, by AlexMoon
Metadata
Release files for trajectorize 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trajectorize-0.0.10.tar.gz | 60.3 kB | Without provenance | Details for trajectorize-0.0.10.tar.gz |
Release files / trajectorize-0.0.10.tar.gz
| Download URL | trajectorize-0.0.10.tar.gz |
|---|---|
| Size | 60.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
768af627681af0e4fbd954efaffbb177625abbe175c77e475d06fa74b54746f7
|
|
BLAKE2b-256 checksum How to use checksums |
6e9dd9c4c773385880098b62051e9c88ff35dad67b2e6e85103df34a70780ace
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for trajectorize 0.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.