Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 3.59 KB

README.md

File metadata and controls

49 lines (36 loc) · 3.59 KB

Asteria

Asteria — kOS launch and landing guidance for Kerbal Space Program

What is this?

Asteria is a kOS script capable of launching a two-staged craft to any specified orbit and recovering the first stage via RTLS or a downrange ASDS landing. The script performs a suicide burn, minimising fuel use and thus maximizing available delta-v.

Demo video

https://cdn-b-east.streamable.com/video/mp4/ba1j9.mp4?token=7rj1NHLRLmu5UQrBpj7xTA&expires=1547580476

Before running

You must have the following mods installed:

  • Trajectories VERSION 1.7.1 - the 2.x versions don't currently work with kOS!
  • kOS
  • KSP version 1.3.1 (read below)

The version requirement for Trajectories effectively means that you must also use KSP version 1.3.1, unless you can get Trajectories working with whatever KSP release you're using.

Your craft should have the following specifications:

  • Grid fins and landing legs on S1 (don't use airbrakes - if you don't have grid fins, use regular fins)
  • A kOS terminal on both S1 and S2; right click the terminals, "change name tag", and name them accordingly ("S1" and "S2")
  • This staging order: S1 engines -> launch clamps -> S2 sep + S2 engine(s) --> fairings

An example Falcon 9 craft file is provided - this craft requires the following mods:

  • Tundra Exploration
  • Kerbal Reusability Expansion

Running

  • Place the s1gnc and s2gnc files into /Ships/Script in your KSP installation folder.
  • Open the Trajectories mod's menu and set entry to retrograde (unless you know you're entering prograde)
  • Open the kOS terminals for both S1 and S2. Type switch to 0. run s1gnc. in the S1 terminal, and switch to 0. run s2gnc. in the S2 terminal.
  • Enter the run parameters into the terminal as the program asks for them, by simply typing the response and hitting enter afterwards. To cancel the execution, press ctrl+c.

Landing sites

By default S1 attempts to land at the launchpad - however, you can add custom landingsite technically anywhere on Kerbin. To add a new landingsite, create a vessel that's capable of landing/driving to your desired location that has a kOS terminal onboard. When you arrive at the location, open the terminal and type PRINT SHIP:GEOPOSITION..

You will get a print that looks something like Kerbin:GEOPOSITIONLATNLNG(0.0,0.0) - the numbers are your main interest. To use this as your landing site, open the s1gnc.ks file, and go to lines ~67-79 - there you'll find a few example locations.

To enter it to the file, make a new line and type in SET MYLANDINGSPOT TO LATLNG(the numbers you got previously go here). SET targeted TO MYLANDINGSPOT. SET MODE TO "RTLS". Now you might want to comment out the previous landing site by adding // in front of the SET targeted -- part. (The default site is probably LPAD).

FAQ

  • What does "is the payload the root part" mean? When you started building your vessel, did you first create the payload and then build the rocket around it (answer yes), or did you build a payload into a pre-built rocket (answer no).

Common errors and fixes

  • S1 crashes into S2: add a kOS terminal to S2 and run the s2gnc.ks program on it. Also set S2 guidance to enabled.
  • Stage doesn't seem to control itself for landing: add (larger) grid fins or regular, steerable fins.
  • Stage crashes into the ground: lower the aggressiveness.

Other tidbits

  • The script may benefit from more instructions per tick - to increase this, go to settings (while in a save), difficulty options, kOS, and drag the "Instructions per update" slider up a bit - even 250 might help a lot. Going above 400-500 will probably have zero effect.