finalized raden launch
wip landing script
This commit is contained in:
38
boosterDeorbit.ks
Normal file
38
boosterDeorbit.ks
Normal file
@@ -0,0 +1,38 @@
|
||||
//-126
|
||||
function DeOrbit{
|
||||
parameter burnLng, deltaV.
|
||||
|
||||
lock pos to SHIP:geoposition.
|
||||
|
||||
lock curLng to pos:lng.
|
||||
|
||||
DECLARE LOCAL tgtLng IS burnLng - 5.
|
||||
if curLng > burnLng or curLng < tgtLng {
|
||||
SET WARPMODE TO "RAILS".
|
||||
SET WARP TO 3.
|
||||
print "warping to " + tgtLng.
|
||||
WAIT UNTIL curLng > tgtLng and curLng < burnLng.
|
||||
SET WARP TO 0.
|
||||
print "arived at dst " + tgtLng.
|
||||
print "burn at " + burnLng.
|
||||
}
|
||||
print "currently at" + curLng.
|
||||
|
||||
BRAKES ON.
|
||||
RCS ON.
|
||||
LOCK steering to retrograde.
|
||||
wait until curLng >= burnLng.
|
||||
|
||||
}
|
||||
|
||||
function CalculateBurnDuration{
|
||||
parameter dv.
|
||||
|
||||
// declare local isp is GetIsp().
|
||||
// declare local finalMass is mass * exp(-dv / (isp * constant:g0)).
|
||||
// declare local twr is ship:maxThrust / (((mass + finalMass)/2) * constant:g0).
|
||||
|
||||
|
||||
// local t is dv / (twr * constant.g0).
|
||||
// return t.
|
||||
}
|
||||
Reference in New Issue
Block a user