Multiple Gravity Assist Trajectory Planner for KSP
An online tool providing automatic design of trajectories with multiple gravity assists for Kerbal Space Program. See the forum post.
Installation
This section details installation building steps to modify and run the tool locally. If you are only interested in adding new solar systems, check the solar system support section.
This project requires Node.js with the TypeScript compiler. Install it globally with:
npm install -g typescript
Install the necessary type definitions for THREE.js, Chart.js and js-yaml with:
npm ci
This project also includes THREE.js example classes for line rendering and camera control.
In order to have the TypeScript compiler recognize them, the following lines must be addded to
node_modules/@types/three/src/Three.d.ts:
/* Examples imports */
/* Example lines */
export * from '../examples/jsm/lines/Line2';
export * from '../examples/jsm/lines/LineGeometry';
export * from '../examples/jsm/lines/LineMaterial';
/* OrbitControls */
export * from '../examples/jsm/controls/OrbitControls';
Compile the project with:
tsc -p ./src/tsconfig.json
Solar systems support
The tool can support any solar system configuration. You can contribute to add support for solar systems from known mods.
- Fork this project and create a new branch for your solar system.
- Create a new folder in
datafor your system with aconfig.ymlandbodies.ymlfile following the templates indata/stock.config.ymlstores the global configurations of the tool. These parameters may need to be changed depending on the characteristics of the solar system (e.g. duration of a day, camera clip distances for large solar systems...).bodies.ymlstores the description of each body in the solar system. It must rigorously follow the template format. If your solar system uses Kopernicus configuration files, you can directly convert them into abodies.ymlfile via this page.
- Add an entry to
data/systems.ymlfor your solar system. - Test the tool locally with your system (run the tool on a local HTTP server, e.g. with VSCode's Live Server), check for the coherence of results and ingame feasibility.
- Create a pull request to this repository.
Used resources
- Ceriotti, Matteo (2010) Global optimisation of multiple gravity assist trajectories. PhD thesis.
- Orbital Mechanics for Engineering Students by Howard D. Curtis
- René Schwarz' website and his Memorandum Series
- Astrodynamics Wikibook
- ESA's Lambert Solver script for pykep
- Space Exploration StackExchange (more precisely this and this post)
