Fix throttling, first attempt to fix gravity turn.
This commit is contained in:
parent
ed31a1fda3
commit
5cb608ff01
3 changed files with 14 additions and 9 deletions
16
launch.ks
16
launch.ks
|
@ -1,4 +1,4 @@
|
|||
run once "lib/functions".
|
||||
run once "lib/guidance".
|
||||
|
||||
local APOAPSIS_TARGET is 80000.
|
||||
local GRAVITY_TURN_START is 5000.
|
||||
|
@ -23,23 +23,27 @@ when TWR() > 1.5 then {
|
|||
return false.
|
||||
}
|
||||
|
||||
lock THROTTLE to ThrottleToTWR(1.5).
|
||||
local newThrot is ThrottleToTWR(1.5).
|
||||
print "Setting throttle to " + newThrot.
|
||||
lock THROTTLE to newThrot.
|
||||
return true.
|
||||
}
|
||||
|
||||
// Main ascent control.
|
||||
lock THROTTLE to 1.0.
|
||||
lock STEERING to UP.
|
||||
lock STEERING to heading(90,90,-90).
|
||||
stage.
|
||||
|
||||
wait until SHIP:ALTITUDE > 200.
|
||||
lock STEERING to heading(90, 85, 90).
|
||||
lock STEERING to heading(90, 85, -90).
|
||||
|
||||
wait until SHIP:ALTITUDE > GRAVITY_TURN_START.
|
||||
print "Beginning gravity turn".
|
||||
until SHIP:APOAPSIS > 80000 {
|
||||
local angle is min(30, SHIP:PROGRADE:PITCH - 2).
|
||||
lock STEERING to heading(90, angle, 90).
|
||||
local angle is max(30, SHIP:PROGRADE:PITCH - 2).
|
||||
lock STEERING to heading(90, angle, -90).
|
||||
wait 0.001.
|
||||
}
|
||||
|
||||
print "Releasing controls. Good luck, Kerman!".
|
||||
set THROTTLE to 0.0.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue