Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ***** Testing TWR value dynamic control utilizing maf. Not yet implemented/working.
- LOCK R TO ALTITUDE+SHIP:BODY:RADIUS.
- LOCK WEIGHT TO MASS*SHIP:BODY:MU/R^2.
- LOCK TWR TO MAXTHRUST/WEIGHT.
- LOCK TARGETTWR TO 1.5.
- // Countdown from 10 to launch.
- PRINT "Faulty Software Systems Inc.".
- PRINT "Counting down:".
- FROM {local countdown is 10.} UNTIL countdown = 0 STEP {SET countdown to countdown - 1.} do {
- PRINT "..." + countdown.
- WAIT 1.
- }
- // Takeoff prep and engine start.
- PRINT "Takeoff".
- SAS ON.
- SET SHIP:CONTROL:PILOTMAINTHROTTLE TO 0.
- LOCK THROTTLE TO 1.0.
- // Staging.
- WHEN SHIP:MAXTHRUST = 0 THEN {
- PRINT "Staging.".
- STAGE.
- PRESERVE.
- }
- //*****Thrust control test, still a WIP. WONT START UNTIL 10K.
- UNTIL APOAPSIS > 99999 {
- // IF TWR > TARGETTWR {SET T TO (T-0.05).} testing, cant figure out how to set the throttle value to = T.
- // IF TWR < TARGETTWR {SET T TO (T+0.05).}.
- LOCK THROTTLE TO 1.0.
- WAIT 1.
- // Gravity turn.
- LOCK STEERING TO HEADING (90,90).
- IF ALTITUDE < 70000 { LOCK STEERING TO HEADING (90, (90-ALTITUDE/777.78)). }
- IF ALTITUDE > 70000 { LOCK STEERING TO HEADING (90,0). }
- }
- // Circularization. Customize the values here to change AP / PE.
- WAIT UNTIL APOAPSIS > 100000.
- LOCK THROTTLE TO 0.0.
- LOCK STEERING TO HEADING (90,0).
- WAIT UNTIL ETA:APOAPSIS < 20.
- LOCK THROTTLE TO 1.0.
- WAIT UNTIL PERIAPSIS > 950000.
- LOCK THROTTLE TO 0.0.
- PRINT "Wait...this thing worked?".
- UNLOCK ALL.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement