Source Code

These source code files have been transcribed or otherwise adapted from digitized images of a hardcopy from the private collection of Don Eyles. The digitization was performed by archive.org, and transcription was performed by a team of volunteers. Note that the page images presented online are of reduced quality, and that the original high-quality images are available at archive.org. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

    473423A YUL SYSTEM FOR BLK2: REVISION 12 of PROGRAM AURORA BY DAP GROUP   NOV 10, 1966
Note that the date is the date of the printout, not the date of the program revision.

026346,000002:                                                                                                  ## Copyright:    Public domain.
026347,000003:                                                                                                  ## Filename:     TRIM_GIMBAL_CONTROL_SYSTEM.agc
026348,000004:                                                                                                  ## Purpose:      Part of the source code for Aurora (revision 12).
026349,000005:                                                                                                  ## Assembler:    yaYUL
026350,000006:                                                                                                  ## Contact:      Ron Burkey <info@sandroid.org>.
026351,000007:                                                                                                  ## Website:      https://www.ibiblio.org/apollo.
026352,000008:                                                                                                  ## Pages:        615-629
026353,000009:                                                                                                  ## Mod history:  2016-09-20 JL   Created.
026354,000010:                                                                                                  ##               2016-10-02 MAS  Transcribed.
026355,000011:                                                                                                  ##               2016-10-04 HG   Change 'code' to comments. Looks like code in the scans
026356,000012:                                                                                                  ##                               but is actually documentation
026357,000013:                                                                                                  ##               2016-10-08 HG   Change THEATA -> ETHETA 
026358,000014:                                                                                                  ##                                      KCENTRAL -> K2CNTRAL   (p. 621)
026359,000015:                                                                                                  ##               2016-10-15 HG   fix label CHECKDRIV -> CHEKDRIV
026360,000016:                                                                                                  ##                                         QRUPFILT  -> QRJPFILT
026361,000017:                                                                                                  ##                                         -TGNBD+1  -> -TGBND+1
026362,000018:                                                                                                  ##               2016-12-08 RSB  Proofed comments with octopus/ProoferComments
026363,000019:                                                                                                  ##                               and fixed the errors found.
026364,000020: 
026365,000021:                                                                                                  ## This source code has been transcribed or otherwise adapted from
026366,000022:                                                                                                  ## digitized images of a hardcopy from the private collection of 
026367,000023:                                                                                                  ## Don Eyles.  The digitization was performed by archive.org.
026368,000024: 
026369,000025:                                                                                                  ## Notations on the hardcopy document read, in part:
026370,000026: 
026371,000027:                                                                                                  ##       473423A YUL SYSTEM FOR BLK2: REVISION 12 of PROGRAM AURORA BY DAP GROUP
026372,000028:                                                                                                  ##       NOV 10, 1966
026373,000029: 
026374,000030:                                                                                                  ##       [Note that this is the date the hardcopy was made, not the
026375,000031:                                                                                                  ##       date of the program revision or the assembly.]
026376,000032: 
026377,000033:                                                                                                  ## The scan images (with suitable reduction in storage size and consequent 
026378,000034:                                                                                                  ## reduction in image quality) are available online at 
026379,000035:                                                                                                  ##       https://www.ibiblio.org/apollo.  
026380,000036:                                                                                                  ## The original high-quality digital images are available at archive.org:
026381,000037:                                                                                                  ##       https://archive.org/details/aurora00dapg
026382,000038: 

Page 615

026384,000040:                                                                                                  #  CONTROL REACHES THIS POINT UNDER EITHER OF THE FOLLOWING TWO CONDITIONS ONCE THE DESCENT ENGINE AND THE DIGITAL
026385,000041:                                                                                                  #  AUTOPILOT ARE BOTH ON:
026386,000042:                                                                                                  #           A) THE TRIM GIMBAL CONTROL LAW WAS ON DURING THE PREVIOUS Q,R-AXIS TIME5 INTERRUPT (OR THE DAPIDLER
026387,000043:                                                                                                  #              INITIALIZATION WAS SET FOR TRIM GIMBAL CONTROL AND THIS IS THE FIRST PASS), OR
026388,000044:                                                                                                  #           B) THE Q,R-AXES RCS JET CONTROL LAW ATTITUDE STEERING MODE REDUCED THE ATTITUDE ERROR TO LESS THAN
026389,000045:                                                                                                  #  1DEGREE ON EACH AXIS ON ITS LAST TIME5 INTERRUPT.
026390,000046: 
026391,000047:                                                                                                  #  THE FOLLOWING T5RUPT ENTRY BEGINS THE TRIM GIMBAL CONTROL LAW.  SINCE IT IS ASSUMED THAT THE LEM WILL REMAIN
026392,000048:                                                                                                  #  UNDER TRIM GIMBAL CONTROL, A KALMAN FILTER RUPT IS SET UP TO BEGIN 30 MS FROM THE TRIM GIMBAL RUPT.
026393,000049: 
026394,000050: 26,2564           32373        GTS                CAF      MS30F                                 #  RESET TIMER IMMEDIATELY: DT = 30 MS
026395,000051: 26,2565           54030                           TS       TIME5                                 
026396,000052: 
026397,000053: 26,2566           22016                           LXCH     BANKRUPT                              #  INTERRUPT LEAD IN (CONTINUED)
026398,000054: 26,2567           00006                           EXTEND                                         
026399,000055: 26,2570           22012                           QXCH     QRUPT                                 
026400,000056: 
026401,000057: 26,2571           00006                           EXTEND                                         
026402,000058: 26,2572           32402                           DCA      POSTPFIL                              
026403,000059: 26,2573           52346                           DXCH     T5ADR                                 
026404,000060: 
026405,000061: 26,2574           12666                           TCF      GTSTEST                               #  SKIP OVER XFORMS UNTIL REORGANIZATION
026406,000062: 
026407,000063: 26,2575           00006        GIMBAL             EXTEND                                         #  GET D.P. FILTERED CDUY VALUE (ONES COMP)
026408,000064: 26,2576           31563                           DCA      CDUYFIL                               #  SCALED AT 2PI RADIANS
026409,000065: 26,2577           02302                           TC       ONETOTWO                              #  FORM S.P. VALUE IN TWOS COMPLEMENT AT PI
026410,000066: 26,2600           00006                           EXTEND                                         
026411,000067: 26,2601           20775                           MSU      CDUYD                                 #  FORM Y-AXIS ERROR IN ONES COMPLEMENT
026412,000068: 26,2602           55477                           TS       QDIFF                                 #  (SAVE IN Q-AXIS ERROR LOC: EFFICIENCY)
026413,000069: 
026414,000070: 26,2603           00006                           EXTEND                                         #  GET D.P. FILTERED CDUZ VALUE (ONES COMP)
026415,000071: 26,2604           31565                           DCA      CDUZFIL                               #  SCALED AT 2PI RADIANS
026416,000072: 26,2605           02302                           TC       ONETOTWO                              #  FORM S.P. VALUE IN TWOS COMPLEMENT AT PI
026417,000073: 26,2606           00006                           EXTEND                                         
026418,000074: 26,2607           20776                           MSU      CDUZD                                 #  FORM Z-AXIS ERROR IN ONES COMPLEMENT
026419,000075: 26,2610           55500                           TS       RDIFF                                 #  (SAVE IN R-AXIS ERROR LOC: EFFICIENCY)
026420,000076: 
026421,000077:                                                                                                  #  TRANSFORM Y,Z CDU ERRORS TO THE Q,R-AXES.
026422,000078: 
026423,000079: 26,2611           00006                           EXTEND                                         #  GET BOTH Y AND Z CDU ERRORS AT PI RAD
026424,000080: 26,2612           31500                           DCA      QDIFF                                 
026425,000081: 26,2613           03421                           TC       QTRANSF                               #  FORM Q-ERROR IN A (SCALED AT PI RAD)
026426,000082: 26,2614           53500                           DXCH     QDIFF                                 #  STORE Q-ERROR, GET BOTH Y,Z CDU ERRORS
026427,000083: 26,2615           03431                           TC       RTRANSF                               #  FORM R-ERROR IN A (SCALED AT PI RAD)
026428,000084: 26,2616           57500                           XCH      RDIFF                                 #  STORE R-ERROR
026429,000085: 
026430,000086:                                                                                                  #  TRANSFORM THE FILTERED Y,Z RATES TO THE Q,R-AXES.
026431,000087:                                                                                                  #  (THESE MAY BE NEEDED FOR THE RATE DERIVATION FOR THE JETS IF THEY MUST BE USED.)
026432,000088: 
026433,000089: 26,2617           31570                           CAE      DCDUZFIL                              #  GET FILTERED Y,Z RATES

Page 616

026435,000091: 26,2620           54001                           TS       L                                     #  SCALED AT PI/4 RADIANS/SECOND
026436,000092: 26,2621           31566                           CAE      DCDUYFIL                              
026437,000093: 26,2622           03421                           TC       QTRANSF                               #  FOR Q-AXIS RATE
026438,000094: 26,2623           55417                           TS       OMEGAQ                                #  STORED SCALED AT PI/4 RADIANS/SECOND
026439,000095: 
026440,000096: 26,2624           31570                           CAE      DCDUZFIL                              #  GET FILTERED Y,Z RATES
026441,000097: 26,2625           54001                           TS       L                                     #  SCALED AT PI/4 RADIANS/SECOND
026442,000098: 26,2626           31566                           CAE      DCDUYFIL                              
026443,000099: 26,2627           03431                           TC       RTRANSF                               #  FOR R-AXIS RATE
026444,000100: 26,2630           55421                           TS       OMEGAR                                #  STORED SCALED AT PI/4 RADIANS/SECOND
026445,000101: 
026446,000102:                                                                                                  #  TRANSFORM THE FILTERED Y,Z ACCELERATIONS TO THE Q,R-AXES.
026447,000103:                                                                                                  #  (THESE MAY BE NEEDED TO CALCULATE TRIM GIMBAL OFF-TIMES IF ATTITUDE ERROR HAS GONE BEYOND TRIM GIMBAL CONTROL.)
026448,000104: 
026449,000105: 26,2631           31574                           CAE      D2CDUZFL                              #  GET FILTERED Y,Z ACCELERATIONS
026450,000106: 26,2632           54001                           TS       L                                     #  SCALED AT PI/8 RADIANS/SECOND(2)
026451,000107: 26,2633           31572                           CAE      D2CDUYFL                              
026452,000108: 26,2634           03421                           TC       QTRANSF                               #  FORM Q-AXIS ACCELERATION
026453,000109: 26,2635           55420                           TS       ALPHAQ                                #  STORE AT PI/8 RADIANS/SECOND(2)
026454,000110: 
026455,000111: 26,2636           31574                           CAE      D2CDUZFL                              #  GET FILTERED Y,Z ACCELERATIONS
026456,000112: 26,2637           54001                           TS       L                                     #  SCALED AT PI/8 RADIANS/SECOND(2)
026457,000113: 26,2640           31572                           CAE      D2CDUYFL                              
026458,000114: 26,2641           03431                           TC       RTRANSF                               #  FORM R-AXIS ACCELERATION
026459,000115: 26,2642           55422                           TS       ALPHAR                                #  STORE AT PI/8 RADIANS/SECOND(2)
026460,000116: 
026461,000117:                                                                                                  #  EXTRAPOLATE THETA AND OMEGA OVER THE 20 MS DELAY BETWEEN THE KALMAN FILTER AND THE TRIM GIMBAL CONTROL.
026462,000118: 
026463,000119: 26,2643           31417                           CAE      OMEGAQ                                
026464,000120: 26,2644           00006                           EXTEND                                         
026465,000121: 26,2645           72664                           MP       DTW                                   
026466,000122: 26,2646           27477                           ADS      QDIFF                                 
026467,000123: 
026468,000124: 26,2647           31421                           CAE      OMEGAR                                
026469,000125: 26,2650           00006                           EXTEND                                         
026470,000126: 26,2651           72664                           MP       DTW                                   
026471,000127: 26,2652           27500                           ADS      RDIFF                                 
026472,000128: 
026473,000129: 26,2653           31420                           CAE      ALPHAQ                                
026474,000130: 26,2654           00006                           EXTEND                                         
026475,000131: 26,2655           72665                           MP       DTA                                   
026476,000132: 26,2656           27417                           ADS      OMEGAQ                                
026477,000133: 
026478,000134: 26,2657           31422                           CAE      ALPHAR                                
026479,000135: 26,2660           00006                           EXTEND                                         
026480,000136: 26,2661           72665                           MP       DTA                                   
026481,000137: 26,2662           27421                           ADS      OMEGAR                                
026482,000138: 
026483,000139: 26,2663           14606                           TCF      RESUME                                
026484,000140: 

Page 617

026486,000142: 26,2664           00122        DTW                DEC      .005                                  
026487,000143: 26,2665           00051        DTA                DEC      .0025                                 
026488,000144: 
026489,000145:                                                                                                  #  TEST TO SEE IF TRIM GIMBAL CONTROL LAW HAS KEPT BOTH ATTITUDE ERRORS BELOW THE 1 DEGREE BOUNDARY WITH THE REGION
026490,000146:                                                                                                  #  OF RCS CONTROL LAW DOMINANCE OR IS STILL REDUCING THE ERROR.
026491,000147: 
026492,000148: 26,2666           37656        GTSTEST            CAF      BIT2                                  #  VERIFY THAT GTS IS STILL OPERATIVE
026493,000149: 26,2667           70765                           MASK     DAPBOOLS                              
026494,000150: 26,2670           10000                           CCS      A                                     
026495,000151: 26,2671           12723                           TCF      RCSCNTRL                              #  GTS NOT OPERATIVE
026496,000152: 26,2672           37657                           CAF      BIT1                                  
026497,000153: 26,2673           54073        LOOPTEST           TS       QRCNTR                                
026498,000154: 26,2674           50073                           INDEX    QRCNTR                                
026499,000155: 26,2675           11477                           CCS      QDIFF                                 #  SCALED AT PI.
026500,000156: 26,2676           62721                           AD       -TGBND+1                              #  -2 DEG SCALED AT PI, + 1 BIT.
026501,000157: 26,2677           12701                           TCF      +2                                    
026502,000158: 26,2700           62721                           AD       -TGBND+1                              
026503,000159: 26,2701           00006                           EXTEND                                         
026504,000160: 26,2702           62704                           BZMF     +2                                    #  IS ERROR MAG LESS,EQUAL 2 DEG.
026505,000161: 26,2703           12723                           TCF      RCSCNTRL                              #  NO.   GO TO JETS.
026506,000162: 26,2704           30073                           CA       QRCNTR                                #  YES.  TRY RATE MAGNITUDE.
026507,000163: 26,2705           60000                           DOUBLE                                         
026508,000164: 26,2706           50000                           INDEX    A                                     
026509,000165: 26,2707           11417                           CCS      OMEGAQ                                #  SCALED AT PI/4.
026510,000166: 26,2710           62722                           AD       -RATBD+1                              #  -.65 DEC/SEC SCALED AT PI/4  + 1 BIT
026511,000167: 26,2711           12713                           TCF      +2                                    
026512,000168: 26,2712           62722                           AD       -RATBD+1                              
026513,000169: 26,2713           00006                           EXTEND                                         
026514,000170: 26,2714           62716                           BZMF     +2                                    #  IS RATE MAG LESS,EQUAL .65 DEG/SEC.
026515,000171: 26,2715           12723                           TCF      RCSCNTRL                              #  NO.    GO TO JETS.
026516,000172: 26,2716           10073                           CCS      QRCNTR                                #  YES.  THIS AXIS IS FINE. ARE BOTH DONE.
026517,000173: 26,2717           12673                           TCF      LOOPTEST                              #  TRY THE Q AXIS NOW.
026518,000174: 26,2720           12766                           TCF      GTSRAXIS                              #  USE TRIM GIMBAL CONTROL.
026519,000175: 26,2721           77512        -TGBND+1           OCT      77512                                 #  -2 DEG SCALED AT PI, + 1 BIT.
026520,000176: 26,2722           77423        -RATBD+1           OCT      77423                                 #  -.65 DEG/SEC SCALED AT PI/4  + 1 BIT
026521,000177:                                                                                                  #  ATTITUDE ERROR IS BEYOND TRIM GIMBAL CONTROL LAW RANGE.  SET UP FOR RCS CONTROL LAW (Q,R-AXIS) AND CALCULATE
026522,000178:                                                                                                  #  TIMES TO TURN OFF THE GIMBAL DRIVES.
026523,000179: 
026524,000180: 26,2723           32745        RCSCNTRL           CAF      POSTQRFL                              #  CHANGE LOCATION OF NEXT T5RUPT FROM
026525,000181: 26,2724           54345                           TS       T5ADR                                 #  FILTER TO FILDUMMY
026526,000182: 
026527,000183: 26,2725           32746                           CAF      QRJPFILT                              #  SET UP POST P-AXIS T5RUPT TO GO TO
026528,000184: 26,2726           55601                           TS       PFILTADR                              #  DUMMYFIL INSTEAD OF FILTER
026529,000185: 

