misc tweaks

This commit is contained in:
2026-04-22 22:59:17 -04:00
parent 2b7f1ceed0
commit 3b81f6ca05
5 changed files with 69 additions and 4 deletions
+6
View File
@@ -0,0 +1,6 @@
wait until ship:unpacked.
clearscreen.
copyPath("0:/defaults", "").
run "defaults".
import("faris4").
+58
View File
@@ -0,0 +1,58 @@
import("library/lib_ascent").
WaitForEngineStart().
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Open Terminal").
set profile to 1.2.
set turn_start to 1000.
set target_orbit to 100000.
when altitude > 80000 then {
ag1 on.
}
Ascent(target_orbit, turn_start, profile, 3).
wait 0.5.
clearScreen.
print "Warping 1 orbit...".
local warpTgt is eta:apoapsis.
warpTo(time:seconds + warpTgt).
wait warpTgt + 1.
print "Preparing for De-orbit...".
lock steering to retrograde.
wait 20.
print "De-orbit Burn...".
lock throttle to 1.
wait until periapsis <= -200000.
print "Preparing for re-entry...".
lock throttle to 0.
wait until throttle = 0.
wait 1.
stage.
wait 1.
set kuniverse:timewarp:rate to 10.
wait until altitude <= 80000.
print "Re-entry...".
lock steering to srfRetrograde.
wait until altitude <= 20000.
print "Falling to ground...".
unlock steering.
set kuniverse:timewarp:rate to 5.
wait until ship:status = "LANDED" or ship:status = "SPLASHED".
set kuniverse:timewarp:rate to 0.
print "Mssion Complete!".
SET V0 TO GETVOICE(0).
V0:PLAY( NOTE(400, 2.5) ).
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Close Terminal").
SHUTDOWN.
+1 -1
View File
@@ -6,7 +6,7 @@ WaitForEngineStart().
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Open Terminal"). CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Open Terminal").
set profile to 1.2. set profile to 1.
set turn_start to 1000. set turn_start to 1000.
set target_orbit to 130000. set target_orbit to 130000.
+4 -2
View File
@@ -118,7 +118,7 @@ local function CreateCircularizationNode{
wait until altitude > 80000. wait until altitude > 80000.
local burnDv is CalculateCircularizationDV(tgt, orbit:semimajoraxis). local burnDv is CalculateCircularizationDV(tgt, orbit:semimajoraxis).
set circNode to Node(time:seconds + eta:apoapsis, 0, 0, burnDv). local circNode is Node(time:seconds + eta:apoapsis, 0, 0, burnDv).
add circNode. add circNode.
wait 0.01. wait 0.01.
lock steering to circNode:burnvector. lock steering to circNode:burnvector.
@@ -126,9 +126,11 @@ local function CreateCircularizationNode{
wait until circNode:eta <= burnDuration /2. wait until circNode:eta <= burnDuration /2.
lock throttle to 1. lock throttle to 1.
wait until nextNode:deltav:mag <= 10. wait until nextNode:deltav:mag <= 10.
lock throttle to 0.5. lock throttle to 0.25.
wait until NEXTNODE:deltav:mag <= 1. wait until NEXTNODE:deltav:mag <= 1.
unlock steering.
remove nextNode. remove nextNode.
wait 0.01.
lock throttle to 0. lock throttle to 0.
wait until throttle = 0. wait until throttle = 0.
} }
-1
View File
@@ -155,7 +155,6 @@ declare function CalculateTimeToImpact{
parameter tgtAltitude is 0.0. parameter tgtAltitude is 0.0.
if gravity <= 0 or curAltitude <= 0{ if gravity <= 0 or curAltitude <= 0{
print "[warn]: invalid altitude or gravity.".
return 0.0. return 0.0.
} }