Giter VIP home page Giter VIP logo

ksp-return-to-launch-mechjeb's Introduction

Kerbal Space Program Automated Return to Launch Site

Python script using kRPC and Mechjeb2 to launch and land a reusable first stage. Upon landing the first stage, the code switches to the second stage and executes the final burn(s) to enter the desired orbit.

See demo video at https://youtu.be/avXz_AQ7HDI

Mod Requirements

  • Mechjeb2
  • kRPC
  • kRPC.Mechjeb
  • Kerbal Reusability Expansion (for grid fins, landing legs and large RCS thrusters)

Craft Reqirements

  • The first stage remote control pod must be the root node of the rocket (the first item placed in the VAB). Otherwise, upon staging KSP will switch control to the second stage.
  • Make sure the first stage does not run out of electric charge before engine reignition for the landing burn.
  • Make sure you have an antenna on both stages, otherwise they can't be controlled.
  • Make sure you have lots of RCS control authority, especially for large rockets.
    • The KRE mod adds large RCS thrusters.

Tunable Parameters

flight_program.py

  • Target orbit height, inclination. First stage staging point. Autopilot PID parameters.

Ascent.py

  • Various trajectory control parameters. Max pitch/throttle rates. Max craft dynamic pressure.

MechjebRTL.py

  • Flip and landing autopilot PID parameters.

Bugs

  • Occasionally when reverting a flight to launch, the conn.mech_jeb.api_ready fails to ever become True, which will cause the first stage to fall to Earth. This is probably a bug in kRPC.Mechjeb.
    • Fix: Revert to VAB first, then proceed to launch from there.

ksp-return-to-launch-mechjeb's People

Contributors

cristian-bicheru avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.