There is a line here saying "* DELETE THROUGH 0134". Presumably this indicates a change from the last revision.

026531,000187: 26,2727           00006                           EXTEND                                         #  PREPARE FOR SEQUENCED RESUMPTION OF
026532,000188: 26,2730           30034                           DCA      CDUY                                  #  Q,R-AXIS RCS CONTROL RATE DERIVATION
026533,000189: 26,2731           53434                           DXCH     OLDYFORQ                              #  BY PROVIDING OLD CDU READINGS
026534,000190: 
026535,000191: 26,2732           00006                           EXTEND                                         #  MOVE FILTERED AND TRANSFORMED ATTITUDE

Page 618

026537,000193: 26,2733           31500                           DCA      QDIFF                                 #  ERRORS INTO ERASABLE FOR Q,R-AXIS RCS
026538,000194: 26,2734           57500                           XCH      RERROR                                #  CONTROL: NOTE THAT THE AXES SEEM TO BE
026539,000195: 26,2735           23477                           LXCH     QERROR                                #  INTERCHANGED BUT ARE NOT CONFUSED
026540,000196: 
026541,000197: 26,2736           37657                           CAF      ONE                                   
026542,000198: 26,2737           04536                           TC       WAITLIST                              
026543,000199: 26,2740           02751 54006                     2CADR    CHEKDRIV                              #  DO TGOFF CALCULATION IN WAITLIST TASK
026544,000200: 
026545,000201: 26,2742           00006                           EXTEND                                         #  GO TO Q,R-AXES CONTROL IMMEDIATELY
026546,000202: 26,2743           32750                           DCA      TGENTRY                               
026547,000203: 26,2744           52006                           DTCB                                           
026548,000204: 

There is a line here saying "* DELETE". Presumably this indicates a change from the last revision.

026550,000206: 26,2745           02555        POSTQRFL           GENADR   FILDUMMY                              
026551,000207: 26,2746           02544        QRJPFILT           GENADR   DUMMYFIL                              
026552,000208: 26,2747           03122 50006  TGENTRY            2CADR    STILLRCS                              
026553,000209: 
026554,000210: 
026555,000211: 26,2751           37665        CHEKDRIV           CAF      ZERO                                  #  CALCULATE Q-AXIS GIMBAL DRIVE SHUTDOWN T
026556,000212: 26,2752           03442                           TC       TGOFFCAL                              
026557,000213: 26,2753           04536                           TC       WAITLIST                              
026558,000214: 26,2754           03370 54006                     2CADR    OFFGIMQ                               
026559,000215: 
026560,000216: 26,2756           37656                           CAF      TWO                                   #  CALCULATE R-AXIS GIMBAL DRIVE SHUTDOWN T
026561,000217: 26,2757           03442                           TC       TGOFFCAL                              
026562,000218: 26,2760           04536                           TC       WAITLIST                              
026563,000219: 26,2761           03373 54006                     2CADR    OFFGIMR                               
026564,000220: 
026565,000221: 26,2763           03400                           TC       WRCHN12                               #  SET UP NEW DRIVES AS OF NOW
026566,000222: 
026567,000223: 26,2764           14602                           TCF      TASKOVER                              
026568,000224: 

Page 619

026570,000226:                                                                                                  #  THE DRIVE SETTING ALGORITHM
026571,000227:                                                                                                  #  DEL = SGN(OMEGA.K + SGN(ALPHA)ALPHA(2)/2)    ONLY +1/-1
026572,000228: 
026573,000229:                                                                                                  #  NEGUSUM = ERROR.K(2) + DEL((OMEGA.K.DEL + ALPHA(2)/2)(3/2) + (OMEGA.K.DEL + ALPHA(2)/3)ALPHA
026574,000230: 
026575,000231:                                                                                                  #  DRIVE = -SGN(NEGUSUM)
026576,000232: 26,2765           76504        -.04266            DEC      -.04266                               
026577,000233: 26,2766           37656        GTSRAXIS           CAF      TWO                                   #  SET INDEXER FOR R-AXIS CALCULATIONS
026578,000234: 26,2767           54073                           TS       QRCNTR                                
026579,000235: 26,2770           12773                           TCF      GTSQAXIS                              
026580,000236: 
026581,000237: 26,2771           37665        GOQTRIMG           CAF      ZERO                                  #  SET INDEXER FOR Q-AXIS CALCULATIONS
026582,000238: 26,2772           54073                           TS       QRCNTR                                
026583,000239: 
026584,000240: 26,2773           00006        GTSQAXIS           EXTEND                                         
026585,000241: 26,2774           50073                           INDEX    QRCNTR                                #  PICK UP K AND K(2) FOR THIS AXIS
026586,000242: 26,2775           31536                           DCA      KQ                                    
026587,000243: 26,2776           52066                           DXCH     KCENTRAL                              
026588,000244: 
026589,000245: 26,2777           00006                           EXTEND                                         
026590,000246: 26,3000           50073                           INDEX    QRCNTR                                #  PICK UP OMEGA AND ALPHA FOR THIS AXIS
026591,000247: 26,3001           31420                           DCA      OMEGAQ                                
026592,000248: 26,3002           52071                           DXCH     WCENTRAL                              
026593,000249: 
026594,000250: 26,3003           30073                           CAE      QRCNTR                                
026595,000251: 26,3004           00006                           EXTEND                                         
026596,000252: 26,3005           13010                           BZF      +3                                    
026597,000253: 26,3006           31500                           CAE      RDIFF                                 
026598,000254: 26,3007           13011                           TCF      +2                                    
026599,000255: 26,3010           31477                           CAE      QDIFF                                 
026600,000256: 
026601,000257: 26,3011           00006                           EXTEND                                         #  RESCALE DIFFERENCE BY MULTIPLYING BY
026602,000258: 26,3012           77651                           MP       BIT7                                  #  2(6)
026603,000259: 26,3013           22075                           LXCH     ETHETA                                
026604,000260: 
026605,000261: 26,3014           30065                           CAE      KCENTRAL                              #  TEST ON MAGNITUDE OF ACCDOT
026606,000262: 26,3015           62765                           AD       -.04266                               
026607,000263: 26,3016           00006                           EXTEND                                         
026608,000264: 26,3017           63033                           BZMF     ACCDOTSM                              #  BRANCH IF ACCDOT IS SMALL
026609,000265: 
026610,000266: 26,3020           37642        ACCDOTLG           CAF      BIT14                                 #  ACCDOT IS COMPARITIVELY LARGE
026611,000267: 26,3021           54076                           TS       SF1                                   #  SET UP SCALE FACTORS
026612,000268: 26,3022           37644                           CAF      BIT12                                 
026613,000269: 26,3023           54077        WSFTEST            TS       SF2                                   
026614,000270: 
026615,000271: 26,3024           10070                           CCS      WCENTRAL                              #  TEST ON MAGNITUDE OF OMEGA
026616,000272: 26,3025           63056                           AD       -.04438                               
026617,000273: 26,3026           13030                           TCF      +2                                    
026618,000274: 26,3027           63056                           AD       -.04438                               

Page 620

