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.

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

Page 591

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

Page 592

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

Page 593

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

Page 594

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

Page 595

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

Page 596

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

Page 597

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

Page 598

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

Page 599

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

Page 600

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

Page 601

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

Page 602

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

Page 603

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

Page 604

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

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