Provides a library of scripts for

  1. launching with atmosphere and in vacuum (ltoa, ltov). Staging to be managed using when commands from the main script.
  2. landing orbit with periapsis 30 degree off the zenith (landnode). Enables landing on the sunny side.
  3. land in vacuum (landv), same script for Mun and Minmus
  4. highly accurate maneuver node execution program (exenode). Better than 0.1% deltav accuracy.
  5. orbital maneuvering (aponode, perinode)
  6. Kerbin maneuvers for Mun and Minmus (soinode)
  7. inclination maneuvers for Minmus transfer (incnode)
  8. Mun and Minmus escape maneuvers to return to Kerbin on a low deltav trajectory (krbnode)

The scripts rely on physics and math to calculate the maneuver properties. Usually 2D there will be some vector math in the inclination and landing node scripts.


Works with KSP 0.23.5 and kOS 12.2p1

What's new?Edit

  1. Kerbin - Mun/Minmus transfer and return node creation
  2. orbit inclination adjustment
  3. ascent w/o atmosphere
  4. descent & landing w/o atmosphere
  5. warpinsoi, warpoutsoi and warpdist scripts to wait for an soi change
  6. exenode script improvements for better accuracy

Mun & Minmus mission scriptsEdit

Kerbal Automated Mission Challenge scripts. The Minmus missions illustrate how to customize the mission scripts for specific vessels.

Mun mission Edit

  1. Vessel: Mun Lander 1b
    run kamc0. // outbound
    run kamc1. // return

Minmus mission "Wikinger" Edit

  1. This vessels' stage 2 separation requires two stage statements.
  2. You'll know why I call it "Viking" when you see the lander.
  3. Vessel: Minmus Lander 1b
    run kamc2. // outbound
    run kamc4. // return

Minmus mission 2 Edit

  1. This vessels' stage 2 separation requires one stage statements.
  2. Vessel: Minmus Lander 1c
    run kamc3. // outbound
    run kamc4. // return

Known issues Edit

  1. When planet and moon are aligned with the sun it may happen that the lander travels in the planet's or moon's shadow for prolonged times during transfer. During those periods of travel in the dark the battery may run empty and shut down the kOS module due to lack of electricity. This will stop the script and require manual restarting of the mission script to execute the remaining commands.

Launch & Landing scriptsEdit

Launch to Orbit / Atmosphere Edit

run ltoa.
  1. Thrust limited by max q during ascent. Max q defaults to 7000.
  2. Gravity turn: pitch depending on cos(altitude). Default: start at 1.000, ends at 50.000. I found these parameters to use least fuel. Can you configure it better?
  3. Staging separated from trajectory control (thrust/pitch). Staging to be implemented in main script using when clauses.
  4. Compensating for atmospheric drag when coasting to apoapsis.
  5. Time warp while coasting to apoapsis.
  6. Calculation of target velocity for circular orbit using aponode.

Launch to Orbit / VacuumEdit

run ltov.
  1. Thrust limited during initial ascent until craft points to the horizon. Thrust limit shall prevent reaching low orbit altitude during first 2 seconds (this is a problem on Minmus).
  2. Gravity turn delayed by 2 seconds to gain some altitude (non-quantitative). Turn will reduce pitch to the horizon compensated for gravitation (which is approx 1 degree on Mun).
  3. Staging separated from trajectory control (thrust/pitch). Staging to be implemented in main script using when clauses.
  4. Time warp while coasting to apoapsis.
  5. Calculation of target velocity for circular orbit using aponode.

Land / VacuumEdit

run landv(ecoh). // ecoh: engine cut-off height
  1. Landing script works in four phases loosely based on the real Apollo mission descent planning:
    1. deceleration from orbit (retrograde burn) until 1/4 of periapsis velocity or radar altimeter starts working
    2. retrograde burn while reducing velocity proportional to radar altitude
    3. high gate (150m): descend and reduce surface velocity (thrusting downwards angled towards surface velocity vector)
    4. low gate (15m and surface velocity is less than 0.1m/s): descend vertically for landing
  2. downward vertical velocity builds only through gravity (in contrast to the Apollo lander which thrusted upward to build downward velocity early in the burn).
  3. engine cut-off when landing gear almost touches the ground. Implemented using the control unit's radar altitude on the ground (ecoh parameter).

Node RunnerEdit

run exenode.
  1. Maneuver node execution script
  2. Mission toolkit node scripts assume impulsive burns, i.e. deltav happens instantly. Of course, this is not possible, but the node runner script runs the engines at full throttle to achieve shortest possible burn times.
  3. The script will
    1. warp to 1min before burn
    2. orient the ship for the burn
    3. warp to burn
    4. burn full throttle, then
    5. for very accurately changing deltav (better 0.1%) throttle down nearing burn end.
  4. Workhorse of any mission script. Usually used alternating with maneuver node generator scripts.

