Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of BURST120 (SUNBURST 120). They were scanned at archive.org's Boston facility, and the scanning was sponsored by Mike Stewart. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are in ALL-CAPS, whereas comments added later in transcription are in Mixed-Case. In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the BURST120 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	YUL SYSTEM FOR AGC: REVISION 0 OF PROGRAM BURST120 
	BY NASA 2021106-031 DEC 7, 1967

	THIS LISTING IS A COPY OF A VERSION OF THE PROGRAM INTENDED 
	FOR USE IN THE ON-BOARD PRIMARY GUIDANCE COMPUTER IN THE 
	UNMANNED FLIGHT OF APOLLO LUNAR MODULE 1 --- THE AS206 MISSION.
Note that the date is the date of the printout, not the date of the program revision.

024745,000002:                                                                                                  ## Copyright:   Public domain.
024746,000003:                                                                                                  ## Filename:    TRIM_GIMBAL_CNTROL_SYSTEM.agc
024747,000004:                                                                                                  ## Purpose:     A module for revision 0 of BURST120 (Sunburst). It 
024748,000005:                                                                                                  ##              is part of the source code for the Lunar Module's
024749,000006:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 5.
024750,000007:                                                                                                  ## Assembler:   yaYUL
024751,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
024752,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
024753,000010:                                                                                                  ## Mod history: 2016-09-30 RSB  Created draft version.
024754,000011:                                                                                                  ##              2016-10-18 MAS  Began.
024755,000012:                                                                                                  ##              2016-10-19 MAS  Completed transcription.
024756,000013:                                                                                                  ##              2016-10-31 RSB   Typos
024757,000014:                                                                                                  ##              2016-12-06 RSB  Comment-proofing with octopus/ProoferComments,
024758,000015:                                                                                                  ##                              changes made.
024759,000016: 

Page 591

024761,000018: 21,2572                                           BANK     21                                    
024762,000019: 21,2572  E6,1542                                  EBANK=   DT                                    
024763,000020:                                                                                                  #  CONTROL REACHES THIS POINT UNDER EITHER OF THE FOLLOWING TWO CONDITIONS ONCE THE DESCENT ENGINE AND THE DIGITAL
024764,000021:                                                                                                  #  AUTOPILOT ARE BOTH ON:
024765,000022:                                                                                                  #           A) THE TRIM GIMBAL CONTROL LAW WAS ON DURING THE PREVIOUS Q,R-AXIS TIME5 INTERRUPT (OR THE DAPIDLER
024766,000023:                                                                                                  #              INITIALIZATION WAS SET FOR TRIM GIMBAL CONTROL AND THIS IS THE FIRST PASS), OR
024767,000024:                                                                                                  #           B) THE Q,R-AXES RCS JET CONTROL LAW ATTITUDE STEERING MODE REDUCED THE ATTITUDE ERROR TO LESS THAN
024768,000025:                                                                                                  #  1DEGREE ON EACH AXIS ON ITS LAST TIME5 INTERRUPT.
024769,000026: 
024770,000027:                                                                                                  #  THE FOLLOWING T5RUPT ENTRY BEGINS THE TRIM GIMBAL CONTROL LAW.  SINCE IT IS ASSUMED THAT THE LEM WILL REMAIN
024771,000028:                                                                                                  #  UNDER TRIM GIMBAL CONTROL, A KALMAN FILTER RUPT IS SET UP TO BEGIN 30 MS FROM THE TRIM GIMBAL RUPT.
024772,000029: 
024773,000030: 21,2572           32402        GTS                CAF      MS30F                                 #  RESET TIMER IMMEDIATELY: DT = 30 MS
024774,000031: 21,2573           54030                           TS       TIME5                                 
024775,000032: 
024776,000033: 21,2574           22016                           LXCH     BANKRUPT                              #  INTERRUPT LEAD IN (CONTINUED)
024777,000034: 21,2575           00006                           EXTEND                                         
024778,000035: 21,2576           22012                           QXCH     QRUPT                                 
024779,000036: 
024780,000037: 21,2577           00006                           EXTEND                                         
024781,000038: 21,2600           32411                           DCA      POSTPFIL                              
024782,000039: 21,2601           53001                           DXCH     T5ADR                                 
024783,000040: 
024784,000041: 21,2602           12674                           TCF      GTSTEST                               #  SKIP OVER XFORMS UNTIL REORGANIZATION
024785,000042: 
024786,000043: 21,2603           00006        GIMBAL             EXTEND                                         #  GET D.P. FILTERED CDUY VALUE (ONES COMP)
024787,000044: 21,2604           31554                           DCA      CDUYFIL                               #  SCALED AT 2PI RADIANS
024788,000045: 21,2605           02307                           TC       ONETOTWO                              #  FORM S.P. VALUE IN TWOS COMPLEMENT AT PI
024789,000046: 21,2606           00006                           EXTEND                                         
024790,000047: 21,2607           20767                           MSU      CDUYD                                 #  FORM Y-AXIS ERROR IN ONES COMPLEMENT
024791,000048: 21,2610           55467                           TS       QDIFF                                 #  (SAVE IN Q-AXIS ERROR LOC: EFFICIENCY)
024792,000049: 
024793,000050: 21,2611           00006                           EXTEND                                         #  GET D.P. FILTERED CDUZ VALUE (ONES COMP)
024794,000051: 21,2612           31556                           DCA      CDUZFIL                               #  SCALED AT 2PI RADIANS
024795,000052: 21,2613           02307                           TC       ONETOTWO                              #  FORM S.P. VALUE IN TWOS COMPLEMENT AT PI
024796,000053: 21,2614           00006                           EXTEND                                         
024797,000054: 21,2615           20770                           MSU      CDUZD                                 #  FORM Z-AXIS ERROR IN ONES COMPLEMENT
024798,000055: 21,2616           55470                           TS       RDIFF                                 #  (SAVE IN R-AXIS ERROR LOC: EFFICIENCY)
024799,000056: 
024800,000057:                                                                                                  #  TRANSFORM Y,Z CDU ERRORS TO THE Q,R-AXES.
024801,000058: 
024802,000059: 21,2617           00006                           EXTEND                                         #  GET BOTH Y AND Z CDU ERRORS AT PI RAD
024803,000060: 21,2620           31470                           DCA      QDIFF                                 
024804,000061: 21,2621           03264                           TC       QTRANSF                               #  FORM Q-ERROR IN A (SCALED AT PI RAD)
024805,000062: 21,2622           53470                           DXCH     QDIFF                                 #  STORE Q-ERROR, GET BOTH Y,Z CDU ERRORS
024806,000063: 21,2623           03274                           TC       RTRANSF                               #  FORM R-ERROR IN A (SCALED AT PI RAD)
024807,000064: 21,2624           57470                           XCH      RDIFF                                 #  STORE R-ERROR
024808,000065: 
024809,000066:                                                                                                  #  TRANSFORM THE FILTERED Y,Z RATES TO THE Q,R-AXES.
024810,000067:                                                                                                  #  (THESE MAY BE NEEDED FOR THE RATE DERIVATION FOR THE JETS IF THEY MUST BE USED.)
024811,000068: 

Page 592

