Source Code

These source code files are a reconstruction of Sundance, 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
This means that source code does not represent a specific historical revision of Sundance, but rather a mixture of the three released versions. Nonetheless, it is capable of flying the whole Apollo 9 mission. This source code matches the binary dumps, as closely as feasible, but 100% match is not possible, due mostly to changes in memory addresses at which code and variables were allocated in different revisions of Sundance. Refer to this list of explanations for each binary mismatch.

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.

029441,000002:                                                                                                  ## Copyright:   Public domain.
029442,000003:                                                                                                  ## Filename:    P40-P47.agc
029443,000004:                                                                                                  ## Purpose:     A section of a reconstructed, mixed version of Sundance
029444,000005:                                                                                                  ##              It is part of the reconstructed source code for the Lunar
029445,000006:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 9.
029446,000007:                                                                                                  ##              No original listings of this program are available;
029447,000008:                                                                                                  ##              instead, this file was created via disassembly of dumps
029448,000009:                                                                                                  ##              of various revisions of Sundance core rope modules.
029449,000010:                                                                                                  ## Assembler:   yaYUL
029450,000011:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
029451,000012:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
029452,000013:                                                                                                  ## Mod history: 2020-06-17 MAS  Created from Luminary 69.
029453,000014:                                                                                                  ##              2021-05-30 ABS  Aligned TCF BURNBABY and TCF B*RNB*B* to field
029454,000015:                                                                                                  ##                              boundaries and surrounding comments to match.
029455,000016:                                                                                                  ##                              TGDCALC -> TGOCALC
029456,000017: 
029457,000018:                                                                                                  ## Sundance 306
029458,000019: 
029459,000020:                                                                                                  #  PROGRAM DESCRIPTION  P40BOTH    DECEMBER 22, 1966
029460,000021:                                                                                                  #  MOD 03 BY PETER ADLER           MARCH 3, 1967
029461,000022:                                                                                                  #  CALLED VIA JOB FROM V37E
029462,000023: 
029463,000024:                                                                                                  #  FUNCTIONAL DESCRIPTION
029464,000025: 
029465,000026:                                                                                                  #           1)  TO COMPUTE A PREFERRED IMU ORIENTATION AND A PREFERRED VEHICLE ATTITUDE FOR A LM DPS
029466,000027:                                                                                                  #               THRUSTING MANEUVER.
029467,000028: 

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