Orbital ManeuveringEdit

Apoapsis maneuverEdit

run aponode(altitude).
  1. create maneuver node at apoapsis for changing periapsis altitude

Periapsis maneuverEdit

run perinode(altitude).
  1. create maneuver node at periapsis for changing apoapsis altitude
  2. See also:

Landing orbit maneuverEdit

run landnode(altitude).
  1. Lowers periapsis to altitude
  2. Assumes a circular orbit
  3. Periapsis will be 30 degrees "after" the zenith (orbitwise) on the dayside of the body. In that position potential pilots and observers will have a good lighting conditions to view the vessel (no beams needed) and its shadow to judge altitude.

Inclination adjustment Edit

run incnode(tgtbody).
  1. Adjusts the orbits inclination to match tgtbodies' orbit inclination around the central body.
  2. Assumes a circular orbit

Intraplanetary TransfersEdit

Intraplanetary Hohmann outbound transfer Edit

run hohnode(tgtbody).
  1. creates a maneuver node for Kerbin to Mun or Minmus Hohmann transfer
  2. requires a circular orbit
  3. apoapsis defaults to half of the target bodies' soi
  4. for Minmus transfers detects whether Mun is in the way. The script then delays the maneuver for one orbit (until Mun is no longer in the way).
  5. maneuver angle is calculated based on:
    1. Hohmann transfer time
    2. target bodies' orbital period

Intraplanetary Hohmann inbound transfer Edit

run krbnode(peri_radius).
  1. creates a maneuver node for Mun or Minmus to Kerbin return Hohmann transfer
  2. the peri_radius parameter is the periapsis radius for the target body, NOT the periapsis altitude. peri_radius = planet_radius + periapis (altitude). This is to allow usage with other planets. The planets radius is injected as a parameter and does not need to be "guessed" by the program.
  3. requires a circular orbit
  4. more tricky since as a first step the moon's soi must be left, i.e. an escape trajectory
  5. maneuver is setup to leave the moon's soi
    1. opposite of the moon's direction of travel
    2. velocity after leaving soi matches an orbit with a) moon's apoapsis and b) periapsis as specified in the parameter.
  6. CAVEAT: it seems like the moon's frame of reference is rotating. Thus an ejection angle of 90 degrees does lead to a distorted velocity vector once leaving the soi! I have solved this by calibrating the ejection angle.


by duration Edit

run warpfor(secs).
  1. warps for duration

until sunrise Edit

run warpday.
  1. warps until sunrise

by distanceEdit

run warpdist(refbody, dist).
  1. warps until passing distance dist relative to refbody
  2. automatically recognizes whether to warp in or out
  3. determines velocity to/from refbody by measuring distance change regularly. The measurement time interval depends on the current warp factor.
  4. used by soi warp programs

until entering soiEdit

run warpinsoi(tgtbody).
  1. warps until entering soi of tgtbody
  2. current body is used as refbody
  3. tgtbody is required to positively recognize new soi

until leaving soiEdit

run warpoutsoi(refbody, tgtbody).
  1. TODO: to be changed to run warpoutsoi. to simplify interface. Parameters are not needed.
  2. warps until leaving soi of a body
  3. refbody is required to calculate distance (even after leaving soi)
  4. tgtbody is used to positively recognize new soi


Body properties databaseEdit

run bodyprops.
  1. Sets a body's properties global variables. A.k.a. "body database" by other kOS developers. Loads body specific properties for the current body.
  2. currently works for Kerbin, Mun and Minmus.

Check vessel compatibilityEdit

run checkvessel(vesselname).
  1. checks for a match of the vesselname
  2. intended for the mission script to check whether used with a compatible vessel
  3. remember: the mission script encodes staging behavior in when..then commands

Turn to sunEdit

run tts.
  1. turns the vessel facing 90 degress from the sun
  2. makes sure simple solar cells receive light
  3. baloan: I had vessels running out of electricity because maneuver burn vectors accidentally were oriented towards the sun or away.

Sphere of influenceEdit

run soi(refbody).
  1. return the refbody's soi in the soi variable
  2. is required by the intraplanetary maneuver scripts
  3. it does NOT use a database but calculates using the body:mu values. See also SOI

Prepare Edit

run prep.
  1. copied to the ship's local volume 1 when the mission scripts start
  2. contains initialization to restart scripts after a KSP restart; currently just switches to volume 0 and runs bodyprops


run steer.
  1. wait for ship to orient, then return
  2. deprecated. to be removed in next mission toolkit
  3. see tts

Planned extensionsEdit

  1. warp to lunar position which avoids prolonged transfer in the dark (without light for the solar cells)
  2. interplanetary transfers
  3. docking (requires kOS thruster support)

Download filesEdit

  • The wiki doesn't like spaces in external links so you have to look for the craft file for yourself here: craft file directory