024813,000070: 21,2625           31561                           CAE      DCDUZFIL                              #  GET FILTERED Y,Z RATES
024814,000071: 21,2626           54001                           TS       L                                     #  SCALED AT PI/4 RADIANS/SECOND
024815,000072: 21,2627           31557                           CAE      DCDUYFIL                              
024816,000073: 21,2630           03264                           TC       QTRANSF                               #  FOR Q-AXIS RATE
024817,000074: 21,2631           55416                           TS       OMEGAQ                                #  STORED SCALED AT PI/4 RADIANS/SECOND
024818,000075: 
024819,000076: 21,2632           31561                           CAE      DCDUZFIL                              #  GET FILTERED Y,Z RATES
024820,000077: 21,2633           54001                           TS       L                                     #  SCALED AT PI/4 RADIANS/SECOND
024821,000078: 21,2634           31557                           CAE      DCDUYFIL                              
024822,000079: 21,2635           03274                           TC       RTRANSF                               #  FOR R-AXIS RATE
024823,000080: 21,2636           55420                           TS       OMEGAR                                #  STORED SCALED AT PI/4 RADIANS/SECOND
024824,000081: 
024825,000082:                                                                                                  #  TRANSFORM THE FILTERED Y,Z ACCELERATIONS TO THE Q,R-AXES.
024826,000083:                                                                                                  #  (THESE MAY BE NEEDED TO CALCULATE TRIM GIMBAL OFF-TIMES IF ATTITUDE ERROR HAS GONE BEYOND TRIM GIMBAL CONTROL.)
024827,000084: 
024828,000085: 21,2637           31565                           CAE      D2CDUZFL                              #  GET FILTERED Y,Z ACCELERATIONS
024829,000086: 21,2640           54001                           TS       L                                     #  SCALED AT PI/8 RADIANS/SECOND(2)
024830,000087: 21,2641           31563                           CAE      D2CDUYFL                              
024831,000088: 21,2642           03264                           TC       QTRANSF                               #  FORM Q-AXIS ACCELERATION
024832,000089: 21,2643           55417                           TS       ALPHAQ                                #  STORE AT PI/8 RADIANS/SECOND(2)
024833,000090: 
024834,000091: 21,2644           31565                           CAE      D2CDUZFL                              #  GET FILTERED Y,Z ACCELERATIONS
024835,000092: 21,2645           54001                           TS       L                                     #  SCALED AT PI/8 RADIANS/SECOND(2)
024836,000093: 21,2646           31563                           CAE      D2CDUYFL                              
024837,000094: 21,2647           03274                           TC       RTRANSF                               #  FORM R-AXIS ACCELERATION
024838,000095: 21,2650           55421                           TS       ALPHAR                                #  STORE AT PI/8 RADIANS/SECOND(2)
024839,000096: 
024840,000097:                                                                                                  #  EXTRAPOLATE THETA AND OMEGA OVER 100 MS PLUS THE 20 MS DELAY BETWEEN THE KALMAN FILTER AND TRIM GIMBAL 
024841,000098:                                                                                                  #   CONTROL, REFLECTING MECHANICAL LAG.
024842,000099: 
024843,000100: 21,2651           31416                           CAE      OMEGAQ                                
024844,000101: 21,2652           00006                           EXTEND                                         
024845,000102: 21,2653           72672                           MP       DTW                                   
024846,000103: 21,2654           27467                           ADS      QDIFF                                 
024847,000104: 
024848,000105: 21,2655           31420                           CAE      OMEGAR                                
024849,000106: 21,2656           00006                           EXTEND                                         
024850,000107: 21,2657           72672                           MP       DTW                                   
024851,000108: 21,2660           27470                           ADS      RDIFF                                 
024852,000109: 
024853,000110: 21,2661           31417                           CAE      ALPHAQ                                
024854,000111: 21,2662           00006                           EXTEND                                         
024855,000112: 21,2663           72673                           MP       DTA                                   
024856,000113: 21,2664           27416                           ADS      OMEGAQ                                
024857,000114: 
024858,000115: 21,2665           31421                           CAE      ALPHAR                                
024859,000116: 21,2666           00006                           EXTEND                                         
024860,000117: 21,2667           72673                           MP       DTA                                   
024861,000118: 21,2670           27420                           ADS      OMEGAR                                
024862,000119: 

Page 593

024864,000121: 21,2671           15733                           TCF      RESUME                                
024865,000122: 
024866,000123: 21,2672           00754        DTW                OCT      00754                                 #  120 MS SCALED AT 4
024867,000124: 21,2673           01727        DTA                OCT      01727                                 #  120 MS SCALED AT 2
024868,000125:                                                                                                  #  TEST TO SEE IF TRIM GIMBAL CONTROL LAW HAS KEPT BOTH ATTITUDE ERRORS BELOW THE 1 DEGREE BOUNDARY WITH THE REGION
024869,000126:                                                                                                  #  OF RCS CONTROL LAW DOMINANCE OR IS STILL REDUCING THE ERROR.
024870,000127: 
024871,000128: 21,2674           37762        GTSTEST            CAF      TRYGIMBL                              #  VERIFY THAT GTS IS STILL OPERATIVE.
024872,000129: 21,2675           70077                           MASK     DAPBOOLS                              
024873,000130: 21,2676           10000                           CCS      A                                     
024874,000131: 21,2677           12731                           TCF      RCSCNTRL                              #  GTS NOT OPERATIVE
024875,000132:                                                                                                  #  START CODING FOR MODULE 3 REMAKE, AUGUST 1967***START CODING FOR MODULE 3 REMAKE, AUGUST 1967*******************
024876,000133: 
024877,000134: 21,2700           13736        INSERT21           TCF      CHKCNTR                               #  GO CHECK TRIMCNTR (AT END OF BANK 21).
024878,000135: 
024879,000136:                                                                                                  #  **END CODING FOR MODULE 3 REMAKE, AUGUST 1967*****END CODING FOR MODULE 3 REMAKE, AUGUST 1967*******************
024880,000137: 
024881,000138: 21,2701           54066        LOOPTEST           TS       QRCNTR                                
024882,000139: 21,2702           50066                           INDEX    QRCNTR                                
024883,000140: 21,2703           11467                           CCS      QDIFF                                 #  SCALED AT PI.
024884,000141: 21,2704           62727                           AD       -TGBND+1                              #  -2 DEG SCALED AT PI, + 1 BIT.
024885,000142: 21,2705           12707                           TCF      +2                                    
024886,000143: 21,2706           62727                           AD       -TGBND+1                              
024887,000144: 21,2707           00006                           EXTEND                                         
024888,000145: 21,2710           62712                           BZMF     +2                                    #  IS ERROR MAG LESS,EQUAL 2 DEG.
024889,000146: 21,2711           13715                           TCF      TESTPCTR                              #  NO.  MAY CONTINUE,THOUGH.
024890,000147: 21,2712           30066                           CA       QRCNTR                                #  YES.  TRY RATE MAGNITUDE.
024891,000148: 21,2713           60000                           DOUBLE                                         
024892,000149: 21,2714           50000                           INDEX    A                                     
024893,000150: 
024894,000151:                                                                                                  #  THIS TEST BYPASSES THE TEST IN WSFTEST.  CHECK WSFTEST IF BOUND CHANGES.
024895,000152: 
024896,000153: 21,2715           11416                           CCS      OMEGAQ                                #  SCALED AT PI/4.
024897,000154: 21,2716           62730                           AD       -RATBD+1                              #  -.65 DEC/SEC SCALED AT PI/4  + 1 BIT
024898,000155: 21,2717           12721                           TCF      +2                                    
024899,000156: 21,2720           62730                           AD       -RATBD+1                              
024900,000157: 21,2721           00006                           EXTEND                                         
024901,000158: 21,2722           62724                           BZMF     +2                                    #  IS RATE MAG LESS,EQUAL .65 DEG/SEC.
024902,000159: 21,2723           13715                           TCF      TESTPCTR                              #  NO.  MAY CONTINUE,THOUGH.
024903,000160: 21,2724           10066                           CCS      QRCNTR                                #  YES.  THIS AXIS IS FINE. ARE BOTH DONE.
024904,000161: 21,2725           12701                           TCF      LOOPTEST                              #  TRY THE Q AXIS NOW.
024905,000162: 21,2726           13000                           TCF      GTSRAXIS                              #  USE TRIM GIMBAL CONTROL.
024906,000163: 21,2727           77512        -TGBND+1           OCT      77512                                 #  -2 DEG SCALED AT PI, + 1 BIT.
024907,000164: 21,2730           77423        -RATBD+1           OCT      77423                                 #  -.65 DEG/SEC SCALED AT PI/4  + 1 BIT
024908,000165:                                                                                                  #  ATTITUDE ERROR IS BEYOND TRIM GIMBAL CONTROL LAW RANGE.  SET UP FOR RCS CONTROL LAW (Q,R-AXIS) AND CALCULATE
024909,000166:                                                                                                  #  TIMES TO TURN OFF THE GIMBAL DRIVES.
024910,000167: 
024911,000168: 21,2731           00006        RCSCNTRL           EXTEND                                         #  CHANGE LOCATION OF NEXT T5RUPT FROM FIL-
024912,000169: 21,2732           32756                           DCA      POSTQRFL                              #  TER TO FILDUMMY.  AHEM, DON'T FORGET
024913,000170: 21,2733           53001                           DXCH     T5ADR                                 #  THAT FILDUMMY MOVED TO BANK20, DICK GOSS
024914,000171: 