029469,000030: 
029470,000031:                                                                                                  #           3)  TO DO THE VEHICLE MANEUVER TO THE THRUSTING ATTITUDE.
029471,000032: 
029472,000033:                                                                                                  #           4)  TO CONTROL THE PGNCS DURING COUNTDOWN, IGNITION, THRUSTING, AND THRUST TERMINATION OF A
029473,000034:                                                                                                  #               PGNCS CONTROLLED DPS MANEUVER.
029474,000035: 
029475,000036:                                                                                                  #           5)  IN POSTBURN--ZERO RENDEZVOUS COUNTER, MAINTAIN VG CALCULATIONS FOR POSSIBLE RCS MANEUVER,
029476,000037:                                                                                                  #                            SET MAXIMUM DEADBAND IN DAP, RESET STEERLAW CSTEER TO ZERO.
029477,000038: 
029478,000039:                                                                                                  #           NOTE:  P42, WHICH IS IN THIS LOG SECTION, DOES THE SAME FOR AN APS BURN, AND P41 DOES 1-3 FOR
029479,000040:                                                                                                  #                  RCS PLUS DISPLAYS PARAMETERS FOR MANUAL CONTROL.
029480,000041: 
029481,000042:                                                                                                  #  SUBROUTINES USED
029482,000043: 
029483,000044:                                                                                                  #           R02      IMU STATUS CHECK
029484,000045:                                                                                                  #           S40.1    COMPUTATION OF THRUST DIRECTION
029485,000046:                                                                                                  #           S40.13   LENGTH OF BURN
029486,000047:                                                                                                  #           S40.2,3  PREFERRED IMU ORIENATTION
029487,000048:                                                                                                  #           S40.8    X PRODUCT STEERING
029488,000049:                                                                                                  #           S40.9    LAMBERT VTOGAIN
029489,000050:                                                                                                  #           R60LEM   ATTITUDE MANEUVER
029490,000051:                                                                                                  #           LEMPREC  EXTRAPOLATE STATE VECTOR
029491,000052:                                                                                                  #           PREREAD  AVERAGE G, SERVICER
029492,000053:                                                                                                  #           ALLCOAST DAP COASTING INITIALIZATION
029493,000054:                                                                                                  #           CLOKTASK ERGO CLOCKJOB--COUNT DOWN
029494,000055:                                                                                                  #           PHASCHNG, INTPRET, FLAGUP, FLAGDOWN, WAITLIST, LONGCALL, GOFLASH, GOFLASHR, GOPERF1, ALARM,
029495,000056:                                                                                                  #           PRIOLARM, GOTOPOOH, ENDOFJOB, BANKCALL, SETMAXDB, SETMINDB, CHECKMM, FLATOUT, OUTFLAT,
029496,000057:                                                                                                  #           KILLTASK, SGNAGREE, TPAGREE, ETC.
029497,000058: 
029498,000059:                                                                                                  #  RESTARTS VIA GROUP 4
029499,000060: 
029500,000061:                                                                                                  #  DISPLAYS
029501,000062: 
029502,000063:                                                                                                  #           V50N25  203 A/P TO PGNCS, AUTO THROTTLE MODE, AUTO ATTITUDE CONTROL
029503,000064:                                                                                                  #           V06N40  TTI, VG, DELTAVM (DISPLAYED ONCE/SECOND BY CLOKTASK)
029504,000065:                                                                                                  #           V50N99  PLEASE PERFORM ENGINE ON ENABLE
029505,000066:                                                                                                  #           V06N40  TG (TIME TO GO TO CUTOFF), VG, DELTAVM--ONCE/SECOND
029506,000067:                                                                                                  #           V16N40  FINAL VALUES OF TG, VG, DELTAVM
029507,000068:                                                                                                  #           V16N85  COMP OF VG (BODY AXES) FOR POSS. RCS MANUAL MANEUVER
029508,000069:                                                                                                  #           V05N09  POSSIBLE ALARMS
029509,000070:                                                                                                  #           V50N07  PLEASE SELECT P00
029510,000071: 
029511,000072:                                                                                                  #           VIA R30
029512,000073: 
029513,000074:                                                                                                  #           V06N44  HAPO, PERI, TFF
029514,000075:                                                                                                  #           V06N35  TIME TO PERIGEE, HMS
029515,000076: 
029516,000077:                                                                                                  #  ALARM OR ABORT EXIT MODES
029517,000078: 
029518,000079:                                                                                                  #           PROGRAM ALARM, FLASHING DISPLAY OF ALARM CODE 1706 IF P40 SELECTED WITH DESCENT UNIT STAGED.
029519,000080:                                                                                                  #           V34E (TERMINATE) IS THE ONLY RESPONSE ACCEPTED. TC GOTOPOOH.
029520,000081: 
029521,000082:                                                                                                  #           PROGRAM ALARM, FLASH CODE 1703:  TIG LESS THAN 45 SECS AWAY.  V34E=  GOTOPOOH OR V33E=  SLIP
029522,000083:                                                                                                  #           TIG BY 45 SECS.
029523,000084: 
029524,000085:                                                                                                  #  ERASABLE INITIALIZATION
029525,000086:                                                                                                  #  DEBRIS
029526,000087:                                                                                                  #  OUTPUT
029527,000088: 
029528,000089:                                                                                                  #           SEE SUBROUTINES E.G.:  S40.1, S40.2,3, S40.13, S40.8, S40.9, TRIMGIMB
029529,000090:                                                                                                  #           XDELVFLG = 1 FOR EXT DELV COMPUTATION
029530,000091:                                                                                                  #                    = 0 FOR AIMPT (LAMBERT) COMP
029531,000092: 
029532,000093: 27,2253                                           COUNT*   $$/P40                                
029533,000094: 27,2253  E7,1430                                  EBANK=   WHICH                                 
029534,000095: 
029535,000096: 36,3133                                           BANK     36                                    
029536,000097: 36,2000                                           SETLOC   P40S                                  
029537,000098: 36,2000                                           BANK                                           
029538,000099: 
029539,000100: 36,3133           33114        P40LM              CAF      P40ADRES                              #  INITIALIZATION FOR BURNBABY.
029540,000101: 36,3134           55430                           TS       WHICH                                 
029541,000102: 
029542,000103: 36,3135           00006                           EXTEND                                         
029543,000104: 36,3136           00030                           READ     CHAN30                                
029544,000105: 36,3137           40000                           COM                                            
029545,000106: 36,3140           75025                           MASK     BIT2                                  
029546,000107: 36,3141           00006                           EXTEND                                         
029547,000108: 36,3142           13714                           BZF      P40ALM                                
029548,000109: 36,3143           04655                           TC       BANKCALL                              #  GO DO IMU STATUS CHECK ROUTINE.
029549,000110: 36,3144           11064                           CADR     R02BOTH                               
029550,000111: 
029551,000112: 36,3145           41102                           CS       DAPBOOLS                              #  INITIALIZE DVMON
029552,000113: 36,3146           75012                           MASK     CSMDOCKD                              
029553,000114: 36,3147           10000                           CCS      A                                     
029554,000115: 36,3150           33757                           CAF      THRESH1                               
029555,000116: 36,3151           63761                           AD       THRESH3                               
029556,000117: 36,3152           55201                           TS       DVTHRUSH                              
029557,000118: 36,3153           35026                           CAF      ONE                                   
029558,000119: 36,3154           55202                           TS       AUXFLAG                               
029559,000120: 36,3155           35024                           CAF      FOUR                                  
029560,000121: 36,3156           55472                           TS       DVCNTR                                
029561,000122: 
029562,000123: 36,3157           06014                           TC       INTPRET                               #  LOAD CONSTANTS FOR DPS BURN
029563,000124: 36,3160           43175                           VLOAD    CLEAR                                 #  LOAD F, MDOT, TDECAY
029564,000125: 36,3161           35725                                    FDPS                                  
029565,000126: 36,3162           02663                                    NOTHROTL                              
029566,000127: 36,3163           03723                           STORE    F                                     
029567,000128: 36,3164           77624        P40IN              CALL                                           
029568,000129: 36,3165           56253                                    S40.1                                 #  COMPUTES UT AND VGTIG
029569,000130: 36,3166           77624                           CALL                                           
029570,000131: 36,3167           56416                                    S40.2,3                               #  COMPUTES PREFERRED IMU ORIENTATION
029571,000132: 36,3170           77776                           EXIT                                           
029572,000133: 
029573,000134: 36,3171           00004                           INHINT                                         
029574,000135: 36,3172           04737                           TC       IBNKCALL                              
029575,000136: 36,3173           40223                           CADR     PFLITEDB                              #  ZERO ATTITUDE ERRORS, SET DB TO ONE DEG.
029576,000137: 
029577,000138: 36,3174           03176                           TC       P40SXT4                               
029578,000139: 
029579,000140: 
029580,000141:                                                                                                  #            ***********************
029581,000142: 36,3175           12133                           TCF      BURNBABY                              
029582,000143:                                                                                                  #            ***********************
029583,000144: 
029584,000145: 
029585,000146: 36,3176           00006        P40SXT4            EXTEND                                         
029586,000147: 36,3177           23153                           QXCH     P40/RET                               
029587,000148: 36,3200           00003        P41MANU            RELINT                                         
029588,000149: 
029589,000150: 36,3201           05575                           TC       DOWNFLAG                              #  CLEAR 3AXISFLG -- R60 WILL USE VECPOINT.
029590,000151: 36,3202           00124                           ADRES    3AXISFLG                              
029591,000152: 
029592,000153: 36,3203           04655                           TC       BANKCALL                              
029593,000154: 36,3204           54103                           CADR     R60LEM                                #  DO ATTITUDE MANEUVER ROUTINE
029594,000155: 36,3205           01153                           TC       P40/RET                               
029595,000156: 
029596,000157: 
029597,000158: 36,3206  E7,1447                                  EBANK=   TRKMKCNT                              
029598,000159: 36,3206           35062        POSTBURN           CA       LOW10                                 
029599,000160: 36,3207           55175                           TS       DISPDEX                               
029600,000161: 36,3210           00006                           EXTEND                                         
029601,000162: 36,3211           32040                           DCA      ACADN85                               
029602,000163: 36,3212           53253                           DXCH     AVEGEXIT                              
029603,000164: 36,3213           33763                           CAF      V16N40                                
029604,000165: 36,3214           04655                           TC       BANKCALL                              
029605,000166: 36,3215           20544                           CADR     GOFLASHR                              
029606,000167: 36,3216           03241                           TC       TERM40                                
029607,000168: 36,3217           13224                           TCF      TIGNOW                                
029608,000169: 36,3220           03206                           TC       POSTBURN                              
029609,000170: 
029610,000171: 36,3221           05413        P40PHS1            TC       PHASCHNG                              
029611,000172: 36,3222           00014                           OCT      00014                                 
029612,000173: 36,3223           15225                           TCF      ENDOFJOB                              
029613,000174: 
029614,000175: 36,3224           00004        TIGNOW             INHINT                                         
029615,000176: 36,3225           04737                           TC       IBNKCALL                              
029616,000177: 36,3226           40232                           CADR     ZATTEROR                              
029617,000178: 36,3227           04737                           TC       IBNKCALL                              
029618,000179: 36,3230           40221                           CADR     SETMINDB                              
029619,000180: 36,3231           00003                           RELINT                                         
029620,000181: 36,3232           33764                           CAF      V16N85B                               
029621,000182: 36,3233           04655                           TC       BANKCALL                              
029622,000183: 36,3234           20375                           CADR     REFLASHR                              
029623,000184: 36,3235           03241                           TC       TERM40                                
029624,000185: 36,3236           13241                           TCF      TERM40                                
029625,000186: 36,3237           03232                           TC       -5                                    
029626,000187: 
029627,000188: 36,3240           13221                           TCF      P40PHS1                               
029628,000189: 
029629,000190: 36,3241           00006        TERM40             EXTEND                                         
029630,000191: 36,3242           32071                           DCA      SERVCADR                              
029631,000192: 36,3243           53253                           DXCH     AVEGEXIT                              
029632,000193: 36,3244           35030                           CAF      ZERO                                  
029633,000194: 36,3245           55447                           TS       TRKMKCNT                              #       ZERO RENDZVS CNTERS
029634,000195: 36,3246           35062                           CA       LOW10                                 
029635,000196: 36,3247           55175                           TS       DISPDEX                               
029636,000197: 36,3250           00004                           INHINT                                         
029637,000198: 36,3251           04737                           TC       IBNKCALL                              
029638,000199: 36,3252           40204                           CADR     RESTORDB                              
029639,000200: 36,3253           00003                           RELINT                                         
029640,000201: 36,3254           04106                           TC       GOTOPOOH                              
029641,000202: 
029642,000203: 36,3255  E7,1430                                  EBANK=   WHICH                                 
029643,000204: 36,3255                                           COUNT*   $$/P41                                
029644,000205: 36,3255           33115        P41LM              CAF      P41ADRES                              #  INITIALIZATION FOR BURNBABY
029645,000206: 36,3256           55430                           TS       WHICH                                 
029646,000207: 
029647,000208: 36,3257           04655                           TC       BANKCALL                              
029648,000209: 36,3260           11064                           CADR     R02BOTH                               
029649,000210: 
029650,000211: 36,3261           06014                           TC       INTPRET                               #  BOTH LM
029651,000212: 36,3262           71214                           BON      DLOAD                                 #  IF NJETSFLAG IS SET, LOAD 2 JET F
029652,000213: 36,3263           00700                                    NJETSFLG                              
029653,000214: 36,3264           75270                                    P41FJET1                              
029654,000215: 36,3265           35733                                    FRCS4                                 #  IF NJETSFLAG IS CLEAR, LOAD 4 JET F
029655,000216: 
029656,000217: 36,3266           37723        P41FJET            STCALL   F                                     
029657,000218: 36,3267           75273                                    P41IN                                 
029658,000219: 36,3270           77745        P41FJET1           DLOAD                                          
029659,000220: 
029660,000221: 36,3271           35735                                    FRCS2                                 
029661,000222: 36,3272           03723                           STORE    F                                     
029662,000223: 
029663,000224: 36,3273           77624        P41IN              CALL                                           
029664,000225: 36,3274           56253                                    S40.1                                 #  BOTH
029665,000226: 36,3275           77624        P41NORM            CALL                                           
029666,000227: 36,3276           56416                                    S40.2,3                               #  CALCULATE PREFERRED IMU ORIENTATION AND
029667,000228: 36,3277           77776                           EXIT                                           #  SET PFRATFLG.
029668,000229: 
029669,000230: 36,3300           00004                           INHINT                                         
029670,000231: 36,3301           04737                           TC       IBNKCALL                              
029671,000232: 36,3302           40232                           CADR     ZATTEROR                              #  ZERO ATTITUDE ERRORS
029672,000233: 36,3303           04737                           TC       IBNKCALL                              
029673,000234: 36,3304           40221                           CADR     SETMINDB                              #  SET 0.3 DEGREE DEADBAND
029674,000235: 36,3305           03176                           TC       P40SXT4                               
029675,000236: 
029676,000237: 36,3306           06014                           TC       INTPRET                               
029677,000238: 36,3307           45175                           VLOAD    CALL                                  #  TRANSFORM VELOCITY-TO-BE-GAINED AT TIG
029678,000239: 36,3310           03674                                    VGTIG                                 #  FROM REFERENCE COORDINATES TO LM BODY-
029679,000240: 36,3311           57307                                    S41.1                                 #  AXIS COORDINATES FOR V16N85 DISPLAY.
029680,000241: 36,3312           03773                           STORE    VGBODY                                #  (SCALED AT 2 (+7) METERS/CENTISECOND)
029681,000242: 36,3313           77776                           EXIT                                           
029682,000243: 
029683,000244: 36,3314           33764                           CAF      V16N85B                               
029684,000245: 36,3315           04655                           TC       BANKCALL                              
029685,000246: 36,3316           20361                           CADR     GODSPRET                              
029686,000247: 
029687,000248: 
029688,000249: 36,3317           35067                           CAF      PRIO5                                 
029689,000250: 36,3320           55175                           TS       DISPDEX                               #  FOR SAFETY ONLY
029690,000251: 36,3321           05155                           TC       FINDVAC                               
029691,000252: 36,3322  E7,1673                                  EBANK=   VGPREV                                
029692,000253: 36,3322           03344 74067                     2CADR    DYNMDISP                              
029693,000254: 
029694,000255: 36,3324           05373                           TC       2PHSCHNG                              
029695,000256: 36,3325           00076                           OCT      00076                                 #  GROUP 6 RESTARTS AT REDO6.7
029696,000257: 36,3326           04024                           OCT      04024                                 #  GROUP 4 RESTARTS HERE
029697,000258: 
029698,000259:                                                                                                  #            ***********************
029699,000260: 36,3327           12142                           TCF      B*RNB*B*                              
029700,000261:                                                                                                  #            ***********************
029701,000262: 
029702,000263: 
029703,000264: 36,3330           35047        BLNKWAIT           CAF      1SEC                                  
029704,000265: 36,3331           04655                           TC       BANKCALL                              
029705,000266: 36,3332           01730                           CADR     DELAYJOB                              
029706,000267: 
029707,000268: 36,3333           31175        REDO6.7            CA       DISPDEX                               #  ON A RESTART, DO NOT PUT UP DISPLAY IF
029708,000269: 36,3334           65025                           AD       TWO                                   #  BLANKING (BETWEEN TIG-35 AND TIG-30)
029709,000270: 
029710,000271:                                                                                                  #            ***********************
029711,000272: 
029712,000273: 
029713,000274: 36,3335           00006                           EXTEND                                         
029714,000275: 36,3336           13330                           BZF      BLNKWAIT                              
029715,000276: 
029716,000277: 36,3337           33764                           CAF      V16N85B                               
029717,000278: 36,3340           04655                           TC       BANKCALL                              
029718,000279: 36,3341           20361                           CADR     GODSPRET                              
029719,000280: 
029720,000281: 36,3342           35067                           CAF      PRIO5                                 
029721,000282: 36,3343           05216                           TC       PRIOCHNG                              
029722,000283: 
029723,000284: 36,3344           31175        DYNMDISP           CA       DISPDEX                               #  A NON-POSITIVE DISPDEX INDICATES PAST
029724,000285: 36,3345           00006                           EXTEND                                         #  TIG-35, SO SERVICER WILL BE DOING THE
029725,000286: 36,3346           65225                           BZMF     ENDOFJOB                              #  UPDATING OF NOUN 85. STOP DYNMDISP.
029726,000287: 36,3347           06014                           TC       INTPRET                               
029727,000288: 36,3350           45175                           VLOAD    CALL                                  
029728,000289: 36,3351           03674                                    VGPREV                                
029729,000290: 36,3352           57307                                    S41.1                                 
029730,000291: 36,3353           03773                           STORE    VGBODY                                
029731,000292: 36,3354           77776                           EXIT                                           
029732,000293: 36,3355           35047                           CAF      1SEC                                  
029733,000294: 36,3356           04655                           TC       BANKCALL                              
029734,000295: 36,3357           01730                           CADR     DELAYJOB                              
029735,000296: 36,3360           13344                           TCF      DYNMDISP                              
029736,000297: 
029737,000298: 36,3361           06014        CALCN85            TC       INTPRET                               
029738,000299: 36,3362           77624                           CALL                                           
029739,000300: 36,3363           75607                                    UPDATEVG                              
029740,000301: 36,3364           45175                           VLOAD    CALL                                  
029741,000302: 36,3365           03674                                    VGPREV                                
029742,000303: 36,3366           57307                                    S41.1                                 
029743,000304: 36,3367           03773                           STORE    VGBODY                                
029744,000305: 36,3370           77776                           EXIT                                           
029745,000306: 36,3371           04674                           TC       POSTJUMP                              
029746,000307: 36,3372           66351                           CADR     SERVEXIT                              
029747,000308: 
029748,000309: 36,3373                                           COUNT*   $$/P42                                
029749,000310: 36,3373  E7,1430                                  EBANK=   WHICH                                 
029750,000311: 
029751,000312: 36,3373           33116        P42LM              CAF      P42ADRES                              #  INITIALIZATION FOR BURNBABY.
029752,000313: 36,3374           55430                           TS       WHICH                                 
029753,000314: 
029754,000315: 36,3375           00006                           EXTEND                                         
029755,000316: 36,3376           00030                           READ     CHAN30                                
029756,000317: 36,3377           40000                           COM                                            
029757,000318: 36,3400           75025                           MASK     BIT2                                  
029758,000319: 36,3401           10000                           CCS      A                                     
029759,000320: 36,3402           03714                           TC       P40ALM                                
029760,000321: 36,3403           04655                           TC       BANKCALL                              
029761,000322: 36,3404           11064                           CADR     R02BOTH                               
029762,000323: 36,3405           33760                           CAF      THRESH2                               #  INITIALIZE DVMON
029763,000324: 36,3406           55201                           TS       DVTHRUSH                              
029764,000325: 36,3407           35026                           CAF      ONE                                   
029765,000326: 36,3410           55202                           TS       AUXFLAG                               
029766,000327: 36,3411           35024                           CAF      FOUR                                  
029767,000328: 36,3412           55472                           TS       DVCNTR                                
029768,000329: 
029769,000330: 36,3413           06014                           TC       INTPRET                               
029770,000331: 36,3414           77214                           SET      VLOAD                                 #  LOAD FAPS, MDOTAPS, AND ATDECAY INTO
029771,000332: 36,3415           01072                                    AVFLAG                                #  F, MDOT, AND TDECAY BY VECTOR LOAD.
029772,000333: 36,3416           35737                                    FAPS                                  
029773,000334: 36,3417           37723                           STCALL   F                                     
029774,000335: 36,3420           75164                                    P40IN                                 
029775,000336: 
029776,000337: 36,3421  E7,1430                                  EBANK=   WHICH                                 
029777,000338: 
029778,000339: 36,3421                                           COUNT*   $$/P47                                
029779,000340: 36,3421           04655        P47LM              TC       BANKCALL                              
029780,000341: 36,3422           11064                           CADR     R02BOTH                               
029781,000342: 36,3423           06014                           TC       INTPRET                               
029782,000343: 36,3424           43234                           RTB      DAD                                   
029783,000344: 36,3425           21454                                    LOADTIME                              
029784,000345: 36,3426           35745                                    SEC60DP                               
029785,000346: 36,3427           03425                           STORE    TIG                                   
029786,000347: 36,3430           77776                           EXIT                                           
029787,000348: 
029788,000349: 36,3431           00006                           EXTEND                                         
029789,000350: 36,3432           33745                           DCA      SEC60DP                               
029790,000351: 36,3433           05337                           TC       LONGCALL                              
029791,000352: 36,3434  E7,1430                                  EBANK=   WHICH                                 
029792,000353: 36,3434           03445 74067                     2CADR    STARTP47                              
029793,000354: 
029794,000355: 36,3436           00003                           RELINT                                         
029795,000356: 36,3437           06014                           TC       INTPRET                               
029796,000357: 36,3440           45145                           DLOAD    CALL                                  
029797,000358: 36,3441           03425                                    TIG                                   
029798,000359: 36,3442           65672                                    TIGINT     -1                         
029799,000360: 36,3443           77776                           EXIT                                           
029800,000361: 
029801,000362: 36,3444           15225                           TCF      ENDOFJOB                              
029802,000363: 
029803,000364: 36,3445           05413        STARTP47           TC       PHASCHNG                              
029804,000365: 36,3446           05014                           OCT      05014                                 
029805,000366: 36,3447           77777                           OCT      77777                                 
029806,000367: 
029807,000368: 36,3450           00006                           EXTEND                                         
029808,000369: 36,3451           33767                           DCA      ACADN83                               
029809,000370: 36,3452           53253                           DXCH     AVEGEXIT                              
029810,000371: 36,3453           35011                           CAF      PRIO20                                
029811,000372: 36,3454           05155                           TC       FINDVAC                               
029812,000373: 36,3455  E7,1607                                  EBANK=   DELVIMU                               
029813,000374: 36,3455           03511 74067                     2CADR    P47BODY                               
029814,000375: 36,3457           12372                           TCF      REDO4.2                               #  CHECKS PHASE 5 AND GOES TO PREREAD
029815,000376:                                                                                                  #  SEE TIG-30 IN BURNBABY.
029816,000377: 
029817,000378: 36,3460           06014        CALCN83            TC       INTPRET                               
029818,000379: 36,3461           53375                           VLOAD    VAD                                   
029819,000380: 36,3462           03773                                    DELVCTL                               
029820,000381: 36,3463           03504                                    DELVREF                               
029821,000382: 36,3464           03643                           STORE    DELVSIN                               #  TEMP STORAGE FOR RESTARTS
029822,000383: 
029823,000384: 36,3465           77624                           CALL                                           
029824,000385: 36,3466           57307                                    S41.1                                 
029825,000386: 36,3467           03610                           STORE    DELVIMU                               
029826,000387: 36,3470           77776                           EXIT                                           
029827,000388: 36,3471           05413                           TC       PHASCHNG                              
029828,000389: 36,3472           10035                           OCT      10035                                 #  REREADAC AND HERE
029829,000390: 
029830,000391: 36,3473           06014                           TC       INTPRET                               
029831,000392: 36,3474           77775                           VLOAD                                          
029832,000393: 36,3475           03643                                    DELVSIN                               
029833,000394: 36,3476           03773                           STORE    DELVCTL                               
029834,000395: 36,3477           77776                           EXIT                                           
029835,000396: 
029836,000397: 36,3500           04674                           TC       POSTJUMP                              
029837,000398: 36,3501           66351                           CADR     SERVEXIT                              
029838,000399: 
029839,000400: 36,3502           33765        P47BOD             CAF      V1683                                 
029840,000401: 36,3503           04655                           TC       BANKCALL                              
029841,000402: 36,3504           20544                           CADR     GOFLASHR                              
029842,000403: 36,3505           04106                           TC       GOTOPOOH                              
029843,000404: 36,3506           04106                           TC       GOTOPOOH                              
029844,000405: 
029845,000406: 36,3507           13511                           TCF      P47BODY                               
029846,000407: 
029847,000408: 36,3510           13221                           TCF      P40PHS1                               
029848,000409: 
029849,000410: 36,3511           06014        P47BODY            TC       INTPRET                               
029850,000411: 36,3512           77775                           VLOAD                                          
029851,000412: 36,3513           06233                                    HI6ZEROS                              
029852,000413: 36,3514           03610                           STORE    DELVIMU                               
029853,000414: 36,3515           03773                           STORE    DELVCTL                               
029854,000415: 36,3516           77776                           EXIT                                           
029855,000416: 36,3517           03502                           TC       P47BOD                                
029856,000417: 
029857,000418: 36,3520                                           COUNT*   $$/P40                                
029858,000419: 36,3520           31474        IMPLBURN           CA       TGO        +1                         
029859,000420: 36,3521           05243                           TC       TWIDDLE                               
029860,000421: 36,3522           03537                           ADRES    ENGOFTSK                              
029861,000422: 36,3523           05575                           TC       DOWNFLAG                              #  TURN OFF IGNFLAG
029862,000423: 36,3524           00153                           ADRES    IGNFLAG                               
029863,000424: 36,3525           05575                           TC       DOWNFLAG                              #  TURN OFF ASTNFLG
029864,000425: 36,3526           00154                           ADRES    ASTNFLAG                              
029865,000426: 36,3527           05575                           TC       DOWNFLAG                              #  TURN OFF IMPULSW
029866,000427: 36,3530           00044                           ADRES    IMPULSW                               
029867,000428: 36,3531           05413                           TC       PHASCHNG                              #  RESTART PROTECT ENGOFTSK (ENGINOFF)
029868,000429: 36,3532           40114                           OCT      40114                                 
029869,000430: 
029870,000431: 36,3533           05271                           TC       FIXDELAY                              #  WAIT HALF A SECOND
029871,000432: 36,3534           00062                           DEC      50         B-14                       
029872,000433: 
029873,000434: 36,3535           02643                           TC       NOULLAGE                              #  TURN OFF ULLAGE
029874,000435: 
029875,000436: 36,3536           05321                           TC       TASKOVER                              
029876,000437: 
029877,000438: 36,3537           04737        ENGOFTSK           TC       IBNKCALL                              #  THIS CODING ALLOWS ENGINOFF ET AL TO BE
029878,000439: 36,3540           75542                           CADR     ENGINOFF                              #  USED BOTH BY WAITLIST AND BY TC IBNKCALL
029879,000440: 36,3541           05321                           TC       TASKOVER                              
029880,000441: 
029881,000442: 36,3542           34703        ENGINOFF           CAF      PRIO12                                #  MUST BE LOWER PRIO THAN CLOCKJOB
029882,000443: 36,3543           05155                           TC       FINDVAC                               
029883,000444: 36,3544  E7,1447                                  EBANK=   TRKMKCNT                              
029884,000445: 36,3544           03206 74067                     2CADR    POSTBURN                              
029885,000446: 
029886,000447: 36,3546           40103        ENGINOF1           CS       FLAGWRD7                              #  SET THE IDLE BIT.
029887,000448: 36,3547           75020                           MASK     IDLEFBIT                              
029888,000449: 36,3550           26103                           ADS      FLAGWRD7                              
029889,000450: 
029890,000451: 36,3551           02643                           TC       NOULLAGE                              
029891,000452: 
029892,000453: 36,3552           00006                           EXTEND                                         
029893,000454: 36,3553           30025                           DCA      TIME2                                 
029894,000455: 36,3554           53355                           DXCH     TEVENT                                
029895,000456: 
029896,000457: 36,3555           35026        ENGINOF2           CAF      BIT1                                  
029897,000458: 36,3556           05252                           TC       WAITLIST                              
029898,000459: 36,3557  E6,1420                                  EBANK=   OMEGAQ                                
029899,000460: 36,3557           03604 74066                     2CADR    COASTSET                              
029900,000461: 
029901,000462: 36,3561           44367        ENGINOF3           CS       PRIO30                                #  ENGINOF3 IS USED AS A PRE-ENGINE ARM
029902,000463: 36,3562           00006                           EXTEND                                         #  SUBROUTINE.
029903,000464: 36,3563           02011                           RAND     DSALMOUT                              
029904,000465: 36,3564           65011                           AD       PRIO20                                #  TURN OFF THE ENGINE - DPS OR APS
029905,000466: 36,3565           00006                           EXTEND                                         
029906,000467: 36,3566           01011                           WRITE    DSALMOUT                              
029907,000468: 
029908,000469: 36,3567           45020                           CS       ENGONBIT                              #  INSURE ENGONFLG IS CLEAR.
029909,000470: 36,3570           70101                           MASK     FLAGWRD5                              
029910,000471: 36,3571           54101                           TS       FLAGWRD5                              
029911,000472: 
029912,000473: 36,3572           41102                           CS       DAPBOOLS                              #  TURN OFF TRIM GIMBAL
029913,000474: 36,3573           75011                           MASK     USEQRJTS                              
029914,000475: 36,3574           27102                           ADS      DAPBOOLS                              
029915,000476: 
029916,000477: 36,3575           45012                           CS       HIRTHROT                              #  ZERO AUTO-THROTTLE WHENEVER THE ENGINE
029917,000478: 36,3576           55417                           TS       PIF                                   
029918,000479: 36,3577           54055                           TS       THRUST                                #  IS TURNED OFF.
029919,000480: 36,3600           35023                           CAF      BIT4                                  #  THE HARDWARE DOES SO ONLY WHEN THE
029920,000481: 36,3601           00006                           EXTEND                                         #  ENGINE IS DISARMED.
029921,000482: 36,3602           05014                           WOR      CHAN14                                
029922,000483: 
029923,000484: 36,3603           04752                           TC       ISWRETRN                              
029924,000485: 
029925,000486: 36,3604           04737        COASTSET           TC       IBNKCALL                              #  DO DAP COASTING INITIALIZATION
029926,000487: 36,3605           40263                           CADR     ALLCOAST                              
029927,000488: 36,3606           05321                           TC       TASKOVER                              
029928,000489: 
029929,000490: 36,3607  E6,1420                                  EBANK=   OMEGAQ                                
029930,000491: 36,3607           45020        UPDATEVG           STQ      CALL                                  
029931,000492: 36,3610           03652                                    QTEMP1                                
029932,000493: 36,3611           56440                                    S40.8                                 #  X-PRODUCT STEERING
029933,000494: 36,3612           43014                           BON      BOFSET                                
029934,000495: 36,3613           01307                                    XDELVFLG                              
029935,000496: 36,3614           03652                                    QTEMP1                                
029936,000497: 36,3615           01045                                    CYCLESW                               
029937,000498: 36,3616           03652                                    QTEMP1                                
029938,000499: 36,3617           77776                           EXIT                                           
029939,000500: 
029940,000501: 36,3620           10755                           CCS      PHASE2                                
029941,000502: 36,3621           13634                           TCF      ENDSTEER                              #  GROUP 2 ACTIVE --> LAMBERT STILL GOING.
029942,000503: 
029943,000504: 36,3622           35012                           CAF      PRIO10                                
029944,000505: 36,3623           00004                           INHINT                                         
029945,000506: 36,3624           05155                           TC       FINDVAC                               
029946,000507: 36,3625  E7,1702                                  EBANK=   VG                                    
029947,000508: 36,3625           03071 56067                     2CADR    S40.9                                 #  LAMBERT VTOGAIN
029948,000509: 
029949,000510: 36,3627           05373                           TC       2PHSCHNG                              
029950,000511: 36,3630           00172                           OCT      00172                                 #  2.17SPOT FOR S40.9
029951,000512: 36,3631           10035                           OCT      10035                                 #  HERE AND REREADAC AFTER RESTART
029952,000513: 
029953,000514: 36,3632           05575                           TC       DOWNFLAG                              
029954,000515: 36,3633           00043                           ADRES    CYCLESW                               #  VG CALCULATION OMITTED
029955,000516: 36,3634           06014        ENDSTEER           TC       INTPRET                               
029956,000517: 36,3635           77650                           GOTO                                           
029957,000518: 36,3636           03652                                    QTEMP1                                
029958,000519: 
029959,000520: 36,3637           06014        STEERING           TC       INTPRET                               
029960,000521: 
029961,000522: 36,3640           77624                           CALL                                           
029962,000523: 36,3641           75607                                    UPDATEVG                              
029963,000524: 36,3642           77776                           EXIT                                           
029964,000525: 
029965,000526: 36,3643  E7,1472                                  EBANK=   DVCNTR                                
029966,000527: 36,3643           00004        NSTEER             INHINT                                         
029967,000528: 36,3644           35066                           CA       EBANK7                                
029968,000529: 36,3645           54003                           TS       EBANK                                 
029969,000530:                                                                                                  #  PHASE CHANGE IN SERVERICER NEEDED HERE *********************************
029970,000531: 36,3646           40076                           CS       FLAGWRD2                              #  CHECK IMPULSE SWITCH.  IT IS SET EITHER
029971,000532: 36,3647           75016                           MASK     IMPULBIT                              #  BY S40.13 IF TBURN<6 SECS OR BY S40.8 IF
029972,000533: 36,3650           10000                           CCS      A                                     #  STEERING IS ALMOST DONE.
029973,000534: 
029974,000535: 36,3651           13656                           TCF      +5                                    #  IMPULSW = 0    EXIT
029975,000536: 
029976,000537: 36,3652           40103                           CS       FLAGWRD7                              #  IMPULSW = 1    WHY?  CHECK IDLEFLAG
029977,000538: 36,3653           75020                           MASK     IDLEFBIT                              #      (IDLEFLAG = 0 --> DVMON ON)
029978,000539: 36,3654           10000                           CCS      A                                     
029979,000540: 36,3655           13660                           TCF      +3                                    #  DVMON ON-->THRUSTING-->IMPULSW VIA S40.8
029980,000541: 36,3656           04674                           TC       POSTJUMP                              #  DVMON OFF-->IMPULSW ON VIA S40.13-->EXIT
029981,000542: 36,3657           66351                           CADR     SERVEXIT                              
029982,000543: 
029983,000544: 36,3660           05575                           TC       DOWNFLAG                              #  TURN OFF IMPULSW
029984,000545: 36,3661           00044                           ADRES    IMPULSW                               
029985,000546: 
029986,000547: 36,3662           05563                           TC       UPFLAG                                
029987,000548: 36,3663           00161                           ADRES    IDLEFLAG                              #  TURN OFF DVMON
029988,000549: 
029989,000550: 36,3664           00004                           INHINT                                         
029990,000551: 36,3665           00006                           EXTEND                                         
029991,000552: 36,3666           31425                           DCA      TIG                                   
029992,000553: 36,3667           52155                           DXCH     MPAC                                  
029993,000554: 36,3670           00006                           EXTEND                                         
029994,000555: 36,3671           40025                           DCS      TIME2                                 
029995,000556: 36,3672           20155                           DAS      MPAC                                  
029996,000557: 36,3673           07231                           TC       TPAGREE                               
029997,000558: 36,3674           30155                           CAE      MPAC       +1                         
029998,000559: 36,3675           10000                           CCS      A                                     
029999,000560: 36,3676           13701                           TCF      +3                                    
030000,000561: 36,3677           13701                           TCF      +2                                    
030001,000562: 36,3700           35030                           CAF      ZERO                                  
030002,000563: 36,3701           65026                           AD       ONE                                   
030003,000564: 36,3702           56001                           XCH      L                                     
030004,000565: 36,3703           35030                           CAF      ZERO                                  
030005,000566: 36,3704           53474                           DXCH     TGO                                   
030006,000567: 36,3705           31474                           CA       TGO        +1                         
030007,000568: 36,3706           05243                           TC       TWIDDLE                               
030008,000569: 36,3707           03537                           ADRES    ENGOFTSK                              
030009,000570: 36,3710           05373                           TC       2PHSCHNG                              
030010,000571: 36,3711           40114                           OCT      40114                                 #  ENGOFTSK (ENGINOFF)
030011,000572: 36,3712           00035                           OCT      00035                                 #  SERVICER--REREADAC
030012,000573: 
030013,000574: 36,3713           15225                           TCF      ENDOFJOB                              
030014,000575: 
030015,000576: 36,3714           05646        P40ALM             TC       ALARM                                 #  ASTRONAUT DOESN'T AGREE WITH STAGE
030016,000577: 36,3715           01706                           OCT      01706                                 #  VERIFY DISCRETE.  HE HAS SELECTED P40,
030017,000578: 36,3716           35056                           CAF      V05N09                                #  BUT THE DAP THINKS THAT THE DESCENT UNIT
030018,000579: 36,3717           04655                           TC       BANKCALL                              #  IS GONE--A SITUATION THAT WOULD MAKE A
030019,000580: 36,3720           20406                           CADR     GOFLASH                               #  DPS BURN EXCEEDINGLY DIFFICULT.
030020,000581: 
030021,000582: 36,3721           14106                           TCF      GOTOPOOH                              #  V34E  TERMINATE
030022,000583: 36,3722           13716                           TCF      -4                                    #  V33E  PROCEED  (ILLEGAL)
030023,000584: 36,3723           13716                           TCF      -5                                    #        RECYCLE  (ILLEGAL)
030024,000585: 
030025,000586:                                                                                                  #  ************************************************************************
030026,000587: 
030027,000588: 36,3724           01050 33423  FDPS               2DEC     4.319223   B-7                        #  9710.0 LBS FORCE IN NEWTONS
030028,000589: 36,3726           00022 07742  MDOTDPS            2DEC     0.00891025 B-3                        #  32.62 LBS/SEC IN KGS/CS.
030029,000590: 36,3730           77777 77731  DTDECAY            2DEC     -38        B-28                       
030030,000591: 
030031,000592: 36,3732           00026 30630  FRCS4              2DEC     0.177929   B-7                        #  400 LBS FORCE IN NEWTONS
030032,000593: 36,3734           00013 14314  FRCS2              2DEC     0.0889645  B-7                        #  200 LBS FORCE IN NEWTONS
030033,000594: 
030034,000595: 36,3736           00307 10516  FAPS               2DEC     1.5568     B-7                        #  3500 LBS FORCE IN NEWTONS
030035,000596: 36,3740           00151 07074  MDOTAPS            2DEC     0.05137812 B-3                        #  11.32 LBS/SEC IN KGS/CS
030036,000597: 36,3742           77777 77765  ATDECAY            2DEC     -10        B-28                       
030037,000598: 
030038,000599: 36,3744           00000        SEC60DP            OCT      00000                                 #  DON'T SEPARATE
030039,000600: 36,3745           13560        SEC60              DEC      6000       B-14                       #  DON'T SEPARATE
030040,000601: 36,3746           00000        SEC15DP            OCT      00000                                 #  DON'T SEPARATE
030041,000602: 36,3747           02734        SEC15              DEC      1500       B-14                       #  DON'T SEPARATE
030042,000603: 36,3750           00000 05670  SEC30DP            2DEC     3000       B-28                       
030043,000604: 36,3752           00000        SEC45DP            OCT      00000                                 #  DON'T MOVE FROM JUST BEFORE SEC45
030044,000605: 36,3753           10624        SEC45              DEC      4500       B-14                       
030045,000606: 36,3754           00000        5SECDP             OCT      00000                                 #  DON'T MOVE FROM JUST BEFORE 5SEC
030046,000607: 36,3755           00764        5SEC               DEC      500        B-14                       
030047,000608: 36,3756           05050        26SECS             DEC      2600       B-14                       
030048,000609: 36,3757           00030        THRESH1            DEC      24         B-14                       
030049,000610: 36,3760           00464        THRESH2            DEC      308        B-14                       
030050,000611: 36,3761           00014        THRESH3            DEC      12         B-14                       
030051,000612: 36,3762     5012               HIRTHROT           =        BIT13                                 
030052,000613: 36,3762           00203        P40A/PMD           OCT      00203                                 
030053,000614: 36,3763           04050        V16N40             VN       1640                                  
030054,000615: 36,3764           04125        V16N85B            VN       1685                                  
030055,000616: 36,3765           04123        V1683              VN       1683                                  
030056,000617: 36,3766     5047               SEC01              =        1SEC                                  
030057,000618: 36,3766  36,2037               ACADN85            =        P41TABLE   +2                         
030058,000619: 
030059,000620: 36,3766  E7,1607                                  EBANK=   DELVIMU                               
030060,000621: 36,3766           03460 74067  ACADN83            2CADR    CALCN83                               
030061,000622: 