026620,000276: 26,3030           00006                           EXTEND                                         
026621,000277: 26,3031           63047                           BZMF     ASFTEST                               #  IF SMALL, GO TO ALPHA TEST
026622,000278: 
026623,000279: 26,3032           13071                           TCF      WLARGE                                
026624,000280: 
026625,000281: 26,3033           30065        ACCDOTSM           CAE      KCENTRAL                              #  RESCALE IF ACCDOT IS SMALL
026626,000282: 26,3034           00006                           EXTEND                                         
026627,000283: 26,3035           77653                           MP       BIT5                                  #  RESCALE K BY MULTIPLYING BY 2(4)
026628,000284: 26,3036           22065                           LXCH     KCENTRAL                              
026629,000285: 26,3037           30065                           CAE      KCENTRAL                              
026630,000286: 26,3040           00006                           EXTEND                                         
026631,000287: 26,3041           70000                           SQUARE                                         
026632,000288: 26,3042           54066                           TS       K2CNTRAL                              
026633,000289: 26,3043           37646                           CAF      BIT10                                 #  SET UP VARIABLE SCALE FACTORS
026634,000290: 26,3044           54076                           TS       SF1                                   
026635,000291: 26,3045           37654                           CAF      BIT4                                  
026636,000292: 26,3046           13023                           TCF      WSFTEST                               #  GO TEST ON MAGNITUDE OF OMEGA
026637,000293: 
026638,000294: 26,3047           10071        ASFTEST            CCS      ACENTRAL                              #  TEST ON MAGNITUDE OF ALPHA
026639,000295: 26,3050           63057                           AD       -.08882                               
026640,000296: 26,3051           13053                           TCF      +2                                    
026641,000297: 26,3052           63057                           AD       -.08882                               
026642,000298: 26,3053           00006                           EXTEND                                         
026643,000299: 26,3054           63060                           BZMF     WARESCAL                              #  IF SMALL, GO TO W,A RESCALING
026644,000300: 26,3055           13071                           TCF      WLARGE                                #  IF LARGE, DO SAME AS IF W LARGE
026645,000301: 
026646,000302: 26,3056           76450        -.04438            DEC      -.04438                               
026647,000303: 26,3057           75120        -.08882            DEC      -.08882                               
026648,000304: 
026649,000305: 26,3060           30070        WARESCAL           CAE      WCENTRAL                              #  RESCALE OMEGA BY MULTIPLYING BY 2(4)
026650,000306: 26,3061           00006                           EXTEND                                         
026651,000307: 26,3062           77653                           MP       BIT5                                  
026652,000308: 26,3063           22070                           LXCH     WCENTRAL                              
026653,000309: 
026654,000310: 26,3064           30071                           CAE      ACENTRAL                              #  RESCALE ALPHA BY MULTIPLYING BY 2(3)
026655,000311: 26,3065           00006                           EXTEND                                         
026656,000312: 26,3066           77654                           MP       BIT4                                  
026657,000313: 26,3067           22071                           LXCH     ACENTRAL                              
026658,000314: 
026659,000315: 26,3070           13101                           TCF      ALGORTHM                              
026660,000316: 
026661,000317: 26,3071           30076        WLARGE             CAE      SF1                                   #  RESCALE VARIABLE SCALE FACTORS
026662,000318: 26,3072           00006                           EXTEND                                         
026663,000319: 26,3073           77643                           MP       BIT13                                 #  SF1 = SF1*2(-2)
026664,000320: 26,3074           54076                           TS       SF1                                   
026665,000321: 26,3075           30077                           CAE      SF2                                   
026666,000322: 26,3076           00006                           EXTEND                                         
026667,000323: 26,3077           77652                           MP       BIT6                                  #  SF2 = SF2*2(-9)
026668,000324: 26,3100           54077                           TS       SF2                                   
026669,000325: 

Page 621

026671,000327: 26,3101           30075        ALGORTHM           CAE      ETHETA                                #  GET RESCALED ERROR THETA
026672,000328: 26,3102           00006                           EXTEND                                         
026673,000329: 26,3103           70066                           MP       K2CNTRAL                              #  FORM K(2)*THETA IN D.P.
026674,000330: 26,3104           22074                           LXCH     K2THETA                               
026675,000331: 26,3105           00006                           EXTEND                                         #  FORM K(2)*THETA*SF2 IN D.P.
026676,000332: 26,3106           70077                           MP       SF2                                   
026677,000333: 26,3107           52075                           DXCH     K2THETA                               
026678,000334: 26,3110           00006                           EXTEND                                         
026679,000335: 26,3111           70077                           MP       SF2                                   
026680,000336: 26,3112           26075                           ADS      K2THETA    +1                         
026681,000337: 
026682,000338: 26,3113           30070                           CAE      WCENTRAL                              #  GET OMEGA
026683,000339: 26,3114           00006                           EXTEND                                         
026684,000340: 26,3115           70065                           MP       KCENTRAL                              #  FORM K*OMEGA IN D.P.
026685,000341: 26,3116           22065                           LXCH     OMEGA.K                               
026686,000342: 26,3117           00006                           EXTEND                                         #  FORM OMEGA*K*SF1 IN D.P.
026687,000343: 26,3120           70076                           MP       SF1                                   
026688,000344: 26,3121           52066                           DXCH     OMEGA.K                               
026689,000345: 26,3122           00006                           EXTEND                                         
026690,000346: 26,3123           70076                           MP       SF1                                   
026691,000347: 26,3124           26066                           ADS      OMEGA.K    +1                         
026692,000348: 
026693,000349: 26,3125           30071                           CAE      ACENTRAL                              #  FORM ALPHA(2) IN D.P.
026694,000350: 26,3126           00006                           EXTEND                                         
026695,000351: 26,3127           70000                           SQUARE                                         
026696,000352: 26,3130           52077                           DXCH     A2CNTRAL                              
026697,000353: 
026698,000354: 26,3131           30071                           CAE      ACENTRAL                              #  GET SGN(ALPHA)
026699,000355: 26,3132           00006                           EXTEND                                         
026700,000356: 26,3133           63137                           BZMF     +4                                    
026701,000357: 26,3134           00006                           EXTEND                                         
026702,000358: 26,3135           30077                           DCA      A2CNTRAL                              
026703,000359: 26,3136           13141                           TCF      +3                                    
026704,000360: 26,3137           00006                           EXTEND                                         
026705,000361: 26,3140           40077                           DCS      A2CNTRAL                              
026706,000362: 26,3141           53531                           DXCH     FUNCTION                              #  SAVE AS SGN(ALPHA)ALPHA(2)
026707,000363: 26,3142           00006                           EXTEND                                         
026708,000364: 26,3143           30066                           DCA      OMEGA.K                               
026709,000365: 26,3144           21531                           DAS      FUNCTION                              #  FORM FUNCT1
026710,000366: 
026711,000367: 26,3145           11530                           CCS      FUNCTION                              #  DEL = SGN(FUNCT1)
026712,000368: 26,3146           13152                           TCF      POSFNCT1                              
026713,000369: 26,3147           13151                           TCF      +2                                    
026714,000370: 26,3150           13154                           TCF      NEGFNCT1                              
026715,000371: 
026716,000372: 26,3151           11531                           CCS      FUNCTION   +1                         #  USE LOW ORDER WORD SINCE HIGH IS ZERO
026717,000373: 26,3152           37656        POSFNCT1           CAF      TWO                                   
026718,000374: 26,3153           13155                           TCF      +2                                    
026719,000375: 26,3154           37665        NEGFNCT1           CAF      ZERO                                  
026720,000376: 26,3155           67667                           AD       NEG1                                  

Page 622