Page 594

024916,000173: 21,2734           00006                           EXTEND                                         #  SET UP POST P-AXIS T5RUPT TO GO TO
024917,000174: 21,2735           32760                           DCA      QRJPFILT                              #  DUMMYFIL INSTEAD OF FILTER.  USE 2CADR
024918,000175: 21,2736           53573                           DXCH     PFILTADR                              #  BECAUSE DUMMYFIL NOW IN BANK 16.
024919,000176: 
024920,000177: 21,2737           00006                           EXTEND                                         #  PREPARE FOR SEQUENCED RESUMPTION OF
024921,000178: 21,2740           30034                           DCA      CDUY                                  #  Q,R-AXIS RCS CONTROL RATE DERIVATION
024922,000179: 21,2741           53430                           DXCH     OLDYFORQ                              #  BY PROVIDING OLD CDU READINGS
024923,000180: 
024924,000181: 21,2742           00006                           EXTEND                                         #  MOVE FILTERED AND TRANSFORMED ATTITUDE
024925,000182: 21,2743           31470                           DCA      QDIFF                                 #  ERRORS INTO ERASABLE FOR Q,R-AXIS RCS
024926,000183: 21,2744           57413                           XCH      ER                                    #  CONTROL URGENCY CALCULATIONS.
024927,000184: 21,2745           23411                           LXCH     E                                     
024928,000185: 
024929,000186: 21,2746           37763                           CAF      ONE                                   
024930,000187: 21,2747           05663                           TC       WAITLIST                              
024931,000188: 21,2750  E6,1542                                  EBANK=   DT                                    
024932,000189: 21,2750           02763 42066                     2CADR    CHEKDRIV                              #  DO TGOFF CALCULATION IN WAITLIST TASK
024933,000190: 
024934,000191: 21,2752           00006                           EXTEND                                         #  GO TO Q,R-AXES CONTROL IMMEDIATELY
024935,000192: 21,2753           32762                           DCA      TGENTRY                               
024936,000193: 21,2754           52006                           DTCB                                           
024937,000194: 
024938,000195: 21,2755  E6,1471                                  EBANK=   JTSONNOW                              #  NO, SURELY YOU JEST, NOT EBANK 6, AGAIN?
024939,000196: 21,2755           03033 40066  POSTQRFL           2CADR    FILDUMMY                              #  WATCH OUT FOR BANK SWITCHING D. GOSS
024940,000197: 
024941,000198: 21,2757  E6,1664                                  EBANK=   AOSQTERM                              
024942,000199: 21,2757           03642 34066  QRJPFILT           2CADR    DUMMYFIL                              #  NECESSARY BECAUSE DUMMYFIL IN BANK 16.
024943,000200: 
024944,000201: 21,2761  E6,1542                                  EBANK=   DT                                    
024945,000202: 21,2761           02715 36066  TGENTRY            2CADR    STILLRCS                              
024946,000203: 
024947,000204: 
024948,000205:                                                                                                  #  START CODING FOR MODULE 3 REMAKE, AUGUST 1967***START CODING FOR MODULE 3 REMAKE, AUGUST 1967*******************
024949,000206: 
024950,000207: 21,2763           11736        CHEKDRIV           CCS      PASSCTR                               #  ENOUGH FILTER PASSES FOR DRIVE DONE?
024951,000208: 21,2764           12766                           TCF      COLDFILT                              #    NO.  JUST STOP DRIVES.
024952,000209: 21,2765           13745                           TCF      WARMFILT                              #    YES.  CALCULATE TIMES (END OF BANK).
024953,000210: 
024954,000211: 21,2766           37767        COLDFILT           CAF      ZERO                                  #  FILTER NOT WARM YET. TURN OFF DRIVES.
024955,000212: 21,2767           55523                           TS       NEGUQ                                 
024956,000213: 21,2770           55525                           TS       NEGUR                                 
024957,000214: 21,2771           55533                           TS       QACCDOT                               
024958,000215: 21,2772           55535                           TS       RACCDOT                               
024959,000216: 21,2773           03243                           TC       WRCHN12                               
024960,000217: 21,2774           15727                           TCF      TASKOVER                              
024961,000218: 
024962,000219: 21,2775           04736                           TC       CCSHOLE                               #  FILLER (TO PRESERVE ADDRESSES)
024963,000220: 21,2776           04736                           TC       CCSHOLE                               #  FILLER (TO PRESERVE ADDRESSES)
024964,000221:                                                                                                  #  **END CODING FOR MODULE 3 REMAKE, AUGUST 1967*****END CODING FOR MODULE 3 REMAKE, AUGUST 1967*******************
024965,000222: 

Page 595