Sundance 302

030063,000624: 
030064,000625:                                                                                                  #  *************************************************
030065,000626: 
030066,000627:                                                                                                  #  PROGRAM DESCRIPTION S40.1       DATE15NOV66
030067,000628:                                                                                                  #  MOD N02         LOG SECTION  P40-P47
030068,000629:                                                                                                  #  MOD BY ZELDIN AND ADAPTED BY TALAYCO
030069,000630:                                                                                                  #  FUNCTIONAL DESCRIPTION
030070,000631:                                                                                                  #           COMPUTE INITIAL THRUST DIRECTION(UT) AND INITIAL VALUE OF VG
030071,000632:                                                                                                  #           VECTOR(VGTIG).
030072,000633:                                                                                                  #  CALLING SEQUENCE
030073,000634:                                                                                                  #         L CALL
030074,000635:                                                                                                  #       L+1        S40.1
030075,000636:                                                                                                  #  NORMAL EXIT MODE
030076,000637:                                                                                                  #           AT L+2 OF CALLING SEQUENCE (GOTO L+2)  NORMAL RETURN OR
030077,000638:                                                                                                  #           ERROR RETURN IF NOSOFLAG =1
030078,000639:                                                                                                  #  SUBROUTINES CALLED
030079,000640:                                                                                                  #           LEMPREC
030080,000641:                                                                                                  #           INITVEL
030081,000642:                                                                                                  #           CALCGRAV
030082,000643:                                                                                                  #           MIDGIM
030083,000644:                                                                                                  #  ALARM OR ABORT EXIT MODES
030084,000645:                                                                                                  #       L+2 OF CALLING SEQUENCE,UNSOLVABLE CONIC IF NOSOFLAG=1
030085,000646:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
030086,000647:                                                                                                  #                  WEIGHT/G  ANTICIPATED VEHICLE MASS         DP  B16KGM
030087,000648:                                                                                                  #           XDELVFLG       1=DELTA-V MANEUVER,0=AIMPT STEER
030088,000649:                                                                                                  #            F         THRUST FOR ENGINE USED
030089,000650:                                                                                                  #        IF DELTA-V MANEUVER
030090,000651:                                                                                                  #           DELVSIN   SPECIFIED DELTA-V REQUIRED IN
030091,000652:                                                                                                  #                     INERTIAL COORDS. OF ACTIVE VEHICLE
030092,000653:                                                                                                  #                     AT TIME OF IGNITION                 VECTOR B7M/CS
030093,000654:                                                                                                  #           DELVSAB   MAG. OF DELVSIN                     DP     B7M/CS
030094,000655:                                                                                                  #           RTIG      POSITION AT TIME OF IGNITION       VECTOR B29M
030095,000656:                                                                                                  #           VTIG      VELOCITY AT TIME OF IGNITION       VECTOR B7M/CS
030096,000657:                                                                                                  #        IF AIMPT STEER
030097,000658:                                                                                                  #           TIG       TIME OF IGNITION                    DP     B28CS
030098,000659:                                                                                                  #           RTARG     POSITION TARGET TIME               VECTOR B29M
030099,000660:                                                                                                  #           CSTEER    C FOR STEER LAW                     DP     B2
030100,000661:                                                                                                  #           DLTARG    TARGET TIME-IGNITION TIME          DP     B28CS
030101,000662:                                                                                                  #  OUTPUT
030102,000663:                                                                                                  #        UT           DESIRED THRUST DIRECTION            VECT. B2M/(CS.CS)
030103,000664:                                                                                                  #        VGTIG        INITIAL VALUE OF VELOCITY
030104,000665:                                                                                                  #                     TO BE GAINED (INERT. COORD.)        VECTOR B7M/CS
030105,000666:                                                                                                  #        DELVLVC      VGTIG IN LOC. VERT. COORDS.                B7M/CS
030106,000667:                                                                                                  #           BDT   V REQUIRED AT TIG -V REQUIRED AT (TIG-2SEC)
030107,000668:                                                                                                  #           -GDT  FOR S40.13                                   VECT  B7M/CS
030108,000669:                                                                                                  #        RTIG         CALC IN S40.1B(AIMPT) FOR S40.2,3  VECTOR B29M
030109,000670:                                                                                                  #                     POSITION AT TIME OF IGNITION
030110,000671:                                                                                                  #  DEBRIS      QTEMP1
030111,000672:                                                                                                  #        MPAC,QPRET
030112,000673:                                                                                                  #        PUSHLIST
030113,000674: 
030114,000675: 14,2000                                           BANK     14                                    
030115,000676: 27,2000                                           SETLOC   P40S1                                 
030116,000677: 27,2000                                           BANK                                           
030117,000678: 
030118,000679: 27,2253                                           COUNT*   $$/S40.1                              
030119,000680: 27,2253           44014        S40.1              CLEAR    STQ                                   
030120,000681: 27,2254           03264                                    FIRSTFLG                              
030121,000682: 27,2255           03617                                    QTEMP                                 
030122,000683: 27,2256           77614        DELVTEST           BOFF                                           
030123,000684: 27,2257           01347                                    XDELVFLG                              
030124,000685: 27,2260           56345                                    S40.1B                                
030125,000686: 27,2261           77201        CALCTHET           SETPD    VLOAD                                 
030126,000687: 27,2262           00001                                    0                                     
030127,000688: 27,2263           03635                                    VTIG                                  
030128,000689: 27,2264           02347                           STORE    VINIT                                 
030129,000690: 27,2265           53435                           VXV      UNIT                                  
030130,000691: 27,2266           03627                                    RTIG                                  
030131,000692: 27,2267           27666                           STOVL    UT                                    #  UP IN UT
030132,000693: 27,2270           03627                                    RTIG                                  
030133,000694: 27,2271           02341                           STORE    RINIT                                 
030134,000695: 27,2272           65236                           VSQ      PDDL                                  
030135,000696: 27,2273           00045                                    36D                                   
030136,000697: 27,2274           56205                           DMP      DDV                                   
030137,000698: 27,2275           16415                                    THETACON                              
030138,000699: 27,2276           41205                           DMP      DMP                                   
030139,000700: 27,2277           03651                                    DELVSAB                               
030140,000701: 27,2300           01244                                    WEIGHT/G                              
030141,000702: 27,2301           77671                           DDV                                            
030142,000703: 27,2302           03723                                    F                                     
030143,000704: 27,2303           24017                           STOVL    14D                                   
030144,000705: 27,2304           03643                                    DELVSIN                               
030145,000706: 
030146,000707: 27,2305           74241                           DOT      VXSC                                  
030147,000708: 27,2306           03666                                    UT                                    
030148,000709: 27,2307           03666                                    UT                                    
030149,000710: 27,2310           41552                           VSL2     PUSH                                  #  (DELTAV.UP)UP SCALED AT 2(+7) P.D.L. 0
030150,000711: 27,2311           65245                           BVSU     PDDL                                  #  DELTA VP SCALED AT 2(+7) P.D.L. 6
030151,000712: 27,2312           03643                                    DELVSIN                               
030152,000713: 27,2313           00017                                    14D                                   
030153,000714: 27,2314           63356                           SIN      PDVL                                  
030154,000715: 27,2315           00007                                    6D                                    
030155,000716: 27,2316           53435                           VXV      UNIT                                  
030156,000717: 27,2317           03666                                    UT                                    
030157,000718: 27,2320           45561                           VXSC     STADR                                 
030158,000719: 27,2321           50103                           STOVL    VGTIG                                 #  UNIT(VPXUP)SIN(THETAT/2) IN VGTIG.
030159,000720: 27,2322           65256                           UNIT     PDDL                                  #  UNIT(DELTA VP) IN P.D.L. 6
030160,000721: 27,2323           00017                                    14D                                   
030161,000722: 27,2324           74346                           COS      VXSC                                  
030162,000723: 27,2325           74255                           VAD      VXSC                                  
030163,000724: 27,2326           03674                                    VGTIG                                 
030164,000725: 27,2327           00045                                    36D                                   
030165,000726: 27,2330           53352                           VSL2     VAD                                   
030166,000727: 27,2331           77626                           STADR                                          
030167,000728: 27,2332           74103                           STORE    VGTIG                                 #  VG IGNITION SCALED AT 2(+7) M/CS
030168,000729: 
030169,000730: 27,2333           77656                           UNIT                                           
030170,000731: 27,2334           27666                           STOVL    UT                                    #  THRUST DIRECTION SCALED AT 2(+1)
030171,000732: 27,2335           03674                                    VGTIG                                 
030172,000733: 27,2336           45006                           PUSH     CALL                                  
030173,000734: 27,2337           20025                                    GET.LVC                               #  VGTIG IN LV COOR AT 2(+7) M/CS IN DELVLVC
030174,000735: 27,2340           77775                           VLOAD                                          
030175,000736: 27,2341           06233                                    ZEROVECS                              
030176,000737: 27,2342           03660                           STORE    BDT                                   
030177,000738: 27,2343           77650                           GOTO                                           
030178,000739: 27,2344           03617                                    QTEMP                                 
030179,000740: 27,2345           77745        S40.1B             DLOAD                                          
030180,000741: 27,2346           03425                                    TIG                                   
030181,000742: 27,2347           00041                           STORE    TDEC1                                 
030182,000743: 27,2350           77621                           BDSU                                           
030183,000744: 27,2351           03616                                    TPASS4                                
030184,000745: 27,2352           36355                           STCALL   DELLT4                                #  INTERCEPT TIME - TIG.
030185,000746: 27,2353           27030                                    LEMPREC                               
030186,000747: 27,2354           40375                           VLOAD    SETPD                                 #  LOAD STATE VECTOR AT TIG FOR INITVEL.
030187,000748: 27,2355           00001                                    RATT                                  
030188,000749: 27,2356           00001                                    0                                     
030189,000750: 27,2357           03627                           STORE    RTIG                                  
030190,000751: 27,2360           26341                           STOVL    RINIT                                 
030191,000752: 27,2361           00007                                    VATT                                  
030192,000753: 27,2362           02347                           STORE    VINIT                                 
030193,000754: 27,2363           65345                           DLOAD    PDDL                                  #  NUMIT = 0
030194,000755: 27,2364           06233                                    ZEROVECS                              
030195,000756: 27,2365           16411                                    EPS1                                  
030196,000757: 27,2366           43214                           BOFF     DAD                                   
030197,000758: 27,2367           03745                                    NORMSW                                
030198,000759: 27,2370           56372                                    SMALLEPS                              
030199,000760: 27,2371           16413                                    EPS2                                  #  EPSILON4 = 10 DEGREES OR 45 DEGREES.
030200,000761: 27,2372           74006        SMALLEPS           PUSH     AXC,1                                 
030201,000762: 27,2373           00002                                    2                                     
030202,000763: 27,2374           77624                           CALL                                           
030203,000764: 27,2375           22022                                    INITVEL                               
030204,000765: 27,2376           41575                           VLOAD    PUSH                                  
030205,000766: 27,2377           03363                                    DELVEET3                              #  VGTIG = VR - VN.
030206,000767: 27,2400           03674                           STORE    VGTIG                                 
030207,000768: 27,2401           77656                           UNIT                                           #  UT = UNIT (VGTIG)
030208,000769: 27,2402           17666                           STODL    UT                                    
030209,000770: 27,2403           00045                                    36D                                   
030210,000771: 27,2404           37651                           STCALL   VGDISP                                #  CONVERT VGTIG (IN PUSHLIST ) TO LOCAL
030211,000772: 27,2405           20025                                    GET.LVC                               #  VERTICAL COORDINATES.
030212,000773: 27,2406           77650                           GOTO                                           
030213,000774: 27,2407           03617                                    QTEMP                                 
030214,000775: 
030215,000776: 27,2410           00707 03434  EPS1               2DEC*    2.777777778 E-2*                       #  10 DEGREES AT 1 REVOLUTION.
030216,000777: 
030217,000778: 27,2412           03070 34344  EPS2               2DEC*    9.722222222 E-2*                       #  35 DEGREES AT 1 REVOLUTION.
030218,000779: 27,2414           00024 13714  THETACON           2DEC     .31830989  B-8                        
030219,000780: 
030220,000781:                                                                                                  #  SUBROUTINE NAME: S40.2,3        MOD. NO. 3 DATE: APRIL 4, 1967
030221,000782: 
030222,000783:                                                                                                  #  MODIFICATION BY: JONATHAN D. ADDELSTON (ADAMS ASSOCIATES)
030223,000784: 
030224,000785:                                                                                                  #  MOD. NO. 4:  JULY 18, 1967:  PETER ADLER (MIT/IL)
030225,000786: 
030226,000787:                                                                                                  #  MOD. NO. 5:  OCTOBER 18, 1967:  PETER ADLER (MIT/IL)
030227,000788: 
030228,000789:                                                                                                  #  ORIGINALLY BY: SAYDEAN ZELDIN (MIT INSTRUMENTATION LAB) AND RICHARD TALAYCO (SYSTEM DEVELOPMENT CORP)
030229,000790: 
030230,000791:                                                                                                  #  S40.2,3 COMPUTES "POINTVSM" WHICH IS THE HALF-UNIT DESIRED THRUST VECTOR IN STABLE-MEMBER COORDINATES FROM "UT"
030231,000792:                                                                                                  #  WHICH IS THE SAME VECTOR IN REFERENCE COORDINATES.  IT DETERMINES THE CORRECT VALUES FOR "SCAXIS" USING THE +X
030232,000793:                                                                                                  #  AXIS FOR DPS, APS, AND RCS BURNS.  THE "WINGS-LEVEL HEADS-UP" LM ORIENTATION IS THEN COMPUTED IN REFERENCE
030233,000794:                                                                                                  #  COORDINATES.  THESE VECTORS ALSO DEFINE THE "PREFERRED IMU ORIENTATION".  UPON COMPLETION OF THIS CALCULATION,
030234,000795:                                                                                                  #  THE "PREFERRED ATTITUDE COMPUTED" FLAG IS SET (PFRATFLG).
030235,000796: 
030236,000797: 
030237,000798:                                                                                                  #  CALLING SEQUENCE:
030238,000799:                                                                                                  #                                          L        CALL                   INTERPRETIVE CALL.
030239,000800:                                                                                                  #                                          L +1            S40.2,3
030240,000801:                                                                                                  #                                          L +2    (RETURN)                GIMBAL ANGLE VECTOR IN MPAC.
030241,000802: 
030242,000803:                                                                                                  #  SUBROUTINES CALLED:  NONE.
030243,000804: 
030244,000805:                                                                                                  #  NORMAL RETURN:  L +2 (SEE CALLING SEQUENCE ABOVE).
030245,000806: 
030246,000807:                                                                                                  #  ALARM/ABORT MODES:  NONE.
030247,000808: 
030248,000809:                                                                                                  #  INPUT:
030249,000810: 
030250,000811:                                                                                                  #           1. REFSMMAT            MATRIX FROM REFERENCE TO STABLE-MEMBER COORDINATES SCALED AT 2.
030251,000812:                                                                                                  #           2. UT                  HALF-UNIT DESIRED THRUST DIRECTION.
030252,000813:                                                                                                  #           3. RTIG                POSITION AT TIG IN REFERENCE COORDINATES.
030253,000814: 
030254,000815:                                                                                                  #  OUTPUT:
030255,000816: 
030256,000817:                                                                                                  #           1. : XSCREF :          WINGS-LEVEL HEADS-UP LM ORIENTATION
030257,000818:                                                                                                  #              : YSCREF :          IN REFERENCE COORDINATES
030258,000819:                                                                                                  #              : ZSCREF :          (PREFERRED IMU ORIENTATION).
030259,000820:                                                                                                  #           2. POINTVSM            DESIRED THRUST DIRECTION IN STABLE-MEMBER COORDINATES.
030260,000821:                                                                                                  #           3. SCAXIS              HALF-UNIT OF AXIS TO ALIGN IN STABLE-MEMBER COORDINATES.
030261,000822:                                                                                                  #           4. PFRATFLG            INTERPRETIVE FLAG.  ON:  PREFERRED ORIENTATION COMPUTED; OFF:  NOT COMPUTED.
030262,000823: 
030263,000824:                                                                                                  #  DEBRIS:  NONE.
030264,000825: 
030265,000826: 
030266,000827: 27,2416                                           COUNT*   $$/S40.2                              
030267,000828: 27,2416           77775        S40.2,3            VLOAD                                          #  UT: DESIRED THRUST DIRECTION (HALF-UNIT)
030268,000829: 27,2417           03666                                    UT                                    #  (PUT INTO TOP OF PUSH-DOWN-LIST.)
030269,000830: 27,2420           76521                           MXV      VSL1                                  #  TRANSFORM THRUST DIRECTION TO STABLE-
030270,000831: 27,2421           01736                                    REFSMMAT                              #  MEMBER FROM REFERENCE COORDS (RESCALE).
030271,000832: 27,2422           25256                           STOVL    POINTVSM                              #  SAVE FOR "VECPOINT" ROUTINE (LEMMANU).
030272,000833: 27,2423           06231                                    UNITX                                 #  SCAXIS SET TO +X, FOR P40 AND P42 AND
030273,000834: 27,2424           25250                           STOVL    SCAXIS                                #  FOR P41 IF RCS NOT -X,+Y,-Y,+Z,-Z.
030274,000835: 
030275,000836: 27,2425           03666                                    UT                                    #  ASSUME +X BURN ALWAYS, EVEN FOR RCS.
030276,000837: 27,2426           03574        PLUSX              STORE    XSCREF                                #  XSCREF = UT (DESIRED THRUST DIRECTION.)
030277,000838: 27,2427           53435                           VXV      UNIT                                  #  RTIG = POSITION AT TIME-OF-IGNITION.
030278,000839: 27,2430           03627                                    RTIG                                  #  YSCREF = UNIT(UT X RTIG)
030279,000840: 27,2431           03602                           STORE    YSCREF                                
030280,000841: 27,2432           76435                           VXV      VSL1                                  #  COMPUTE (YSCREF X XSCREF),BUT FOR A
030281,000842: 27,2433           03574                                    XSCREF                                #  RIGHT HANDED SYSTEM, NEED (X CROSS Y).
030282,000843: 27,2434           77676                           VCOMP                                          #  ZSCREF = - (YSCREF X XSCREF)
030283,000844: 27,2435           03610                           STORE    ZSCREF                                #         = + (XSCREF X YSCREF)
030284,000845: 
030285,000846: 27,2436           43414                           SET      RVQ                                   
030286,000847: 27,2437           01073                                    PFRATFLG                              
030287,000848: 
030288,000849:                                                                                                  #  SUBROUTINE S40.8
030289,000850: 
030290,000851:                                                                                                  #  MODIFIED APRIL 3, 1968  BY  PETER ADLER    MIT/IL
030291,000852: 
030292,000853:                                                                                                  #  DESCRIPTION
030293,000854: 
030294,000855:                                                                                                  #       S40.8 UPDATES THE VELOCITY-TO-BE-GAINED VECTOR, VG, (AND FOR LAMBERT TARGETTED BURNS ALSO EXTRAPOLATES VG
030295,000856:                                                                                                  #  USING THE BDT VECTOR)  COMPUTES THE TIME FOR ISSUING THE ENGINE OFF COMMAND, TGO, AND CALLS THE ROUTINE
030296,000857:                                                                                                  #  "FINDCDUW", WHICH GENERATES STEERING COMMANDS FOR THE DAP.
030297,000858: 
030298,000859:                                                                                                  #  CALLING SEQUENCE
030299,000860: 
030300,000861:                                                                                                  #  L-1      CALL
030301,000862:                                                                                                  #  L               S40.8
030302,000863:                                                                                                  #  L+1                      INTERPRETIVE RETURN
030303,000864: 
030304,000865:                                                                                                  #  ALARM
030305,000866: 
030306,000867:                                                                                                  #       IF VG . DELVREF IS NEGATIVE (VG AND DELVREF OVER 90 DEGREES APART), BYPASS TGO AND STEERING COMPUTATIONS
030307,000868:                                                                                                  #  AND SET ALARM 1407.  RETURN TO CALLER NORMALLY.
030308,000869: 
030309,000870:                                                                                                  #  INPUT AND INITIALIZATION
030310,000871: 
030311,000872:                                                                                                  #  VGPREV          REFERENCE       2(7) M/CS
030312,000873:                                                                                                  #  DELVREF         REFERENCE       2(7) M/CS
030313,000874:                                                                                                  #  BDT             REFERENCE       2(7) M/CS
030314,000875:                                                                                                  #  TDECAY          TAIL-OFF TIME   2(28)  CS
030315,000876:                                                                                                  #  XDELVFLG        1 = EXTERNAL DELTA-V;  0 = LAMBERT (AIMPOINT)
030316,000877:                                                                                                  #  STEERSW         1 = DO STEERING AND TGO COMPUTATIONS; 0 = VG UPDATE ONLY
030317,000878:                                                                                                  #  FIRSTFLG        1 = GONE TO LAMBERT AT LEAST ONCE;  0 = HAVEN'T GONE TO LAMBERT YET
030318,000879: 
030319,000880:                                                                                                  #  NOTE:  VGTIG EQUALS VGPREV
030320,000881: 
030321,000882:                                                                                                  #  OUTPUT
030322,000883: 
030323,000884:                                                                                                  #  STEERSW         SEE INPUT
030324,000885:                                                                                                  #  IMPULSW         1 = ENGINE OFF IN TGO CENTISECONDS;  0 = CONTINUE BURN
030325,000886:                                                                                                  #  TGO             TIME TO CUT-OFF 2(28)   CS
030326,000887:                                                                                                  #  SEE FINDCDUW FOR STEERING OUTPUTS.
030327,000888: 
030328,000889:                                                                                                  #  SUBROUTINE CALLED
030329,000890: 
030330,000891:                                                                                                  #       FINDCDUW
030331,000892: 
030332,000893:                                                                                                  #  DEBRIS
030333,000894: 
030334,000895:                                                                                                  #       MPACS, PUSHLIST
030335,000896: 
030336,000897: 27,2440                                           COUNT*   $$/S40.8                              
030337,000898: 
030338,000899: 27,2440  E6,1420                                  EBANK=   OMEGAQ                                
030339,000900: 27,2440           43175        S40.8              VLOAD    BON                                   
030340,000901: 27,2441           03674                                    VGPREV                                
030341,000902: 27,2442           01307                                    XDELVFLG                              
030342,000903: 27,2443           56450                                    VGNEW                                 
030343,000904: 27,2444           53214                           BOFF     VAD                                   
030344,000905: 27,2445           03344                                    FIRSTFLG                              
030345,000906: 27,2446           56450                                    VGNEW                                 
030346,000907: 27,2447           03660                                    BDT                                   
030347,000908: 27,2450           77651        VGNEW              VSU                                            
030348,000909: 27,2451           03504                                    DELVREF                               
030349,000910: 27,2452           03703        VGAIN*             STORE    VG                                    #  VELOCITY TO BE GAINED SCALED AT (7)M/CS
030350,000911: 27,2453           76521                           MXV      VSL1                                  
030351,000912: 27,2454           01736                                    REFSMMAT                              
030352,000913: 27,2455           77656                           UNIT                                           
030353,000914: 27,2456           03764                           STORE    UDSTEER                               
030354,000915: 27,2457           77214                           BON      VLOAD                                 
030355,000916: 27,2460           03304                                    FIRSTFLG                              
030356,000917: 27,2461           56464                                    BDTOK                                 
030357,000918: 27,2462           06233                                    HI6ZEROS                              
030358,000919: 27,2463           03660                           STORE    BDT                                   
030359,000920: 27,2464           77745        BDTOK              DLOAD                                          
030360,000921: 27,2465           00045                                    36D                                   
030361,000922: 27,2466           03651                           STORE    VGDISP                                
030362,000923: 27,2467           44001        TGOCALC            SETPD    STQ                                   
030363,000924: 27,2470           00001                                    0                                     
030364,000925: 27,2471           03771                                    S40EXIT                               
030365,000926: 27,2472           77775                           VLOAD                                          
030366,000927: 27,2473           03703                                    VG                                    
030367,000928: 27,2474           27674                           STOVL    VGPREV                                
030368,000929: 27,2475           03504                                    DELVREF                               
030369,000930: 27,2476           57414                           BOFF     VCOMP                                 
030370,000931: 27,2477           01344                                    STEERSW                               
030371,000932: 27,2500           03771                                    S40EXIT                               
030372,000933: 27,2501           77656                           UNIT                                           
030373,000934: 27,2502           41441                           DOT      PUSH                                  
030374,000935: 27,2503           03703                                    VG                                    
030375,000936: 27,2504           56244                           BPL      DDV                                   
030376,000937: 27,2505           56627                                    ALARMIT                               #  DELV IS MORE THAN 90 DEGREES FROM VG.
030377,000938: 27,2506           16646                                    2VEXHUST                              
030378,000939: 27,2507           41215                           DAD      DMP                                   
030379,000940: 27,2510           06231                                    DPHALF                                
030380,000941: 27,2511           56261                           SR       DDV                                   
030381,000942: 27,2512           20613                                    10D                                   
030382,000943: 27,2513           00045                                    36D                                   
030383,000944: 27,2514           43205                           DMP      DAD                                   
030384,000945: 27,2515           16644                                    -FOURDT                               
030385,000946: 27,2516           03727                                    TDECAY                                
030386,000947: 27,2517           03474                           STORE    TGO                                   
030387,000948: 27,2520           77615                           DAD                                            
030388,000949: 27,2521           01234                                    PIPTIME                               
030389,000950: 27,2522           17425                           STODL    TIG                                   
030390,000951: 27,2523           03474                                    TGO                                   
030391,000952: 
030392,000953: 27,2524           51025                           DSU      BPL                                   
030393,000954: 27,2525           16650                                    FOURSECS                              #  400 CS
030394,000955: 27,2526           56533                                    FINDCDUD                              
030395,000956: 27,2527           43014                           SET      CLRGO                                 
030396,000957: 27,2530           01066                                    IMPULSW                               
030397,000958: 27,2531           01224                                    STEERSW                               
030398,000959: 27,2532           03771                                    S40EXIT                               
030399,000960: 
030400,000961: 27,2533           44001        FINDCDUD           SETPD    STQ                                   
030401,000962: 27,2534           00001                                    0                                     
030402,000963: 27,2535           03771                                    S40EXIT                               
030403,000964: 27,2536           77634                           RTB                                            
030404,000965: 27,2537           66533                                    TMPTOSPT                              
030405,000966: 27,2540           45175                           VLOAD    CALL                                  
030406,000967: 27,2541           03764                                    UDSTEER                               
030407,000968: 27,2542           47373                                    TRG*SMNB                              
030408,000969: 27,2543           03764                           STORE    UDSTEER                               
030409,000970: 27,2544           77775                           VLOAD                                          
030410,000971: 27,2545           01212                                    DELV                                  
030411,000972: 27,2546           45056                           UNIT     CALL                                  
030412,000973: 27,2547           47413                                    *SMNB*                                
030413,000974: 27,2550           64451                           VSU      VSR3                                  
030414,000975: 27,2551           03461                                    UASTEER                               
030415,000976: 27,2552           53455                           VAD      UNIT                                  
030416,000977: 27,2553           03461                                    UASTEER                               
030417,000978: 27,2554           03461                           STORE    UASTEER                               
030418,000979: 27,2555           47375                           VLOAD    VXV                                   
030419,000980: 27,2556           03461                                    UASTEER                               
030420,000981: 27,2557           03764                                    UDSTEER                               
030421,000982: 27,2560           00013                           STORE    10D                                   
030422,000983: 27,2561           41446                           ABVAL    PUSH                                  
030423,000984: 27,2562           50025                           DSU      BMN                                   
030424,000985: 27,2563           16654                                    SIN20DEG                              
030425,000986: 27,2564           56576                                    SCALPROD                              
030426,000987: 27,2565           77745                           DLOAD                                          
030427,000988: 27,2566           51025                           DSU      BPL                                   
030428,000989: 27,2567           16652                                    SIN45DEG                              
030429,000990: 27,2570           56627                                    ALARMIT                               
030430,000991: 27,2571           53575                           VLOAD    UNIT                                  
030431,000992: 27,2572           00013                                    10D                                   
030432,000993: 27,2573           76561                           VXSC     VSL1                                  
030433,000994: 27,2574           16654                                    SIN20DEG                              
030434,000995: 27,2575           00013                           STORE    10D                                   
030435,000996: 
030436,000997: 27,2576           74375        SCALPROD           VLOAD    VXSC                                  
030437,000998: 27,2577           00013                                    10D                                   
030438,000999: 27,2600           16640                                    1/PI                                  
030439,001000: 27,2601           00013                           STORE    10D                                   
030440,001001: 27,2602           45001                           SETPD    CALL                                  
030441,001002: 27,2603           00001                                    0                                     
030442,001003: 27,2604           56655                                    CALCCMD                               
030443,001004: 27,2605           53375                           VLOAD    VAD                                   
030444,001005: 27,2606           00025                                    20D                                   
030445,001006: 27,2607           00767                                    CDUSPOT                               
030446,001007: 27,2610           77434                           RTB      EXIT                                  
030447,001008: 27,2611           21516                                    V1STO2S                               
030448,001009: 
030449,001010: 27,2612           52155                           DXCH     MPAC                                  
030450,001011: 27,2613           53210                           DXCH     CTHETA                                
030451,001012: 27,2614           31632                           CA       CDUXD                                 
030452,001013: 27,2615           55206                           TS       CPHI                                  
030453,001014: 
030454,001015: 27,2616           35012                           CAF      BIT13                                 
030455,001016: 27,2617           00006                           EXTEND                                         
030456,001017: 27,2620           02031                           RAND     CHAN31                                
030457,001018: 27,2621           00006                           EXTEND                                         
030458,001019: 27,2622           12632                           BZF      S40.8XIT                              
030459,001020: 
030460,001021: 27,2623           00006                           EXTEND                                         
030461,001022: 27,2624           31210                           DCA      CTHETA                                
030462,001023: 27,2625           53634                           DXCH     CDUYD                                 
030463,001024: 27,2626           12632                           TCF      S40.8XIT                              
030464,001025: 
030465,001026: 27,2627           77776        ALARMIT            EXIT                                           
030466,001027: 27,2630           05646                           TC       ALARM                                 
030467,001028: 27,2631           01407                           OCT      01407                                 
030468,001029: 27,2632           31176        S40.8XIT           CAE      TEMPR60                               
030469,001030: 27,2633           54003                           TS       EBANK                                 
030470,001031: 27,2634           06014                           TC       INTPRET                               
030471,001032: 27,2635           77650                           GOTO                                           
030472,001033: 27,2636           03771                                    S40EXIT                               
030473,001034: 
030474,001035: 27,2637           24276 14076  1/PI               2DEC     0.3183099  B1                         
030475,001036: 27,2641           00002 00545  UNUSEDC1           2OCT     00002      00545                      
030476,001037: 
030477,001038: 27,2643           77715 77777  -FOURDT            2DEC     -800       B-18                       #  -4 (200 CS.)  B(-18)
030478,001039: 27,2645           17000 00000  2VEXHUST           2DEC     3000       E-2        B-6             
030479,001040: 27,2647           00000 00620  FOURSECS           2DEC     400        B-28                       #  400 CS SCALED AT 2(+28)CS
030480,001041: 27,2651           05520 11006  SIN45DEG           2DEC     0.7071     B-2                        
030481,001042: 27,2653           02572 00505  SIN20DEG           2DEC     0.34229    B-2                        
030482,001043: 
030483,001044: 27,2655           41345        CALCCMD            DLOAD    DMP                                   
030484,001045: 27,2656           00015                                    12D                                   
030485,001046: 27,2657           00751                                    COSCDUX                               
030486,001047: 27,2660           41325                           PDDL     DMP                                   
030487,001048: 27,2661           00017                                    14D                                   
030488,001049: 27,2662           00743                                    SINCDUX                               
030489,001050: 27,2663           77621                           BDSU                                           
030490,001051: 27,2664           77671                           DDV                                            
030491,001052: 27,2665           00747                                    COSCDUZ                               
030492,001053: 27,2666           00025                           STORE    20D                                   
030493,001054: 27,2667           57545                           DLOAD    DCOMP                                 
030494,001055: 27,2670           00773                                    CDUSPOTX                              
030495,001056: 27,2671           14031                           STODL    24D                                   
030496,001057: 27,2672           00015                                    12D                                   
030497,001058: 27,2673           65205                           DMP      PDDL                                  
030498,001059: 27,2674           00743                                    SINCDUX                               
030499,001060: 27,2675           00017                                    14D                                   
030500,001061: 27,2676           43205                           DMP      DAD                                   
030501,001062: 27,2677           00751                                    COSCDUX                               
030502,001063: 27,2700           77752                           SL1                                            
030503,001064: 27,2701           00027                           STORE    22D                                   
030504,001065: 27,2702           77616                           RVQ                                            
030505,001066: 
030506,001067:                                                                                                  #  NAME     S40.13 - TIMEBURN
030507,001068:                                                                                                  #  FUNCTION        (1) DETERMINE WHETHER A GIVEN COMBINATION OF VELOCITY TO
030508,001069:                                                                                                  #                  BE GAINED AND ENGINE CHOICE RESULT IN A BURN TIME
030509,001070:                                                                                                  #                  SUFFICIENT TO ALLOW STEERING AT THE VEHICLE DURING THE
030510,001071:                                                                                                  #                  BURN
030511,001072:                                                                                                  #                  (2) THE MAGNITUDE OF THE RESULTING BURN TIME -- IF IT
030512,001073:                                                                                                  #                  IS SHORT --  AND THE ASSOCIATED TIME OF THE ENGINE OFF
030513,001074:                                                                                                  #                  SIGNAL
030514,001075:                                                                                                  #  CALLING SEQUENCE  VIA FINDVAC AS A NEW JOB
030515,001076:                                                                                                  #  INPUT           VGTIG VELOCITY TO BE GAINED VECTOR (METERS/CS) AT +7
030516,001077:                                                                                                  #                  WEIGHT/G MASS OF VEHICLE IN KGM AT +16
030517,001078:                                                                                                  #                  F  APS ENGINE THRUST IN M.NEWTONS AT +7
030518,001079:                                                                                                  #                  AND ALSO FOR RCS ENGINE
030519,001080:                                                                                                  #                  MDOT RATE OF DECREASE OF VEHICLE MASS DURING ENGINE
030520,001081:                                                                                                  #                  BURN IN KILOGRAMS/CS  AT +3 . THIS SCALING MAY
030521,001082:                                                                                                  #                  REQUIRE MODIFICATION FOR SATURN BURNS.
030522,001083:                                                                                                  #           ENG1FLAG     SWITCH TO DECIDE WHETHER APS OR DPS ENGINE IS USED
030523,001084:                                                                                                  #                   =0   DPS
030524,001085:                                                                                                  #                   =1   APS
030525,001086:                                                                                                  #  OUTPUT          IMPULSW  ZERO FOR STEERING
030526,001087:                                                                                                  #                           ONE FOR ATTITUDE HOLD
030527,001088:                                                                                                  #                  NOTHROTL  ZERO FOR THROTTLING
030528,001089:                                                                                                  #                            ONE  TO INHIBIT THROTTLING
030529,001090:                                                                                                  #                  TGO  TIME TO BURN IN CS
030530,001091:                                                                                                  #           THE QUANTITY M.NEWTON = 10000 NEWTONS WILL BE USED TO EXPRESS
030531,001092:                                                                                                  #                  FORCE
030532,001093: 
030533,001094: 
030534,001095: 27,2703  E7,1473                                  EBANK=   TGO                                   
030535,001096: 27,2703                                           COUNT*   $$/40.13                              
030536,001097: 27,2703           06014        S40.13             TC       INTPRET                               
030537,001098: 27,2704           43001                           SETPD    CLEAR                                 
030538,001099: 27,2705           00001                                    00D                                   
030539,001100: 27,2706           01266                                    IMPULSW                               #  ASSUME NO STEERING UNTIL FOUND OTHERWISE
030540,001101: 27,2707           51575                           VLOAD    ABVAL                                 
030541,001102: 27,2710           03674                                    VGTIG                                 #  VELOCITY TO BE GAINED AT +7
030542,001103: 27,2711           41325                           PDDL     DMP                                   #  00D = MAG OF VGTIG AT +7
030543,001104: 27,2712           17056                                    7SEC                                  #  700 CS AT + 18
030544,001105: 27,2713           17060                                    FRCS2B3                               
030545,001106: 27,2714           62471                           DDV      SL2                                   #  SCALE
030546,001107: 27,2715           01244                                    WEIGHT/G                              
030547,001108: 27,2716           41421                           BDSU     PUSH                                  
030548,001109: 27,2717           43014                           BOFF     SET                                   
030549,001110: 27,2720           00743                                    APSFLAG                               
030550,001111: 27,2721           56771                                    S40.13D                               #  FOR DPS ENGINE
030551,001112: 27,2722           02463                                    NOTHROTL                              
030552,001113: 27,2723           56345                           DLOAD    DDV                                   #  00D = MAG OF VGTIG CORRECTED
030553,001114: 27,2724           17040                                    K1VAL                                 #  M.NEWTONS-CS AT +24
030554,001115: 27,2725           01244                                    WEIGHT/G                              
030555,001116: 27,2726           50021                           BDSU     BMN                                   
030556,001117: 
030557,001118: 27,2727           00001                                    00D                                   
030558,001119: 27,2730           56753                                    S40.131                               #  TGO LESS THAN 100 CS
030559,001120: 27,2731           41325                           PDDL     DMP                                   #  02D = TEMP1 AT +7
030560,001121: 27,2732           03725                                    MDOT                                  
030561,001122: 
030562,001123:                                                                                                  #  MDOT REPRESENTS THE RATE OF DECREASE OF VEHICLE MASS DURING ENGINE
030563,001124:                                                                                                  #  BURN IN KILOGRAMS/CS .  WHEN  SATURN IS USED , THE SCALING MAY
030564,001125:                                                                                                  #  REQUIRE ADJUSTMENT
030565,001126: 
030566,001127: 27,2733           17050                                    3.5SEC                                #  350 CS AT +14
030567,001128: 27,2734           65221                           BDSU     PDDL                                  
030568,001129: 27,2735           01244                                    WEIGHT/G                              
030569,001130: 27,2736           03723                                    F                                     
030570,001131: 27,2737           60405                           DMP      SR2                                   #  SCALE
030571,001132: 27,2740           17052                                    5SECS                                 
030572,001133: 27,2741           41471                           DDV      PUSH                                  #  04D = TEMP2
030573,001134: 27,2742           51021                           BDSU     BPL                                   
030574,001135: 27,2743           00003                                    02D                                   
030575,001136: 27,2744           56771                                    S40.13D                               
030576,001137: 27,2745           55345                           DLOAD    BDDV                                  
030577,001138: 27,2746           43205                           DMP      DAD                                   
030578,001139: 27,2747           17052                                    5SECS                                 
030579,001140: 27,2750           17046                                    1SEC2D                                #  100 CS AT +14
030580,001141: 27,2751           77650                           GOTO                                           
030581,001142: 27,2752           56761                                    S40.132                               
030582,001143: 27,2753           41345        S40.131            DLOAD    DMP                                   
030583,001144: 27,2754           01244                                    WEIGHT/G                              
030584,001145: 27,2755           41542                           SR1      PUSH                                  
030585,001146: 27,2756           56215                           DAD      DDV                                   
030586,001147: 27,2757           17042                                    K2VAL                                 #  M.NEWTON CS AT +24
030587,001148: 27,2760           17044                                    K3VAL                                 #  M.NEWTON CS AT +10
030588,001149: 27,2761           77414        S40.132            SET      EXIT                                  
030589,001150: 27,2762           01066                                    IMPULSW                               
030590,001151: 27,2763           07231        S40.132*           TC       TPAGREE                               
030591,001152: 27,2764           30154                           CA       MPAC                                  
030592,001153: 27,2765           56001                           XCH      L                                     
030593,001154: 27,2766           35030                           CA       ZERO                                  
030594,001155: 27,2767           53474                           DXCH     TGO                                   
030595,001156: 27,2770           13013                           TCF      S40.134                               
030596,001157: 
030597,001158: 27,2771           41345        S40.13D            DLOAD    DMP                                   #  FOR DPS ENGINE
030598,001159: 27,2772           00001                                    00D                                   
030599,001160: 27,2773           01244                                    WEIGHT/G                              
030600,001161: 27,2774           43006                           PUSH     BON                                   
030601,001162: 27,2775           00703                                    APSFLAG                               
030602,001163: 27,2776           57034                                    APSTGO                                
030603,001164: 27,2777           43071                           DDV      CLEAR                                 
030604,001165: 27,3000           17062                                    S40.136                               
030605,001166: 27,3001           02663                                    NOTHROTL                              
030606,001167: 27,3002           41400                           BOV      PUSH                                  
030607,001168: 
030608,001169: 27,3003           57016                                    S40.130V                              
030609,001170: 27,3004           51025        S40.137            DSU      BPL                                   
030610,001171: 27,3005           17054                                    6SEC                                  #  600.0 CS AT +14
030611,001172: 27,3006           57024                                    S40.138                               
030612,001173: 27,3007           52015                           DAD      GOTO                                  
030613,001174: 27,3010           17054                                    6SEC                                  
030614,001175: 27,3011           56761                                    S40.132                               
030615,001176: 27,3012           77776        S40.133            EXIT                                           
030616,001177: 27,3013           05413        S40.134            TC       PHASCHNG                              
030617,001178: 27,3014           00003                           OCT      00003                                 
030618,001179: 27,3015           05225                           TC       ENDOFJOB                              
030619,001180: 27,3016           40545        S40.130V           DLOAD    SR4                                   #  RECOMPUTE TGO IN TIME2 UNITS
030620,001181: 27,3017           77671                           DDV                                            
030621,001182: 27,3020           17064                                    S40.136_                              #  S40.136 SHIFTED LEFT 10
030622,001183: 27,3021           03474                           STORE    TGO                                   
030623,001184: 27,3022           77776                           EXIT                                           
030624,001185: 27,3023           13013                           TCF      S40.134                               #  REJOIN COMMON CODING FOR RESTART PROTECT
030625,001186: 
030626,001187: 27,3024           51025        S40.138            DSU      BPL                                   
030627,001188: 27,3025           17066                                    89SECS                                
030628,001189: 27,3026           57031                                    STORETGO                              
030629,001190: 27,3027           77614                           SET                                            
030630,001191: 27,3030           02463                                    NOTHROTL                              
030631,001192: 27,3031           77745        STORETGO           DLOAD                                          #  LOAD TGO AT 2(14)
030632,001193: 27,3032           77776                           EXIT                                           
030633,001194: 27,3033           12763                           TCF      S40.132*                              
030634,001195: 
030635,001196: 27,3034           52071        APSTGO             DDV      GOTO                                  
030636,001197: 27,3035           17070                                    FAPSB9                                
030637,001198: 27,3036           57032                                    STORETGO   +1                         
030638,001199: 27,3037           00000 07621  K1VAL              2DEC     124.54     B-23                       #  2800 LB-SEC
030639,001200: 27,3041           00000 00762  K2VAL              2DEC     31.138     B-24                       #  700  LB-SEC
030640,001201: 27,3043           00030 35052  K3VAL              2DEC     1.556802   B-10                       #  FAPS ( 3500 LBS THRUST)
030641,001202: 27,3045           00144 00000  1SEC2D             2DEC     100.0      B-14                       #  100.0 CS AT +14
030642,001203: 27,3047           01274 00000  3.5SEC             2DEC     350.0      B-13                       #  350 CS AT +13
030643,001204: 27,3051           00764 00000  5SECS              2DEC     500.0      B-14                       #  500.0 CS AT +14
030644,001205: 27,3053           01130 00000  6SEC               2DEC     600.0      B-14                       #  600.0 CS AT +14
030645,001206: 27,3055           00000 01274  7SEC               2DEC     700.0                                 #  700.0 CS
030646,001207: 27,3057           26614 05221  FRCS2B3            2DEC     0.08896    B3                         #  200 LBS FORCE IN NEWTONS
030647,001208: 27,3061           00016 36237  S40.136            2DEC     .4671      B-9                        #  .4671 M NEWTONS (DPS)
030648,001209: 27,3063           35711 35663  S40.136_           2DEC     .4671      B+1                        #  S40.136 SHIFTED LEFT 10.
030649,001210: 27,3065           21304 00000  89SECS             2DEC     8900.0     B-14                       
030650,001211: 27,3067           00061 32124  FAPSB9             2DEC     1.5568     B-9                        #  3500 LBS FORCE IN NEWTONS
030651,001212:                                                                                                  #  FUNCTION    (1) GENERATES REQUIRED VELOCITY AND VELOCITY-TO-BE-GAINED
030652,001213:                                                                                                  #              VECTORS FOR USE DURING AIMPOINT MANEUVERS EVERY TWO
030653,001214:                                                                                                  #              COMPUTATION CYCLES (4 SECONDS).
030654,001215:                                                                                                  #              (2) UPDATES THE B VECTOR WHICH IS USED IN THE FINAL
030655,001216:                                                                                                  #              CALCULATION OF EXTRAPOLATING THE VELOCITY-TO-BE-GAINED
030656,001217:                                                                                                  #              THROUGH ONE 2-SECOND INTERVAL INTO THE FUTURE.
030657,001218:                                                                                                  #  CALLING SEQ VIA FINDVAC AS NEW JOB.
030658,001219: 
030659,001220:                                                                                                  #  INPUT       RN       - ACTIVE VEHICLE RADIUS VECTOR IN METERS AT +29.
030660,001221:                                                                                                  #              VN       - ACTIVE VEHICLE VELOCITY VECTOR IN METERS/CS AT +7
030661,001222:                                                                                                  #              VRPREV   - LAST COMPUTED VELOCITY REQUIRED VECTOR IN
030662,001223:                                                                                                  #                         METERS/CS AT +7.
030663,001224:                                                                                                  #              TIG      - TIME OF IGNITION IN CS AT +28.
030664,001225:                                                                                                  #              DLTARG   - COMPUTATION CYCLE INTERVAL = 200 CS AT +28.
030665,001226:                                                                                                  #              PIPTIME  - TIME OF RN AND VN IN CS AT +28.
030666,001227:                                                                                                  #              GDT/2    - HALF OF VELOCITY GAINED IN DELTA T TIME DUE TO
030667,001228:                                                                                                  #                         ACCERERATION OF GRAVITY IN METERS/CS AT +7.
030668,001229:                                                                                                  #              DELVREF  - CHANGE IN VELOCITY DURING LAST 2 SEC IN
030669,001230:                                                                                                  #                         METERS/CS AT +7.
030670,001231:                                                                                                  #  OUTPUT      VGPREV   - VELOCITY TO BE GAINED VECTOR IN METERS/CS AT +7.
030671,001232:                                                                                                  #              VGDISP   - MAG OF VGPREV FOR DISPLAY PURPOSES.
030672,001233:                                                                                                  #              VRPREV   - VELOCITY REQUIRED VECTOR IN METERS/CS AT +7.
030673,001234:                                                                                                  #              BDT      - B VECTOR IN METERS/CS AT +7.
030674,001235:                                                                                                  #  SUBROUTINES USED  -  INITVEL
030675,001236: 
030676,001237: 27,3071  E7,1673                                  EBANK=   VGPREV                                
030677,001238: 27,3071                                           COUNT*   $$/S40.9                              
030678,001239: 27,3071           06014        S40.9              TC       INTPRET                               
030679,001240: 27,3072           77201                           SETPD    VLOAD                                 
030680,001241: 27,3073           00001                                    00D                                   
030681,001242: 27,3074           01220                                    RN                                    #  ACTIVE VEHICLE RADIUS VECTOR AT T1
030682,001243: 27,3075           26341                           STOVL    RINIT                                 
030683,001244: 27,3076           01226                                    VN                                    #  ACTIVE VEHICLE VELOCITY VECTOR AT T1
030684,001245: 27,3077           16347                           STODL    VINIT                                 
030685,001246: 27,3100           01234                                    PIPTIME                               
030686,001247: 27,3101           03717                           STORE    TNIT                                  
030687,001248: 27,3102           77621                           BDSU                                           
030688,001249: 27,3103           03616                                    TPASS4                                
030689,001250: 27,3104           02355                           STORE    DELLT4                                #  T2 - T1
030690,001251: 27,3105           71214                           SET      DLOAD                                 
030691,001252: 27,3106           01072                                    AVFLAG                                #  SET AVFLAG FOR LEM ACTIVE
030692,001253: 27,3107           06233                                    HI6ZEROS                              
030693,001254: 27,3110           77725                           PDDL                                           
030694,001255: 27,3111           16411                                    EPS1                                  
030695,001256: 27,3112           43214                           BOFF     DAD                                   #  EPSILON4 = 10 OR 45 DEGREES.
030696,001257: 27,3113           03745                                    NORMSW                                
030697,001258: 27,3114           57116                                    EPSSMALL                              
030698,001259: 27,3115           16413                                    EPS2                                  
030699,001260: 27,3116           74006        EPSSMALL           PUSH     AXC,1                                 
030700,001261: 27,3117           00002                                    2                                     
030701,001262: 27,3120           45014        S40.92             BOFSET   CALL                                  
030702,001263: 27,3121           03044                                    FIRSTFLG                              
030703,001264: 27,3122           57224                                    INITINIT                              
030704,001265: 27,3123           22024                                    HAVEGUES                              
030705,001266: 27,3124           52375                           VLOAD    VSU                                   
030706,001267: 27,3125           02357                                    VIPRIME                               
030707,001268: 27,3126           03711                                    VRPREV                                
030708,001269: 27,3127           45325                           PDDL     DSU                                   
030709,001270: 27,3130           03717                                    TNIT                                  
030710,001271: 27,3131           03721                                    TNITPREV                              
030711,001272: 
030712,001273: 27,3132           55261                           SL       BDDV                                  
030713,001274: 27,3133           20223                                    18D                                   
030714,001275: 27,3134           17223                                    100B10                                
030715,001276: 27,3135           77761                           VXSC                                           
030716,001277: 27,3136           76451                           VSU      VSL1                                  
030717,001278: 27,3137           01236                                    GDT/2                                 
030718,001279: 27,3140           03660                           STORE    BDT                                   
030719,001280: 
030720,001281: 27,3141           53575        GETGOBL            VLOAD    UNIT                                  #  CALCULATE OBLATENESS TERM.
030721,001282: 27,3142           01220                                    RN                                    
030722,001283: 27,3143           45345                           DLOAD    DSU                                   
030723,001284: 27,3144           01234                                    PIPTIME                               #               2
030724,001285: 27,3145           03574                                    GOBLTIME                              #  G    = -(MU/R )(UNITGOBL)(T - TIG)
030725,001286: 27,3146           56205                           DMP      DDV                                   #   OBL
030726,001287: 27,3147           17231                                    EARTHMU                               
030727,001288: 27,3150           00043                                    34D                                   #  34D = /RN/ (2) FROM UNIT OPERATION.
030728,001289: 27,3151           53361                           VXSC     VAD                                   
030729,001290: 27,3152           03476                                    UNITGOBL                              
030730,001291: 27,3153           03363                                    DELVEET3                              #  OUTPUT FROM INITVEL VG = VR - VN
030731,001292: 27,3154           03363                           STORE    DELVEET3                              #  VG = VR + GOBL - VN
030732,001293: 27,3155           77646        NOGOBL             ABVAL                                          
030733,001294: 27,3156           17651                           STODL    VGDISP                                
030734,001295: 27,3157           03717                                    TNIT                                  
030735,001296: 27,3160           03721                           STORE    TNITPREV                              
030736,001297: 27,3161           77776                           EXIT                                           
030737,001298: 27,3162           05413                           TC       PHASCHNG                              
030738,001299: 27,3163           05022                           OCT      05022                                 
030739,001300: 27,3164           14000                           OCT      14000                                 
030740,001301: 27,3165           06014                           TC       INTPRET                               
030741,001302: 27,3166           77775                           VLOAD                                          
030742,001303: 27,3167           02357                                    VIPRIME                               #  VR(T)
030743,001304: 27,3170           03711                           STORE    VRPREV                                
030744,001305: 27,3171           77776                           EXIT                                           
030745,001306: 27,3172           05413                           TC       PHASCHNG                              
030746,001307: 27,3173           05022                           OCT      05022                                 
030747,001308: 27,3174           14000                           OCT      14000                                 
030748,001309: 27,3175           06014                           TC       INTPRET                               
030749,001310: 27,3176           77214                           BON      VLOAD                                 
030750,001311: 27,3177           01305                                    CYCLESW                               
030751,001312: 27,3200           57206                                    S40.91                                
030752,001313: 27,3201           03363                                    DELVEET3                              
030753,001314: 27,3202           03674                           STORE    VGPREV                                
030754,001315: 27,3203           52014                           SET      GOTO                                  
030755,001316: 27,3204           01065                                    CYCLESW                               
030756,001317: 27,3205           57216                                    ENDS40.9                              
030757,001318: 27,3206           53375        S40.91             VLOAD    VAD                                   #  EXTRAPOLATE FOR V TO GAIN
030758,001319: 27,3207           03363                                    DELVEET3                              
030759,001320: 27,3210           03660                                    BDT                                   
030760,001321: 
030761,001322: 27,3211           77651                           VSU                                            
030762,001323: 27,3212           03504                                    DELVREF                               
030763,001324: 27,3213           03674                           STORE    VGPREV                                
030764,001325: 27,3214           77646                           ABVAL                                          
030765,001326: 27,3215           03651                           STORE    VGDISP                                #  FOR DISPLAY PURPOSES
030766,001327: 27,3216           77776        ENDS40.9           EXIT                                           
030767,001328: 27,3217           05413                           TC       PHASCHNG                              
030768,001329: 27,3220           00002                           OCT      2                                     
030769,001330: 27,3221           05225                           TC       ENDOFJOB                              
030770,001331: 27,3222           03100 00000  100B10             2DEC     100        B-10                       
030771,001332: 27,3224           77624        INITINIT           CALL                                           
030772,001333: 27,3225           22024                                    HAVEGUES                              
030773,001334: 27,3226           77650                           GOTO                                           
030774,001335: 27,3227           57141                                    GETGOBL                               
030775,001336: 
030776,001337: 27,3230           55340 61710  EARTHMU            2DEC*    -3.986032  E10        B-36*           #  M(3)/CS(2)
030777,001338: 
030778,001339:                                                                                                  #  MOD 0     24 FEB 67     PETER ADLER
030779,001340:                                                                                                  #  FUNCTION:
030780,001341:                                                                                                  #           TRIMS DPS ENGINE TO MINIMIZE THRUST/CG OFFSET. ENGINE IS GIMBALLED TO FULL + PITCH AND + ROLL (TO LOCK)
030781,001342:                                                                                                  #           FOR REFERENCE AND IS THEN BROUGHT BACK TO TRIM POSITION BY RUNNING FOR THE PROPER TIMES (TO BE
030782,001343:                                                                                                  #           SPECIFIED BY GAEC) IN - PITCH AND - ROLL.
030783,001344:                                                                                                  #  CALLING SEQUENCE:
030784,001345:                                                                                                  #           VIA WAITLIST FROM R03
030785,001346:                                                                                                  #  INPUT:
030786,001347:                                                                                                  #           PITTIME     TIME TO RUN FROM FULL + PITCH TO TRIM  (CS)
030787,001348:                                                                                                  #           ROLLTIME    TIME TO RUN FROM FULL + ROLL  TO TRIM  (CS)
030788,001349:                                                                                                  #  SUBROUTINES USED:
030789,001350:                                                                                                  #           WAITLIST, FIXDELAY, VARDELAY, FLAGUP, FLAGDOWN, NOVAC
030790,001351: 
030791,001352: 27,3232                                           COUNT*   $$/S40.6                              
030792,001353: 27,3232  E6,1401                                  EBANK=   ROLLTIME                              #  OCTAL MASKS:  PRIO5=05000 EBANK5=02400
030793,001354: 
030794,001355: 27,3232           05575        TRIMGIMB           TC       DOWNFLAG                              #  GMBDRVSW FLAG IS SET WHEN EITHER ROLL OR
030795,001356: 27,3233           00137                           ADRES    GMBDRVSW                              #  PITCH IS COMPLETED, WHICHEVER IS FIRST.
030796,001357: 
030797,001358: 27,3234           35065                           CAF      EBANK6                                
030798,001359: 27,3235           56003                           XCH      EBANK                                 
030799,001360: 27,3236           54061                           TS       ITEMP1                                
030800,001361: 
030801,001362: 27,3237           45067                           CS       PRIO5                                 #  TURN OFF - PITCH, - ROLL, IF ON.
030802,001363: 27,3240           00006                           EXTEND                                         
030803,001364: 27,3241           03012                           WAND     CHAN12                                
030804,001365: 27,3242           35064                           CAF      EBANK5                                #  TURN ON + PITCH, + ROLL.
030805,001366: 27,3243           00006                           EXTEND                                         
030806,001367: 27,3244           05012                           WOR      CHAN12                                
030807,001368: 27,3245           05271                           TC       FIXDELAY                              #  WAIT ONE MINUTE TO MAKE SURE ENGINE IS
030808,001369: 27,3246           13560                           DEC      6000       B-14                       #  AT FULL + PITCH AND FULL + ROLL
030809,001370: 27,3247           45064                           CS       EBANK5                                #  TURN OFF + PITCH, + ROLL.
030810,001371: 27,3250           00006                           EXTEND                                         
030811,001372: 27,3251           03012                           WAND     CHAN12                                
030812,001373: 27,3252           35067                           CAF      PRIO5                                 #  TURN ON - PITCH, - ROLL.
030813,001374: 27,3253           00006                           EXTEND                                         
030814,001375: 27,3254           05012                           WOR      CHAN12                                
030815,001376: 27,3255           31402                           CAE      PITTIME                               #  GET TIME TO SHUT OFF - PITCH AND SET UP
030816,001377: 27,3256           05243                           TC       TWIDDLE                               #  TWIDDLE-TASK TO TURN IT OFF THEN
030817,001378: 
030818,001379: 27,3257           03300                           ADRES    PITCHOFF                              
030819,001380: 
030820,001381: 27,3260           31401                           CAE      ROLLTIME                              #  GET TIME TO SHUT OFF - ROLL AND GO AWAY
030821,001382: 27,3261           05274                           TC       VARDELAY                              #  UNTIL THEN
030822,001383: 27,3262           45013                           CS       BIT12                                 
030823,001384: 27,3263           00006                           EXTEND                                         
030824,001385: 27,3264           03012                           WAND     CHAN12                                #  SHUT OFF ROLL
030825,001386: 27,3265           30102        ROLLOVER           CA       FLAGWRD6                              #  IF HERE INLINE (ROLL DONE) IS PITCH DONE
030826,001387: 27,3266           75015                           MASK     GMBDRBIT                              #  IF HERE FROM PITCHOFF, IS ROLL DONE?
030827,001388: 27,3267           00006                           EXTEND                                         
030828,001389: 27,3270           13304                           BZF      PITCHOFF   +4                         #  NO.  SET FLAG, ROLL OR PITCH DONE.
030829,001390: 27,3271           30061                           CA       ITEMP1                                
030830,001391: 27,3272           54003                           TS       EBANK                                 
030831,001392: 27,3273           35012                           CAF      PRIO10                                #  RETURN TO R03
030832,001393: 27,3274           05142                           TC       NOVAC                                 
030833,001394: 27,3275  E7,1456                                  EBANK=   WHOCARES                              
030834,001395: 27,3275           02171 40067                     2CADR    TRIMDONE                              
030835,001396: 27,3277           05321                           TC       TASKOVER                              
030836,001397: 27,3300           45015        PITCHOFF           CS       BIT10                                 
030837,001398: 27,3301           00006                           EXTEND                                         
030838,001399: 27,3302           03012                           WAND     CHAN12                                #  SHUT OFF PITCH
030839,001400: 27,3303           13265                           TCF      ROLLOVER                              #  SEE IF ROLL HAS FINISHED ALSO.
030840,001401: 27,3304           05563                           TC       UPFLAG                                #  ROLL DONE; OR PITCH DONE; BUT NOT BOTH.
030841,001402: 27,3305           00137                           ADRES    GMBDRVSW                              
030842,001403: 27,3306           05321                           TC       TASKOVER                              
030843,001404: 
030844,001405:                                                                                                  #  SUBROUTINE NAME: S41.1          MOD. NO. 0  DATE: FEBRUARY 28, 1967
030845,001406: 
030846,001407:                                                                                                  #                          MOD. NO. 1  DATE: JANUARY 23, 1968: BY PETER ADLER (MIT/IL)
030847,001408: 
030848,001409:                                                                                                  #  AUTHOR: JONATHAN D. ADDELSTON (ADAMS ASSOCIATES)
030849,001410: 
030850,001411:                                                                                                  #  S41.1 PERFORMS THE COORDINATE SYSTEM TRANFORMATION FROM THE REFERENCE FRAME TO THE BODY OF THE LM.
030851,001412:                                                                                                  #  SPECIFICALLY, IT IS USED TO TRANSFORM A VELOCITY (SCALED AT 2(+7) METERS/CENTISECOND) FROM REFERENCE TO LM AXIS
030852,001413:                                                                                                  #  COORDINATES.  FIRST THE VECTOR IS TRANSFORMED TO THE STABLE MEMBER COORDINATES BY THE MATRIX REFSMMAT.  THIS
030853,001414:                                                                                                  #  LEAVES THE VECTOR IN MPAC, SCALED AT 2(+8) METERS/CENTISECOND.  THEN
030854,001415:                                                                                                  #  THE SUBROUTINE CDUTRIG IS CALLED TO SET UP THE DOUBLE-PRECISION CDU VECTOR ALONG WITH ITS SINES AND COSINES.
030855,001416:                                                                                                  #  THE VECTOR IS THEN TRANSFORMED FROM STABLE MEMBER COORDINATES TO SPACECRAFT (OR LM) COORDINATES BY THE
030856,001417:                                                                                                  #  SUBROUTINE *SMNB*.  FINALLY( THE VECTOR IS RESCALED TO 2(+7) METERS/CENTISECOND, AND CONTROL IS RETURNED TO THE
030857,001418:                                                                                                  #  CALLER WITH C(MPAC) = VELOCITY(LM).
030858,001419: 
030859,001420: 
030860,001421:                                                                                                  #  CALLING SEQUENCE:
030861,001422:                                                                                                  #                                          L        VLOAD  CALL
030862,001423:                                                                                                  #                                          L +1            VELOCITY(REF)   SCALED AT 2(+7)M/CS IN REFERENCE COORDS.
030863,001424:                                                                                                  #                                          L +2            S41.1
030864,001425:                                                                                                  #                                          L +3     STORE  VELOCITY(LM)    SCALED AT 2(+7)M/CS IN LM BODY AXIS SYS.
030865,001426: 
030866,001427:                                                                                                  #  SUBROUTINES CALLED:
030867,001428: 
030868,001429:                                                                                                  #           1.  CDUTRIG,
030869,001430:                                                                                                  #                  WHICH CALLS CDULOGIC.
030870,001431:                                                                                                  #           2.  *SMNB*
030871,001432: 
030872,001433:                                                                                                  #  NORMAL RETURN: L +3 (SEE CALLING SEQUENCE, ABOVE.)
030873,001434: 
030874,001435:                                                                                                  #  ALARM/ABORT MODES: NONE.
030875,001436: 
030876,001437:                                                                                                  #  RESTART PROTECTION: NONE.
030877,001438: 
030878,001439:                                                                                                  #  INPUT:
030879,001440: 
030880,001441:                                                                                                  #           1.  REFSMMAT.
030881,001442:                                                                                                  #           2.  CDUX, CDUY, CDUZ.
030882,001443:                                                                                                  #           3.  VELOCITY (REF) IN MPAC.
030883,001444: 
030884,001445:                                                                                                  #  OUTPUT:
030885,001446: 
030886,001447:                                                                                                  #           1.  CDUSPOT:  DOUBLE PRECISION CDU VECTOR, ORDERED Y,Z,X.
030887,001448:                                                                                                  #           2.  SINCDU:   HALF SINES OF CDUSPOT COMPONENTS.
030888,001449:                                                                                                  #           3.  COSCDU:   HALF COSINES OF CDUSPOT COMPONENTS.
030889,001450:                                                                                                  #           4.  MPAC:     VELOCITY(LM) (SCALED AT 2(+7) METERS/CENTISECOND)
030890,001451: 
030891,001452:                                                                                                  #  DEBRIS: NONE.
030892,001453: 
030893,001454:                                                                                                  #  CHECKOUT STATUS:  CODED.
030894,001455: 
030895,001456: 27,3307                                           COUNT*   $$/S41.1                              
030896,001457: 27,3307           76521        S41.1              MXV      VSL1                                  #  CONVERT VECTOR IN MPAC FROM REF AT 2(+7)
030897,001458: 27,3310           01736                                    REFSMMAT                              #  TO SM AND RESCALE DUE TO HALFUNIT MATRIX
030898,001459: 27,3311           77650                           GOTO                                           #  CONVERT TO BODY AT 2(+7) USING PRESENT
030899,001460: 27,3312           47370                                    CDU*SMNB                              #  CDU ANGLES.  CDU*SMNB WILL RETURN
030900,001461:                                                                                                  #  VIA RVQ TO THE CALLER OF S41.1

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