026722,000378: 26,3156           54072                           TS       DEL                                   
026723,000379: 
026724,000380: 26,3157           10072                           CCS      DEL                                   #  MAKE OMEGA*K REALLY DEL*OMEGA*K
026725,000381: 26,3160           13165                           TCF      FUNCT2                                #  (NOTHING NEED BE DONE)
026726,000382: 26,3161           25253        .66667             DEC      .66667                                
026727,000383: 26,3162           00006                           EXTEND                                         
026728,000384: 26,3163           40066                           DCS      OMEGA.K                               
026729,000385: 26,3164           52066                           DXCH     OMEGA.K                               #  CHANGE SIGN OF OMEGA*K
026730,000386: 
026731,000387: 26,3165           00006        FUNCT2             EXTEND                                         
026732,000388: 26,3166           30066                           DCA      OMEGA.K                               
026733,000389: 26,3167           53531                           DXCH     FUNCTION                              #  DEL*OMEGA*K
026734,000390: 26,3170           00006                           EXTEND                                         
026735,000391: 26,3171           30077                           DCA      A2CNTRAL                              
026736,000392: 26,3172           21531                           DAS      FUNCTION                              #  DEL*OMEGA*K + SGN(ALPHA)ALPHA(2)
026737,000393: 
026738,000394: 26,3173           30076        FUNCT3             CAE      A2CNTRAL                              #  CALCULATE (2/3)SGN(ALPHA)ALPHA(2)
026739,000395: 26,3174           00006                           EXTEND                                         
026740,000396: 26,3175           73161                           MP       .66667                                
026741,000397: 26,3176           52077                           DXCH     A2CNTRAL                              
026742,000398: 26,3177           56001                           XCH      L                                     
026743,000399: 26,3200           00006                           EXTEND                                         
026744,000400: 26,3201           73161                           MP       .66667                                
026745,000401: 26,3202           26077                           ADS      A2CNTRAL   +1                         
026746,000402: 26,3203           54001                           TS       L                                     
026747,000403: 26,3204           13206                           TCF      +2                                    
026748,000404: 26,3205           60076                           AD       A2CNTRAL                              
026749,000405: 
026750,000406: 26,3206           52066                           DXCH     OMEGA.K                               #  DEL*OMEGA*K+
026751,000407: 26,3207           20077                           DAS      A2CNTRAL                              #  (2/3)SGN(ALPHA)ALPHA(2)=G
026752,000408: 
026753,000409: 26,3210           30076                           CAE      A2CNTRAL                              #  G*ALPHA IN D.P.
026754,000410: 26,3211           00006                           EXTEND                                         
026755,000411: 26,3212           70071                           MP       ACENTRAL                              
026756,000412: 26,3213           52077                           DXCH     A2CNTRAL                              
026757,000413: 26,3214           56001                           XCH      L                                     
026758,000414: 26,3215           00006                           EXTEND                                         
026759,000415: 26,3216           70071                           MP       ACENTRAL                              
026760,000416: 26,3217           26077                           ADS      A2CNTRAL   +1                         
026761,000417: 26,3220           54001                           TS       L                                     
026762,000418: 26,3221           13223                           TCF      +2                                    
026763,000419: 26,3222           26076                           ADS      A2CNTRAL                              
026764,000420: 
026765,000421: 26,3223           52077                           DXCH     A2CNTRAL                              #  FIRST AND THIRD TERMS
026766,000422: 26,3224           20075                           DAS      K2THETA                               #  SUMMED IN D.P.
026767,000423: 
026768,000424:                                                                                                  #  THE FOLLOWING SECTION CALCULATES .707*DEL*FUNCTION(3/2) AND ADDS IT TO THE OTHER TWO TERMS OF NEGUSUM.
026769,000425: 
026770,000426: 26,3225           11530                           CCS      FUNCTION                              #  TEST FOR HIGH ORDER WORD NON-ZERO
026771,000427: 26,3226           13273                           TCF      FMAGTEST                              #  YES, SEE IF RESCALING IS NECESSARY

Page 623

026773,000429: 26,3227           13231                           TCF      +2                                    #  NO, USE LOW ORDER WORD ONLY
026774,000430: 26,3230           26501        .707GTS            DEC      .70711                                #  (CCS HOLE USED FOR DATA)
026775,000431: 26,3231           04177                           TC       T6JOBCHK                              
026776,000432: 
026777,000433: 26,3232           31531                           CAE      FUNCTION   +1                         #  USE LOW ORDER WORD ONLY
026778,000434: 26,3233           04275                           TC       SPROOT                                #  SQUARE ROOT SUBROUTINE CALL
026779,000435: 26,3234           00006                           EXTEND                                         #          3/2
026780,000436: 26,3235           71531                           MP       FUNCTION   +1                         #  FUNCTION
026781,000437: 26,3236           00006                           EXTEND                                         #  (NEEDS TO BE SHIFTED RIGHT 21 PLACES)
026782,000438: 26,3237           77650                           MP       BIT8                                  
026783,000439: 26,3240           56001                           XCH      L                                     
026784,000440: 26,3241           37665                           CAF      ZERO                                  #               3/2
026785,000441: 26,3242           53531                           DXCH     FUNCTION                              #  SAVE FUNCTION    IN FUNCTION LOCATION
026786,000442: 26,3243           13260                           TCF      DELTEST                               
026787,000443: 
026788,000444: 26,3244           31530        SQRESCAL           CAE      FUNCTION                              #  HIGH ORDER WORD OF FUNCTION NEEDS TO BE
026789,000445: 26,3245           00006                           EXTEND                                         #  RESCALED FOR ACCURACY, SO MULTIPLY D.P.
026790,000446: 26,3246           77651                           MP       BIT7                                  #  VALUE BY 2(6)
026791,000447: 26,3247           23530                           LXCH     FUNCTION                              
026792,000448: 26,3250           37665                           CAF      ZERO                                  
026793,000449: 26,3251           57531                           XCH      FUNCTION   +1                         
026794,000450: 26,3252           00006                           EXTEND                                         
026795,000451: 26,3253           77651                           MP       BIT7                                  
026796,000452: 26,3254           21531                           DAS      FUNCTION                              
026797,000453: 
026798,000454: 26,3255           37665                           CAF      ZERO                                  #  SET FLAG TO GO TO RESCALE, AND GO TO DO
026799,000455: 26,3256           55527                           TS       MULTFLAG                              #  SQUARE ROOT AND FUNCTION(3/2)
026800,000456: 26,3257           13300                           TCF      DOSPROOT                              #  CALCULATION
026801,000457: 
026802,000458: 26,3260           47637        DELTEST            CS       POSMAX                                #  SET FLAG TO GO TO NEGUSUM
026803,000459: 26,3261           55527                           TS       MULTFLAG                              
026804,000460: 26,3262           10072                           CCS      DEL                                   #  GET DEL*.707
026805,000461: 26,3263           33230                           CAF      .707GTS                               
026806,000462: 26,3264           13266                           TCF      +2                                    
026807,000463: 26,3265           43230                           CS       .707GTS                               
026808,000464: 26,3266           13302                           TCF      SPDPMULT                              #  GO TO MULTIPLY ROUTINE
026809,000465: 
026810,000466: 26,3267           37637        RESHIFT            CAF      POSMAX                                #  SET FLAG TO GO TO DELTEST
026811,000467: 26,3270           55527                           TS       MULTFLAG                              
026812,000468: 26,3271           37652                           CAF      BIT6                                  
026813,000469: 26,3272           13302                           TCF      SPDPMULT                              #  GO TO MULTIPLY ROUTINE
026814,000470: 
026815,000471: 26,3273           64362        FMAGTEST           AD       63/64+1                               #  IF MAGNITUDE OF HIGH ORDER WORD IS LESS
026816,000472: 26,3274           54000                           OVSK                                           #  THAN 1/64 RESCALE WHOLE D.P. WORD
026817,000473: 26,3275           13244                           TCF      SQRESCAL                              
026818,000474: 
026819,000475: 26,3276           37637                           CAF      POSMAX                                
026820,000476: 26,3277           55527                           TS       MULTFLAG                              
026821,000477: 
026822,000478: 26,3300           31530        DOSPROOT           CAE      FUNCTION                              #  USE HIGH ORDER WORD ONLY

Page 624