024967,000224:                                                                                                  #  THE DRIVE SETTING ALGORITHM
024968,000225:                                                                                                  #  DEL = SGN(OMEGA.K + SGN(ALPHA)ALPHA(2)/2)    ONLY +1/-1
024969,000226: 
024970,000227:                                                                                                  #  NEGUSUM = ERROR.K(2) + DEL(OMEGA.K.DEL + ALPHA(2)/2)(3/2) + ALPHA(OMEGA.K.DEL + ALPHA(2)/3)
024971,000228: 
024972,000229:                                                                                                  #  DRIVE = -SGN(NEGUSUM)
024973,000230: 
024974,000231: 21,2777           76504        -.04266            DEC      -.04266                               
024975,000232: 21,3000           37762        GTSRAXIS           CAF      TWO                                   #  SET INDEXER FOR R-AXIS CALCULATIONS
024976,000233: 21,3001           54066                           TS       QRCNTR                                
024977,000234: 21,3002           13712                           TCF      USUALXIT                              
024978,000235: 
024979,000236: 21,3003           37767        GOQTRIMG           CAF      ZERO                                  #  SET INDEXER FOR Q-AXIS CALCULATIONS
024980,000237: 21,3004           54066                           TS       QRCNTR                                
024981,000238: 
024982,000239: 21,3005           00006        GTSQAXIS           EXTEND                                         
024983,000240: 21,3006           50066                           INDEX    QRCNTR                                #  PICK UP K AND K(2) FOR THIS AXIS
024984,000241: 21,3007           31527                           DCA      KQ                                    
024985,000242: 21,3010           52062                           DXCH     KCENTRAL                              
024986,000243: 
024987,000244: 21,3011           00006                           EXTEND                                         
024988,000245: 21,3012           50066                           INDEX    QRCNTR                                #  PICK UP OMEGA AND ALPHA FOR THIS AXIS
024989,000246: 21,3013           31417                           DCA      OMEGAQ                                
024990,000247: 21,3014           52064                           DXCH     WCENTRAL                              
024991,000248: 
024992,000249: 21,3015           10066                           CCS      QRCNTR                                #  RDIFF IS STORED IMMEDIATELY FOLLOWING
024993,000250: 21,3016           50000                           INDEX    A                                     #  QDIFF, WITH NO SEPARATING CELL.
024994,000251: 21,3017           31467                           CAE      QDIFF                                 
024995,000252: 
024996,000253:                                                                                                  #  QDIFF IS LESS,EQUAL 2 DEG. AND IS SCALED AT 180 DEG.  RESCALE AT 180/64 DEG. = 2 + 13/16 DEG. = PI/64 RADIANS.
024997,000254: 
024998,000255: 21,3020           00006                           EXTEND                                         #  RESCALE DIFFERENCE BY MULTIPLYING BY
024999,000256: 21,3021           77755                           MP       BIT7                                  #  2(6)
025000,000257: 21,3022           22071                           LXCH     ETHETA                                
025001,000258: 
025002,000259: 21,3023           30061                           CAE      KCENTRAL                              #  TEST ON MAGNITUDE OF ACCDOT
025003,000260: 21,3024           62777                           AD       -.04266                               
025004,000261: 21,3025           00006                           EXTEND                                         
025005,000262: 21,3026           63034                           BZMF     ACCDOTSM                              #  BRANCH IF ACCDOT IS SMALL
025006,000263: 
025007,000264: 21,3027           37746        ACCDOTLG           CAF      BIT14                                 #  ACCDOT IS COMPARITIVELY LARGE
025008,000265: 21,3030           54072                           TS       SF1                                   #  SET UP SCALE FACTORS
025009,000266: 21,3031           37750                           CAF      BIT12                                 
025010,000267: 21,3032           54073        WSFTEST            TS       SF2                                   
025011,000268: 
025012,000269:                                                                                                  #  LOOPTEST CODING BYPASSES THE OMEGA MAGNITUDE TEST, BUT A CHANGE IN THE TEST BOUNDS COULD REQUIRE ITS USE AGAIN.
025013,000270: 
025014,000271:                                                                                                  #                  CCS             WCENTRAL                      TEST ON MAGNITUDE OF OMEGA
025015,000272:                                                                                                  #                  AD              -.04438                         
025016,000273:                                                                                                  #                  TCF             +2                              

Page 596

025018,000275:                                                                                                  #                  AD              -.04438                         
025019,000276:                                                                                                  #                  EXTEND                                          
025020,000277:                                                                                                  #                  BZMF            ASFTEST                       IF SMALL, GO TO ALPHA TEST
025021,000278:                                                                                                  #                  TCF             WLARGE                          
025022,000279: 21,3033           13050                           TCF      ASFTEST                               #  OMEGA IS ALWAYS BOUNDED BY .65 DEG/SEC.
025023,000280: 21,3034           30061        ACCDOTSM           CAE      KCENTRAL                              #  RESCALE IF ACCDOT IS SMALL
025024,000281: 21,3035           00006                           EXTEND                                         
025025,000282: 21,3036           77757                           MP       BIT5                                  #  RESCALE K BY MULTIPLYING BY 2(4)
025026,000283: 21,3037           22061                           LXCH     KCENTRAL                              
025027,000284: 21,3040           30061                           CAE      KCENTRAL                              
025028,000285: 21,3041           00006                           EXTEND                                         
025029,000286: 21,3042           70000                           SQUARE                                         
025030,000287: 21,3043           54062                           TS       K2CNTRAL                              
025031,000288: 21,3044           37752                           CAF      BIT10                                 #  SET UP VARIABLE SCALE FACTORS
025032,000289: 21,3045           54072                           TS       SF1                                   
025033,000290: 21,3046           37760                           CAF      BIT4                                  
025034,000291: 21,3047           13032                           TCF      WSFTEST                               #  GO TEST ON MAGNITUDE OF OMEGA
025035,000292: 
025036,000293: 21,3050           10064        ASFTEST            CCS      ACENTRAL                              #  TEST ON MAGNITUDE OF ALPHA
025037,000294: 21,3051           63057                           AD       -.08882                               
025038,000295: 21,3052           13054                           TCF      +2                                    
025039,000296: 21,3053           63057                           AD       -.08882                               
025040,000297: 21,3054           00006                           EXTEND                                         
025041,000298: 21,3055           63060                           BZMF     WARESCAL                              #  IF SMALL, GO TO W,A RESCALING
025042,000299: 21,3056           13071                           TCF      WLARGE                                #  IF LARGE, DO SAME AS IF W LARGE
025043,000300: 
025044,000301:                                                                                                  #  -.04438         DEC             -.04438                         
025045,000302: 21,3057           75120        -.08882            DEC      -.08882                               
025046,000303: 
025047,000304: 21,3060           30063        WARESCAL           CAE      WCENTRAL                              #  RESCALE OMEGA BY MULTIPLYING BY 2(4)
025048,000305: 21,3061           00006                           EXTEND                                         
025049,000306: 21,3062           77757                           MP       BIT5                                  
025050,000307: 21,3063           22063                           LXCH     WCENTRAL                              
025051,000308: 
025052,000309: 21,3064           30064                           CAE      ACENTRAL                              #  RESCALE ALPHA BY MULTIPLYING BY 2(3)
025053,000310: 21,3065           00006                           EXTEND                                         
025054,000311: 21,3066           77760                           MP       BIT4                                  
025055,000312: 21,3067           22064                           LXCH     ACENTRAL                              
025056,000313: 
025057,000314: 21,3070           13101                           TCF      ALGORTHM                              
025058,000315: 
025059,000316: 21,3071           30072        WLARGE             CAE      SF1                                   #  RESCALE VARIABLE SCALE FACTORS
025060,000317: 21,3072           00006                           EXTEND                                         
025061,000318: 21,3073           77747                           MP       BIT13                                 #  SF1 = SF1*2(-2)
025062,000319: 21,3074           54072                           TS       SF1                                   
025063,000320: 21,3075           30073                           CAE      SF2                                   
025064,000321: 21,3076           00006                           EXTEND                                         
025065,000322: 21,3077           77756                           MP       BIT6                                  #  SF2 = SF2*2(-9)
025066,000323: 21,3100           54073                           TS       SF2                                   
025067,000324: 

Page 597

