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.

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

Page 615

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

Page 616

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

Page 617

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

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

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

Page 618

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

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

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

Page 619

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

Page 620

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

Page 621

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

Page 622

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

Page 623

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

Page 624

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

Page 625

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

Page 626

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

Page 627

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

Page 628

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

Page 629

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

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