026824,000480: 26,3301           04275                           TC       SPROOT                                #  SQUARE ROOT SUBROUTINE CALL
026825,000481: 
026826,000482: 26,3302           57530        SPDPMULT           XCH      FUNCTION                              #  THIS IS AN OPEN SUBROUTINE WHICH USES
026827,000483: 26,3303           00006                           EXTEND                                         #  MULTFLAG AS A RETURN SWITCH.
026828,000484: 26,3304           71530                           MP       FUNCTION                              #  IT MULTIPLIES FUNCTION (D.P.) BY C(A)
026829,000485: 26,3305           53531                           DXCH     FUNCTION                              #  AND LEAVES THE RESULT IN FUNCTION (D.P.)
026830,000486: 26,3306           00006                           EXTEND                                         #  IT IS USED FOR-
026831,000487: 26,3307           70001                           MP       L                                     #  1) F(1/2)*F
026832,000488: 26,3310           27531                           ADS      FUNCTION   +1                         #  2) (.707*DEL)*F
026833,000489: 26,3311           54001                           TS       L                                     #  3) 2(-9)*F
026834,000490: 26,3312           13314                           TCF      +2                                    
026835,000491: 26,3313           27530                           ADS      FUNCTION                              
026836,000492: 
026837,000493: 26,3314           11527                           CCS      MULTFLAG                              #  POSMAX MEANS GO TO DELTEST
026838,000494: 26,3315           13260                           TCF      DELTEST                               #  ZERO   MEANS GO TO RESHIFT
026839,000495: 26,3316           13267                           TCF      RESHIFT                               #  NEGMAX MEANS GO TO NEGUSUM
026840,000496: 
026841,000497: 26,3317           00006        NEGUSUM            EXTEND                                         #  FORM FINAL SUM FOR NEGUSUM
026842,000498: 26,3320           31531                           DCA      FUNCTION                              
026843,000499: 26,3321           20075                           DAS      K2THETA                               
026844,000500: 
026845,000501: 26,3322           10074                           CCS      K2THETA                               #  TEST FOR ZERO HIGH ORDER PART
026846,000502: 26,3323           13327                           TCF      NEGDRIVE                              
026847,000503: 26,3324           13326                           TCF      +2                                    
026848,000504: 26,3325           13331                           TCF      POSDRIVE                              
026849,000505: 
026850,000506: 26,3326           10075                           CCS      K2THETA    +1                         #  SIGN TEST ON LOW ORDER PART
026851,000507: 26,3327           37656        NEGDRIVE           CAF      TWO                                   
026852,000508: 26,3330           13332                           TCF      +2                                    
026853,000509: 26,3331           37665        POSDRIVE           CAF      ZERO                                  
026854,000510: 26,3332           67667                           AD       NEG1                                  
026855,000511: 26,3333           50073                           INDEX    ITEMP6                                #  SET NEGUQ,R TO NEG DRIVE
026856,000512: 26,3334           55532                           TS       NEGUQ                                 
026857,000513: 
026858,000514: 26,3335           40000                           COM                                            
026859,000515: 26,3336           00006                           EXTEND                                         #  SEND BACK JERK TERM
026860,000516: 26,3337           50073                           INDEX    ITEMP6                                
026861,000517: 26,3340           71541                           MP       ACCDOTQ                               
026862,000518: 26,3341           50073                           INDEX    ITEMP6                                
026863,000519: 26,3342           23542                           LXCH     QACCDOT                               
026864,000520: 
026865,000521: 26,3343           10073                           CCS      QRCNTR                                #  LOOP COUNTER
026866,000522: 26,3344           12771                           TCF      GOQTRIMG                              
026867,000523: 
026868,000524:                                                                                                  #  TRANSFORM JERKS BACK TO GIMBAL AXES.
026869,000525: 
026870,000526: 26,3345           31542                           CAE      QACCDOT                               #  SCALED AT PI/2(7)
026871,000527: 26,3346           00006                           EXTEND                                         
026872,000528: 26,3347           71400                           MP       MR12                                  #  SCALED AT 2
026873,000529: 26,3350           55576                           TS       Y3DOT                                 

Page 625

026875,000531: 26,3351           31544                           CAE      RACCDOT                               #  SCALED AT PI/2(7)
026876,000532: 26,3352           00006                           EXTEND                                         
026877,000533: 26,3353           71402                           MP       MR13                                  #  SCALED AT 2
026878,000534: 26,3354           27576                           ADS      Y3DOT                                 
026879,000535: 26,3355           27576                           ADS      Y3DOT                                 #  SCALED AT PI/2(7)
026880,000536: 
026881,000537: 26,3356           31542                           CAE      QACCDOT                               #  SCALED AT PI/2(7)
026882,000538: 26,3357           00006                           EXTEND                                         
026883,000539: 26,3360           71401                           MP       MR22                                  #  SCALED AT 1
026884,000540: 26,3361           55600                           TS       Z3DOT                                 
026885,000541: 26,3362           31544                           CAE      RACCDOT                               #  SCALED AT PI/2(7)
026886,000542: 26,3363           00006                           EXTEND                                         
026887,000543: 26,3364           71403                           MP       MR23                                  #  SCALED AT 1
026888,000544: 26,3365           27600                           ADS      Z3DOT                                 #  SCALED AT PI/2(7)
026889,000545: 
026890,000546: 26,3366           03400                           TC       WRCHN12                               #  SEND GIMBAL DRIVES TO SERVOS
026891,000547: 26,3367           14606                           TCF      RESUME                                #  WAIT UNTIL NEXT TRIM GIMBAL RUPT
026892,000548: 
026893,000549:                                                                                                  #  WAITLIST TASKS TO SET TRIM GIMBAL TURN OFF BITS.
026894,000550: 
026895,000551: 26,3370           37665        OFFGIMQ            CAF      ZERO                                  #  SET Q-AXIS FLAG TO ZERO
026896,000552: 26,3371           55532                           TS       NEGUQ                                 
026897,000553: 26,3372           13375                           TCF      +3                                    
026898,000554: 26,3373           37665        OFFGIMR            CAF      ZERO                                  #  SET R-AXIS FLAG TO ZERO
026899,000555: 26,3374           55534                           TS       NEGUR                                 
026900,000556: 26,3375           03400                           TC       WRCHN12                               #  FLAGS TO CHANNEL BITS
026901,000557: 26,3376           14602                           TCF      TASKOVER                              
026902,000558: 
026903,000559:                                                                                                  #  THE WRCHN12 SUBROUTINE SETS BITS 9,10,11,12 OF CHANNEL 12 ON THE BASIS OF THE CONTENTS OF NEGUQ,NEGUR WHICH ARE
026904,000560:                                                                                                  #  THE NEGATIVES OF THE TRIM GIMBAL DESIRED DRIVES.
026905,000561: 
026906,000562: 26,3377           07400        BGIM               OCTAL    07400                                 
026907,000563: 26,3400     0073               CHNL12             EQUALS   ITEMP6                                
026908,000564: 
026909,000565: 26,3400           43377        WRCHN12            CS       BGIM                                  #  SAVE THE REST OF CHANNEL 12 DURING TESTS
026910,000566: 26,3401           00006                           EXTEND                                         
026911,000567: 26,3402           02012                           RAND     12                                    
026912,000568: 26,3403           54073                           TS       CHNL12                                #  (TEMPORARY STORAGE)
026913,000569: 
026914,000570: 26,3404           11532                           CCS      NEGUQ                                 
026915,000571: 26,3405           37647                           CAF      BIT9                                  
026916,000572: 26,3406           13410                           TCF      +2                                    
026917,000573: 26,3407           37646                           CAF      BIT10                                 
026918,000574: 26,3410           26073                           ADS      CHNL12                                
026919,000575: 
026920,000576: 26,3411           11534                           CCS      NEGUR                                 
026921,000577: 26,3412           37645                           CAF      BIT11                                 
026922,000578: 26,3413           13415                           TCF      +2                                    
026923,000579: 26,3414           37644                           CAF      BIT12                                 
026924,000580: 26,3415           26073                           ADS      CHNL12                                #  (STORED RESULT NOT USED AT PRESENT)

Page 626