025069,000326: 21,3101           30071        ALGORTHM           CAE      ETHETA                                #  GET RESCALED ERROR THETA
025070,000327: 21,3102           00006                           EXTEND                                         
025071,000328: 21,3103           70062                           MP       K2CNTRAL                              #  FORM K(2)*THETA IN D.P.
025072,000329: 21,3104           00006                           EXTEND                                         
025073,000330: 21,3105           70073                           MP       SF2                                   #  CALCULATE AND STORE
025074,000331: 21,3106           54070                           TS       K2THETA                               #  K(2)*THETA*SF2 IN K2THETA
025075,000332: 
025076,000333: 21,3107           30063                           CA       WCENTRAL                              #  CALCULATE AND STORE
025077,000334: 21,3110           00006                           EXTEND                                         #  K*OMEGA*SF1 IN OMEGA.K
025078,000335: 21,3111           70061                           MP       KCENTRAL                              
025079,000336: 21,3112           00006                           EXTEND                                         
025080,000337: 21,3113           70072                           MP       SF1                                   
025081,000338: 21,3114           54061                           TS       OMEGA.K                               
025082,000339: 
025083,000340: 21,3115           30064                           CA       ACENTRAL                              
025084,000341: 21,3116           00006                           EXTEND                                         #  BY REDESIGNATION OF THE SCALE FACTOR,
025085,000342: 21,3117           70000                           MP       A                                     #  THIS PRODUCT BECOMES ALPHA(2)/2
025086,000343: 21,3120           54072                           TS       A2CNTRAL                              #  INSTEAD OF  ALPHA(2)
025087,000344: 
025088,000345: 21,3121           10064                           CCS      ACENTRAL                              
025089,000346: 21,3122           30072                           CA       A2CNTRAL                              
025090,000347: 21,3123           13125                           TCF      +2                                    
025091,000348: 21,3124           40072                           CS       A2CNTRAL                              #  NOW THE A REGISTER CONTAINS
025092,000349: 21,3125           60061                           AD       OMEGA.K                               #  K*OMEGA + ALPHA*ABS(ALPHA)/2
025093,000350: 
025094,000351: 21,3126           10000                           CCS      A                                     
025095,000352: 21,3127           37763                           CA       BIT1                                  #  DEL = SIGNUM(A) , (ZERO WHEN A IS ZERO),
025096,000353: 21,3130           13132                           TCF      +2                                    #  PLUS ONE OR MINUS ONE OTHERWISE.
025097,000354: 21,3131           47763                           CS       BIT1                                  
025098,000355: 21,3132           54065                           TS       DEL                                   
025099,000356: 
025100,000357: 21,3133           10065                           CCS      DEL                                   
025101,000358: 21,3134           30061                           CA       OMEGA.K                               
025102,000359: 21,3135           13137                           TCF      +2                                    
025103,000360: 21,3136           40061                           CS       OMEGA.K                               #  DEL*OMEGA.K REPLACES OMEGA.K
025104,000361: 21,3137           54061                           TS       OMEGA.K                               
025105,000362: 
025106,000363: 21,3140           60072                           AD       A2CNTRAL                              #  DEL*OMEGA.K + ALPHA(2)/2
025107,000364: 21,3141           57521                           XCH      FUNCTION                              #  STORED IN FUNCTION
025108,000365: 
025109,000366: 21,3142           30072                           CA       A2CNTRAL                              
025110,000367: 21,3143           00006                           EXTEND                                         #  CALCULATE ALPHA(2)/3
025111,000368: 21,3144           73304                           MP       .66667                                
025112,000369: 21,3145           60061                           AD       OMEGA.K                               
025113,000370: 21,3146           00006                           EXTEND                                         
025114,000371: 21,3147           70064                           MP       ACENTRAL                              #  K(2)*THETA+ALPHA*(DEL*OMEG.K+ALPHA(2)/3)
025115,000372: 21,3150           26070                           ADS      K2THETA                               #  FIRST AND SECOND TERMS SUMMED HERE.
025116,000373: 
025117,000374:                                                                                                  #  THE FOLLOWING SECTION CALCULATES .707*DEL*FUNCTION(3/2) AND ADDS IT TO THE OTHER TWO TERMS OF NEGUSUM.
025118,000375: 

Page 598

025120,000377: 21,3151           30021                           CA       SR                                    #  CALL SEQUENCE FOR SPROOT REQUIRES THAT
025121,000378: 21,3152           60000                           AD       A                                     #  SR BE PRESERVED BY THE CALLER.
025122,000379: 21,3153           57540                           XCH      STORCDUY                              #  THE KALMAN FILTER STORES INTO THE CELL
025123,000380: 21,3154           31521                           CA       FUNCTION                              #  STORCDUY BEFORE USING IT OTHERWISE.
025124,000381: 21,3155           05417                           TC       SPROOT                                
025125,000382: 21,3156           23540                           LXCH     STORCDUY                              
025126,000383: 21,3157           22021                           LXCH     SR                                    
025127,000384: 
025128,000385: 21,3160           00006                           EXTEND                                         
025129,000386: 21,3161           71521                           MP       FUNCTION                              
025130,000387: 21,3162           57540                           XCH      STORCDUY                              
025131,000388: 21,3163           10065                           CCS      DEL                                   
025132,000389: 21,3164           33305                           CA       .707GTS                               #  THIS CELL CONTAINS SQUARE ROOT OF 1/2
025133,000390: 21,3165           13167                           TCF      +2                                    
025134,000391: 21,3166           43305                           CS       .707GTS                               
025135,000392: 21,3167           00006                           EXTEND                                         
025136,000393: 21,3170           71540                           MP       STORCDUY                              
025137,000394: 21,3171           60070                           AD       K2THETA                               #  NEGUSUM IS COMPLETE.
025138,000395: 
025139,000396: 21,3172           10000                           CCS      A                                     #  SIGNUM(NEGUSUM) IS NEGATIVE OF THE SIGN
025140,000397: 21,3173           37763                           CA       BIT1                                  #  WHICH WILL BE ATTACHED TO THE NEW VALUE
025141,000398: 21,3174           13176                           TCF      POSDRIVE                              #  OF Q(R)ACCDOT.
025142,000399: 21,3175           47763                           CS       BIT1                                  
025143,000400: 
025144,000401: 21,3176           50066        POSDRIVE           INDEX    QRCNTR                                #  SIGN OF NEW Q(R)ACCDOT OPPOSES THIS SIGN
025145,000402: 21,3177           55523                           TS       NEGUQ                                 
025146,000403: 
025147,000404: 21,3200           40000                           COM                                            
025148,000405: 21,3201           00006                           EXTEND                                         #  SEND BACK JERK TERM
025149,000406: 21,3202           50066                           INDEX    ITEMP6                                
025150,000407: 21,3203           71532                           MP       ACCDOTQ                               
025151,000408: 21,3204           50066                           INDEX    ITEMP6                                
025152,000409: 21,3205           23733                           LXCH     QACDOTMP                              #  STORE FOR 100 MS, THEN RELEASE TO FILTER
025153,000410: 21,3206           10066                           CCS      QRCNTR                                #  LOOP COUNTER
025154,000411: 21,3207           01737                           TC       SLECTLAW                              #  2ND PASS.  (FOR Q-AXIS)
025155,000412:                                                                                                  #  TRANSFORM JERKS BACK TO GIMBAL AXES.
025156,000413: 
025157,000414: 21,3210           41533                           CS       QACCDOT                               #  SCALED AT PI/2(7), AND COMPLEMENTED.
025158,000415: 21,3211           00006                           EXTEND                                         
025159,000416: 21,3212           71400                           MP       MR12                                  #  SCALED AT 2
025160,000417: 21,3213           55567                           TS       Y3DOT                                 
025161,000418: 21,3214           41535                           CS       RACCDOT                               #  SCALED AT PI/2(7), AND COMPLEMENTED.
025162,000419: 21,3215           00006                           EXTEND                                         
025163,000420: 21,3216           71402                           MP       MR13                                  #  SCALED AT 2
025164,000421: 21,3217           27567                           ADS      Y3DOT                                 
025165,000422: 21,3220           27567                           ADS      Y3DOT                                 #  SCALED AT PI/2(7)
025166,000423: 
025167,000424: 21,3221           41533                           CS       QACCDOT                               #  SCALED AT PI/2(7), AND COMPLEMENTED.
025168,000425: 21,3222           00006                           EXTEND                                         
025169,000426: 21,3223           71401                           MP       MR22                                  #  SCALED AT 1

Page 599

