Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clearscreen.
- sas off.
- Set Go to 0.
- set tOrbit to apoapsis.
- set BurnNow to 0.
- set end to 0.
- set done to 0.
- set inputFlag to 0.
- set eccintricity to
- (((apoapsis + 600000)-(periapsis + 600000))/((apoapsis + 600000)+(periapsis + 600000))).
- set printflag to 1.
- if ag9 = "True" { toggle ag9. }.
- if ag8 = "True" { toggle ag8. }.
- if ag7 = "True" { toggle ag7. }.
- until end = 1
- {
- if ag9 = "True" { set tOrbit to tOrbit + 10000. set printflag to 1. toggle ag9. }.
- if ag8 = "True" { set tOrbit to tOrbit - 10000. set printflag to 1. toggle ag8. }.
- if tOrbit < 80000 { set tOrbit to 80000. }.
- if torbit > 650000 { set tOrbit to 650000. }.
- if ag7 = "True"
- {
- clearscreen.
- print "Your new orbit will be. " + tOrbit + "m" at (0,1).
- toggle ag7.
- wait 2.
- set end to 1.
- }.
- if printflag = 1
- {
- clearscreen.
- print "Select your orbit altitude." at (0,0).
- print "--------------------------------" at (0,1).
- print "Use action group 9 to add 10Km to orbit alt." at (0,3).
- print "Use action group 8 to remove 10Km from orbit alt." at (0,5).
- print "Use action group 7 to confirm orbit alt." at (0,7).
- print "You have selected " + tOrbit + "m" at (0,9).
- set printflag to 0.
- }.
- }.
- if tOrbit > apoapsis { set condition to 0. }.
- if tOrbit < apoapsis { set condition to 1. }.
- if eccintricity < 0.002
- { set BurnNow to 1. }.
- if condition = 0
- {
- lock steering to prograde.
- if BurnNow = 1
- {
- print "Use Action Group 7 to begin the burn.".
- print "Use Action Group 9 to Cancel.".
- until inputFlag = 1
- {
- if ag7 = "True" { set inputFlag to 1. toggle ag7. set Go to 1. }.
- if ag9 = "True" { toggle ag9. print garbage. }.
- }.
- }.
- if BurnNow = 0
- {
- print "Wating for Periapsis.".
- set warp to 3.
- when eta:periapsis < 120 then set warp to 2.
- when eta:periapsis < 30 then set warp to 0.
- when eta:periapsis < 1 then set Go to 1.
- }.
- clearscreen.
- wait until Go = 1.
- print "Burning for " + tOrbit + "m".
- lock throttle to 1.
- set Go to 0.
- when apoapsis > (tOrbit - (tOrbit*.01)) then lock throttle to .05.
- when apoapsis > tOrbit then { lock throttle to 0. set Go to 1. }.
- wait until Go = 1.
- set Gk to 3.5216000*10^12.
- set Radius to 600000 + apoapsis.
- set sma to 600000 + ((periapsis+apoapsis)/2).
- set V1 to (Gk/Radius)^.5.
- set V2 to (Gk*((2/Radius)-(1/sma)))^.5.
- set dV to abs(V1-V2).
- set acceleration to (maxthrust/mass).
- set burnTime to (dV/acceleration).
- set tTime to (burnTime/2).
- set waitTime to eta:apoapsis - tTime.
- print "Curcularizing Burn in " + waitTime + "seconds.".
- wait 1.
- set warp to 3.
- when eta:apoapsis < 120 then set warp to 2.
- when eta:apoapsis < 30 then { set warp to 0. set tOrbit to apoapsis. }.
- when eta:apoapsis < tTime then lock throttle to 1.
- when periapsis > (tOrbit - (tOrbit*.01)) then lock throttle to .05.
- when periapsis > (tOrbit - 100) then { lock throttle to 0. set done to 1. }.
- }.
- if condition = 1
- {
- lock steering to retrograde.
- if BurnNow = 1
- {
- print "Use Action Group 7 to begin the burn.".
- print "Use Action Group 9 to Cancel.".
- until inputFlag = 1
- {
- if ag7 = "True" { set inputFlag to 1. toggle ag7. set Go to 1. }.
- if ag9 = "True" { toggle ag9. print garbage. }.
- }.
- }.
- if BurnNow = 0
- {
- print "Wating for Apoapsis.".
- set warp to 3.
- when eta:apoapsis < 120 then set warp to 2.
- when eta:apoapsis < 30 then set warp to 0.
- when eta:apoapsis < 1 then set Go to 1.
- }.
- clearscreen.
- wait until Go = 1.
- print "Burning for " + tOrbit + "m Periapsis.".
- lock throttle to 1.
- set Go to 0.
- when periapsis < (tOrbit + (tOrbit*.01)) then lock throttle to .05.
- when periapsis < tOrbit then { lock throttle to 0. set Go to 1. }.
- wait until Go = 1.
- set Gk to 3.5216000*10^12.
- set Radius to 600000 + periapsis.
- set sma to 600000 + ((periapsis+apoapsis)/2).
- set V1 to (Gk/Radius)^.5.
- set V2 to (Gk*((2/Radius)-(1/sma)))^.5.
- set dV to abs(V1-V2).
- set acceleration to (maxthrust/mass).
- set burnTime to (dV/acceleration).
- set tTime to (burnTime/2).
- set waitTime to eta:periapsis - tTime.
- print "Curcularizing Burn in " + waitTime + "seconds.".
- wait 1.
- set warp to 3.
- when eta:periapsis < 120 then set warp to 2.
- when eta:periapsis < 30 then { set warp to 0. set tOrbit to periapsis. }.
- when eta:periapsis < tTime then lock throttle to 1.
- when apoapsis < (tOrbit + (tOrbit*.01)) then lock throttle to .05.
- when apoapsis < (tOrbit + 100) then { lock throttle to 0. set done to 1. }.
- }.
- wait until done = 1.
- sas on.
- print " ".
- print "Orbital Eccentricity is " +
- (((apoapsis + 600000)-(periapsis + 600000))/((apoapsis + 600000)+(periapsis + 600000))).
- print " ".
- wait 2.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement