Source Code

These source code files are an attempted reconstruction of Sundance revision 306, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
These dumps were then modified using memos, checklists, observed address changes, and the Sundance GSOPs to get the entire program to match Sundance revision 306 as closely as possible. Without more information, it is not possible to say how close it actually is; however, this code should be quite close. It is capable of flying the whole Apollo 9 mission using the original checklists and padload. Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

029564,000002:                                                                                                  ## Copyright:   Public domain.
029565,000003:                                                                                                  ## Filename:    P40-P47.agc
029566,000004:                                                                                                  ## Purpose:     A section of an attempt to reconstruct Sundance revision 306
029567,000005:                                                                                                  ##              as closely as possible with available information. Sundance
029568,000006:                                                                                                  ##              306 is the source code for the Lunar Module's (LM) Apollo
029569,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 9. This program was created
029570,000008:                                                                                                  ##              using the mixed-revision SundanceXXX as a starting point, and
029571,000009:                                                                                                  ##              pulling back features from Luminary 69 believed to have been
029572,000010:                                                                                                  ##              added based on memos, checklists, observed address changes,
029573,000011:                                                                                                  ##              or the Sundance GSOPs.
029574,000012:                                                                                                  ## Assembler:   yaYUL
029575,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
029576,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
029577,000015:                                                                                                  ## Mod history: 2020-07-24 MAS  Created from SundanceXXX.
029578,000016:                                                                                                  ##              2021-05-30 ABS  Aligned TCF BURNBABY and TCF B*RNB*B* to field
029579,000017:                                                                                                  ##                              boundaries and surrounding comments to match.
029580,000018:                                                                                                  ##                              TGDCALC -> TGOCALC
029581,000019: 
029582,000020: 
029583,000021: 
029584,000022:                                                                                                  #  PROGRAM DESCRIPTION  P40BOTH    DECEMBER 22, 1966
029585,000023:                                                                                                  #  MOD 03 BY PETER ADLER           MARCH 3, 1967
029586,000024:                                                                                                  #  CALLED VIA JOB FROM V37E
029587,000025: 
029588,000026:                                                                                                  #  FUNCTIONAL DESCRIPTION
029589,000027: 
029590,000028:                                                                                                  #           1)  TO COMPUTE A PREFERRED IMU ORIENTATION AND A PREFERRED VEHICLE ATTITUDE FOR A LM DPS
029591,000029:                                                                                                  #               THRUSTING MANEUVER.
029592,000030: 

(There is no item #2 in the original program listing.)

029594,000032: 
029595,000033:                                                                                                  #           3)  TO DO THE VEHICLE MANEUVER TO THE THRUSTING ATTITUDE.
029596,000034: 
029597,000035:                                                                                                  #           4)  TO CONTROL THE PGNCS DURING COUNTDOWN, IGNITION, THRUSTING, AND THRUST TERMINATION OF A
029598,000036:                                                                                                  #               PGNCS CONTROLLED DPS MANEUVER.
029599,000037: 
029600,000038:                                                                                                  #           5)  IN POSTBURN--ZERO RENDEZVOUS COUNTER, MAINTAIN VG CALCULATIONS FOR POSSIBLE RCS MANEUVER,
029601,000039:                                                                                                  #                            SET MAXIMUM DEADBAND IN DAP, RESET STEERLAW CSTEER TO ZERO.
029602,000040: 
029603,000041:                                                                                                  #           NOTE:  P42, WHICH IS IN THIS LOG SECTION, DOES THE SAME FOR AN APS BURN, AND P41 DOES 1-3 FOR
029604,000042:                                                                                                  #                  RCS PLUS DISPLAYS PARAMETERS FOR MANUAL CONTROL.
029605,000043: 
029606,000044:                                                                                                  #  SUBROUTINES USED
029607,000045: 
029608,000046:                                                                                                  #           R02      IMU STATUS CHECK
029609,000047:                                                                                                  #           S40.1    COMPUTATION OF THRUST DIRECTION
029610,000048:                                                                                                  #           S40.13   LENGTH OF BURN
029611,000049:                                                                                                  #           S40.2,3  PREFERRED IMU ORIENATTION
029612,000050:                                                                                                  #           S40.8    X PRODUCT STEERING
029613,000051:                                                                                                  #           S40.9    LAMBERT VTOGAIN
029614,000052:                                                                                                  #           R60LEM   ATTITUDE MANEUVER
029615,000053:                                                                                                  #           LEMPREC  EXTRAPOLATE STATE VECTOR
029616,000054:                                                                                                  #           PREREAD  AVERAGE G, SERVICER
029617,000055:                                                                                                  #           ALLCOAST DAP COASTING INITIALIZATION
029618,000056:                                                                                                  #           CLOKTASK ERGO CLOCKJOB--COUNT DOWN
029619,000057:                                                                                                  #           PHASCHNG, INTPRET, FLAGUP, FLAGDOWN, WAITLIST, LONGCALL, GOFLASH, GOFLASHR, GOPERF1, ALARM,
029620,000058:                                                                                                  #           PRIOLARM, GOTOPOOH, ENDOFJOB, BANKCALL, SETMAXDB, SETMINDB, CHECKMM, FLATOUT, OUTFLAT,
029621,000059:                                                                                                  #           KILLTASK, SGNAGREE, TPAGREE, ETC.
029622,000060: 
029623,000061:                                                                                                  #  RESTARTS VIA GROUP 4
029624,000062: 
029625,000063:                                                                                                  #  DISPLAYS
029626,000064: 
029627,000065:                                                                                                  #           V50N25  203 A/P TO PGNCS, AUTO THROTTLE MODE, AUTO ATTITUDE CONTROL
029628,000066:                                                                                                  #           V06N40  TTI, VG, DELTAVM (DISPLAYED ONCE/SECOND BY CLOKTASK)
029629,000067:                                                                                                  #           V50N99  PLEASE PERFORM ENGINE ON ENABLE
029630,000068:                                                                                                  #           V06N40  TG (TIME TO GO TO CUTOFF), VG, DELTAVM--ONCE/SECOND
029631,000069:                                                                                                  #           V16N40  FINAL VALUES OF TG, VG, DELTAVM
029632,000070:                                                                                                  #           V16N85  COMP OF VG (BODY AXES) FOR POSS. RCS MANUAL MANEUVER
029633,000071:                                                                                                  #           V05N09  POSSIBLE ALARMS
029634,000072:                                                                                                  #           V50N07  PLEASE SELECT P00
029635,000073: 
029636,000074:                                                                                                  #           VIA R30
029637,000075: 
029638,000076:                                                                                                  #           V06N44  HAPO, PERI, TFF
029639,000077:                                                                                                  #           V06N35  TIME TO PERIGEE, HMS
029640,000078: 
029641,000079:                                                                                                  #  ALARM OR ABORT EXIT MODES
029642,000080: 
029643,000081:                                                                                                  #           PROGRAM ALARM, FLASHING DISPLAY OF ALARM CODE 1706 IF P40 SELECTED WITH DESCENT UNIT STAGED.
029644,000082:                                                                                                  #           V34E (TERMINATE) IS THE ONLY RESPONSE ACCEPTED. TC GOTOPOOH.
029645,000083: 
029646,000084:                                                                                                  #           PROGRAM ALARM, FLASH CODE 1703:  TIG LESS THAN 45 SECS AWAY.  V34E=  GOTOPOOH OR V33E=  SLIP
029647,000085:                                                                                                  #           TIG BY 45 SECS.
029648,000086: 
029649,000087:                                                                                                  #  ERASABLE INITIALIZATION
029650,000088:                                                                                                  #  DEBRIS
029651,000089:                                                                                                  #  OUTPUT
029652,000090: 
029653,000091:                                                                                                  #           SEE SUBROUTINES E.G.:  S40.1, S40.2,3, S40.13, S40.8, S40.9, TRIMGIMB
029654,000092:                                                                                                  #           XDELVFLG = 1 FOR EXT DELV COMPUTATION
029655,000093:                                                                                                  #                    = 0 FOR AIMPT (LAMBERT) COMP
029656,000094: 
029657,000095: 27,2253                                           COUNT*   $$/P40                                
029658,000096: 27,2253  E7,1430                                  EBANK=   WHICH                                 
029659,000097: 
029660,000098: 36,3133                                           BANK     36                                    
029661,000099: 36,2000                                           SETLOC   P40S                                  
029662,000100: 36,2000                                           BANK                                           
029663,000101: 
029664,000102: 36,3133           33114        P40LM              CAF      P40ADRES                              #  INITIALIZATION FOR BURNBABY.
029665,000103: 36,3134           55430                           TS       WHICH                                 
029666,000104: 
029667,000105: 36,3135           00006                           EXTEND                                         
029668,000106: 36,3136           00030                           READ     CHAN30                                
029669,000107: 36,3137           40000                           COM                                            
029670,000108: 36,3140           75025                           MASK     BIT2                                  
029671,000109: 36,3141           00006                           EXTEND                                         
029672,000110: 36,3142           13714                           BZF      P40ALM                                
029673,000111: 36,3143           04655                           TC       BANKCALL                              #  GO DO IMU STATUS CHECK ROUTINE.
029674,000112: 36,3144           11067                           CADR     R02BOTH                               
029675,000113: 
029676,000114: 36,3145           41102                           CS       DAPBOOLS                              #  INITIALIZE DVMON
029677,000115: 36,3146           75012                           MASK     CSMDOCKD                              
029678,000116: 36,3147           10000                           CCS      A                                     
029679,000117: 36,3150           33757                           CAF      THRESH1                               
029680,000118: 36,3151           63761                           AD       THRESH3                               
029681,000119: 36,3152           55201                           TS       DVTHRUSH                              
029682,000120: 36,3153           35026                           CAF      ONE                                   
029683,000121: 36,3154           55202                           TS       AUXFLAG                               
029684,000122: 36,3155           35024                           CAF      FOUR                                  
029685,000123: 36,3156           55472                           TS       DVCNTR                                
029686,000124: 
029687,000125: 36,3157           06014                           TC       INTPRET                               #  LOAD CONSTANTS FOR DPS BURN
029688,000126: 36,3160           43175                           VLOAD    CLEAR                                 #  LOAD F, MDOT, TDECAY
029689,000127: 36,3161           35725                                    FDPS                                  
029690,000128: 36,3162           02663                                    NOTHROTL                              
029691,000129: 36,3163           03723                           STORE    F                                     
029692,000130: 36,3164           77624        P40IN              CALL                                           
029693,000131: 36,3165           56253                                    S40.1                                 #  COMPUTES UT AND VGTIG
029694,000132: 36,3166           77624                           CALL                                           
029695,000133: 36,3167           56416                                    S40.2,3                               #  COMPUTES PREFERRED IMU ORIENTATION
029696,000134: 36,3170           77776                           EXIT                                           
029697,000135: 
029698,000136: 36,3171           00004                           INHINT                                         
029699,000137: 36,3172           04737                           TC       IBNKCALL                              
029700,000138: 36,3173           40223                           CADR     PFLITEDB                              #  ZERO ATTITUDE ERRORS, SET DB TO ONE DEG.
029701,000139: 
029702,000140: 36,3174           03176                           TC       P40SXT4                               
029703,000141: 
029704,000142: 
029705,000143:                                                                                                  #            ***********************
029706,000144: 36,3175           12133                           TCF      BURNBABY                              
029707,000145:                                                                                                  #            ***********************
029708,000146: 
029709,000147: 
029710,000148: 36,3176           00006        P40SXT4            EXTEND                                         
029711,000149: 36,3177           23153                           QXCH     P40/RET                               
029712,000150: 36,3200           00003        P41MANU            RELINT                                         
029713,000151: 
029714,000152: 36,3201           05600                           TC       DOWNFLAG                              #  CLEAR 3AXISFLG -- R60 WILL USE VECPOINT.
029715,000153: 36,3202           00124                           ADRES    3AXISFLG                              
029716,000154: 
029717,000155: 36,3203           04655                           TC       BANKCALL                              
029718,000156: 36,3204           54103                           CADR     R60LEM                                #  DO ATTITUDE MANEUVER ROUTINE
029719,000157: 36,3205           01153                           TC       P40/RET                               
029720,000158: 
029721,000159: 
029722,000160: 36,3206  E7,1447                                  EBANK=   TRKMKCNT                              
029723,000161: 36,3206           35062        POSTBURN           CA       LOW10                                 
029724,000162: 36,3207           55175                           TS       DISPDEX                               
029725,000163: 36,3210           00006                           EXTEND                                         
029726,000164: 36,3211           32040                           DCA      ACADN85                               
029727,000165: 36,3212           53253                           DXCH     AVEGEXIT                              
029728,000166: 36,3213           33763                           CAF      V16N40                                
029729,000167: 36,3214           04655                           TC       BANKCALL                              
029730,000168: 36,3215           20544                           CADR     GOFLASHR                              
029731,000169: 36,3216           03241                           TC       TERM40                                
029732,000170: 36,3217           13224                           TCF      TIGNOW                                
029733,000171: 36,3220           03206                           TC       POSTBURN                              
029734,000172: 
029735,000173: 36,3221           05423        P40PHS1            TC       PHASCHNG                              
029736,000174: 36,3222           00014                           OCT      00014                                 
029737,000175: 36,3223           15225                           TCF      ENDOFJOB                              
029738,000176: 
029739,000177: 36,3224           00004        TIGNOW             INHINT                                         
029740,000178: 36,3225           04737                           TC       IBNKCALL                              
029741,000179: 36,3226           40232                           CADR     ZATTEROR                              
029742,000180: 36,3227           04737                           TC       IBNKCALL                              
029743,000181: 36,3230           40221                           CADR     SETMINDB                              
029744,000182: 36,3231           00003                           RELINT                                         
029745,000183: 36,3232           33764                           CAF      V16N85B                               
029746,000184: 36,3233           04655                           TC       BANKCALL                              
029747,000185: 36,3234           20375                           CADR     REFLASHR                              
029748,000186: 36,3235           03241                           TC       TERM40                                
029749,000187: 36,3236           13241                           TCF      TERM40                                
029750,000188: 36,3237           03232                           TC       -5                                    
029751,000189: 
029752,000190: 36,3240           13221                           TCF      P40PHS1                               
029753,000191: 
029754,000192: 36,3241           00006        TERM40             EXTEND                                         
029755,000193: 36,3242           32071                           DCA      SERVCADR                              
029756,000194: 36,3243           53253                           DXCH     AVEGEXIT                              
029757,000195: 36,3244           35030                           CAF      ZERO                                  
029758,000196: 36,3245           55447                           TS       TRKMKCNT                              #       ZERO RENDZVS CNTERS
029759,000197: 36,3246           35062                           CA       LOW10                                 
029760,000198: 36,3247           55175                           TS       DISPDEX                               
029761,000199: 36,3250           00004                           INHINT                                         
029762,000200: 36,3251           04737                           TC       IBNKCALL                              
029763,000201: 36,3252           40204                           CADR     RESTORDB                              
029764,000202: 36,3253           00003                           RELINT                                         
029765,000203: 36,3254           04106                           TC       GOTOPOOH                              
029766,000204: 
029767,000205: 36,3255  E7,1430                                  EBANK=   WHICH                                 
029768,000206: 36,3255                                           COUNT*   $$/P41                                
029769,000207: 36,3255           33115        P41LM              CAF      P41ADRES                              #  INITIALIZATION FOR BURNBABY
029770,000208: 36,3256           55430                           TS       WHICH                                 
029771,000209: 
029772,000210: 36,3257           04655                           TC       BANKCALL                              
029773,000211: 36,3260           11067                           CADR     R02BOTH                               
029774,000212: 
029775,000213: 36,3261           06014                           TC       INTPRET                               #  BOTH LM
029776,000214: 36,3262           71214                           BON      DLOAD                                 #  IF NJETSFLAG IS SET, LOAD 2 JET F
029777,000215: 36,3263           00700                                    NJETSFLG                              
029778,000216: 36,3264           75270                                    P41FJET1                              
029779,000217: 36,3265           35733                                    FRCS4                                 #  IF NJETSFLAG IS CLEAR, LOAD 4 JET F
029780,000218: 
029781,000219: 36,3266           37723        P41FJET            STCALL   F                                     
029782,000220: 36,3267           75273                                    P41IN                                 
029783,000221: 36,3270           77745        P41FJET1           DLOAD                                          
029784,000222: 
029785,000223: 36,3271           35735                                    FRCS2                                 
029786,000224: 36,3272           03723                           STORE    F                                     
029787,000225: 
029788,000226: 36,3273           77624        P41IN              CALL                                           
029789,000227: 36,3274           56253                                    S40.1                                 #  BOTH
029790,000228: 36,3275           77624        P41NORM            CALL                                           
029791,000229: 36,3276           56416                                    S40.2,3                               #  CALCULATE PREFERRED IMU ORIENTATION AND
029792,000230: 36,3277           77776                           EXIT                                           #  SET PFRATFLG.
029793,000231: 
029794,000232: 36,3300           00004                           INHINT                                         
029795,000233: 36,3301           04737                           TC       IBNKCALL                              
029796,000234: 36,3302           40232                           CADR     ZATTEROR                              #  ZERO ATTITUDE ERRORS
029797,000235: 36,3303           04737                           TC       IBNKCALL                              
029798,000236: 36,3304           40221                           CADR     SETMINDB                              #  SET 0.3 DEGREE DEADBAND
029799,000237: 36,3305           03176                           TC       P40SXT4                               
029800,000238: 
029801,000239: 36,3306           06014                           TC       INTPRET                               
029802,000240: 36,3307           45175                           VLOAD    CALL                                  #  TRANSFORM VELOCITY-TO-BE-GAINED AT TIG
029803,000241: 36,3310           03674                                    VGTIG                                 #  FROM REFERENCE COORDINATES TO LM BODY-
029804,000242: 36,3311           57307                                    S41.1                                 #  AXIS COORDINATES FOR V16N85 DISPLAY.
029805,000243: 36,3312           03773                           STORE    VGBODY                                #  (SCALED AT 2 (+7) METERS/CENTISECOND)
029806,000244: 36,3313           77776                           EXIT                                           
029807,000245: 
029808,000246: 36,3314           33764                           CAF      V16N85B                               
029809,000247: 36,3315           04655                           TC       BANKCALL                              
029810,000248: 36,3316           20361                           CADR     GODSPRET                              
029811,000249: 
029812,000250: 
029813,000251: 36,3317           35067                           CAF      PRIO5                                 
029814,000252: 36,3320           55175                           TS       DISPDEX                               #  FOR SAFETY ONLY
029815,000253: 36,3321           05155                           TC       FINDVAC                               
029816,000254: 36,3322  E7,1673                                  EBANK=   VGPREV                                
029817,000255: 36,3322           03344 74067                     2CADR    DYNMDISP                              
029818,000256: 
029819,000257: 36,3324           05403                           TC       2PHSCHNG                              
029820,000258: 36,3325           00076                           OCT      00076                                 #  GROUP 6 RESTARTS AT REDO6.7
029821,000259: 36,3326           04024                           OCT      04024                                 #  GROUP 4 RESTARTS HERE
029822,000260: 
029823,000261:                                                                                                  #            ***********************
029824,000262: 36,3327           12142                           TCF      B*RNB*B*                              
029825,000263:                                                                                                  #            ***********************
029826,000264: 
029827,000265: 
029828,000266: 36,3330           35047        BLNKWAIT           CAF      1SEC                                  
029829,000267: 36,3331           04655                           TC       BANKCALL                              
029830,000268: 36,3332           01732                           CADR     DELAYJOB                              
029831,000269: 
029832,000270: 36,3333           31175        REDO6.7            CA       DISPDEX                               #  ON A RESTART, DO NOT PUT UP DISPLAY IF
029833,000271: 36,3334           65025                           AD       TWO                                   #  BLANKING (BETWEEN TIG-35 AND TIG-30)
029834,000272: 
029835,000273:                                                                                                  #            ***********************
029836,000274: 
029837,000275: 
029838,000276: 36,3335           00006                           EXTEND                                         
029839,000277: 36,3336           13330                           BZF      BLNKWAIT                              
029840,000278: 
029841,000279: 36,3337           33764                           CAF      V16N85B                               
029842,000280: 36,3340           04655                           TC       BANKCALL                              
029843,000281: 36,3341           20361                           CADR     GODSPRET                              
029844,000282: 
029845,000283: 36,3342           35067                           CAF      PRIO5                                 
029846,000284: 36,3343           05216                           TC       PRIOCHNG                              
029847,000285: 
029848,000286: 36,3344           31175        DYNMDISP           CA       DISPDEX                               #  A NON-POSITIVE DISPDEX INDICATES PAST
029849,000287: 36,3345           00006                           EXTEND                                         #  TIG-35, SO SERVICER WILL BE DOING THE
029850,000288: 36,3346           65225                           BZMF     ENDOFJOB                              #  UPDATING OF NOUN 85. STOP DYNMDISP.
029851,000289: 36,3347           06014                           TC       INTPRET                               
029852,000290: 36,3350           45175                           VLOAD    CALL                                  
029853,000291: 36,3351           03674                                    VGPREV                                
029854,000292: 36,3352           57307                                    S41.1                                 
029855,000293: 36,3353           03773                           STORE    VGBODY                                
029856,000294: 36,3354           77776                           EXIT                                           
029857,000295: 36,3355           35047                           CAF      1SEC                                  
029858,000296: 36,3356           04655                           TC       BANKCALL                              
029859,000297: 36,3357           01732                           CADR     DELAYJOB                              
029860,000298: 36,3360           13344                           TCF      DYNMDISP                              
029861,000299: 
029862,000300: 36,3361           06014        CALCN85            TC       INTPRET                               
029863,000301: 36,3362           77624                           CALL                                           
029864,000302: 36,3363           75607                                    UPDATEVG                              
029865,000303: 36,3364           45175                           VLOAD    CALL                                  
029866,000304: 36,3365           03674                                    VGPREV                                
029867,000305: 36,3366           57307                                    S41.1                                 
029868,000306: 36,3367           03773                           STORE    VGBODY                                
029869,000307: 36,3370           77776                           EXIT                                           
029870,000308: 36,3371           04674                           TC       POSTJUMP                              
029871,000309: 36,3372           66354                           CADR     SERVEXIT                              
029872,000310: 
029873,000311: 36,3373                                           COUNT*   $$/P42                                
029874,000312: 36,3373  E7,1430                                  EBANK=   WHICH                                 
029875,000313: 
029876,000314: 36,3373           33116        P42LM              CAF      P42ADRES                              #  INITIALIZATION FOR BURNBABY.
029877,000315: 36,3374           55430                           TS       WHICH                                 
029878,000316: 
029879,000317: 36,3375           00006                           EXTEND                                         
029880,000318: 36,3376           00030                           READ     CHAN30                                
029881,000319: 36,3377           40000                           COM                                            
029882,000320: 36,3400           75025                           MASK     BIT2                                  
029883,000321: 36,3401           10000                           CCS      A                                     
029884,000322: 36,3402           03714                           TC       P40ALM                                
029885,000323: 36,3403           04655                           TC       BANKCALL                              
029886,000324: 36,3404           11067                           CADR     R02BOTH                               
029887,000325: 36,3405           33760                           CAF      THRESH2                               #  INITIALIZE DVMON
029888,000326: 36,3406           55201                           TS       DVTHRUSH                              
029889,000327: 36,3407           35026                           CAF      ONE                                   
029890,000328: 36,3410           55202                           TS       AUXFLAG                               
029891,000329: 36,3411           35024                           CAF      FOUR                                  
029892,000330: 36,3412           55472                           TS       DVCNTR                                
029893,000331: 
029894,000332: 36,3413           06014                           TC       INTPRET                               
029895,000333: 36,3414           77214                           SET      VLOAD                                 #  LOAD FAPS, MDOTAPS, AND ATDECAY INTO
029896,000334: 36,3415           01072                                    AVFLAG                                #  F, MDOT, AND TDECAY BY VECTOR LOAD.
029897,000335: 36,3416           35737                                    FAPS                                  
029898,000336: 36,3417           37723                           STCALL   F                                     
029899,000337: 36,3420           75164                                    P40IN                                 
029900,000338: 
029901,000339: 36,3421  E7,1430                                  EBANK=   WHICH                                 
029902,000340: 
029903,000341: 36,3421                                           COUNT*   $$/P47                                
029904,000342: 36,3421           04655        P47LM              TC       BANKCALL                              
029905,000343: 36,3422           11067                           CADR     R02BOTH                               
029906,000344: 36,3423           06014                           TC       INTPRET                               
029907,000345: 36,3424           43234                           RTB      DAD                                   
029908,000346: 36,3425           21454                                    LOADTIME                              
029909,000347: 36,3426           35745                                    SEC60DP                               
029910,000348: 36,3427           03425                           STORE    TIG                                   
029911,000349: 36,3430           77776                           EXIT                                           
029912,000350: 
029913,000351: 36,3431           00006                           EXTEND                                         
029914,000352: 36,3432           33745                           DCA      SEC60DP                               
029915,000353: 36,3433           05347                           TC       LONGCALL                              
029916,000354: 36,3434  E7,1430                                  EBANK=   WHICH                                 
029917,000355: 36,3434           03445 74067                     2CADR    STARTP47                              
029918,000356: 
029919,000357: 36,3436           00003                           RELINT                                         
029920,000358: 36,3437           06014                           TC       INTPRET                               
029921,000359: 36,3440           45145                           DLOAD    CALL                                  
029922,000360: 36,3441           03425                                    TIG                                   
029923,000361: 36,3442           64671                                    TIGINT     -1                         
029924,000362: 36,3443           77776                           EXIT                                           
029925,000363: 
029926,000364: 36,3444           15225                           TCF      ENDOFJOB                              
029927,000365: 
029928,000366: 36,3445           05423        STARTP47           TC       PHASCHNG                              
029929,000367: 36,3446           05014                           OCT      05014                                 
029930,000368: 36,3447           77777                           OCT      77777                                 
029931,000369: 
029932,000370: 36,3450           00006                           EXTEND                                         
029933,000371: 36,3451           33767                           DCA      ACADN83                               
029934,000372: 36,3452           53253                           DXCH     AVEGEXIT                              
029935,000373: 36,3453           35011                           CAF      PRIO20                                
029936,000374: 36,3454           05155                           TC       FINDVAC                               
029937,000375: 36,3455  E7,1607                                  EBANK=   DELVIMU                               
029938,000376: 36,3455           03511 74067                     2CADR    P47BODY                               
029939,000377: 36,3457           12372                           TCF      REDO4.2                               #  CHECKS PHASE 5 AND GOES TO PREREAD
029940,000378:                                                                                                  #  SEE TIG-30 IN BURNBABY.
029941,000379: 
029942,000380: 36,3460           06014        CALCN83            TC       INTPRET                               
029943,000381: 36,3461           53375                           VLOAD    VAD                                   
029944,000382: 36,3462           03773                                    DELVCTL                               
029945,000383: 36,3463           03504                                    DELVREF                               
029946,000384: 36,3464           03643                           STORE    DELVSIN                               #  TEMP STORAGE FOR RESTARTS
029947,000385: 
029948,000386: 36,3465           77624                           CALL                                           
029949,000387: 36,3466           57307                                    S41.1                                 
029950,000388: 36,3467           03610                           STORE    DELVIMU                               
029951,000389: 36,3470           77776                           EXIT                                           
029952,000390: 36,3471           05423                           TC       PHASCHNG                              
029953,000391: 36,3472           10035                           OCT      10035                                 #  REREADAC AND HERE
029954,000392: 
029955,000393: 36,3473           06014                           TC       INTPRET                               
029956,000394: 36,3474           77775                           VLOAD                                          
029957,000395: 36,3475           03643                                    DELVSIN                               
029958,000396: 36,3476           03773                           STORE    DELVCTL                               
029959,000397: 36,3477           77776                           EXIT                                           
029960,000398: 
029961,000399: 36,3500           04674                           TC       POSTJUMP                              
029962,000400: 36,3501           66354                           CADR     SERVEXIT                              
029963,000401: 
029964,000402: 36,3502           33765        P47BOD             CAF      V1683                                 
029965,000403: 36,3503           04655                           TC       BANKCALL                              
029966,000404: 36,3504           20544                           CADR     GOFLASHR                              
029967,000405: 36,3505           04106                           TC       GOTOPOOH                              
029968,000406: 36,3506           04106                           TC       GOTOPOOH                              
029969,000407: 
029970,000408: 36,3507           13511                           TCF      P47BODY                               
029971,000409: 
029972,000410: 36,3510           13221                           TCF      P40PHS1                               
029973,000411: 
029974,000412: 36,3511           06014        P47BODY            TC       INTPRET                               
029975,000413: 36,3512           77775                           VLOAD                                          
029976,000414: 36,3513           06233                                    HI6ZEROS                              
029977,000415: 36,3514           03610                           STORE    DELVIMU                               
029978,000416: 36,3515           03773                           STORE    DELVCTL                               
029979,000417: 36,3516           77776                           EXIT                                           
029980,000418: 36,3517           03502                           TC       P47BOD                                
029981,000419: 
029982,000420: 36,3520                                           COUNT*   $$/P40                                
029983,000421: 36,3520           31474        IMPLBURN           CA       TGO        +1                         
029984,000422: 36,3521           05243                           TC       TWIDDLE                               
029985,000423: 36,3522           03537                           ADRES    ENGOFTSK                              
029986,000424: 36,3523           05600                           TC       DOWNFLAG                              #  TURN OFF IGNFLAG
029987,000425: 36,3524           00153                           ADRES    IGNFLAG                               
029988,000426: 36,3525           05600                           TC       DOWNFLAG                              #  TURN OFF ASTNFLG
029989,000427: 36,3526           00154                           ADRES    ASTNFLAG                              
029990,000428: 36,3527           05600                           TC       DOWNFLAG                              #  TURN OFF IMPULSW
029991,000429: 36,3530           00044                           ADRES    IMPULSW                               
029992,000430: 36,3531           05423                           TC       PHASCHNG                              #  RESTART PROTECT ENGOFTSK (ENGINOFF)
029993,000431: 36,3532           40114                           OCT      40114                                 
029994,000432: 
029995,000433: 36,3533           05271                           TC       FIXDELAY                              #  WAIT HALF A SECOND
029996,000434: 36,3534           00062                           DEC      50         B-14                       
029997,000435: 
029998,000436: 36,3535           02643                           TC       NOULLAGE                              #  TURN OFF ULLAGE
029999,000437: 
030000,000438: 36,3536           05331                           TC       TASKOVER                              
030001,000439: 
030002,000440: 36,3537           04737        ENGOFTSK           TC       IBNKCALL                              #  THIS CODING ALLOWS ENGINOFF ET AL TO BE
030003,000441: 36,3540           75542                           CADR     ENGINOFF                              #  USED BOTH BY WAITLIST AND BY TC IBNKCALL
030004,000442: 36,3541           05331                           TC       TASKOVER                              
030005,000443: 
030006,000444: 36,3542           34703        ENGINOFF           CAF      PRIO12                                #  MUST BE LOWER PRIO THAN CLOCKJOB
030007,000445: 36,3543           05155                           TC       FINDVAC                               
030008,000446: 36,3544  E7,1447                                  EBANK=   TRKMKCNT                              
030009,000447: 36,3544           03206 74067                     2CADR    POSTBURN                              
030010,000448: 
030011,000449: 36,3546           40103        ENGINOF1           CS       FLAGWRD7                              #  SET THE IDLE BIT.
030012,000450: 36,3547           75020                           MASK     IDLEFBIT                              
030013,000451: 36,3550           26103                           ADS      FLAGWRD7                              
030014,000452: 
030015,000453: 36,3551           02643                           TC       NOULLAGE                              
030016,000454: 
030017,000455: 36,3552           00006                           EXTEND                                         
030018,000456: 36,3553           30025                           DCA      TIME2                                 
030019,000457: 36,3554           53355                           DXCH     TEVENT                                
030020,000458: 
030021,000459: 36,3555           35026        ENGINOF2           CAF      BIT1                                  
030022,000460: 36,3556           05252                           TC       WAITLIST                              
030023,000461: 36,3557  E6,1420                                  EBANK=   OMEGAQ                                
030024,000462: 36,3557           03604 74066                     2CADR    COASTSET                              
030025,000463: 
030026,000464: 36,3561           44367        ENGINOF3           CS       PRIO30                                #  ENGINOF3 IS USED AS A PRE-ENGINE ARM
030027,000465: 36,3562           00006                           EXTEND                                         #  SUBROUTINE.
030028,000466: 36,3563           02011                           RAND     DSALMOUT                              
030029,000467: 36,3564           65011                           AD       PRIO20                                #  TURN OFF THE ENGINE - DPS OR APS
030030,000468: 36,3565           00006                           EXTEND                                         
030031,000469: 36,3566           01011                           WRITE    DSALMOUT                              
030032,000470: 
030033,000471: 36,3567           45020                           CS       ENGONBIT                              #  INSURE ENGONFLG IS CLEAR.
030034,000472: 36,3570           70101                           MASK     FLAGWRD5                              
030035,000473: 36,3571           54101                           TS       FLAGWRD5                              
030036,000474: 
030037,000475: 36,3572           41102                           CS       DAPBOOLS                              #  TURN OFF TRIM GIMBAL
030038,000476: 36,3573           75011                           MASK     USEQRJTS                              
030039,000477: 36,3574           27102                           ADS      DAPBOOLS                              
030040,000478: 
030041,000479: 36,3575           45012                           CS       HIRTHROT                              #  ZERO AUTO-THROTTLE WHENEVER THE ENGINE
030042,000480: 36,3576           55417                           TS       PIF                                   
030043,000481: 36,3577           54055                           TS       THRUST                                #  IS TURNED OFF.
030044,000482: 36,3600           35023                           CAF      BIT4                                  #  THE HARDWARE DOES SO ONLY WHEN THE
030045,000483: 36,3601           00006                           EXTEND                                         #  ENGINE IS DISARMED.
030046,000484: 36,3602           05014                           WOR      CHAN14                                
030047,000485: 
030048,000486: 36,3603           04752                           TC       ISWRETRN                              
030049,000487: 
030050,000488: 36,3604           04737        COASTSET           TC       IBNKCALL                              #  DO DAP COASTING INITIALIZATION
030051,000489: 36,3605           40263                           CADR     ALLCOAST                              
030052,000490: 36,3606           05331                           TC       TASKOVER                              
030053,000491: 
030054,000492: 36,3607  E6,1420                                  EBANK=   OMEGAQ                                
030055,000493: 36,3607           45020        UPDATEVG           STQ      CALL                                  
030056,000494: 36,3610           03652                                    QTEMP1                                
030057,000495: 36,3611           56440                                    S40.8                                 #  X-PRODUCT STEERING
030058,000496: 36,3612           43014                           BON      BOFSET                                
030059,000497: 36,3613           01307                                    XDELVFLG                              
030060,000498: 36,3614           03652                                    QTEMP1                                
030061,000499: 36,3615           01045                                    CYCLESW                               
030062,000500: 36,3616           03652                                    QTEMP1                                
030063,000501: 36,3617           77776                           EXIT                                           
030064,000502: 
030065,000503: 36,3620           10755                           CCS      PHASE2                                
030066,000504: 36,3621           13634                           TCF      ENDSTEER                              #  GROUP 2 ACTIVE --> LAMBERT STILL GOING.
030067,000505: 
030068,000506: 36,3622           35012                           CAF      PRIO10                                
030069,000507: 36,3623           00004                           INHINT                                         
030070,000508: 36,3624           05155                           TC       FINDVAC                               
030071,000509: 36,3625  E7,1702                                  EBANK=   VG                                    
030072,000510: 36,3625           03071 56067                     2CADR    S40.9                                 #  LAMBERT VTOGAIN
030073,000511: 
030074,000512: 36,3627           05403                           TC       2PHSCHNG                              
030075,000513: 36,3630           00172                           OCT      00172                                 #  2.17SPOT FOR S40.9
030076,000514: 36,3631           10035                           OCT      10035                                 #  HERE AND REREADAC AFTER RESTART
030077,000515: 
030078,000516: 36,3632           05600                           TC       DOWNFLAG                              
030079,000517: 36,3633           00043                           ADRES    CYCLESW                               #  VG CALCULATION OMITTED
030080,000518: 36,3634           06014        ENDSTEER           TC       INTPRET                               
030081,000519: 36,3635           77650                           GOTO                                           
030082,000520: 36,3636           03652                                    QTEMP1                                
030083,000521: 
030084,000522: 36,3637           06014        STEERING           TC       INTPRET                               
030085,000523: 
030086,000524: 36,3640           77624                           CALL                                           
030087,000525: 36,3641           75607                                    UPDATEVG                              
030088,000526: 36,3642           77776                           EXIT                                           
030089,000527: 
030090,000528: 36,3643  E7,1472                                  EBANK=   DVCNTR                                
030091,000529: 36,3643           00004        NSTEER             INHINT                                         
030092,000530: 36,3644           35066                           CA       EBANK7                                
030093,000531: 36,3645           54003                           TS       EBANK                                 
030094,000532:                                                                                                  #  PHASE CHANGE IN SERVERICER NEEDED HERE *********************************
030095,000533: 36,3646           40076                           CS       FLAGWRD2                              #  CHECK IMPULSE SWITCH.  IT IS SET EITHER
030096,000534: 36,3647           75016                           MASK     IMPULBIT                              #  BY S40.13 IF TBURN<6 SECS OR BY S40.8 IF
030097,000535: 36,3650           10000                           CCS      A                                     #  STEERING IS ALMOST DONE.
030098,000536: 
030099,000537: 36,3651           13656                           TCF      +5                                    #  IMPULSW = 0    EXIT
030100,000538: 
030101,000539: 36,3652           40103                           CS       FLAGWRD7                              #  IMPULSW = 1    WHY?  CHECK IDLEFLAG
030102,000540: 36,3653           75020                           MASK     IDLEFBIT                              #      (IDLEFLAG = 0 --> DVMON ON)
030103,000541: 36,3654           10000                           CCS      A                                     
030104,000542: 36,3655           13660                           TCF      +3                                    #  DVMON ON-->THRUSTING-->IMPULSW VIA S40.8
030105,000543: 36,3656           04674                           TC       POSTJUMP                              #  DVMON OFF-->IMPULSW ON VIA S40.13-->EXIT
030106,000544: 36,3657           66354                           CADR     SERVEXIT                              
030107,000545: 
030108,000546: 36,3660           05600                           TC       DOWNFLAG                              #  TURN OFF IMPULSW
030109,000547: 36,3661           00044                           ADRES    IMPULSW                               
030110,000548: 
030111,000549: 36,3662           05566                           TC       UPFLAG                                
030112,000550: 36,3663           00161                           ADRES    IDLEFLAG                              #  TURN OFF DVMON
030113,000551: 
030114,000552: 36,3664           00004                           INHINT                                         
030115,000553: 36,3665           00006                           EXTEND                                         
030116,000554: 36,3666           31425                           DCA      TIG                                   
030117,000555: 36,3667           52155                           DXCH     MPAC                                  
030118,000556: 36,3670           00006                           EXTEND                                         
030119,000557: 36,3671           40025                           DCS      TIME2                                 
030120,000558: 36,3672           20155                           DAS      MPAC                                  
030121,000559: 36,3673           07231                           TC       TPAGREE                               
030122,000560: 36,3674           30155                           CAE      MPAC       +1                         
030123,000561: 36,3675           10000                           CCS      A                                     
030124,000562: 36,3676           13701                           TCF      +3                                    
030125,000563: 36,3677           13701                           TCF      +2                                    
030126,000564: 36,3700           35030                           CAF      ZERO                                  
030127,000565: 36,3701           65026                           AD       ONE                                   
030128,000566: 36,3702           56001                           XCH      L                                     
030129,000567: 36,3703           35030                           CAF      ZERO                                  
030130,000568: 36,3704           53474                           DXCH     TGO                                   
030131,000569: 36,3705           31474                           CA       TGO        +1                         
030132,000570: 36,3706           05243                           TC       TWIDDLE                               
030133,000571: 36,3707           03537                           ADRES    ENGOFTSK                              
030134,000572: 36,3710           05403                           TC       2PHSCHNG                              
030135,000573: 36,3711           40114                           OCT      40114                                 #  ENGOFTSK (ENGINOFF)
030136,000574: 36,3712           00035                           OCT      00035                                 #  SERVICER--REREADAC
030137,000575: 
030138,000576: 36,3713           15225                           TCF      ENDOFJOB                              
030139,000577: 
030140,000578: 36,3714           05651        P40ALM             TC       ALARM                                 #  ASTRONAUT DOESN'T AGREE WITH STAGE
030141,000579: 36,3715           01706                           OCT      01706                                 #  VERIFY DISCRETE.  HE HAS SELECTED P40,
030142,000580: 36,3716           35056                           CAF      V05N09                                #  BUT THE DAP THINKS THAT THE DESCENT UNIT
030143,000581: 36,3717           04655                           TC       BANKCALL                              #  IS GONE--A SITUATION THAT WOULD MAKE A
030144,000582: 36,3720           20406                           CADR     GOFLASH                               #  DPS BURN EXCEEDINGLY DIFFICULT.
030145,000583: 
030146,000584: 36,3721           14106                           TCF      GOTOPOOH                              #  V34E  TERMINATE
030147,000585: 36,3722           13716                           TCF      -4                                    #  V33E  PROCEED  (ILLEGAL)
030148,000586: 36,3723           13716                           TCF      -5                                    #        RECYCLE  (ILLEGAL)
030149,000587: 
030150,000588:                                                                                                  #  ************************************************************************
030151,000589: 
030152,000590: 36,3724           01050 33423  FDPS               2DEC     4.319223   B-7                        #  9710.0 LBS FORCE IN NEWTONS
030153,000591: 36,3726           00022 07742  MDOTDPS            2DEC     0.00891025 B-3                        #  32.62 LBS/SEC IN KGS/CS.
030154,000592: 36,3730           77777 77731  DTDECAY            2DEC     -38        B-28                       
030155,000593: 
030156,000594: 36,3732           00026 30630  FRCS4              2DEC     0.177929   B-7                        #  400 LBS FORCE IN NEWTONS
030157,000595: 36,3734           00013 14314  FRCS2              2DEC     0.0889645  B-7                        #  200 LBS FORCE IN NEWTONS
030158,000596: 
030159,000597: 36,3736           00307 10516  FAPS               2DEC     1.5568     B-7                        #  3500 LBS FORCE IN NEWTONS
030160,000598: 36,3740           00151 07074  MDOTAPS            2DEC     0.05137812 B-3                        #  11.32 LBS/SEC IN KGS/CS
030161,000599: 36,3742           77777 77765  ATDECAY            2DEC     -10        B-28                       
030162,000600: 
030163,000601: 36,3744           00000        SEC60DP            OCT      00000                                 #  DON'T SEPARATE
030164,000602: 36,3745           13560        SEC60              DEC      6000       B-14                       #  DON'T SEPARATE
030165,000603: 36,3746           00000        SEC15DP            OCT      00000                                 #  DON'T SEPARATE
030166,000604: 36,3747           02734        SEC15              DEC      1500       B-14                       #  DON'T SEPARATE
030167,000605: 36,3750           00000 05670  SEC30DP            2DEC     3000       B-28                       
030168,000606: 36,3752           00000        SEC45DP            OCT      00000                                 #  DON'T MOVE FROM JUST BEFORE SEC45
030169,000607: 36,3753           10624        SEC45              DEC      4500       B-14                       
030170,000608: 36,3754           00000        5SECDP             OCT      00000                                 #  DON'T MOVE FROM JUST BEFORE 5SEC
030171,000609: 36,3755           00764        5SEC               DEC      500        B-14                       
030172,000610: 36,3756           05050        26SECS             DEC      2600       B-14                       
030173,000611: 36,3757           00030        THRESH1            DEC      24         B-14                       
030174,000612: 36,3760           00464        THRESH2            DEC      308        B-14                       
030175,000613: 36,3761           00014        THRESH3            DEC      12         B-14                       
030176,000614: 36,3762     5012               HIRTHROT           =        BIT13                                 
030177,000615: 36,3762           00203        P40A/PMD           OCT      00203                                 
030178,000616: 36,3763           04050        V16N40             VN       1640                                  
030179,000617: 36,3764           04125        V16N85B            VN       1685                                  
030180,000618: 36,3765           04123        V1683              VN       1683                                  
030181,000619: 36,3766     5047               SEC01              =        1SEC                                  
030182,000620: 36,3766  36,2037               ACADN85            =        P41TABLE   +2                         
030183,000621: 
030184,000622: 36,3766  E7,1607                                  EBANK=   DELVIMU                               
030185,000623: 36,3766           03460 74067  ACADN83            2CADR    CALCN83                               
030186,000624: 
030187,000625: 
030188,000626:                                                                                                  #  *************************************************
030189,000627: 
030190,000628:                                                                                                  #  PROGRAM DESCRIPTION S40.1       DATE15NOV66
030191,000629:                                                                                                  #  MOD N02         LOG SECTION  P40-P47
030192,000630:                                                                                                  #  MOD BY ZELDIN AND ADAPTED BY TALAYCO
030193,000631:                                                                                                  #  FUNCTIONAL DESCRIPTION
030194,000632:                                                                                                  #           COMPUTE INITIAL THRUST DIRECTION(UT) AND INITIAL VALUE OF VG
030195,000633:                                                                                                  #           VECTOR(VGTIG).
030196,000634:                                                                                                  #  CALLING SEQUENCE
030197,000635:                                                                                                  #         L CALL
030198,000636:                                                                                                  #       L+1        S40.1
030199,000637:                                                                                                  #  NORMAL EXIT MODE
030200,000638:                                                                                                  #           AT L+2 OF CALLING SEQUENCE (GOTO L+2)  NORMAL RETURN OR
030201,000639:                                                                                                  #           ERROR RETURN IF NOSOFLAG =1
030202,000640:                                                                                                  #  SUBROUTINES CALLED
030203,000641:                                                                                                  #           LEMPREC
030204,000642:                                                                                                  #           INITVEL
030205,000643:                                                                                                  #           CALCGRAV
030206,000644:                                                                                                  #           MIDGIM
030207,000645:                                                                                                  #  ALARM OR ABORT EXIT MODES
030208,000646:                                                                                                  #       L+2 OF CALLING SEQUENCE,UNSOLVABLE CONIC IF NOSOFLAG=1
030209,000647:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
030210,000648:                                                                                                  #                  WEIGHT/G  ANTICIPATED VEHICLE MASS         DP  B16KGM
030211,000649:                                                                                                  #           XDELVFLG       1=DELTA-V MANEUVER,0=AIMPT STEER
030212,000650:                                                                                                  #            F         THRUST FOR ENGINE USED
030213,000651:                                                                                                  #        IF DELTA-V MANEUVER
030214,000652:                                                                                                  #           DELVSIN   SPECIFIED DELTA-V REQUIRED IN
030215,000653:                                                                                                  #                     INERTIAL COORDS. OF ACTIVE VEHICLE
030216,000654:                                                                                                  #                     AT TIME OF IGNITION                 VECTOR B7M/CS
030217,000655:                                                                                                  #           DELVSAB   MAG. OF DELVSIN                     DP     B7M/CS
030218,000656:                                                                                                  #           RTIG      POSITION AT TIME OF IGNITION       VECTOR B29M
030219,000657:                                                                                                  #           VTIG      VELOCITY AT TIME OF IGNITION       VECTOR B7M/CS
030220,000658:                                                                                                  #        IF AIMPT STEER
030221,000659:                                                                                                  #           TIG       TIME OF IGNITION                    DP     B28CS
030222,000660:                                                                                                  #           RTARG     POSITION TARGET TIME               VECTOR B29M
030223,000661:                                                                                                  #           CSTEER    C FOR STEER LAW                     DP     B2
030224,000662:                                                                                                  #           DLTARG    TARGET TIME-IGNITION TIME          DP     B28CS
030225,000663:                                                                                                  #  OUTPUT
030226,000664:                                                                                                  #        UT           DESIRED THRUST DIRECTION            VECT. B2M/(CS.CS)
030227,000665:                                                                                                  #        VGTIG        INITIAL VALUE OF VELOCITY
030228,000666:                                                                                                  #                     TO BE GAINED (INERT. COORD.)        VECTOR B7M/CS
030229,000667:                                                                                                  #        DELVLVC      VGTIG IN LOC. VERT. COORDS.                B7M/CS
030230,000668:                                                                                                  #           BDT   V REQUIRED AT TIG -V REQUIRED AT (TIG-2SEC)
030231,000669:                                                                                                  #           -GDT  FOR S40.13                                   VECT  B7M/CS
030232,000670:                                                                                                  #        RTIG         CALC IN S40.1B(AIMPT) FOR S40.2,3  VECTOR B29M
030233,000671:                                                                                                  #                     POSITION AT TIME OF IGNITION
030234,000672:                                                                                                  #  DEBRIS      QTEMP1
030235,000673:                                                                                                  #        MPAC,QPRET
030236,000674:                                                                                                  #        PUSHLIST
030237,000675: 
030238,000676: 14,2000                                           BANK     14                                    
030239,000677: 27,2000                                           SETLOC   P40S1                                 
030240,000678: 27,2000                                           BANK                                           
030241,000679: 
030242,000680: 27,2253                                           COUNT*   $$/S40.1                              
030243,000681: 27,2253           44014        S40.1              CLEAR    STQ                                   
030244,000682: 27,2254           03264                                    FIRSTFLG                              
030245,000683: 27,2255           03617                                    QTEMP                                 
030246,000684: 27,2256           77614        DELVTEST           BOFF                                           
030247,000685: 27,2257           01347                                    XDELVFLG                              
030248,000686: 27,2260           56345                                    S40.1B                                
030249,000687: 27,2261           77201        CALCTHET           SETPD    VLOAD                                 
030250,000688: 27,2262           00001                                    0                                     
030251,000689: 27,2263           03635                                    VTIG                                  
030252,000690: 27,2264           02347                           STORE    VINIT                                 
030253,000691: 27,2265           53435                           VXV      UNIT                                  
030254,000692: 27,2266           03627                                    RTIG                                  
030255,000693: 27,2267           27666                           STOVL    UT                                    #  UP IN UT
030256,000694: 27,2270           03627                                    RTIG                                  
030257,000695: 27,2271           02341                           STORE    RINIT                                 
030258,000696: 27,2272           65236                           VSQ      PDDL                                  
030259,000697: 27,2273           00045                                    36D                                   
030260,000698: 27,2274           56205                           DMP      DDV                                   
030261,000699: 27,2275           16415                                    THETACON                              
030262,000700: 27,2276           41205                           DMP      DMP                                   
030263,000701: 27,2277           03651                                    DELVSAB                               
030264,000702: 27,2300           01244                                    WEIGHT/G                              
030265,000703: 27,2301           77671                           DDV                                            
030266,000704: 27,2302           03723                                    F                                     
030267,000705: 27,2303           24017                           STOVL    14D                                   
030268,000706: 27,2304           03643                                    DELVSIN                               
030269,000707: 
030270,000708: 27,2305           74241                           DOT      VXSC                                  
030271,000709: 27,2306           03666                                    UT                                    
030272,000710: 27,2307           03666                                    UT                                    
030273,000711: 27,2310           41552                           VSL2     PUSH                                  #  (DELTAV.UP)UP SCALED AT 2(+7) P.D.L. 0
030274,000712: 27,2311           65245                           BVSU     PDDL                                  #  DELTA VP SCALED AT 2(+7) P.D.L. 6
030275,000713: 27,2312           03643                                    DELVSIN                               
030276,000714: 27,2313           00017                                    14D                                   
030277,000715: 27,2314           63356                           SIN      PDVL                                  
030278,000716: 27,2315           00007                                    6D                                    
030279,000717: 27,2316           53435                           VXV      UNIT                                  
030280,000718: 27,2317           03666                                    UT                                    
030281,000719: 27,2320           45561                           VXSC     STADR                                 
030282,000720: 27,2321           50103                           STOVL    VGTIG                                 #  UNIT(VPXUP)SIN(THETAT/2) IN VGTIG.
030283,000721: 27,2322           65256                           UNIT     PDDL                                  #  UNIT(DELTA VP) IN P.D.L. 6
030284,000722: 27,2323           00017                                    14D                                   
030285,000723: 27,2324           74346                           COS      VXSC                                  
030286,000724: 27,2325           74255                           VAD      VXSC                                  
030287,000725: 27,2326           03674                                    VGTIG                                 
030288,000726: 27,2327           00045                                    36D                                   
030289,000727: 27,2330           53352                           VSL2     VAD                                   
030290,000728: 27,2331           77626                           STADR                                          
030291,000729: 27,2332           74103                           STORE    VGTIG                                 #  VG IGNITION SCALED AT 2(+7) M/CS
030292,000730: 
030293,000731: 27,2333           77656                           UNIT                                           
030294,000732: 27,2334           27666                           STOVL    UT                                    #  THRUST DIRECTION SCALED AT 2(+1)
030295,000733: 27,2335           03674                                    VGTIG                                 
030296,000734: 27,2336           45006                           PUSH     CALL                                  
030297,000735: 27,2337           20025                                    GET.LVC                               #  VGTIG IN LV COOR AT 2(+7) M/CS IN DELVLVC
030298,000736: 27,2340           77775                           VLOAD                                          
030299,000737: 27,2341           06233                                    ZEROVECS                              
030300,000738: 27,2342           03660                           STORE    BDT                                   
030301,000739: 27,2343           77650                           GOTO                                           
030302,000740: 27,2344           03617                                    QTEMP                                 
030303,000741: 27,2345           77745        S40.1B             DLOAD                                          
030304,000742: 27,2346           03425                                    TIG                                   
030305,000743: 27,2347           00041                           STORE    TDEC1                                 
030306,000744: 27,2350           77621                           BDSU                                           
030307,000745: 27,2351           03616                                    TPASS4                                
030308,000746: 27,2352           36355                           STCALL   DELLT4                                #  INTERCEPT TIME - TIG.
030309,000747: 27,2353           27030                                    LEMPREC                               
030310,000748: 27,2354           40375                           VLOAD    SETPD                                 #  LOAD STATE VECTOR AT TIG FOR INITVEL.
030311,000749: 27,2355           00001                                    RATT                                  
030312,000750: 27,2356           00001                                    0                                     
030313,000751: 27,2357           03627                           STORE    RTIG                                  
030314,000752: 27,2360           26341                           STOVL    RINIT                                 
030315,000753: 27,2361           00007                                    VATT                                  
030316,000754: 27,2362           02347                           STORE    VINIT                                 
030317,000755: 27,2363           65345                           DLOAD    PDDL                                  #  NUMIT = 0
030318,000756: 27,2364           06233                                    ZEROVECS                              
030319,000757: 27,2365           16411                                    EPS1                                  
030320,000758: 27,2366           43214                           BOFF     DAD                                   
030321,000759: 27,2367           03745                                    NORMSW                                
030322,000760: 27,2370           56372                                    SMALLEPS                              
030323,000761: 27,2371           16413                                    EPS2                                  #  EPSILON4 = 10 DEGREES OR 45 DEGREES.
030324,000762: 27,2372           74006        SMALLEPS           PUSH     AXC,1                                 
030325,000763: 27,2373           00002                                    2                                     
030326,000764: 27,2374           77624                           CALL                                           
030327,000765: 27,2375           22022                                    INITVEL                               
030328,000766: 27,2376           41575                           VLOAD    PUSH                                  
030329,000767: 27,2377           03363                                    DELVEET3                              #  VGTIG = VR - VN.
030330,000768: 27,2400           03674                           STORE    VGTIG                                 
030331,000769: 27,2401           77656                           UNIT                                           #  UT = UNIT (VGTIG)
030332,000770: 27,2402           17666                           STODL    UT                                    
030333,000771: 27,2403           00045                                    36D                                   
030334,000772: 27,2404           37651                           STCALL   VGDISP                                #  CONVERT VGTIG (IN PUSHLIST ) TO LOCAL
030335,000773: 27,2405           20025                                    GET.LVC                               #  VERTICAL COORDINATES.
030336,000774: 27,2406           77650                           GOTO                                           
030337,000775: 27,2407           03617                                    QTEMP                                 
030338,000776: 
030339,000777: 27,2410           00707 03434  EPS1               2DEC*    2.777777778 E-2*                       #  10 DEGREES AT 1 REVOLUTION.
030340,000778: 
030341,000779: 27,2412           03070 34344  EPS2               2DEC*    9.722222222 E-2*                       #  35 DEGREES AT 1 REVOLUTION.
030342,000780: 27,2414           00024 13714  THETACON           2DEC     .31830989  B-8                        
030343,000781: 
030344,000782:                                                                                                  #  SUBROUTINE NAME: S40.2,3        MOD. NO. 3 DATE: APRIL 4, 1967
030345,000783: 
030346,000784:                                                                                                  #  MODIFICATION BY: JONATHAN D. ADDELSTON (ADAMS ASSOCIATES)
030347,000785: 
030348,000786:                                                                                                  #  MOD. NO. 4:  JULY 18, 1967:  PETER ADLER (MIT/IL)
030349,000787: 
030350,000788:                                                                                                  #  MOD. NO. 5:  OCTOBER 18, 1967:  PETER ADLER (MIT/IL)
030351,000789: 
030352,000790:                                                                                                  #  ORIGINALLY BY: SAYDEAN ZELDIN (MIT INSTRUMENTATION LAB) AND RICHARD TALAYCO (SYSTEM DEVELOPMENT CORP)
030353,000791: 
030354,000792:                                                                                                  #  S40.2,3 COMPUTES "POINTVSM" WHICH IS THE HALF-UNIT DESIRED THRUST VECTOR IN STABLE-MEMBER COORDINATES FROM "UT"
030355,000793:                                                                                                  #  WHICH IS THE SAME VECTOR IN REFERENCE COORDINATES.  IT DETERMINES THE CORRECT VALUES FOR "SCAXIS" USING THE +X
030356,000794:                                                                                                  #  AXIS FOR DPS, APS, AND RCS BURNS.  THE "WINGS-LEVEL HEADS-UP" LM ORIENTATION IS THEN COMPUTED IN REFERENCE
030357,000795:                                                                                                  #  COORDINATES.  THESE VECTORS ALSO DEFINE THE "PREFERRED IMU ORIENTATION".  UPON COMPLETION OF THIS CALCULATION,
030358,000796:                                                                                                  #  THE "PREFERRED ATTITUDE COMPUTED" FLAG IS SET (PFRATFLG).
030359,000797: 
030360,000798: 
030361,000799:                                                                                                  #  CALLING SEQUENCE:
030362,000800:                                                                                                  #                                          L        CALL                   INTERPRETIVE CALL.
030363,000801:                                                                                                  #                                          L +1            S40.2,3
030364,000802:                                                                                                  #                                          L +2    (RETURN)                GIMBAL ANGLE VECTOR IN MPAC.
030365,000803: 
030366,000804:                                                                                                  #  SUBROUTINES CALLED:  NONE.
030367,000805: 
030368,000806:                                                                                                  #  NORMAL RETURN:  L +2 (SEE CALLING SEQUENCE ABOVE).
030369,000807: 
030370,000808:                                                                                                  #  ALARM/ABORT MODES:  NONE.
030371,000809: 
030372,000810:                                                                                                  #  INPUT:
030373,000811: 
030374,000812:                                                                                                  #           1. REFSMMAT            MATRIX FROM REFERENCE TO STABLE-MEMBER COORDINATES SCALED AT 2.
030375,000813:                                                                                                  #           2. UT                  HALF-UNIT DESIRED THRUST DIRECTION.
030376,000814:                                                                                                  #           3. RTIG                POSITION AT TIG IN REFERENCE COORDINATES.
030377,000815: 
030378,000816:                                                                                                  #  OUTPUT:
030379,000817: 
030380,000818:                                                                                                  #           1. : XSCREF :          WINGS-LEVEL HEADS-UP LM ORIENTATION
030381,000819:                                                                                                  #              : YSCREF :          IN REFERENCE COORDINATES
030382,000820:                                                                                                  #              : ZSCREF :          (PREFERRED IMU ORIENTATION).
030383,000821:                                                                                                  #           2. POINTVSM            DESIRED THRUST DIRECTION IN STABLE-MEMBER COORDINATES.
030384,000822:                                                                                                  #           3. SCAXIS              HALF-UNIT OF AXIS TO ALIGN IN STABLE-MEMBER COORDINATES.
030385,000823:                                                                                                  #           4. PFRATFLG            INTERPRETIVE FLAG.  ON:  PREFERRED ORIENTATION COMPUTED; OFF:  NOT COMPUTED.
030386,000824: 
030387,000825:                                                                                                  #  DEBRIS:  NONE.
030388,000826: 
030389,000827: 
030390,000828: 27,2416                                           COUNT*   $$/S40.2                              
030391,000829: 27,2416           77775        S40.2,3            VLOAD                                          #  UT: DESIRED THRUST DIRECTION (HALF-UNIT)
030392,000830: 27,2417           03666                                    UT                                    #  (PUT INTO TOP OF PUSH-DOWN-LIST.)
030393,000831: 27,2420           76521                           MXV      VSL1                                  #  TRANSFORM THRUST DIRECTION TO STABLE-
030394,000832: 27,2421           01736                                    REFSMMAT                              #  MEMBER FROM REFERENCE COORDS (RESCALE).
030395,000833: 27,2422           25256                           STOVL    POINTVSM                              #  SAVE FOR "VECPOINT" ROUTINE (LEMMANU).
030396,000834: 27,2423           06231                                    UNITX                                 #  SCAXIS SET TO +X, FOR P40 AND P42 AND
030397,000835: 27,2424           25250                           STOVL    SCAXIS                                #  FOR P41 IF RCS NOT -X,+Y,-Y,+Z,-Z.
030398,000836: 
030399,000837: 27,2425           03666                                    UT                                    #  ASSUME +X BURN ALWAYS, EVEN FOR RCS.
030400,000838: 27,2426           03574        PLUSX              STORE    XSCREF                                #  XSCREF = UT (DESIRED THRUST DIRECTION.)
030401,000839: 27,2427           53435                           VXV      UNIT                                  #  RTIG = POSITION AT TIME-OF-IGNITION.
030402,000840: 27,2430           03627                                    RTIG                                  #  YSCREF = UNIT(UT X RTIG)
030403,000841: 27,2431           03602                           STORE    YSCREF                                
030404,000842: 27,2432           76435                           VXV      VSL1                                  #  COMPUTE (YSCREF X XSCREF),BUT FOR A
030405,000843: 27,2433           03574                                    XSCREF                                #  RIGHT HANDED SYSTEM, NEED (X CROSS Y).
030406,000844: 27,2434           77676                           VCOMP                                          #  ZSCREF = - (YSCREF X XSCREF)
030407,000845: 27,2435           03610                           STORE    ZSCREF                                #         = + (XSCREF X YSCREF)
030408,000846: 
030409,000847: 27,2436           43414                           SET      RVQ                                   
030410,000848: 27,2437           01073                                    PFRATFLG                              
030411,000849: 
030412,000850:                                                                                                  #  SUBROUTINE S40.8
030413,000851: 
030414,000852:                                                                                                  #  MODIFIED APRIL 3, 1968  BY  PETER ADLER    MIT/IL
030415,000853: 
030416,000854:                                                                                                  #  DESCRIPTION
030417,000855: 
030418,000856:                                                                                                  #       S40.8 UPDATES THE VELOCITY-TO-BE-GAINED VECTOR, VG, (AND FOR LAMBERT TARGETTED BURNS ALSO EXTRAPOLATES VG
030419,000857:                                                                                                  #  USING THE BDT VECTOR)  COMPUTES THE TIME FOR ISSUING THE ENGINE OFF COMMAND, TGO, AND CALLS THE ROUTINE
030420,000858:                                                                                                  #  "FINDCDUW", WHICH GENERATES STEERING COMMANDS FOR THE DAP.
030421,000859: 
030422,000860:                                                                                                  #  CALLING SEQUENCE
030423,000861: 
030424,000862:                                                                                                  #  L-1      CALL
030425,000863:                                                                                                  #  L               S40.8
030426,000864:                                                                                                  #  L+1                      INTERPRETIVE RETURN
030427,000865: 
030428,000866:                                                                                                  #  ALARM
030429,000867: 
030430,000868:                                                                                                  #       IF VG . DELVREF IS NEGATIVE (VG AND DELVREF OVER 90 DEGREES APART), BYPASS TGO AND STEERING COMPUTATIONS
030431,000869:                                                                                                  #  AND SET ALARM 1407.  RETURN TO CALLER NORMALLY.
030432,000870: 
030433,000871:                                                                                                  #  INPUT AND INITIALIZATION
030434,000872: 
030435,000873:                                                                                                  #  VGPREV          REFERENCE       2(7) M/CS
030436,000874:                                                                                                  #  DELVREF         REFERENCE       2(7) M/CS
030437,000875:                                                                                                  #  BDT             REFERENCE       2(7) M/CS
030438,000876:                                                                                                  #  TDECAY          TAIL-OFF TIME   2(28)  CS
030439,000877:                                                                                                  #  XDELVFLG        1 = EXTERNAL DELTA-V;  0 = LAMBERT (AIMPOINT)
030440,000878:                                                                                                  #  STEERSW         1 = DO STEERING AND TGO COMPUTATIONS; 0 = VG UPDATE ONLY
030441,000879:                                                                                                  #  FIRSTFLG        1 = GONE TO LAMBERT AT LEAST ONCE;  0 = HAVEN'T GONE TO LAMBERT YET
030442,000880: 
030443,000881:                                                                                                  #  NOTE:  VGTIG EQUALS VGPREV
030444,000882: 
030445,000883:                                                                                                  #  OUTPUT
030446,000884: 
030447,000885:                                                                                                  #  STEERSW         SEE INPUT
030448,000886:                                                                                                  #  IMPULSW         1 = ENGINE OFF IN TGO CENTISECONDS;  0 = CONTINUE BURN
030449,000887:                                                                                                  #  TGO             TIME TO CUT-OFF 2(28)   CS
030450,000888:                                                                                                  #  SEE FINDCDUW FOR STEERING OUTPUTS.
030451,000889: 
030452,000890:                                                                                                  #  SUBROUTINE CALLED
030453,000891: 
030454,000892:                                                                                                  #       FINDCDUW
030455,000893: 
030456,000894:                                                                                                  #  DEBRIS
030457,000895: 
030458,000896:                                                                                                  #       MPACS, PUSHLIST
030459,000897: 
030460,000898: 27,2440                                           COUNT*   $$/S40.8                              
030461,000899: 
030462,000900: 27,2440  E6,1420                                  EBANK=   OMEGAQ                                
030463,000901: 27,2440           43175        S40.8              VLOAD    BON                                   
030464,000902: 27,2441           03674                                    VGPREV                                
030465,000903: 27,2442           01307                                    XDELVFLG                              
030466,000904: 27,2443           56450                                    VGNEW                                 
030467,000905: 27,2444           53214                           BOFF     VAD                                   
030468,000906: 27,2445           03344                                    FIRSTFLG                              
030469,000907: 27,2446           56450                                    VGNEW                                 
030470,000908: 27,2447           03660                                    BDT                                   
030471,000909: 27,2450           77651        VGNEW              VSU                                            
030472,000910: 27,2451           03504                                    DELVREF                               
030473,000911: 27,2452           03703        VGAIN*             STORE    VG                                    #  VELOCITY TO BE GAINED SCALED AT (7)M/CS
030474,000912: 27,2453           76521                           MXV      VSL1                                  
030475,000913: 27,2454           01736                                    REFSMMAT                              
030476,000914: 27,2455           77656                           UNIT                                           
030477,000915: 27,2456           03764                           STORE    UDSTEER                               
030478,000916: 27,2457           77214                           BON      VLOAD                                 
030479,000917: 27,2460           03304                                    FIRSTFLG                              
030480,000918: 27,2461           56464                                    BDTOK                                 
030481,000919: 27,2462           06233                                    HI6ZEROS                              
030482,000920: 27,2463           03660                           STORE    BDT                                   
030483,000921: 27,2464           77745        BDTOK              DLOAD                                          
030484,000922: 27,2465           00045                                    36D                                   
030485,000923: 27,2466           03651                           STORE    VGDISP                                
030486,000924: 27,2467           44001        TGOCALC            SETPD    STQ                                   
030487,000925: 27,2470           00001                                    0                                     
030488,000926: 27,2471           03771                                    S40EXIT                               
030489,000927: 27,2472           77775                           VLOAD                                          
030490,000928: 27,2473           03703                                    VG                                    
030491,000929: 27,2474           27674                           STOVL    VGPREV                                
030492,000930: 27,2475           03504                                    DELVREF                               
030493,000931: 27,2476           57414                           BOFF     VCOMP                                 
030494,000932: 27,2477           01344                                    STEERSW                               
030495,000933: 27,2500           03771                                    S40EXIT                               
030496,000934: 27,2501           77656                           UNIT                                           
030497,000935: 27,2502           41441                           DOT      PUSH                                  
030498,000936: 27,2503           03703                                    VG                                    
030499,000937: 27,2504           56244                           BPL      DDV                                   
030500,000938: 27,2505           56627                                    ALARMIT                               #  DELV IS MORE THAN 90 DEGREES FROM VG.
030501,000939: 27,2506           16646                                    2VEXHUST                              
030502,000940: 27,2507           41215                           DAD      DMP                                   
030503,000941: 27,2510           06231                                    DPHALF                                
030504,000942: 27,2511           56261                           SR       DDV                                   
030505,000943: 27,2512           20613                                    10D                                   
030506,000944: 27,2513           00045                                    36D                                   
030507,000945: 27,2514           43205                           DMP      DAD                                   
030508,000946: 27,2515           16644                                    -FOURDT                               
030509,000947: 27,2516           03727                                    TDECAY                                
030510,000948: 27,2517           03474                           STORE    TGO                                   
030511,000949: 27,2520           77615                           DAD                                            
030512,000950: 27,2521           01234                                    PIPTIME                               
030513,000951: 27,2522           17425                           STODL    TIG                                   
030514,000952: 27,2523           03474                                    TGO                                   
030515,000953: 
030516,000954: 27,2524           51025                           DSU      BPL                                   
030517,000955: 27,2525           16650                                    FOURSECS                              #  400 CS
030518,000956: 27,2526           56533                                    FINDCDUD                              
030519,000957: 27,2527           43014                           SET      CLRGO                                 
030520,000958: 27,2530           01066                                    IMPULSW                               
030521,000959: 27,2531           01224                                    STEERSW                               
030522,000960: 27,2532           03771                                    S40EXIT                               
030523,000961: 
030524,000962: 27,2533           44001        FINDCDUD           SETPD    STQ                                   
030525,000963: 27,2534           00001                                    0                                     
030526,000964: 27,2535           03771                                    S40EXIT                               
030527,000965: 27,2536           77634                           RTB                                            
030528,000966: 27,2537           66536                                    TMPTOSPT                              
030529,000967: 27,2540           45175                           VLOAD    CALL                                  
030530,000968: 27,2541           03764                                    UDSTEER                               
030531,000969: 27,2542           47457                                    TRG*SMNB                              
030532,000970: 27,2543           03764                           STORE    UDSTEER                               
030533,000971: 27,2544           77775                           VLOAD                                          
030534,000972: 27,2545           01212                                    DELV                                  
030535,000973: 27,2546           45056                           UNIT     CALL                                  
030536,000974: 27,2547           47477                                    *SMNB*                                
030537,000975: 27,2550           64451                           VSU      VSR3                                  
030538,000976: 27,2551           03461                                    UASTEER                               
030539,000977: 27,2552           53455                           VAD      UNIT                                  
030540,000978: 27,2553           03461                                    UASTEER                               
030541,000979: 27,2554           03461                           STORE    UASTEER                               
030542,000980: 27,2555           47375                           VLOAD    VXV                                   
030543,000981: 27,2556           03461                                    UASTEER                               
030544,000982: 27,2557           03764                                    UDSTEER                               
030545,000983: 27,2560           00013                           STORE    10D                                   
030546,000984: 27,2561           41446                           ABVAL    PUSH                                  
030547,000985: 27,2562           50025                           DSU      BMN                                   
030548,000986: 27,2563           16654                                    SIN20DEG                              
030549,000987: 27,2564           56576                                    SCALPROD                              
030550,000988: 27,2565           77745                           DLOAD                                          
030551,000989: 27,2566           51025                           DSU      BPL                                   
030552,000990: 27,2567           16652                                    SIN45DEG                              
030553,000991: 27,2570           56627                                    ALARMIT                               
030554,000992: 27,2571           53575                           VLOAD    UNIT                                  
030555,000993: 27,2572           00013                                    10D                                   
030556,000994: 27,2573           76561                           VXSC     VSL1                                  
030557,000995: 27,2574           16654                                    SIN20DEG                              
030558,000996: 27,2575           00013                           STORE    10D                                   
030559,000997: 
030560,000998: 27,2576           74375        SCALPROD           VLOAD    VXSC                                  
030561,000999: 27,2577           00013                                    10D                                   
030562,001000: 27,2600           16640                                    1/PI                                  
030563,001001: 27,2601           00013                           STORE    10D                                   
030564,001002: 27,2602           45001                           SETPD    CALL                                  
030565,001003: 27,2603           00001                                    0                                     
030566,001004: 27,2604           56655                                    CALCCMD                               
030567,001005: 27,2605           53375                           VLOAD    VAD                                   
030568,001006: 27,2606           00025                                    20D                                   
030569,001007: 27,2607           00767                                    CDUSPOT                               
030570,001008: 27,2610           77434                           RTB      EXIT                                  
030571,001009: 27,2611           21516                                    V1STO2S                               
030572,001010: 
030573,001011: 27,2612           52155                           DXCH     MPAC                                  
030574,001012: 27,2613           53210                           DXCH     CTHETA                                
030575,001013: 27,2614           31632                           CA       CDUXD                                 
030576,001014: 27,2615           55206                           TS       CPHI                                  
030577,001015: 
030578,001016: 27,2616           35012                           CAF      BIT13                                 
030579,001017: 27,2617           00006                           EXTEND                                         
030580,001018: 27,2620           02031                           RAND     CHAN31                                
030581,001019: 27,2621           00006                           EXTEND                                         
030582,001020: 27,2622           12632                           BZF      S40.8XIT                              
030583,001021: 
030584,001022: 27,2623           00006                           EXTEND                                         
030585,001023: 27,2624           31210                           DCA      CTHETA                                
030586,001024: 27,2625           53634                           DXCH     CDUYD                                 
030587,001025: 27,2626           12632                           TCF      S40.8XIT                              
030588,001026: 
030589,001027: 27,2627           77776        ALARMIT            EXIT                                           
030590,001028: 27,2630           05651                           TC       ALARM                                 
030591,001029: 27,2631           01407                           OCT      01407                                 
030592,001030: 27,2632           31176        S40.8XIT           CAE      TEMPR60                               
030593,001031: 27,2633           54003                           TS       EBANK                                 
030594,001032: 27,2634           06014                           TC       INTPRET                               
030595,001033: 27,2635           77650                           GOTO                                           
030596,001034: 27,2636           03771                                    S40EXIT                               
030597,001035: 
030598,001036: 27,2637           24276 14076  1/PI               2DEC     0.3183099  B1                         
030599,001037: 27,2641           00002 00545  UNUSEDC1           2OCT     00002      00545                      
030600,001038: 
030601,001039: 27,2643           77715 77777  -FOURDT            2DEC     -800       B-18                       #  -4 (200 CS.)  B(-18)
030602,001040: 27,2645           17000 00000  2VEXHUST           2DEC     3000       E-2        B-6             
030603,001041: 27,2647           00000 00620  FOURSECS           2DEC     400        B-28                       #  400 CS SCALED AT 2(+28)CS
030604,001042: 27,2651           05520 11006  SIN45DEG           2DEC     0.7071     B-2                        
030605,001043: 27,2653           02572 00505  SIN20DEG           2DEC     0.34229    B-2                        
030606,001044: 
030607,001045: 27,2655           41345        CALCCMD            DLOAD    DMP                                   
030608,001046: 27,2656           00015                                    12D                                   
030609,001047: 27,2657           00751                                    COSCDUX                               
030610,001048: 27,2660           41325                           PDDL     DMP                                   
030611,001049: 27,2661           00017                                    14D                                   
030612,001050: 27,2662           00743                                    SINCDUX                               
030613,001051: 27,2663           77621                           BDSU                                           
030614,001052: 27,2664           77671                           DDV                                            
030615,001053: 27,2665           00747                                    COSCDUZ                               
030616,001054: 27,2666           00025                           STORE    20D                                   
030617,001055: 27,2667           57545                           DLOAD    DCOMP                                 
030618,001056: 27,2670           00773                                    CDUSPOTX                              
030619,001057: 27,2671           14031                           STODL    24D                                   
030620,001058: 27,2672           00015                                    12D                                   
030621,001059: 27,2673           65205                           DMP      PDDL                                  
030622,001060: 27,2674           00743                                    SINCDUX                               
030623,001061: 27,2675           00017                                    14D                                   
030624,001062: 27,2676           43205                           DMP      DAD                                   
030625,001063: 27,2677           00751                                    COSCDUX                               
030626,001064: 27,2700           77752                           SL1                                            
030627,001065: 27,2701           00027                           STORE    22D                                   
030628,001066: 27,2702           77616                           RVQ                                            
030629,001067: 
030630,001068:                                                                                                  #  NAME     S40.13 - TIMEBURN
030631,001069:                                                                                                  #  FUNCTION        (1) DETERMINE WHETHER A GIVEN COMBINATION OF VELOCITY TO
030632,001070:                                                                                                  #                  BE GAINED AND ENGINE CHOICE RESULT IN A BURN TIME
030633,001071:                                                                                                  #                  SUFFICIENT TO ALLOW STEERING AT THE VEHICLE DURING THE
030634,001072:                                                                                                  #                  BURN
030635,001073:                                                                                                  #                  (2) THE MAGNITUDE OF THE RESULTING BURN TIME -- IF IT
030636,001074:                                                                                                  #                  IS SHORT --  AND THE ASSOCIATED TIME OF THE ENGINE OFF
030637,001075:                                                                                                  #                  SIGNAL
030638,001076:                                                                                                  #  CALLING SEQUENCE  VIA FINDVAC AS A NEW JOB
030639,001077:                                                                                                  #  INPUT           VGTIG VELOCITY TO BE GAINED VECTOR (METERS/CS) AT +7
030640,001078:                                                                                                  #                  WEIGHT/G MASS OF VEHICLE IN KGM AT +16
030641,001079:                                                                                                  #                  F  APS ENGINE THRUST IN M.NEWTONS AT +7
030642,001080:                                                                                                  #                  AND ALSO FOR RCS ENGINE
030643,001081:                                                                                                  #                  MDOT RATE OF DECREASE OF VEHICLE MASS DURING ENGINE
030644,001082:                                                                                                  #                  BURN IN KILOGRAMS/CS  AT +3 . THIS SCALING MAY
030645,001083:                                                                                                  #                  REQUIRE MODIFICATION FOR SATURN BURNS.
030646,001084:                                                                                                  #           ENG1FLAG     SWITCH TO DECIDE WHETHER APS OR DPS ENGINE IS USED
030647,001085:                                                                                                  #                   =0   DPS
030648,001086:                                                                                                  #                   =1   APS
030649,001087:                                                                                                  #  OUTPUT          IMPULSW  ZERO FOR STEERING
030650,001088:                                                                                                  #                           ONE FOR ATTITUDE HOLD
030651,001089:                                                                                                  #                  NOTHROTL  ZERO FOR THROTTLING
030652,001090:                                                                                                  #                            ONE  TO INHIBIT THROTTLING
030653,001091:                                                                                                  #                  TGO  TIME TO BURN IN CS
030654,001092:                                                                                                  #           THE QUANTITY M.NEWTON = 10000 NEWTONS WILL BE USED TO EXPRESS
030655,001093:                                                                                                  #                  FORCE
030656,001094: 
030657,001095: 
030658,001096: 27,2703  E7,1473                                  EBANK=   TGO                                   
030659,001097: 27,2703                                           COUNT*   $$/40.13                              
030660,001098: 27,2703           06014        S40.13             TC       INTPRET                               
030661,001099: 27,2704           43001                           SETPD    CLEAR                                 
030662,001100: 27,2705           00001                                    00D                                   
030663,001101: 27,2706           01266                                    IMPULSW                               #  ASSUME NO STEERING UNTIL FOUND OTHERWISE
030664,001102: 27,2707           51575                           VLOAD    ABVAL                                 
030665,001103: 27,2710           03674                                    VGTIG                                 #  VELOCITY TO BE GAINED AT +7
030666,001104: 27,2711           41325                           PDDL     DMP                                   #  00D = MAG OF VGTIG AT +7
030667,001105: 27,2712           17056                                    7SEC                                  #  700 CS AT + 18
030668,001106: 27,2713           17060                                    FRCS2B3                               
030669,001107: 27,2714           62471                           DDV      SL2                                   #  SCALE
030670,001108: 27,2715           01244                                    WEIGHT/G                              
030671,001109: 27,2716           41421                           BDSU     PUSH                                  
030672,001110: 27,2717           43014                           BOFF     SET                                   
030673,001111: 27,2720           00743                                    APSFLAG                               
030674,001112: 27,2721           56771                                    S40.13D                               #  FOR DPS ENGINE
030675,001113: 27,2722           02463                                    NOTHROTL                              
030676,001114: 27,2723           56345                           DLOAD    DDV                                   #  00D = MAG OF VGTIG CORRECTED
030677,001115: 27,2724           17040                                    K1VAL                                 #  M.NEWTONS-CS AT +24
030678,001116: 27,2725           01244                                    WEIGHT/G                              
030679,001117: 27,2726           50021                           BDSU     BMN                                   
030680,001118: 
030681,001119: 27,2727           00001                                    00D                                   
030682,001120: 27,2730           56753                                    S40.131                               #  TGO LESS THAN 100 CS
030683,001121: 27,2731           41325                           PDDL     DMP                                   #  02D = TEMP1 AT +7
030684,001122: 27,2732           03725                                    MDOT                                  
030685,001123: 
030686,001124:                                                                                                  #  MDOT REPRESENTS THE RATE OF DECREASE OF VEHICLE MASS DURING ENGINE
030687,001125:                                                                                                  #  BURN IN KILOGRAMS/CS .  WHEN  SATURN IS USED , THE SCALING MAY
030688,001126:                                                                                                  #  REQUIRE ADJUSTMENT
030689,001127: 
030690,001128: 27,2733           17050                                    3.5SEC                                #  350 CS AT +14
030691,001129: 27,2734           65221                           BDSU     PDDL                                  
030692,001130: 27,2735           01244                                    WEIGHT/G                              
030693,001131: 27,2736           03723                                    F                                     
030694,001132: 27,2737           60405                           DMP      SR2                                   #  SCALE
030695,001133: 27,2740           17052                                    5SECS                                 
030696,001134: 27,2741           41471                           DDV      PUSH                                  #  04D = TEMP2
030697,001135: 27,2742           51021                           BDSU     BPL                                   
030698,001136: 27,2743           00003                                    02D                                   
030699,001137: 27,2744           56771                                    S40.13D                               
030700,001138: 27,2745           55345                           DLOAD    BDDV                                  
030701,001139: 27,2746           43205                           DMP      DAD                                   
030702,001140: 27,2747           17052                                    5SECS                                 
030703,001141: 27,2750           17046                                    1SEC2D                                #  100 CS AT +14
030704,001142: 27,2751           77650                           GOTO                                           
030705,001143: 27,2752           56761                                    S40.132                               
030706,001144: 27,2753           41345        S40.131            DLOAD    DMP                                   
030707,001145: 27,2754           01244                                    WEIGHT/G                              
030708,001146: 27,2755           41542                           SR1      PUSH                                  
030709,001147: 27,2756           56215                           DAD      DDV                                   
030710,001148: 27,2757           17042                                    K2VAL                                 #  M.NEWTON CS AT +24
030711,001149: 27,2760           17044                                    K3VAL                                 #  M.NEWTON CS AT +10
030712,001150: 27,2761           77414        S40.132            SET      EXIT                                  
030713,001151: 27,2762           01066                                    IMPULSW                               
030714,001152: 27,2763           07231        S40.132*           TC       TPAGREE                               
030715,001153: 27,2764           30154                           CA       MPAC                                  
030716,001154: 27,2765           56001                           XCH      L                                     
030717,001155: 27,2766           35030                           CA       ZERO                                  
030718,001156: 27,2767           53474                           DXCH     TGO                                   
030719,001157: 27,2770           13013                           TCF      S40.134                               
030720,001158: 
030721,001159: 27,2771           41345        S40.13D            DLOAD    DMP                                   #  FOR DPS ENGINE
030722,001160: 27,2772           00001                                    00D                                   
030723,001161: 27,2773           01244                                    WEIGHT/G                              
030724,001162: 27,2774           43006                           PUSH     BON                                   
030725,001163: 27,2775           00703                                    APSFLAG                               
030726,001164: 27,2776           57034                                    APSTGO                                
030727,001165: 27,2777           43071                           DDV      CLEAR                                 
030728,001166: 27,3000           17062                                    S40.136                               
030729,001167: 27,3001           02663                                    NOTHROTL                              
030730,001168: 27,3002           41400                           BOV      PUSH                                  
030731,001169: 
030732,001170: 27,3003           57016                                    S40.130V                              
030733,001171: 27,3004           51025        S40.137            DSU      BPL                                   
030734,001172: 27,3005           17054                                    6SEC                                  #  600.0 CS AT +14
030735,001173: 27,3006           57024                                    S40.138                               
030736,001174: 27,3007           52015                           DAD      GOTO                                  
030737,001175: 27,3010           17054                                    6SEC                                  
030738,001176: 27,3011           56761                                    S40.132                               
030739,001177: 27,3012           77776        S40.133            EXIT                                           
030740,001178: 27,3013           05423        S40.134            TC       PHASCHNG                              
030741,001179: 27,3014           00003                           OCT      00003                                 
030742,001180: 27,3015           05225                           TC       ENDOFJOB                              
030743,001181: 27,3016           40545        S40.130V           DLOAD    SR4                                   #  RECOMPUTE TGO IN TIME2 UNITS
030744,001182: 27,3017           77671                           DDV                                            
030745,001183: 27,3020           17064                                    S40.136_                              #  S40.136 SHIFTED LEFT 10
030746,001184: 27,3021           03474                           STORE    TGO                                   
030747,001185: 27,3022           77776                           EXIT                                           
030748,001186: 27,3023           13013                           TCF      S40.134                               #  REJOIN COMMON CODING FOR RESTART PROTECT
030749,001187: 
030750,001188: 27,3024           51025        S40.138            DSU      BPL                                   
030751,001189: 27,3025           17066                                    89SECS                                
030752,001190: 27,3026           57031                                    STORETGO                              
030753,001191: 27,3027           77614                           SET                                            
030754,001192: 27,3030           02463                                    NOTHROTL                              
030755,001193: 27,3031           77745        STORETGO           DLOAD                                          #  LOAD TGO AT 2(14)
030756,001194: 27,3032           77776                           EXIT                                           
030757,001195: 27,3033           12763                           TCF      S40.132*                              
030758,001196: 
030759,001197: 27,3034           52071        APSTGO             DDV      GOTO                                  
030760,001198: 27,3035           17070                                    FAPSB9                                
030761,001199: 27,3036           57032                                    STORETGO   +1                         
030762,001200: 27,3037           00000 07621  K1VAL              2DEC     124.54     B-23                       #  2800 LB-SEC
030763,001201: 27,3041           00000 00762  K2VAL              2DEC     31.138     B-24                       #  700  LB-SEC
030764,001202: 27,3043           00030 35052  K3VAL              2DEC     1.556802   B-10                       #  FAPS ( 3500 LBS THRUST)
030765,001203: 27,3045           00144 00000  1SEC2D             2DEC     100.0      B-14                       #  100.0 CS AT +14
030766,001204: 27,3047           01274 00000  3.5SEC             2DEC     350.0      B-13                       #  350 CS AT +13
030767,001205: 27,3051           00764 00000  5SECS              2DEC     500.0      B-14                       #  500.0 CS AT +14
030768,001206: 27,3053           01130 00000  6SEC               2DEC     600.0      B-14                       #  600.0 CS AT +14
030769,001207: 27,3055           00000 01274  7SEC               2DEC     700.0                                 #  700.0 CS
030770,001208: 27,3057           26614 05221  FRCS2B3            2DEC     0.08896    B3                         #  200 LBS FORCE IN NEWTONS
030771,001209: 27,3061           00016 36237  S40.136            2DEC     .4671      B-9                        #  .4671 M NEWTONS (DPS)
030772,001210: 27,3063           35711 35663  S40.136_           2DEC     .4671      B+1                        #  S40.136 SHIFTED LEFT 10.
030773,001211: 27,3065           21304 00000  89SECS             2DEC     8900.0     B-14                       
030774,001212: 27,3067           00061 32124  FAPSB9             2DEC     1.5568     B-9                        #  3500 LBS FORCE IN NEWTONS
030775,001213:                                                                                                  #  FUNCTION    (1) GENERATES REQUIRED VELOCITY AND VELOCITY-TO-BE-GAINED
030776,001214:                                                                                                  #              VECTORS FOR USE DURING AIMPOINT MANEUVERS EVERY TWO
030777,001215:                                                                                                  #              COMPUTATION CYCLES (4 SECONDS).
030778,001216:                                                                                                  #              (2) UPDATES THE B VECTOR WHICH IS USED IN THE FINAL
030779,001217:                                                                                                  #              CALCULATION OF EXTRAPOLATING THE VELOCITY-TO-BE-GAINED
030780,001218:                                                                                                  #              THROUGH ONE 2-SECOND INTERVAL INTO THE FUTURE.
030781,001219:                                                                                                  #  CALLING SEQ VIA FINDVAC AS NEW JOB.
030782,001220: 
030783,001221:                                                                                                  #  INPUT       RN       - ACTIVE VEHICLE RADIUS VECTOR IN METERS AT +29.
030784,001222:                                                                                                  #              VN       - ACTIVE VEHICLE VELOCITY VECTOR IN METERS/CS AT +7
030785,001223:                                                                                                  #              VRPREV   - LAST COMPUTED VELOCITY REQUIRED VECTOR IN
030786,001224:                                                                                                  #                         METERS/CS AT +7.
030787,001225:                                                                                                  #              TIG      - TIME OF IGNITION IN CS AT +28.
030788,001226:                                                                                                  #              DLTARG   - COMPUTATION CYCLE INTERVAL = 200 CS AT +28.
030789,001227:                                                                                                  #              PIPTIME  - TIME OF RN AND VN IN CS AT +28.
030790,001228:                                                                                                  #              GDT/2    - HALF OF VELOCITY GAINED IN DELTA T TIME DUE TO
030791,001229:                                                                                                  #                         ACCERERATION OF GRAVITY IN METERS/CS AT +7.
030792,001230:                                                                                                  #              DELVREF  - CHANGE IN VELOCITY DURING LAST 2 SEC IN
030793,001231:                                                                                                  #                         METERS/CS AT +7.
030794,001232:                                                                                                  #  OUTPUT      VGPREV   - VELOCITY TO BE GAINED VECTOR IN METERS/CS AT +7.
030795,001233:                                                                                                  #              VGDISP   - MAG OF VGPREV FOR DISPLAY PURPOSES.
030796,001234:                                                                                                  #              VRPREV   - VELOCITY REQUIRED VECTOR IN METERS/CS AT +7.
030797,001235:                                                                                                  #              BDT      - B VECTOR IN METERS/CS AT +7.
030798,001236:                                                                                                  #  SUBROUTINES USED  -  INITVEL
030799,001237: 
030800,001238: 27,3071  E7,1673                                  EBANK=   VGPREV                                
030801,001239: 27,3071                                           COUNT*   $$/S40.9                              
030802,001240: 27,3071           06014        S40.9              TC       INTPRET                               
030803,001241: 27,3072           77201                           SETPD    VLOAD                                 
030804,001242: 27,3073           00001                                    00D                                   
030805,001243: 27,3074           01220                                    RN                                    #  ACTIVE VEHICLE RADIUS VECTOR AT T1
030806,001244: 27,3075           26341                           STOVL    RINIT                                 
030807,001245: 27,3076           01226                                    VN                                    #  ACTIVE VEHICLE VELOCITY VECTOR AT T1
030808,001246: 27,3077           16347                           STODL    VINIT                                 
030809,001247: 27,3100           01234                                    PIPTIME                               
030810,001248: 27,3101           03717                           STORE    TNIT                                  
030811,001249: 27,3102           77621                           BDSU                                           
030812,001250: 27,3103           03616                                    TPASS4                                
030813,001251: 27,3104           02355                           STORE    DELLT4                                #  T2 - T1
030814,001252: 27,3105           71214                           SET      DLOAD                                 
030815,001253: 27,3106           01072                                    AVFLAG                                #  SET AVFLAG FOR LEM ACTIVE
030816,001254: 27,3107           06233                                    HI6ZEROS                              
030817,001255: 27,3110           77725                           PDDL                                           
030818,001256: 27,3111           16411                                    EPS1                                  
030819,001257: 27,3112           43214                           BOFF     DAD                                   #  EPSILON4 = 10 OR 45 DEGREES.
030820,001258: 27,3113           03745                                    NORMSW                                
030821,001259: 27,3114           57116                                    EPSSMALL                              
030822,001260: 27,3115           16413                                    EPS2                                  
030823,001261: 27,3116           74006        EPSSMALL           PUSH     AXC,1                                 
030824,001262: 27,3117           00002                                    2                                     
030825,001263: 27,3120           45014        S40.92             BOFSET   CALL                                  
030826,001264: 27,3121           03044                                    FIRSTFLG                              
030827,001265: 27,3122           57224                                    INITINIT                              
030828,001266: 27,3123           22024                                    HAVEGUES                              
030829,001267: 27,3124           52375                           VLOAD    VSU                                   
030830,001268: 27,3125           02357                                    VIPRIME                               
030831,001269: 27,3126           03711                                    VRPREV                                
030832,001270: 27,3127           45325                           PDDL     DSU                                   
030833,001271: 27,3130           03717                                    TNIT                                  
030834,001272: 27,3131           03721                                    TNITPREV                              
030835,001273: 
030836,001274: 27,3132           55261                           SL       BDDV                                  
030837,001275: 27,3133           20223                                    18D                                   
030838,001276: 27,3134           17223                                    100B10                                
030839,001277: 27,3135           77761                           VXSC                                           
030840,001278: 27,3136           76451                           VSU      VSL1                                  
030841,001279: 27,3137           01236                                    GDT/2                                 
030842,001280: 27,3140           03660                           STORE    BDT                                   
030843,001281: 
030844,001282: 27,3141           53575        GETGOBL            VLOAD    UNIT                                  #  CALCULATE OBLATENESS TERM.
030845,001283: 27,3142           01220                                    RN                                    
030846,001284: 27,3143           45345                           DLOAD    DSU                                   
030847,001285: 27,3144           01234                                    PIPTIME                               #               2
030848,001286: 27,3145           03574                                    GOBLTIME                              #  G    = -(MU/R )(UNITGOBL)(T - TIG)
030849,001287: 27,3146           56205                           DMP      DDV                                   #   OBL
030850,001288: 27,3147           17231                                    EARTHMU                               
030851,001289: 27,3150           00043                                    34D                                   #  34D = /RN/ (2) FROM UNIT OPERATION.
030852,001290: 27,3151           53361                           VXSC     VAD                                   
030853,001291: 27,3152           03476                                    UNITGOBL                              
030854,001292: 27,3153           03363                                    DELVEET3                              #  OUTPUT FROM INITVEL VG = VR - VN
030855,001293: 27,3154           03363                           STORE    DELVEET3                              #  VG = VR + GOBL - VN
030856,001294: 27,3155           77646        NOGOBL             ABVAL                                          
030857,001295: 27,3156           17651                           STODL    VGDISP                                
030858,001296: 27,3157           03717                                    TNIT                                  
030859,001297: 27,3160           03721                           STORE    TNITPREV                              
030860,001298: 27,3161           77776                           EXIT                                           
030861,001299: 27,3162           05423                           TC       PHASCHNG                              
030862,001300: 27,3163           05022                           OCT      05022                                 
030863,001301: 27,3164           14000                           OCT      14000                                 
030864,001302: 27,3165           06014                           TC       INTPRET                               
030865,001303: 27,3166           77775                           VLOAD                                          
030866,001304: 27,3167           02357                                    VIPRIME                               #  VR(T)
030867,001305: 27,3170           03711                           STORE    VRPREV                                
030868,001306: 27,3171           77776                           EXIT                                           
030869,001307: 27,3172           05423                           TC       PHASCHNG                              
030870,001308: 27,3173           05022                           OCT      05022                                 
030871,001309: 27,3174           14000                           OCT      14000                                 
030872,001310: 27,3175           06014                           TC       INTPRET                               
030873,001311: 27,3176           77214                           BON      VLOAD                                 
030874,001312: 27,3177           01305                                    CYCLESW                               
030875,001313: 27,3200           57206                                    S40.91                                
030876,001314: 27,3201           03363                                    DELVEET3                              
030877,001315: 27,3202           03674                           STORE    VGPREV                                
030878,001316: 27,3203           52014                           SET      GOTO                                  
030879,001317: 27,3204           01065                                    CYCLESW                               
030880,001318: 27,3205           57216                                    ENDS40.9                              
030881,001319: 27,3206           53375        S40.91             VLOAD    VAD                                   #  EXTRAPOLATE FOR V TO GAIN
030882,001320: 27,3207           03363                                    DELVEET3                              
030883,001321: 27,3210           03660                                    BDT                                   
030884,001322: 
030885,001323: 27,3211           77651                           VSU                                            
030886,001324: 27,3212           03504                                    DELVREF                               
030887,001325: 27,3213           03674                           STORE    VGPREV                                
030888,001326: 27,3214           77646                           ABVAL                                          
030889,001327: 27,3215           03651                           STORE    VGDISP                                #  FOR DISPLAY PURPOSES
030890,001328: 27,3216           77776        ENDS40.9           EXIT                                           
030891,001329: 27,3217           05423                           TC       PHASCHNG                              
030892,001330: 27,3220           00002                           OCT      2                                     
030893,001331: 27,3221           05225                           TC       ENDOFJOB                              
030894,001332: 27,3222           03100 00000  100B10             2DEC     100        B-10                       
030895,001333: 27,3224           77624        INITINIT           CALL                                           
030896,001334: 27,3225           22024                                    HAVEGUES                              
030897,001335: 27,3226           77650                           GOTO                                           
030898,001336: 27,3227           57141                                    GETGOBL                               
030899,001337: 
030900,001338: 27,3230           55340 61710  EARTHMU            2DEC*    -3.986032  E10        B-36*           #  M(3)/CS(2)
030901,001339: 
030902,001340:                                                                                                  #  MOD 0     24 FEB 67     PETER ADLER
030903,001341:                                                                                                  #  FUNCTION:
030904,001342:                                                                                                  #           TRIMS DPS ENGINE TO MINIMIZE THRUST/CG OFFSET. ENGINE IS GIMBALLED TO FULL + PITCH AND + ROLL (TO LOCK)
030905,001343:                                                                                                  #           FOR REFERENCE AND IS THEN BROUGHT BACK TO TRIM POSITION BY RUNNING FOR THE PROPER TIMES (TO BE
030906,001344:                                                                                                  #           SPECIFIED BY GAEC) IN - PITCH AND - ROLL.
030907,001345:                                                                                                  #  CALLING SEQUENCE:
030908,001346:                                                                                                  #           VIA WAITLIST FROM R03
030909,001347:                                                                                                  #  INPUT:
030910,001348:                                                                                                  #           PITTIME     TIME TO RUN FROM FULL + PITCH TO TRIM  (CS)
030911,001349:                                                                                                  #           ROLLTIME    TIME TO RUN FROM FULL + ROLL  TO TRIM  (CS)
030912,001350:                                                                                                  #  SUBROUTINES USED:
030913,001351:                                                                                                  #           WAITLIST, FIXDELAY, VARDELAY, FLAGUP, FLAGDOWN, NOVAC
030914,001352: 
030915,001353: 27,3232                                           COUNT*   $$/S40.6                              
030916,001354: 27,3232  E6,1401                                  EBANK=   ROLLTIME                              #  OCTAL MASKS:  PRIO5=05000 EBANK5=02400
030917,001355: 
030918,001356: 27,3232           05600        TRIMGIMB           TC       DOWNFLAG                              #  GMBDRVSW FLAG IS SET WHEN EITHER ROLL OR
030919,001357: 27,3233           00137                           ADRES    GMBDRVSW                              #  PITCH IS COMPLETED, WHICHEVER IS FIRST.
030920,001358: 
030921,001359: 27,3234           35065                           CAF      EBANK6                                
030922,001360: 27,3235           56003                           XCH      EBANK                                 
030923,001361: 27,3236           54061                           TS       ITEMP1                                
030924,001362: 
030925,001363: 27,3237           45067                           CS       PRIO5                                 #  TURN OFF - PITCH, - ROLL, IF ON.
030926,001364: 27,3240           00006                           EXTEND                                         
030927,001365: 27,3241           03012                           WAND     CHAN12                                
030928,001366: 27,3242           35064                           CAF      EBANK5                                #  TURN ON + PITCH, + ROLL.
030929,001367: 27,3243           00006                           EXTEND                                         
030930,001368: 27,3244           05012                           WOR      CHAN12                                
030931,001369: 27,3245           05271                           TC       FIXDELAY                              #  WAIT ONE MINUTE TO MAKE SURE ENGINE IS
030932,001370: 27,3246           13560                           DEC      6000       B-14                       #  AT FULL + PITCH AND FULL + ROLL
030933,001371: 27,3247           45064                           CS       EBANK5                                #  TURN OFF + PITCH, + ROLL.
030934,001372: 27,3250           00006                           EXTEND                                         
030935,001373: 27,3251           03012                           WAND     CHAN12                                
030936,001374: 27,3252           35067                           CAF      PRIO5                                 #  TURN ON - PITCH, - ROLL.
030937,001375: 27,3253           00006                           EXTEND                                         
030938,001376: 27,3254           05012                           WOR      CHAN12                                
030939,001377: 27,3255           31402                           CAE      PITTIME                               #  GET TIME TO SHUT OFF - PITCH AND SET UP
030940,001378: 27,3256           05243                           TC       TWIDDLE                               #  TWIDDLE-TASK TO TURN IT OFF THEN
030941,001379: 
030942,001380: 27,3257           03300                           ADRES    PITCHOFF                              
030943,001381: 
030944,001382: 27,3260           31401                           CAE      ROLLTIME                              #  GET TIME TO SHUT OFF - ROLL AND GO AWAY
030945,001383: 27,3261           05274                           TC       VARDELAY                              #  UNTIL THEN
030946,001384: 27,3262           45013                           CS       BIT12                                 
030947,001385: 27,3263           00006                           EXTEND                                         
030948,001386: 27,3264           03012                           WAND     CHAN12                                #  SHUT OFF ROLL
030949,001387: 27,3265           30102        ROLLOVER           CA       FLAGWRD6                              #  IF HERE INLINE (ROLL DONE) IS PITCH DONE
030950,001388: 27,3266           75015                           MASK     GMBDRBIT                              #  IF HERE FROM PITCHOFF, IS ROLL DONE?
030951,001389: 27,3267           00006                           EXTEND                                         
030952,001390: 27,3270           13304                           BZF      PITCHOFF   +4                         #  NO.  SET FLAG, ROLL OR PITCH DONE.
030953,001391: 27,3271           30061                           CA       ITEMP1                                
030954,001392: 27,3272           54003                           TS       EBANK                                 
030955,001393: 27,3273           35012                           CAF      PRIO10                                #  RETURN TO R03
030956,001394: 27,3274           05142                           TC       NOVAC                                 
030957,001395: 27,3275  E7,1456                                  EBANK=   WHOCARES                              
030958,001396: 27,3275           02171 40067                     2CADR    TRIMDONE                              
030959,001397: 27,3277           05331                           TC       TASKOVER                              
030960,001398: 27,3300           45015        PITCHOFF           CS       BIT10                                 
030961,001399: 27,3301           00006                           EXTEND                                         
030962,001400: 27,3302           03012                           WAND     CHAN12                                #  SHUT OFF PITCH
030963,001401: 27,3303           13265                           TCF      ROLLOVER                              #  SEE IF ROLL HAS FINISHED ALSO.
030964,001402: 27,3304           05566                           TC       UPFLAG                                #  ROLL DONE; OR PITCH DONE; BUT NOT BOTH.
030965,001403: 27,3305           00137                           ADRES    GMBDRVSW                              
030966,001404: 27,3306           05331                           TC       TASKOVER                              
030967,001405: 
030968,001406:                                                                                                  #  SUBROUTINE NAME: S41.1          MOD. NO. 0  DATE: FEBRUARY 28, 1967
030969,001407: 
030970,001408:                                                                                                  #                          MOD. NO. 1  DATE: JANUARY 23, 1968: BY PETER ADLER (MIT/IL)
030971,001409: 
030972,001410:                                                                                                  #  AUTHOR: JONATHAN D. ADDELSTON (ADAMS ASSOCIATES)
030973,001411: 
030974,001412:                                                                                                  #  S41.1 PERFORMS THE COORDINATE SYSTEM TRANFORMATION FROM THE REFERENCE FRAME TO THE BODY OF THE LM.
030975,001413:                                                                                                  #  SPECIFICALLY, IT IS USED TO TRANSFORM A VELOCITY (SCALED AT 2(+7) METERS/CENTISECOND) FROM REFERENCE TO LM AXIS
030976,001414:                                                                                                  #  COORDINATES.  FIRST THE VECTOR IS TRANSFORMED TO THE STABLE MEMBER COORDINATES BY THE MATRIX REFSMMAT.  THIS
030977,001415:                                                                                                  #  LEAVES THE VECTOR IN MPAC, SCALED AT 2(+8) METERS/CENTISECOND.  THEN
030978,001416:                                                                                                  #  THE SUBROUTINE CDUTRIG IS CALLED TO SET UP THE DOUBLE-PRECISION CDU VECTOR ALONG WITH ITS SINES AND COSINES.
030979,001417:                                                                                                  #  THE VECTOR IS THEN TRANSFORMED FROM STABLE MEMBER COORDINATES TO SPACECRAFT (OR LM) COORDINATES BY THE
030980,001418:                                                                                                  #  SUBROUTINE *SMNB*.  FINALLY( THE VECTOR IS RESCALED TO 2(+7) METERS/CENTISECOND, AND CONTROL IS RETURNED TO THE
030981,001419:                                                                                                  #  CALLER WITH C(MPAC) = VELOCITY(LM).
030982,001420: 
030983,001421: 
030984,001422:                                                                                                  #  CALLING SEQUENCE:
030985,001423:                                                                                                  #                                          L        VLOAD  CALL
030986,001424:                                                                                                  #                                          L +1            VELOCITY(REF)   SCALED AT 2(+7)M/CS IN REFERENCE COORDS.
030987,001425:                                                                                                  #                                          L +2            S41.1
030988,001426:                                                                                                  #                                          L +3     STORE  VELOCITY(LM)    SCALED AT 2(+7)M/CS IN LM BODY AXIS SYS.
030989,001427: 
030990,001428:                                                                                                  #  SUBROUTINES CALLED:
030991,001429: 
030992,001430:                                                                                                  #           1.  CDUTRIG,
030993,001431:                                                                                                  #                  WHICH CALLS CDULOGIC.
030994,001432:                                                                                                  #           2.  *SMNB*
030995,001433: 
030996,001434:                                                                                                  #  NORMAL RETURN: L +3 (SEE CALLING SEQUENCE, ABOVE.)
030997,001435: 
030998,001436:                                                                                                  #  ALARM/ABORT MODES: NONE.
030999,001437: 
031000,001438:                                                                                                  #  RESTART PROTECTION: NONE.
031001,001439: 
031002,001440:                                                                                                  #  INPUT:
031003,001441: 
031004,001442:                                                                                                  #           1.  REFSMMAT.
031005,001443:                                                                                                  #           2.  CDUX, CDUY, CDUZ.
031006,001444:                                                                                                  #           3.  VELOCITY (REF) IN MPAC.
031007,001445: 
031008,001446:                                                                                                  #  OUTPUT:
031009,001447: 
031010,001448:                                                                                                  #           1.  CDUSPOT:  DOUBLE PRECISION CDU VECTOR, ORDERED Y,Z,X.
031011,001449:                                                                                                  #           2.  SINCDU:   HALF SINES OF CDUSPOT COMPONENTS.
031012,001450:                                                                                                  #           3.  COSCDU:   HALF COSINES OF CDUSPOT COMPONENTS.
031013,001451:                                                                                                  #           4.  MPAC:     VELOCITY(LM) (SCALED AT 2(+7) METERS/CENTISECOND)
031014,001452: 
031015,001453:                                                                                                  #  DEBRIS: NONE.
031016,001454: 
031017,001455:                                                                                                  #  CHECKOUT STATUS:  CODED.
031018,001456: 
031019,001457: 27,3307                                           COUNT*   $$/S41.1                              
031020,001458: 27,3307           76521        S41.1              MXV      VSL1                                  #  CONVERT VECTOR IN MPAC FROM REF AT 2(+7)
031021,001459: 27,3310           01736                                    REFSMMAT                              #  TO SM AND RESCALE DUE TO HALFUNIT MATRIX
031022,001460: 27,3311           77650                           GOTO                                           #  CONVERT TO BODY AT 2(+7) USING PRESENT
031023,001461: 27,3312           47454                                    CDU*SMNB                              #  CDU ANGLES.  CDU*SMNB WILL RETURN
031024,001462:                                                                                                  #  VIA RVQ TO THE CALLER OF S41.1

End of include-file P40-P47.agc.  Parent file is MAIN.agc