025171,000428: 21,3224           55571                           TS       Z3DOT                                 
025172,000429: 21,3225           41535                           CS       RACCDOT                               #  SCALED AT PI/2(7), AND COMPLEMENTED.
025173,000430: 21,3226           00006                           EXTEND                                         
025174,000431: 21,3227           71403                           MP       MR23                                  #  SCALED AT 1
025175,000432: 21,3230           27571                           ADS      Z3DOT                                 #  SCALED AT PI/2(7)
025176,000433: 
025177,000434: 21,3231           03243                           TC       WRCHN12                               #  SEND GIMBAL DRIVES TO SERVOS
025178,000435: 21,3232           15733                           TCF      RESUME                                #  WAIT UNTIL NEXT TRIM GIMBAL RUPT
025179,000436: 
025180,000437:                                                                                                  #  WAITLIST TASKS TO SET TRIM GIMBAL TURN OFF BITS.
025181,000438: 
025182,000439: 21,3233           37767        OFFGIMQ            CAF      ZERO                                  #  SET Q-AXIS FLAG TO ZERO
025183,000440: 21,3234           55523                           TS       NEGUQ                                 
025184,000441: 21,3235           13240                           TCF      +3                                    
025185,000442: 21,3236           37767        OFFGIMR            CAF      ZERO                                  #  SET R-AXIS FLAG TO ZERO
025186,000443: 21,3237           55525                           TS       NEGUR                                 
025187,000444: 21,3240           03243                           TC       WRCHN12                               #  FLAGS TO CHANNEL BITS
025188,000445: 21,3241           15727                           TCF      TASKOVER                              
025189,000446: 
025190,000447:                                                                                                  #  THE WRCHN12 SUBROUTINE SETS BITS 9,10,11,12 OF CHANNEL 12 ON THE BASIS OF THE CONTENTS OF NEGUQ,NEGUR WHICH ARE
025191,000448:                                                                                                  #  THE NEGATIVES OF THE TRIM GIMBAL DESIRED DRIVES.
025192,000449: 
025193,000450: 21,3242           07400        BGIM               OCTAL    07400                                 
025194,000451: 21,3243     0066               CHNL12             EQUALS   ITEMP6                                
025195,000452: 
025196,000453: 21,3243           11523        WRCHN12            CCS      NEGUQ                                 
025197,000454: 21,3244           37752                           CAF      BIT10                                 
025198,000455: 21,3245           13247                           TCF      +2                                    
025199,000456: 21,3246           37753                           CAF      BIT9                                  
025200,000457: 21,3247           54066                           TS       CHNL12                                
025201,000458: 
025202,000459: 21,3250           11525                           CCS      NEGUR                                 
025203,000460: 21,3251           37750                           CAF      BIT12                                 
025204,000461: 21,3252           13254                           TCF      +2                                    
025205,000462: 21,3253           37751                           CAF      BIT11                                 
025206,000463: 21,3254           26066                           ADS      CHNL12                                #  (STORED RESULT NOT USED AT PRESENT)
025207,000464: 
025208,000465: 21,3255           43242                           CS       BGIM                                  
025209,000466: 21,3256           00006                           EXTEND                                         
025210,000467: 21,3257           03012                           WAND     12                                    
025211,000468: 21,3260           30066                           CA       CHNL12                                
025212,000469: 21,3261           00006                           EXTEND                                         
025213,000470: 21,3262           05012                           WOR      12                                    
025214,000471: 
025215,000472: 21,3263           00002                           TC       Q                                     #  SIMPLE RETURN ALWAYS
025216,000473: 
025217,000474:                                                                                                  #  Q,R-TRANSF TRANSFORMS A Y,Z GIMBAL COORDINATE VARIABLE PAIR (IN A,L) TO PILOT COORDINATES (Q/R), RETURNED IN A.
025218,000475:                                                                                                  #  (THE MATRIX M FROM GIMBAL TO PILOT AXES IS ASSUMED TO BE DONE BY T4RUPT AND SCALED AT +1.)
025219,000476: 
025220,000477: 21,3264     0066               QRERAS             EQUALS   ITEMP6                                
025221,000478: 

Page 600

025223,000480: 21,3264           22066        QTRANSF            LXCH     QRERAS                                #  SAVE Z-AXIS VARIABLE
025224,000481: 21,3265           00006                           EXTEND                                         
025225,000482: 21,3266           71405                           MP       M21                                   #  (Y-AXIS)*M21
025226,000483: 21,3267           56066                           XCH      QRERAS                                #  SAVE, GET Z-AXIS VARIABLE
025227,000484: 21,3270           00006                           EXTEND                                         
025228,000485: 21,3271           71401                           MP       M22                                   #  (Z-AXIS)*M22
025229,000486: 21,3272           60066                           AD       QRERAS                                #  SUM = (Y-AXIS)*M21 + (Z-AXIS)*M22
025230,000487: 21,3273           00002                           TC       Q                                     #  RETURN WITH SUM IN A
025231,000488: 
025232,000489: 21,3274           22066        RTRANSF            LXCH     QRERAS                                #  SAVE Z-AXIS VARIABLE
025233,000490: 21,3275           00006                           EXTEND                                         
025234,000491: 21,3276           71406                           MP       M31                                   #  (Y-AXIS)*M31
025235,000492: 21,3277           56066                           XCH      QRERAS                                #  SAVE, GET Z-AXIS VARIABLE
025236,000493: 21,3300           00006                           EXTEND                                         
025237,000494: 21,3301           71403                           MP       M32                                   #  (Z-AXIS)*M32
025238,000495: 21,3302           60066                           AD       QRERAS                                #  SUM = (Y-AXIS)*M31 + (Z-AXIS)*M32
025239,000496: 21,3303           00002                           TC       Q                                     #  RETURN WITH SUM IN A
025240,000497: 
025241,000498: 21,3304           25253        .66667             DEC      .66667                                
025242,000499: 21,3305           26501        .707GTS            DEC      0.70711                               
025243,000500: 21,3306           25253        (2/3)              DEC      0.66667                               
025244,000501: 

Page 601

