KSP Trajectory Optimization
Project description
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
Propagation of Two-Body Trajectories Using Universal Keplerian Elements
python -m trajectorize.demos.orbit
Inspirations
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file trajectorize-0.0.4.tar.gz
.
File metadata
- Download URL: trajectorize-0.0.4.tar.gz
- Upload date:
- Size: 35.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8157c3ad0b59fd3659789308cd334144be28ab43a12229d3a831cbed6e648b33 |
|
MD5 | 54fbdbcc4d9cdfcea5e069be334c842b |
|
BLAKE2b-256 | e09154143ea2316012145b765c207992323585b64b910be54eff0682c956e724 |
File details
Details for the file trajectorize-0.0.4-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: trajectorize-0.0.4-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 44.9 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7ef3dde9c1f0b40240cc80d4e87dc772cde82d1fa297730aae7892b94c59e0d |
|
MD5 | eb7ba94bb22f2e4e42561b3b06960e30 |
|
BLAKE2b-256 | 41d9be800ba6ac7ac2a387b50e230da75d8a07fa2fae22537afbe7f95c4b3045 |