Automation for KSP2 written with KontrolSystem2.
Tested with the Steam version of Kerbal Space Program 2, but it should work with any version.
Now when you launch KSP2 and select the rightmost icon at the center bottom (looks like 3x3 squares) there should be a new option "Kontrol System 2"
Right now there are the following missions:
The scripts will stage as needed. Debug and status output is shown in the console, opening it is highly recommended.
Initially the vessel is launched, gravity turn is performed and we climb to close to the target apoapsis. Usually an additional burn is performed to fune tune once we have exited the atmosphere. After circularization, we check if the inclination needs to be change.
Then the transfer is planned. For anything but Mun, the transfer from Kerbin will happen in two phases:
After the correction burn, we wait until we are in the spehere of influence (SOI) of the target body. Once that is the case, we circularize, lower periapsis and lower apopasis to the target orbit height.
Last we pick a spot to land, slow down close to that spot and the auto lander plans and executed a (hopefully) soft landing. Right now landing spots are hardcoded, we do no check the terrain for suitability.
Return starts with an initial burn to an apoapsis that is circularized. We then claculate ejection angles (at least in the Kerbin system) and perform an ejection burn. This should put us into an elliptical orbit around Kerbin. We then wait for the Apoapsis, lower periapsis and attempt aero capture. This may happen over a number of passes to reduce heat.
Once Periapsis is below sea level, the landing code takes over, waits for safe opening of parachutes and lands.
Most scripts are written that they can be aborted and re-started at most time. Quicksave is your friend.
Best place to get help are the KSP forums.
If you encounter a bug or have a suggestions, please file it here on GitHub.