026926,000582: 26,3416           00006                           EXTEND                                         
026927,000583: 26,3417           01012                           WRITE    12                                    
026928,000584: 
026929,000585: 26,3420           00002                           TC       Q                                     #  SIMPLE RETURN ALWAYS
026930,000586: 
026931,000587:                                                                                                  #  Q,R-TRANSF TRANSFORMS A Y,Z GIMBAL COORDINATE VARIABLE PAIR (IN A,L) TO PILOT COORDINATES (Q/R), RETURNED IN A.
026932,000588:                                                                                                  #  (THE MATRIX M FROM GIMBAL TO PILOT AXES IS ASSUMED TO BE DONE BY T4RUPT AND SCALED AT +1.)
026933,000589: 
026934,000590: 26,3421     0073               QRERAS             EQUALS   ITEMP6                                
026935,000591: 
026936,000592: 26,3421           22073        QTRANSF            LXCH     QRERAS                                #  SAVE Z-AXIS VARIABLE
026937,000593: 26,3422           00006                           EXTEND                                         
026938,000594: 26,3423           71405                           MP       M21                                   #  (Y-AXIS)*M21
026939,000595: 26,3424           56073                           XCH      QRERAS                                #  SAVE, GET Z-AXIS VARIABLE
026940,000596: 26,3425           00006                           EXTEND                                         
026941,000597: 26,3426           71401                           MP       M22                                   #  (Z-AXIS)*M22
026942,000598: 26,3427           60073                           AD       QRERAS                                #  SUM = (Y-AXIS)*M21 + (Z-AXIS)*M22
026943,000599: 26,3430           00002                           TC       Q                                     #  RETURN WITH SUM IN A
026944,000600: 
026945,000601: 26,3431           22073        RTRANSF            LXCH     QRERAS                                #  SAVE Z-AXIS VARIABLE
026946,000602: 26,3432           00006                           EXTEND                                         
026947,000603: 26,3433           71406                           MP       M31                                   #  (Y-AXIS)*M31
026948,000604: 26,3434           56073                           XCH      QRERAS                                #  SAVE, GET Z-AXIS VARIABLE
026949,000605: 26,3435           00006                           EXTEND                                         
026950,000606: 26,3436           71403                           MP       M32                                   #  (Z-AXIS)*M32
026951,000607: 26,3437           60073                           AD       QRERAS                                #  SUM = (Y-AXIS)*M31 + (Z-AXIS)*M32
026952,000608: 26,3440           00002                           TC       Q                                     #  RETURN WITH SUM IN A
026953,000609: 
026954,000610: 26,3441           25253        (2/3)              DEC      0.66667                               
026955,000611: 

Page 627

026957,000613:                                                                                                  #  SUBROUTINE: TGOFFCAL            MOD. NO. 1  DATE: AUGUST 22, 1966
026958,000614: 
026959,000615:                                                                                                  #  PROGRAM DESIGN BY: RICHARD D. GOSS (MIT/IL)
026960,000616: 
026961,000617:                                                                                                  #  PROGRAM IMPLEMENTATION BY: JONATHAN D. ADDELSTON (ADAMS ASSOCIATES)
026962,000618: 
026963,000619:                                                                                                  #  THIS SUBROUTINE CALCULATES THE TRIM GIMBAL SHUTDOWN TIME FOR EITHER THE Q OR THE R AXIS (DEPENDING ON THE
026964,000620:                                                                                                  #  CALLING SEQUENCE).  THIS TIME IS SCALED FOR IMMEDIATE USE BY A WAITLIST CALL AS SHOWN IN THE CALLING SEQUENCES.
026965,000621:                                                                                                  #  IF THE TIME-TO-GO IS MORE THAN TWO MINUTES, IT IS LIMITED TO TWO MINUTES DUE TO THE WAITLIST SPECIFICATION.  IF
026966,000622:                                                                                                  #  THE TIME-TO-GO IS LESS THAN TEN MILLISECONDS, THE SHUTDOWN IS PERFORMED IMMEDIATELY AND THE WAITLIST CALL IS
026967,000623:                                                                                                  #  BY-PASSED.  FINALLY, IF THE TRIM GIMBAL SHOULD HAPPEN TO BE MOVING IN A DIRECTION WHICH INCREASES THE ANGULAR
026968,000624:                                                                                                  #  ACCELERATION ABOUT THE GIVEN AXIS, THEN THE NEGATIVE GIMBAL DRIVE FLAG IS IMMEDIATELY COMPLEMENTED AND THE
026969,000625:                                                                                                  #  NORMAL CALCULATIONS ARE RESUMED.
026970,000626: 
026971,000627:                                                                                                  #  THESE TIME-TO-GO CALCULATIONS ARE DESIGNED TO DRIVE THE TRIM GIMBAL TO A POSITION WHERE THE DESCENT ENGINE WILL
026972,000628:                                                                                                  #  CAUSE NO ANGULAR ACCELERATION.  THIS SUBROUTINE IS CALLED ONLY FROM THE WAITLIST TASK CHEKDRIV WHICH IS
026973,000629:                                                                                                  #  INITIATED ONLY WHEN THE TRIM GIMBAL CONTROL LAW HAS LOST CONTROL OF THE LEM VEHICLE ATTITUDE AND MUST RETURN TO
026974,000630:                                                                                                  #  THE USE OF REACTION CONTROL SYSTEM JETS.
026975,000631: 
026976,000632:                                                                                                  #  CALLING SEQUENCES:
026977,000633: 
026978,000634:                                                                                                  #                      26,1000  3 7657 1            CAF    ZERO           Q-AXIS INDEXER
026979,000635:                                                                                                  #                      26,1001  0 $$$$ $            TC     TGOFFCAL       CALL TGOFFCAL (*** REPLACE $S ***)
026980,000636:                                                                                                  #                      26,1002  0 4511 0            TC     WAITLIST       CALL WAITLIST WITH CALCULATED TIME
026981,000637:                                                                                                  #                      26,1003   0$$$$ $            2CADR  OFFGIMQ        2CADR OF Q-AXIS SHUTDOWN PROGRAM
026982,000638:                                                                                                  #                      26,1004   54006 1
026983,000639: 
026984,000640:                                                                                                  #                      26,1005  3 7657 1            CAF    TWO            R-AXIS INDEXER
026985,000641:                                                                                                  #                      26,1006  0 $$$$ $            TC     TGOFFCAL       CALL TGOFFCAL (*** REPLACE $S ***)
026986,000642:                                                                                                  #                      26,1007  0 4511 0            TC     WAITLIST       CALL WAITLIST WITH CALCULATED TIME
026987,000643:                                                                                                  #                      26,1010   0$$$$ $            2CADR  OFFGIMR        2CADR OF R-AXIS SHUTDOWN PROGRAM
026988,000644:                                                                                                  #                      26,1011   54006 1
026989,000645: 
026990,000646:                                                                                                  #  SUBROUTINES CALLED: NONE, BUT WRCHNL12 IS CALLED AFTER BOTH TGOFFCALL CALLS.
026991,000647: 
026992,000648:                                                                                                  #  NORMAL EXITS: TO WAITLIST CALL OR BEYOND 2CADR IN CALLING SEQUENCE AS SPECIFIED ABOVE.
026993,000649: 
026994,000650:                                                                                                  #  ALARM OR ABORT EXIT MODES: NONE
026995,000651: 
026996,000652:                                                                                                  #  INPUT: 1. THE AXIS INDEXER: 0 FOR Q, 2 FOR R (SEE CALLING SEQUENCES)
026997,000653:                                                                                                  #         2. THE SIGNED TIME DERIVATIVE OF ACCELERATION (QACCDOT OR RACCDOT) SCALED AT PI/2(7) RAD/SEC(3).
026998,000654:                                                                                                  #         3. THE ACCELERATION APPROXIMATION FROM THE DESCENT KALMAN FILTER TRANSFORMED TO PILOT AXES (ALPHAQ OR
026999,000655:                                                                                                  #  ALPHAR) SCALED AT PI/8 RAD/SEC(2).
027000,000656:                                                                                                  #         4. THE NEGATIVE GIMBAL DRIVE FLAG (NEGUQ AND NEGUR) WHERE +1 BIT INDICATES A GIMBAL DRIVE DIRECTION WHICH
027001,000657:                                                                                                  #  DECREASES THE SIGNED GIMBAL ANGLE, WHERE -1 BIT INDICATES A GIMBAL DRIVE DIRECTION WHICH INCREASES THE SIGNED
027002,000658:                                                                                                  #  GIMBAL ANGLE, AND WHERE ZERO INDICATES NO DRIVE.
027003,000659:                                                                                                  #         5. CHANNEL 12 CONTAINS THE TRIM GIMBAL DRIVES AND OTHER BITS.
027004,000660: 
027005,000661:                                                                                                  #  ERASABLE STORAGE CONFIGURATION (NEEDED BY THE INDEXING METHODS):

Page 628

027007,000663:                                                                                                  #                NEGUQ           ERASE           +2                              NEGATIVE OF Q-AXIS GIMBAL DRIVE
027008,000664:                                                                                                  #                (SPWORD)        EQUALS          NEGUQ           +1              ANY S.P. ERASABLE NUMBER, NOW THRSTCMD
027009,000665:                                                                                                  #                NEGUR           EQUALS          NEGUQ           +2              NEGATIVE OF R-AXIS GIMBAL DRIVE
027010,000666: 
027011,000667:                                                                                                  #                QACCDOT         ERASE           +2                              Q-JERK SCALED AT PI/2(7) RAD/SEC(3) +SGN
027012,000668:                                                                                                  #                (SPWORD)        EQUALS          QACCDOT         +1              ANY S.P. ERASABLE NUMBER, NOW ACCDOTR
027013,000669:                                                                                                  #                RACCDOT         EQUALS          QACCDOT         +2              R-JERK SCALED AT PI/2(7) RAD/SEC(3) +SGN
027014,000670:                                                                                                  #                                                                                NOTE: NOW ACCDOTQ MUST PRECEDE QACCDOT
027015,000671: 
027016,000672:                                                                                                  #                ALPHAQ          ERASE           +2                              Q-AXIS ACCELERATION SCALED AT PI/8 R/S2
027017,000673:                                                                                                  #                (SPWORD)        EQUALS          ALPHAQ          +1              ANY S.P. ERASABLE NUMBER, NOW OMEGAR
027018,000674:                                                                                                  #                ALPHAR          EQUALS          ALPHAQ          +2              R-AXIS ACCELERATION SCALED AT PI/8 R/S2
027019,000675:                                                                                                  #                                                                                NOTE: NOW OMEGAP,OMEGAQ PRECEDE ALPHAQ
027020,000676: 
027021,000677:                                                                                                  #  DEBRIS: L, Q, ITEMP1, ITEMP2, ITEMP6
027022,000678: 
027023,000679: 
027024,000680: 26,3442           54065        TGOFFCAL           TS       QRNDXER                               #  Q OR R AXIS INDEXER
027025,000681: 26,3443           50065                           INDEX    QRNDXER                               #  GET SIGNED JERK TERM SCALED AT PI/2(7)
027026,000682: 26,3444           31542                           CAE      QACCDOT                               #  IN RADIANS/SECOND(3)
027027,000683: 26,3445           00006                           EXTEND                                         #  IF THETA TRIPLE-DOT IS ZERO, THEN RESET
027028,000684: 26,3446           13511                           BZF      TGOFFNOW                              #  DRIVE TO ZERO (SHOULD BE REDUNDANT)
027029,000685: 26,3447           54066                           TS       NZACCDOT                              #  SAVE NON-ZERO JERK FOR DENOMINATOR
027030,000686: 26,3450           00006                           EXTEND                                         #  TEST FOR REDUCING ACCELERATION IS SAME
027031,000687: 26,3451           50065                           INDEX    QRNDXER                               #  AS TEST FOR SAME SIGN IN -ACC AND ACCDOT
027032,000688: 26,3452           71420                           MP       ALPHAQ                                #  IF POSITIVE PRODUCT, THEN GIMBAL DRIVE
027033,000689: 26,3453           10000                           CCS      A                                     #  SHOULD BE REVERSED: NOTE THAT A SIMPLE
027034,000690: 26,3454           13460                           TCF      NEGTIME                               #  BZMF TEST WILL NOT WORK WHEN THE MP
027035,000691: 26,3455           13460                           TCF      NEGTIME                               #  INSTRUCTION RESULTS IN ZERO IN A
027036,000692: 26,3456           13466                           TCF      POSTIME                               #  AT POSTIME IT IS INSURED THAT A POSITIVE
027037,000693: 26,3457           13466                           TCF      POSTIME                               #  TIME WILL RESULT AND ACC WILL GO TO ZERO
027038,000694: 
027039,000695: 26,3460           50065        NEGTIME            INDEX    QRNDXER                               #  COMPLEMENT THE DRIVE DIRECTION FLAG
027040,000696: 26,3461           41532                           CS       NEGUQ                                 
027041,000697: 26,3462           50065                           INDEX    QRNDXER                               
027042,000698: 26,3463           55532                           TS       NEGUQ                                 
027043,000699: 26,3464           40066                           CS       NZACCDOT                              #  COMPLEMENT ACCDOT TO GET A GUARANTEED
027044,000700: 26,3465           54066                           TS       NZACCDOT                              #  POSITIVE TIME FROM QUOTIENT
027045,000701: 
027046,000702: 26,3466           50065        POSTIME            INDEX    QRNDXER                               #  TIME = -ACC/ACCDOT (POSITIVE VALUE)
027047,000703: 26,3467           41420                           CS       ALPHAQ                                #  SCALED AT PI/8 RADIANS/SECOND(2)
027048,000704: 26,3470           00006                           EXTEND                                         #  MULTIPLY BY 1/16
027049,000705: 26,3471           77645                           MP       BIT11                                 #  TO CHANGE SCALING TO 2PI RAD/SEC(2)
027050,000706: 26,3472           00006                           EXTEND                                         #  ACCDOT SCALED AT PI/2(7) IN DENOMINATOR
027051,000707: 26,3473           10066                           DV       NZACCDOT                              #  YIELDS TIME SCALED AT 256 SECONDS
027052,000708: 26,3474           63517                           AD       -2MIN256                              #  COMPARE WITH MAXIMUM 2 MINUTE DELAY OF
027053,000709: 26,3475           10000                           CCS      A                                     #  WAITLIST ACTION (TIMES AT 256 SECONDS)
027054,000710: 26,3476           43516                           CS       -2MINWL                               #  MORE THAN TWO MINUTES, USE 2 MINUTES
027055,000711: 26,3477           00002                           TC       Q                                     #  RETURN WL CALL WITH 2 MIN AT 1BIT=10MS

Page 629

027057,000713: 26,3500           67657                           AD       ONE                                   #  (CORRECT FOR CCS BIT)
027058,000714: 26,3501           00006                           EXTEND                                         #  CALCULATE DT = ABS(T-2MIN)
027059,000715: 26,3502           73520                           MP       128/164                               #  AND RESCALE DT TO WAITLIST SCALING
027060,000716: 26,3503           20001                           DDOUBL                                         
027061,000717: 26,3504           63516                           AD       -2MINWL                               #  -T = DT + 2MIN (IN WAITLIST SCALING)
027062,000718: 26,3505           40000                           COM                                            #  MAKE T POSITIVE FOR WAITLIST
027063,000719: 26,3506           00006                           EXTEND                                         #  MAKE FINAL CHECK TO INSURE T .G. 10MS
027064,000720: 26,3507           63511                           BZMF     TGOFFNOW                              #  DO SHUTDOWN NOW (COULD USE BZF)
027065,000721: 26,3510           00002                           TC       Q                                     #  RETURN TO WAITLIST CALL WITH WL TIME
027066,000722: 
027067,000723: 26,3511           37665        TGOFFNOW           CAF      ZERO                                  #  MAKE SURE PLUS ZERO FOR DRIVE FLAG
027068,000724: 26,3512           50065                           INDEX    QRNDXER                               #  TURN OFF DRIVE FLAG NOW
027069,000725: 26,3513           55532                           TS       NEGUQ                                 
027070,000726: 26,3514           50002                           INDEX    Q                                     
027071,000727: 26,3515           00003                           TC       3                                     #  SKIP WAITLIST CALL AND 2CADR
027072,000728: 
027073,000729: 
027074,000730: 26,3516     0065               QRNDXER            EQUALS   ITEMP1                                #  INDEXER FOR Q OR R AXIS
027075,000731: 26,3516     0066               NZACCDOT           EQUALS   ITEMP2                                #  TEMPORARY STORAGE FOR NON-ZERO ACCDOT
027076,000732: 26,3516           50437        -2MINWL            DEC      -12000     B-14                       #  - 2 MINUTES SCALED FOR WAITLIST
027077,000733: 26,3517           60777        -2MIN256           DEC      -.46875                               #  - 2 MINUTES SCALED AT 256
027078,000734: 26,3520           31000        128/164            OCTAL    31000                                 #  128/163.84 CONVERTING 256 TO WAITLIST/2
027079,000735: 26,3521                        ENDDAP26           EQUALS                                         

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