Fix satdeploy.
This commit is contained in:
14
prog/circ.ks
14
prog/circ.ks
@ -2,14 +2,6 @@
|
||||
|
||||
runoncepath("/lib/navigation").
|
||||
|
||||
parameter where is "a".
|
||||
parameter whereStr is "apoapsis".
|
||||
|
||||
local usePeri is false.
|
||||
if where = "p" {
|
||||
set usePeri to true.
|
||||
set whereStr to "periapsis".
|
||||
}
|
||||
|
||||
CreateCircularizationNode(usePeri).
|
||||
print "Circularization node created at " + whereStr.
|
||||
parameter where.
|
||||
add CreateCircularizationNode(where).
|
||||
print "Circularization node created.".
|
||||
|
@ -1,4 +1,4 @@
|
||||
@lazyglobal off.
|
||||
|
||||
runoncepath("/lib/node").
|
||||
ExecuteNode().
|
||||
ExecNode().
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Run this program on a staged multi-satellite deploy mission. (e.g. using a fairing with interstage nodes and stack separators) To use:
|
||||
//
|
||||
// 1. Make sure the next stage will decouple a satellite and activate its engines.
|
||||
// 2. Pull up the PAW for the satellite's probe core and "Control from Here".
|
||||
// 2. Pull up the PAW for the satellite's probe core and "Control from Here", so KSP stays focused on the satellite after deploy.
|
||||
// 3. Run this program from that satellite's computer.
|
||||
//
|
||||
// This program will decouple the satellite and circularize its orbit. Ideally done on a resonant satellite injection orbit.
|
||||
@ -14,13 +14,23 @@ runoncepath("/lib/navigation").
|
||||
runoncepath("/lib/node").
|
||||
|
||||
stage.
|
||||
PANELS on.
|
||||
set SHIP:NAME to name.
|
||||
add CreateCircularizationNode(TIME + 2).
|
||||
ExecNode().
|
||||
|
||||
wait until SHIP:UNPACKED.
|
||||
wait 0.001.
|
||||
|
||||
// KSP does not intelligently figure out staging on the fly here, so stage again
|
||||
stage.
|
||||
|
||||
set SHIP:NAME to name.
|
||||
|
||||
PANELS on.
|
||||
for p in SHIP:PARTS {
|
||||
if p:MODULES:Find("ModuleRTAntenna") > -1 {
|
||||
p:GetModule("ModuleRTAntenna"):DoEvent("ACTIVATE").
|
||||
if p:MODULES:Find("ModuleRTAntenna") > -1 and p:GetModule("ModuleRTAntenna"):ALLEVENTS:Find("Activate") > -1 {
|
||||
p:GetModule("ModuleRTAntenna"):DoEvent("Activate").
|
||||
}
|
||||
}
|
||||
|
||||
//add CreateCircularizationNode(TIME + 5).
|
||||
add CreateCircularizationNode("PERI").
|
||||
ExecNode().
|
||||
|
||||
|
Reference in New Issue
Block a user