Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.46 KB | None | 0 0
  1. clearscreen.
  2. PRINT "Préparation du lancement d'Hydrogène...".
  3. sas off.
  4. rcs off.
  5. lights off.
  6. lock throttle to 0.
  7. SET timer to 0.
  8. SET CU to "TestFlightPound".
  9. PRINT "Etapes du vol :" at (3,10).
  10. SET etage to 0.
  11. PRINT "Décollage d'Hydrogène." at (4,11).
  12. SET coiffe to 1.
  13.  
  14. SET apoapsis to 120000. //Set de l'apogée finale en mètre
  15. SET periapsis to 100000. //Set de lapérgiée finale en mètre
  16.  
  17. SET phasevol to 2. //Gère les phases du vol
  18. IF alt:radar < 50 {
  19. SET phasevol to 1.
  20. }
  21.  
  22. UNTIL phasevol = 0 { //Jusqu'à la fin du vol
  23.  
  24. IF phasevol = 1 { //Vaisseau sur le launchpad
  25. LOCK steering to up.
  26. LOCK throttle to 1.0. //Throttle to 100%
  27. stage.
  28. SET phasevol to 2.
  29. }
  30.  
  31. else if phasevol = 2 { //Le vaisseau vol jusqu'a 100m/s
  32.  
  33. LOCK steering to heading ( 90, 90). //Pointe le haut
  34. IF ship:verticalspeed > 100 {
  35. SET phasevol to 3. //Passé à la 3eme phase
  36. }
  37. }
  38.  
  39. else IF phasevol = 3 { //Gravity turn
  40. LOCK steering to heading ( 90, 70). //vers 90 degrés à l'est
  41. IF ship:altitude > 17000 {
  42. set phasevol to 4.
  43. }
  44. }
  45.  
  46. else IF phasevol = 5 { //Vers l'orbite
  47. IF eta:apoapsis < 10 { //Si on dépasse l'apogée
  48. LOCK steering to heading ( 90, 0).
  49. LOCK throttle to 1.0.
  50. PRINT "2ème Allumage Terrier." at (4,17).
  51. }
  52. IF (ship:periapsis > periapsis) or (ship:periapsis > apoapsis * 0.95) { //Si la périgée dépasse l'apogée
  53. LOCK throttle to 0.0.
  54. PRINT "2ème Extinction Terrier." at (4,18).
  55. SET phasevol to 10.
  56. }
  57. }
  58. else IF phasevol = 10 { //Touche finale
  59. LOCK throttle to 0.0.
  60. stage.
  61. PRINT CU + " a été déployé avec succés !" at (4,19).
  62. SET phasevol to 0.
  63. }
  64. SET timer to timer + 1.
  65. PRINT timer at (5,20).
  66. IF timer > 1700 {
  67. stage.
  68. PRINT "Séparation des quatres Hammer." at (4,12).
  69. SET timer to -9999999.
  70. }
  71.  
  72. IF maxthrust = 0 { //Si l'étage n'accélère plus on s'en sépare
  73. LOCK throttle to 0.0.
  74. wait 1.
  75. stage.
  76. SET etage to etage + 1.
  77. IF etage = 0 {
  78. PRINT "Décollage d'Hydrogène." at (4,11).
  79. } else IF etage = 1 {
  80. PRINT "Séparation Kickback." at (4,13).
  81. } else IF etage = 2 {
  82. PRINT "1er Allumage Terrier." at (4,14).
  83. } else IF etage = 3 {
  84. PRINT "1er Extinction Terrier." at (4,15).
  85. }
  86. wait 3.
  87. stage.
  88. SET etage to etage + 1.
  89. LOCK throttle to 1.0.
  90. IF etage = 0 {
  91. PRINT "Décollage d'Hydrogène." at (4,11).
  92. } else IF etage = 1 {
  93. PRINT "Séparation Kickback." at (4,13).
  94. } else IF etage = 2 {
  95. PRINT "1er Allumage Terrier." at (4,14).
  96. } else IF etage = 3 {
  97. PRINT "1er Extinction Terrier." at (4,16).
  98. } else IF etage = 4 {
  99. }
  100. }
  101.  
  102. IF ship:altitude > 60000 and coiffe = 1 {
  103. stage.
  104. PRINT "Séparation de la coiffe" at (4,15).
  105. SET etage to 5.
  106. SET coiffe to 0.
  107. }
  108.  
  109. else IF phasevol = 4 { //Vers l'apogée
  110. IF ship:apoapsis > apoapsis { //Quand l'apogée est bonne
  111. LOCK throttle to 0.0. //Moteur à 0% On arrete les moteurs
  112. LOCK steering to heading ( 90, 0).
  113. PRINT "1er Extinction Terrier." at (4,15).
  114. SET phasevol to 5.
  115. } else {
  116. LOCK steering to heading ( 90, 45). //3° au dessus de l'horizon
  117. }
  118. }
  119.  
  120. //Infos du vol en direct
  121. PRINT "Phase du vol : " + phasevol + " " at (5,4).
  122. PRINT "Altitude : " + round(ship:altitude) + " " at (5,5).
  123. PRINT "Apogée : " + round(apoapsis) + " " at (5,6).
  124. PRINT "Périgée : " + round(periapsis) + " " at (5,7).
  125. PRINT "Temps avant AP : " + round(eta:apoapsis) + " " at (5,8).
  126. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement