re-entry tweaks
This commit is contained in:
12
beegSana.ks
12
beegSana.ks
@@ -4,19 +4,25 @@ run "poweredLanding".
|
|||||||
|
|
||||||
declare function Reentry{
|
declare function Reentry{
|
||||||
print "Re-entry.".
|
print "Re-entry.".
|
||||||
lock steering to heading(90, 60, 0).
|
lock steering to heading(90, 70, 0).
|
||||||
ag1 on.
|
ag1 on.
|
||||||
|
wait until altitude < 20000.
|
||||||
rcs off.
|
rcs off.
|
||||||
|
|
||||||
wait until (groundSpeed < 500 and altitude < 11000).
|
wait until (groundSpeed < 500 and altitude < 10000).
|
||||||
print "Flipping.".
|
print "Flipping.".
|
||||||
rcs on.
|
rcs on.
|
||||||
lock steering to srfRetrograde.
|
lock steering to srfRetrograde.
|
||||||
}
|
}
|
||||||
|
wait until (altitude > 70000 and periapsis > 70000) or (verticalSpeed < -100 and periapsis < 0).
|
||||||
wait until (periapsis < 0 and throttle = 0).
|
wait until (periapsis < 0 and throttle = 0).
|
||||||
print "Prep for re-entry".
|
print "Prep for re-entry".
|
||||||
|
print "Dont forget to Turn of MechJob Q Limit".
|
||||||
sas off.
|
sas off.
|
||||||
|
rcs on.
|
||||||
|
// set mj to addons:mj.
|
||||||
|
// set asc to mj:ascent.
|
||||||
|
// set asc:limitqaenabled to false.
|
||||||
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Open Terminal").
|
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Open Terminal").
|
||||||
lock steering to heading(90, 60, 0).
|
lock steering to heading(90, 60, 0).
|
||||||
wait until (altitude < 70000).
|
wait until (altitude < 70000).
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ function TestSetup{
|
|||||||
|
|
||||||
declare function Landing{
|
declare function Landing{
|
||||||
parameter altitudeOffset is 0.0.
|
parameter altitudeOffset is 0.0.
|
||||||
|
parameter maxLandingSpeed is -20.
|
||||||
|
|
||||||
print "Starting Landing".
|
print "Starting Landing".
|
||||||
gear on.
|
gear on.
|
||||||
set pad to location_constants:kerbin:launchpad:position.
|
set pad to location_constants:kerbin:launchpad:position.
|
||||||
@@ -71,7 +73,7 @@ declare function Landing{
|
|||||||
|
|
||||||
until landed {
|
until landed {
|
||||||
set landingThrottle to hoverPid:update(time:seconds, verticalSpeed).
|
set landingThrottle to hoverPid:update(time:seconds, verticalSpeed).
|
||||||
set hoverPid:setpoint to Map(alt:radar + altitudeOffset, 0, 100, -0.5, -20).
|
set hoverPid:setpoint to Map(alt:radar + altitudeOffset, 0, 100, -0.5, maxLandingSpeed).
|
||||||
wait 0.001.
|
wait 0.001.
|
||||||
}
|
}
|
||||||
print "Landed".
|
print "Landed".
|
||||||
|
|||||||
Reference in New Issue
Block a user