From bf31b4133d3596b481913f265561966ccacc10b8 Mon Sep 17 00:00:00 2001 From: annabunches Date: Thu, 19 Aug 2021 23:57:25 -0400 Subject: [PATCH] Fix bug uncovered with ground approximation code. --- lib/boot.ks | 2 +- lib/navigation.ks | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/boot.ks b/lib/boot.ks index eb9a468..5504971 100644 --- a/lib/boot.ks +++ b/lib/boot.ks @@ -37,7 +37,7 @@ function Bootstrap { } else { set CORE:BOOTFILENAME to "/init". } -// reboot. + reboot. } } diff --git a/lib/navigation.ks b/lib/navigation.ks index 3d14c59..19b0304 100644 --- a/lib/navigation.ks +++ b/lib/navigation.ks @@ -33,6 +33,9 @@ function CreateCircularizationNode { // REQUIRES a circular orbit. // TODO: it would be great to semi-automate this... function TargetBurnDistance { + if not HASTARGET { + return -1. + } return Sqrt(StoppingDistance()^2 + (SHIP:ORBIT:SEMIMAJORAXIS - SHIP:BODY:RADIUS - TARGET:ALTITUDE)^2). }