dceeddfcf1
- lander.ks: Replace fixed suicide burn with dynamic throttle control using vertical fraction, gateRatio, and finalPhase logic; simplify post-land sequence to SAS stabilityassist - transfer.ks: Replace hardcoded Mun target with GUI popup menu populated from body:orbitingchildren - ascent.ks: Change fairing jettison trigger from dynamic pressure to altitude > atm height; guard antenna extension with hasmodule check - basic.ks: Append stayRunner invocation at end of script - boot/boot.ks: Remove commented RT connection block; add newline before runPath - boot/testing.ks: Switch to volume 0 and use relative paths for transfer and doManeuver scripts - boot/heloBoot.ks: Delete unused boot file
61 lines
1.4 KiB
Plaintext
61 lines
1.4 KiB
Plaintext
// core:part:getmodule("kOSProcessor"):doevent("Open Terminal").
|
|
|
|
if ship:bounds:bottomaltradar > 5 {
|
|
print "Script shouldn't start off the ground".
|
|
} else {
|
|
set MODULES to list(
|
|
"ascent.ks",
|
|
"maneuver.ks",
|
|
"staging.ks",
|
|
"logger.ks"
|
|
).
|
|
|
|
for mod in MODULES {
|
|
copyPath("0:/scripts/" + mod, "1:/" + mod).
|
|
}
|
|
|
|
// #include ascent
|
|
run once ascent.
|
|
|
|
// --- GUI ---
|
|
local targetAlt is 80000.
|
|
local targetHdg is 90.
|
|
local guiConfirmed is false.
|
|
|
|
local g is GUI(300).
|
|
set g:x to 100.
|
|
set g:y to 100.
|
|
|
|
local titleLabel is g:addlabel("Ascent Parameters").
|
|
set titleLabel:style:align to "center".
|
|
set titleLabel:style:hstretch to true.
|
|
|
|
g:addlabel("Target Altitude (m):").
|
|
local altBox is g:addtextfield(targetAlt:tostring).
|
|
set altBox:style:hstretch to true.
|
|
|
|
g:addlabel("Heading (degrees):").
|
|
local hdgBox is g:addtextfield(targetHdg:tostring).
|
|
set hdgBox:style:hstretch to true.
|
|
|
|
local confirmBtn is g:addbutton("Launch").
|
|
set confirmBtn:onclick to {
|
|
set targetAlt to altBox:text:tonumber(targetAlt).
|
|
set targetHdg to hdgBox:text:tonumber(targetHdg).
|
|
set guiConfirmed to true.
|
|
g:hide().
|
|
}.
|
|
|
|
g:show().
|
|
wait until guiConfirmed.
|
|
g:dispose().
|
|
// --- END GUI ---
|
|
|
|
basicAscent(targetHdg, targetAlt).
|
|
|
|
// core:part:getmodule("kOSProcessor"):doevent("Close Terminal").
|
|
}
|
|
|
|
// wait for more input
|
|
runpath("0:/scripts/stayRunner.ks").
|