Skip to content

Instantly share code, notes, and snippets.

//gist ee56a79af24c3af1ab89ca089a150e0d
parameter tarAlt.
parameter mode is "Closest".
set warp to 1.
local tx is time:seconds.
if tarAlt <= periapsis {
print "Warping to periapsis".
set tx to time:seconds + eta:periapsis.
//gist 1d0f7f6de526f489e676a5bb4ed51c90
// This version is only good for docklandings. For anything else use gist 7944e97619657cea4a3af77cf9500c6a instead.
// Assumes stable and circular (ap - pe < 500) orbit
// Set guidanceactive to false and vacLocLanderFinished to true, if you want to take over during landing
if not (defined tgt) {
if hastarget AND target:body = body AND (target:status = "landed" OR target:status = "splashed") {
set tgt to target:geoposition.