From 55af841aeb970628630555d20c0fe4dd57139034 Mon Sep 17 00:00:00 2001 From: annabunches Date: Sat, 21 Aug 2021 04:49:34 -0400 Subject: [PATCH] Arbitrary function name change seems to have fixed strange runtime bug. --- lib/launch_rocket.ks | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/launch_rocket.ks b/lib/launch_rocket.ks index c742cb8..7842828 100644 --- a/lib/launch_rocket.ks +++ b/lib/launch_rocket.ks @@ -2,14 +2,12 @@ RunOncePath("lib/throttle"). RunOncePath("lib/navigation"). // Calculate the direction to lock during ascent. -function getAscentDir { - parameter leadAngle is 5. +function getClampedDir { parameter minPitch is 5. // face just beneath prograde, but hold a solid eastern heading and don't // rotate the ship local newHeading is lookdirup(SHIP:SRFPROGRADE:FOREVECTOR, heading(90, 0, 270):TOPVECTOR). - set newHeading to angleaxis(leadAngle, newHeading:TOPVECTOR)*newHeading. if getPitch(newHeading:FOREVECTOR) < minPitch { set newHeading to heading(90, minPitch, 270). } @@ -88,7 +86,7 @@ function Launch { wait pitchTime. print "Phase 3: Stable Prograde Boost.". - lock STEERING to getAscentDir(0, minPitch). + lock STEERING to getClampedDir(minPitch). wait until SHIP:ORBIT:APOAPSIS > apoapsisTarget. // TODO: A smoother approach based on target orbital velocity should be considered.