ascend + basic auto landing + misc

This commit is contained in:
2026-04-18 23:19:23 -04:00
parent 8a0700c36a
commit 9a4ae5e472
17 changed files with 504 additions and 7 deletions
+37 -3
View File
@@ -1,5 +1,6 @@
run "defaults".
run "library/lib_orbits".
run "library/lib_vessel_utils".
run "poweredLanding".
declare function Reentry{
@@ -14,12 +15,45 @@ declare function Reentry{
rcs on.
lock steering to srfRetrograde.
}
declare function DeorbitBurn{
if periapsis < 0
{
return.
}
set kscPad to location_constants:kerbin:launchpad.
// wait until ag10.
sas off.
rcs on.
CreateDeorbit(kscPad, -300, 0, 0).
lock steering to nextNode:burnvector.
local lock align to vDot(ship:facing:vector, nextNode:burnvector).
wait until align > 0.95.
unlock steering.
sas on.
set sasMode to "MANEUVER".
wait 0.001.
warpTo(time:seconds + nextNode:eta - 15).
sas off.
local dur to CalculateBurnDuration(nextNode:burnvector:mag, GetIsp(), ship:mass, GetMaxMassFlow() * 1000).
print "duration " + dur.
lock steering to nextNode:burnvector.
wait until nextNode:eta < 1.
local end to time:seconds + dur.
lock throttle to 1.
wait until end <= time:seconds.
lock throttle to 0.
unlock throttle.
unlock steering.
remove nextNode.
}
DeorbitBurn().
wait until (altitude > 70000 and periapsis > 70000) or (verticalSpeed < -100 and periapsis < 0).
wait until (periapsis < 0 and throttle = 0).
print "Prep for re-entry".
print "Dont forget to Turn of MechJob Q Limit".
sas off.
rcs on.
// set mj to addons:mj.
// set asc to mj:ascent.
// set asc:limitqaenabled to false.