025246,000503:                                                                                                  #  SUBROUTINE: TGOFFCAL            MOD. NO. 1  DATE: AUGUST 22, 1966
025247,000504: 
025248,000505:                                                                                                  #  START CODING FOR MODULE 3 REMAKE, AUGUST 1967***START CODING FOR MODULE 3 REMAKE, AUGUST 1967*******************
025249,000506: 
025250,000507:                                                                                                  #  PROGRAM DESIGN BY: RICHARD D. GOSS (MIT/IL)
025251,000508: 
025252,000509:                                                                                                  #  PROGRAM IMPLEMENTATION BY: JONATHAN D. ADDELSTON (ADAMS ASSOCIATES)
025253,000510: 
025254,000511:                                                                                                  #  MODIFIED 30 NOV 66, TO USE ACCDOTQ AND ACCDOTR.              CRAIG WORK
025255,000512:                                                                                                  #  MODIFIED AUGUST '67 TO CHANGE CALLING SEQUENCE AND MAKE MAXTIME ERASABLE          PETER WEISSMAN
025256,000513: 
025257,000514:                                                                                                  #  THIS SUBROUTINE CALCULATES THE TRIM GIMBAL SHUTDOWN TIME FOR EITHER THE Q OR THE R AXIS (DEPENDING ON THE
025258,000515:                                                                                                  #  CALLING SEQUENCE).  THIS TIME IS SCALED FOR IMMEDIATE USE BY A WAITLIST CALL AS SHOWN IN THE CALLING SEQUENCES.
025259,000516:                                                                                                  #  IF THE TIME-TO-GO IS MORE THAN 'DRIVELIM', IT IS LIMITED TO 'MAXTIME'. IF
025260,000517:                                                                                                  #  THE TIME-TO-GO IS LESS THAN TEN MILLISECONDS, THE SHUTDOWN IS PERFORMED IMMEDIATELY AND THE WAITLIST CALL IS
025261,000518:                                                                                                  #  BY-PASSED.
025262,000519: 
025263,000520:                                                                                                  #  THESE TIME-TO-GO CALCULATIONS ARE DESIGNED TO DRIVE THE TRIM GIMBAL TO A POSITION WHERE THE DESCENT ENGINE WILL
025264,000521:                                                                                                  #  CAUSE NO ANGULAR ACCELERATION.  THIS SUBROUTINE IS CALLED ONLY FROM THE WAITLIST TASK CHEKDRIV WHICH IS
025265,000522:                                                                                                  #  INITIATED ONLY WHEN THE TRIM GIMBAL CONTROL LAW HAS LOST CONTROL OF THE LEM VEHICLE ATTITUDE AND MUST RETURN TO
025266,000523:                                                                                                  #  THE USE OF REACTION CONTROL SYSTEM JETS.
025267,000524: 
025268,000525:                                                                                                  #  CALLING SEQUENCES:
025269,000526: 
025270,000527:                                                                                                  #                                                   CAF     ZERO           INDEX FOR Q-AXIS.
025271,000528:                                                                                                  #                                                   TC      TGOFFCAL
025272,000529:                                                                                                  #                                                   CAF     NEGMAX         RETURN HERE FOR NO Q DRIVE.
025273,000530:                                                                                                  #                                                   TS      (QTIME)        RETURN HERE WITH TIME IN A (DECASECONDS)
025274,000531: 
025275,000532:                                                                                                  #                                                   CAF     TWO            INDEX FOR R-AXIS.
025276,000533:                                                                                                  #                                                   TC      TGOFFCAL
025277,000534:                                                                                                  #                                                   CAF     NEGMAX         RETURN HERE FOR NO R DRIVE.
025278,000535:                                                                                                  #                                                   TS      (RTIME)        RETURN HERE WITH TIME IN A (DECASECONDS)
025279,000536: 
025280,000537:                                                                                                  #  SUBROUTINES CALLED: NONE, BUT WRCHNL12 IS CALLED AFTER BOTH TGOFFCALL CALLS.
025281,000538: 
025282,000539:                                                                                                  #  NORMAL EXITS: TO WAITLIST CALL OR BEYOND 2CADR IN CALLING SEQUENCE AS SPECIFIED ABOVE.
025283,000540: 
025284,000541:                                                                                                  #  ALARM OR ABORT EXIT MODES: NONE
025285,000542: 
025286,000543:                                                                                                  #  INPUT: 1. THE AXIS INDEXER: 0 FOR Q, 2 FOR R (SEE CALLING SEQUENCES)
025287,000544:                                                                                                  #         2. THE SIGNED TIME DERIVATIVE OF ACCELERATION (QACCDOT OR RACCDOT) SCALED AT PI/2(7) RAD/SEC(3).
025288,000545:                                                                                                  #         3. THE ACCELERATION APPROXIMATION FROM THE DESCENT KALMAN FILTER TRANSFORMED TO PILOT AXES (ALPHAQ OR
025289,000546:                                                                                                  #  ALPHAR) SCALED AT PI/8 RAD/SEC(2).
025290,000547: 
025291,000548:                                                                                                  #         4. CHANNEL 12 CONTAINS THE GIMBAL DRIVES AND OTHER BITS.
025292,000549:                                                                                                  #  OUTPUT 5. THE NEGATIVE GIMBAL DRIVE FLAG (NEGUQ AND NEGUR) WHERE A +1 BIT REQUESTS POSITIVE GIMBAL DRIVE
025293,000550:                                                                                                  #            (ANGULAR ACCELERATION DECREASING), A -1 BIT REQUESTS NEGATIVE GIMBAL DRIVE (ANG. ACC. INCREASING).
025294,000551:                                                                                                  #            A ZERO INDICATES NO DRIVE.
025295,000552:                                                                                                  #         6. TIME REQUIRED TO ZERO OFFSET, SCALED FOR Q(R)GIMTIMR.
025296,000553: 

Page 602

025298,000555:                                                                                                  #  ERASABLE STORAGE CONFIGURATION (NEEDED BY THE INDEXING METHODS):
025299,000556: 
025300,000557:                                                                                                  #                                          NEGUQ    ERASE   +2             NEGATIVE OF Q-AXIS GIMBAL DRIVE
025301,000558:                                                                                                  #                                          (SPWORD) EQUALS NEGUQ +1        ANY S.P. ERASABLE NUMBER, NOW THRSTCMD
025302,000559:                                                                                                  #                                          NEGUR    EQUALS NEGUQ +2        NEGATIVE OF R-AXIS GIMBAL DRIVE
025303,000560: 
025304,000561:                                                                                                  #                                          ACCDOTQ  ERASE   +2             Q-JERK TERM SCALED AT PI/2(7) RAD/SEC(3)
025305,000562:                                                                                                  #                                          (SPWORD) EQUALS ACCDOTQ +1      ANY S.P. ERASABLE NUMBER  NOW QACCDOT
025306,000563:                                                                                                  #                                          ACCDOTR  EQUALS ACCDOTQ +2      R-JERK TERM SCALED AT PI/2(7) RAD/SEC(3)
025307,000564:                                                                                                  #                                                                          ACCDOTQ,ACCDOTR ARE MAGNITUDES.
025308,000565:                                                                                                  #                                          ALPHAQ   ERASE   +2             Q-AXIS ACCELERATION SCALED AT PI/8 R/S2
025309,000566:                                                                                                  #                                          (SPWORD) EQUALS ALPHAQ +1       ANY S.P. ERASABLE NUMBER, NOW OMEGAR
025310,000567:                                                                                                  #                                          ALPHAR   EQUALS ALPHAQ +2       R-AXIS ACCELERATION SCALED AT PI/8 R/S2
025311,000568:                                                                                                  #                                                                          NOTE: NOW OMEGAP,OMEGAQ PRECEDE ALPHAQ
025312,000569: 
025313,000570:                                                                                                  #  DEBRIS: L, Q, ITEMP1, ITEMP2, ITEMP6
025314,000571: 
025315,000572: 
025316,000573: 21,3307           54061        TGOFFCAL           TS       QRNDXER                               #  Q OR R AXIS INDEXER
025317,000574: 21,3310           50061                           INDEX    QRNDXER                               #  GET JERK TERM MAGNITUDE SCALED AT
025318,000575: 21,3311           31532                           CAE      ACCDOTQ                               #       PI/2(7) IN RADIANS/SEC(3).
025319,000576: 21,3312           00006                           EXTEND                                         #  UNLESS THETA TRIPLE-DOT MAGNITUDE IS NON
025320,000577: 21,3313           63373                           BZMF     TGOFFNOW                              #       -ZERO, SET DRIVE TO ZERO NOW.
025321,000578: 21,3314           54062                           TS       NZACCDOT                              #  SAVE NON-ZERO DENOMINATOR.
025322,000579: 21,3315           50061                           INDEX    QRNDXER                               #  INITIALIZE THE AOSTERM WHICH WILL BE UP-
025323,000580: 21,3316           31417                           CAE      ALPHAQ                                #  DATED IN THE DUMMYFIL CALCULATION FOR
025324,000581: 21,3317           00006                           EXTEND                                         #  USE IN THE QRAXIS RATE DERIVATION.  SET
025325,000582: 21,3320           73403                           MP       .1-.05K)                              #  AOSTERM TO ALPHA*CSP*(1-.5*K), WHERE CSP
025326,000583: 21,3321           56001                           XCH      L                                     #  IS .1 SEC, K IS .5   THEN AOSTERM IS SET
025327,000584: 21,3322           10061                           CCS      QRNDXER                               #  TO .075*ALPHA, SCALED AT PI/4,WHILE
025328,000585: 21,3323           50000                           INDEX    A                                     #  ALPHA IS SCALED AT PI/8( THE CONSTANT IS
025329,000586: 21,3324           23664                           LXCH     AOSQTERM                              #  SCALED AT 2.
025330,000587: 21,3325           50061                           INDEX    QRNDXER                               #  GET ACCELERATION SCALED AT PI/8
025331,000588: 21,3326           31417                           CAE      ALPHAQ                                #       RAD/SEC(2).
025332,000589: 21,3327           00006                           EXTEND                                         #  IF ACCELERATION IS ALREADY ZERO, EXIT.
025333,000590: 21,3330           13373                           BZF      TGOFFNOW                              #  OTHERWISE, PROCEED WITH NON-ZERO ALPHA.
025334,000591: 21,3331           00006                           EXTEND                                         #  SET NEGUQ TO THE SIGN OF ALPHA. THEN USE
025335,000592: 21,3332           63336                           BZMF     NEGALPH                               #    THE MAGNITUDE OF ALPHA TO COMPUTE TIME
025336,000593: 21,3333           54066                           TS       ITEMP6                                
025337,000594: 21,3334           37763                           CAF      BIT1                                  
025338,000595: 21,3335           13341                           TCF      +4                                    
025339,000596: 21,3336           40000        NEGALPH            CS       A                                     
025340,000597: 21,3337           54066                           TS       ITEMP6                                
025341,000598: 21,3340           47763                           CS       BIT1                                  
025342,000599: 21,3341           50061                           INDEX    QRNDXER                               #  STORE THE DRIVE DIRECTION FLAG
025343,000600: 21,3342           55523                           TS       NEGUQ                                 #  TIME = MAGNITUDE OF (ALPHA/ACCDOT),
025344,000601:                                                                                                  #  MINUS THE SIGN OF Q(R)ACCDOT LEFT IN A.
025345,000602: 21,3343           00006                           EXTEND                                         #  STORE ACCDOT TO REFLECT THE CHANGE IN
025346,000603: 21,3344           50061                           INDEX    QRNDXER                               #  GIMBAL DRIVE DIRECTION (POSSIBLE).  THIS

