Skip to main content

KSP Trajectory Optimization

Project description

Trajectorize Logo PyPi Version License


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

Kerbol System Animation

Calculation of Ballistic Interplanetary Transfers Using Lambert's Problem

python -m trajectorize.demos.kerbin_duna_transfer

Transfer

Propagation of Two-Body Trajectories Using Universal Keplerian Elements

python -m trajectorize.demos.orbit

Orbit Demo

Calculations of Optimal Transfers, Porkchop Plots

python -m trajectorize.demos.kerbin_duna_porkchop

Porkchop

Inspirations

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trajectorize-0.0.8.tar.gz (47.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trajectorize-0.0.8-cp310-cp310-win_amd64.whl (71.1 kB view details)

Uploaded CPython 3.10Windows x86-64

File details

Details for the file trajectorize-0.0.8.tar.gz.

File metadata

  • Download URL: trajectorize-0.0.8.tar.gz
  • Upload date:
  • Size: 47.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for trajectorize-0.0.8.tar.gz
Algorithm Hash digest
SHA256 8e6389369e15f6ce3c3015eed88e1e9e12f52a26e968c8332eeb62fed01e82c0
MD5 144cb93448c058dd24fed31a4f31d44e
BLAKE2b-256 6815aa2cfcfc7eafe30d7e5226adfac9f5580667aa31d8abfe0cd35d3b70aa68

See more details on using hashes here.

File details

Details for the file trajectorize-0.0.8-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for trajectorize-0.0.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0dd783935478b4f359191483c07d0dba0095447270062a486a439147667dc85c
MD5 40b67f5dd91f856984fc6c6a68f77116
BLAKE2b-256 088dd0f11a5474fd6d98998bf8eebd6d6d69173913b798914e2db0ad453de2ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page