Improvements and gui to ascent script
This commit is contained in:
+5
-51
@@ -1,52 +1,6 @@
|
||||
copyPath("0:/ascent.ks", "1:/ascent.ks").
|
||||
copyPath("0:/maneuver.ks", "1:/maneuver.ks").
|
||||
copyPath("0:/staging.ks", "1:/staging.ks").
|
||||
copyPath("0:/logger.ks", "1:/logger.ks").
|
||||
// #include logger
|
||||
run once logger.
|
||||
// #include ascent
|
||||
run once ascent.
|
||||
|
||||
createDir("1:/logs").
|
||||
set LOG to loggerCreate(
|
||||
"1:/logs/flight-" + ship:shipName + "-" + time:full + ".json",
|
||||
list(
|
||||
"time",
|
||||
"altitude",
|
||||
"apoapsis",
|
||||
"periapsis",
|
||||
"eccentricity",
|
||||
"throttle",
|
||||
"pitch",
|
||||
"heading",
|
||||
"mass",
|
||||
"stageNum"
|
||||
),
|
||||
1.0
|
||||
).
|
||||
set LOG_DATA to {
|
||||
return list(
|
||||
time:seconds,
|
||||
round(ship:altitude, 1),
|
||||
round(ship:apoapsis, 1),
|
||||
round(ship:periapsis, 1),
|
||||
round(ship:orbit:eccentricity, 4),
|
||||
round(ship:throttle, 3),
|
||||
round(ship:pitch, 2),
|
||||
round(ship:heading, 2),
|
||||
round(ship:mass, 3),
|
||||
stage:number
|
||||
).
|
||||
}.
|
||||
|
||||
function UPDATE_LOG {
|
||||
loggerUpdate(LOG, LOG_DATA()).
|
||||
}
|
||||
|
||||
wait until ship:unpacked.
|
||||
core:part:getmodule("kOSProcessor"):doevent("Open Terminal").
|
||||
|
||||
basicAscent(90, 80000).
|
||||
|
||||
core:part:getmodule("kOSProcessor"):doevent("Close Terminal").
|
||||
loggerFlush(LOG).
|
||||
if addons:RT:hasKSCConnection(ship) {
|
||||
runPath("0:/scripts/basic.ks").
|
||||
} else {
|
||||
print "No connection to the KSC".
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
wait until ship:unpacked.
|
||||
runPath("0:/scripts/helo.ks").
|
||||
Reference in New Issue
Block a user