Page 603

025348,000605: 21,3345           71532                           MP       ACCDOTQ                               #  CAN BE ESSENTIAL FOR DUMMYFIL, IN CASE
025349,000606: 21,3346           50061                           INDEX    QRNDXER                               #  Q(R)ACCDOT IS NOT INITIALIZED BEFORE
025350,000607: 21,3347           23533                           LXCH     QACCDOT                               #  EXECUTING DUMMYFIL.
025351,000608: 21,3350           30062                           CAE      NZACCDOT                              #  WILL ALPHA/ACCDOT EXCEED MAX DRIVE TIME?
025352,000609: 21,3351           00006                           EXTEND                                         
025353,000610: 21,3352           71747                           MP       DRIVELIM                              #  MAX DRIVE TIME AT 16 SEC (ERASABLE LOAD)
025354,000611: 21,3353           00006                           EXTEND                                         
025355,000612: 21,3354           60066                           SU       ITEMP6                                #  15*ACCDOT - ABS(ALPHA) AT PI/8
025356,000613: 21,3355           00006                           EXTEND                                         
025357,000614: 21,3356           63370                           BZMF     USEMAX                                #  LARGE T.  USE MAX DRIVE TIME INSTEAD.
025358,000615: 
025359,000616: 21,3357           30066                           CAE      ITEMP6                                #  DRIVE  IME = ABS(ALPHA/ACCDOT)
025360,000617: 21,3360           00006                           EXTEND                                         #  RESCALE QUOTIENT TO TIMER(ERASABLE LOAD)
025361,000618: 21,3361           50061                           INDEX    QRNDXER                               
025362,000619: 21,3362           71750                           MP       DRIVFACQ                              #  (10 SCALED AT 2(10)) X (DAMPING FACTOR)
025363,000620: 21,3363           00006                           EXTEND                                         
025364,000621: 21,3364           10062                           DV       NZACCDOT                              
025365,000622: 
025366,000623: 21,3365           00006        ZEROTEST           EXTEND                                         #  BE SURE WAITLIST TIME IS GREATER THAN 0.
025367,000624: 21,3366           63373                           BZMF     TGOFFNOW                              
025368,000625: 
025369,000626: 21,3367           13371                           TCF      +2                                    #  IT IS, RETURN.
025370,000627: 
025371,000628: 21,3370           31755        USEMAX             CAE      MAXTIME                               #  USE MAXIMUM DRIVE TIME.
025372,000629: 21,3371           50002                 +2        INDEX    Q                                     #  RETURN TO Q+1 WITH TIME IN A.
025373,000630: 21,3372           00001                           TC       1                                     
025374,000631: 
025375,000632: 21,3373           37767        TGOFFNOW           CAF      ZERO                                  #  MAKE SURE PLUS ZERO FOR DRIVE FLAG
025376,000633: 21,3374           50061                           INDEX    QRNDXER                               #  TURN OFF DRIVE FLAG NOW
025377,000634: 21,3375           55523                           TS       NEGUQ                                 
025378,000635: 21,3376           00002                           TC       Q                                     #  RETURN TO Q ( WITHOUT A DRIVE TIME).
025379,000636: 
025380,000637: 21,3377           04736                           TC       CCSHOLE                               #    (FILLER)
025381,000638: 
025382,000639:                                                                                                  #  **END CODING FOR MODULE 3 REMAKE, AUGUST 1967*****END CODING FOR MODULE 3 REMAKE, AUGUST 1967*******************
025383,000640: 
025384,000641: 21,3400     0061               QRNDXER            EQUALS   ITEMP1                                #  INDEXER FOR Q OR R AXIS
025385,000642: 21,3400     0062               NZACCDOT           EQUALS   ITEMP2                                #  TEMPORARY STORAGE FOR NON-ZERO ACCDOT
025386,000643: 21,3400           50437        -2MINWL            DEC      -12000     B-14                       #  - 2 MINUTES SCALED FOR WAITLIST
025387,000644: 21,3401           60777        -2MIN256           DEC      -.46875                               #  - 2 MINUTES SCALED AT 256
025388,000645: 21,3402           31000        128/164            OCTAL    31000                                 #  128/163.84 CONVERTING 256 TO WAITLIST/2
025389,000646: 21,3403           01146        .1-.05K)           OCTAL    01146                                 #  .0375=.075 SCALED AT 2
025390,000647:                                                                                                  #  START CODING FOR MODULE 3 REMAKE, AUGUST 1967***START CODING FOR MODULE 3 REMAKE, AUGUST 1967*******************
025391,000648: 
025392,000649: 21,3404           11764        TESTCNTR           CCS      SIMPCNTR                              #  USE BIGBOX FOR PASSCTR INITIALIZATION
025393,000650: 21,3405           13410                           TCF      BIGLOAD                               #  UNTIL SIMPCNTR IS +0. THEN USE COUNTBOX.
025394,000651: 
025395,000652: 21,3406           31743                           CAE      COUNTBOX                              
025396,000653: 21,3407           13612                           TCF      LOADCNTR                              

Page 604

025398,000655: 21,3410           31766        BIGLOAD            CAE      BIGBOX                                
025399,000656: 21,3411           13612                           TCF      LOADCNTR                              
025400,000657: 
025401,000658:                                                                                                  #  **END CODING FOR MODULE 3 REMAKE, AUGUST 1967*****END CODING FOR MODULE 3 REMAKE, AUGUST 1967*******************
025402,000659: 
025403,000660:                                                                                                  #  THE NEXT FIVE CELLS ARE LEFT IN FOR SPACING.
025404,000661: 
025405,000662: 21,3412           27522                           ADS      FUNCTION   +1                         #  MULTIPLIER AS C(A).  MULTIPLY THESE AND
025406,000663: 21,3413           54001                           TS       L                                     #  USE ONLY HIGH ORDER PART OF PRODUCT.
025407,000664: 21,3414           13416                           TCF      +2                                    #  ADD S.P. LOW PRODUCT TO LOW PART OF HIGH
025408,000665: 21,3415           27521                           ADS      FUNCTION                              #  PRODUCT.  CHECK OVERFLOW, CARRY, AND
025409,000666: 21,3416           00002                           TC       Q                                     #  RETURN.

End of include-file TRIM_GIMBAL_CONTROL_SYSTEM.agc.  Parent file is MAIN.agc