Source Code

This source code is very close to the Apollo Guidance Computer software for the Apollo 13 Lunar module. This revision of the Luminary 131 program is from December of 1969, whereas there was a later revision in January of 1970, and still another revision in February, which is the code that flew on the mission. As far as this transcription is concerned, it was originally from a copy made in 1991 of a printout from the collection of AGC developer Don Eyles for collector David Craig. It was subsequently scanned by Gary Neff, reprocessed for online presentation at the now-discontinued History of Recent Science and Technology (HRST) website of MIT's Dibner Institute (the full-quality scans being discarded in the process), and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a high-quality replacement scan for a completely illegible page was later provided by Gary Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many errors to be introduced into the transcription. Accordingly, a second scan of the same physical printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive, and used to correct the transcription errors. All of the scanned materials mentioned, as well as other Luminary 131 related material, are available online. Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017, so the two scans are not identical in that respect. The page-headings in the printout read, in part:
	GAP:  ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091
	17:53 DEC. 19, 1969
Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together.

038780,000002:                                                                                                  ## Copyright:   Public domain.
038781,000003:                                                                                                  ## Filename:    FINDCDUW--GUIDAP_INTERFACE.agc
038782,000004:                                                                                                  ## Purpose:     A section of Luminary 1C, revision 131.
038783,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
038784,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13.
038785,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
038786,000008:                                                                                                  ##              that the code format has been changed to conform to the
038787,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
038788,000010:                                                                                                  ##              original YUL assembler.
038789,000011:                                                                                                  ## Reference:   pp. 902-920
038790,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
038791,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
038792,000014:                                                                                                  ## Mod history: 05/28/03 RSB.   Began transcribing.
038793,000015:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
038794,000016:                                                                                                  ##              2017-02-26 RSB  Proofed comment text using octopus/ProoferComments.
038795,000017:                                                                                                  ##              2017-03-01 RSB  Fixed lingering typos.
038796,000018:                                                                                                  ##              2017-03-10 RSB  Comment-text fixes noted in proofing Luminary 116.
038797,000019:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 5-way
038798,000020:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
038799,000021: 

Page 902

038801,000023:                                                                                                  #  PROGRAM NAME:  FINDCDUW
038802,000024:                                                                                                  #  MOD NUMBER:  1        68 07 15
038803,000025:                                                                                                  #  MOD AUTHOR:  KLUMPP
038804,000026: 
038805,000027:                                                                                                  #  OBJECTS OF MOD:       1.      TO SUPPLY COMMANDED GIMBAL ANGLES FOR NOUN 22.
038806,000028:                                                                                                  #                        2.      TO MAINTAIN CORRECT AND CURRENT THRUST
038807,000029:                                                                                                  #                                DIRECTION DATA IN ALL MODES.  THIS IS DONE BY
038808,000030:                                                                                                  #                                FETCHING FOR THE THRUST DIRECTION FILTER THE
038809,000031:                                                                                                  #                                CDUD'S IN PNGCS-AUTO, THE CDU'S IN ALL OTHER
038810,000032:                                                                                                  #                                MODES.
038811,000033:                                                                                                  #                        3.      TO SUBSTITUTE A STOPRATE FOR THE NORMAL
038812,000034:                                                                                                  #                                AUTOPILOT COMMANDS WHENEVER
038813,000035:                                                                                                  #                                1) NOT IN PNGCS-AUTO, OR
038814,000036:                                                                                                  #                                2) ENGINE IS OFF.
038815,000037: 
038816,000038:                                                                                                  #  FUNCTIONAL DESCRIPTION:
038817,000039: 
038818,000040:                                                                                                  #  FINDCDUW PROVIDES THE INTERFACES BETWEEN THE VARIOUS POWERED FLITE GUIDANCE PROGRAMS
038819,000041:                                                                                                  #  AND THE DIGITAL AUTOPILOT.  THE INPUTS TO FINDCDUW ARE THE THRUST COMMAND VECTOR
038820,000042:                                                                                                  #  AND THE WINDOW COMMAND VECTOR, AND THE OUTPUTS ARE THE GIMBAL ANGLE
038821,000043:                                                                                                  #  INCREMENTS, THE COMMANDED ATTITUDE ANGLE RATES, AND THE COMMANDED
038822,000044:                                                                                                  #  ATTITUDE LAG ANGLES (WHICH ACCOUNT FOR THE ANGLES BY WHICH THE BODY WILL
038823,000045:                                                                                                  #  LAG BEHIND A RAMP COMMAND IN ATTITUDE ANGLE DUE TO THE FINITE ANGULAR
038824,000046:                                                                                                  #  ACCELERATIONS AVAILABLE).
038825,000047: 
038826,000048:                                                                                                  #  FINDCDUW ALINES THE ESTIMATED THRUST VECTOR FROM THE THRUST DIRECTION
038827,000049:                                                                                                  #  FILTER WITH THE THRUST COMMAND VECTOR, AND, WHEN XOVINHIB SET,
038828,000050:                                                                                                  #  ALINES THE +Z HALF OF THE LM ZX PLANE WITH THE WINDOW COMMAND VECTOR.
038829,000051: 

Page 903

038831,000053:                                                                                                  #  SPECIFICATIONS:
038832,000054: 
038833,000055:                                                                                                  #  INITIALIZATION:       A SINGLE INTERPRETIVE CALL TO INITCDUW IS REQUIRED
038834,000056:                                                                                                  #                        BEFORE EACH GUIDED MANEUVER USING FINDCDUW.
038835,000057: 
038836,000058:                                                                                                  #  CALL:                 INTERPRETIVE CALL TO FINDCDUW WITH THE THRUST COMMAND
038837,000059:                                                                                                  #                        VECTOR IN MPAC.  INTERPRETIVE CALL TO FINDCDUW -2 WITH
038838,000060:                                                                                                  #                        THE THRUST COMMAND VECTOR IN UNFC/2 AND NOT IN MPAC.
038839,000061: 
038840,000062:                                                                                                  #  RETURNS:              NORMAL INTERPRETIVE IN ALL CASES
038841,000063:                                                                                                  #                        1.      NORMALLY ALL AUTOPILOT CMDS ARE ISSUED.
038842,000064:                                                                                                  #                        2.      IF NOT PNGCS AUTO, DO STOPRATE AND RETURN
038843,000065:                                                                                                  #                                WITHOUT ISSUING AUTOPILOT CMDS.
038844,000066:                                                                                                  #                        3.      IF ENGINE OFF, DO STOPRATE AND RETURN WITHOUT
038845,000067:                                                                                                  #                                ISSUING AUTOPILOT CMDS.
038846,000068: 
038847,000069:                                                                                                  #  ALARMS:               00401   IF INPUTS DETERMINE AN ATTITUDE IN GIMBAL LOCK.
038848,000070:                                                                                                  #                                FINDCDUW DRIVES CDUXD AND CDUYD TO THE RQD VALUES,
038849,000071:                                                                                                  #                                BUT DRIVES CDUZD ONLY TO THE GIMBAL LOCK CONE.
038850,000072: 
038851,000073:                                                                                                  #                        00402   IF UNFC/2 OR UNWC/2 PRODUCE OVERFLOW WHEN
038852,000074:                                                                                                  #                                UNITIZED USING NORMUNIT.  FINDCDUW ISSUES
038853,000075:                                                                                                  #                                STOPRATE AS ONLY INPUT TO AUTOPILOT.
038854,000076: 
038855,000077:                                                                                                  #  INPUTS:               UNFC/2          THRUST COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
038856,000078:                                                                                                  #                        UNWC/2          WINDOW COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
038857,000079:                                                                                                  #                        OGABIAS         POSSIBLE BIAS FOR OUTER GIMBAL ANGLE (ZEROED IN INITCDUW), UNITS OF PI.
038858,000080:                                                                                                  #                        XOVINHIB        FLAG DENOTING X AXIS OVERRIDE INHIBITED.
038859,000081:                                                                                                  #                        CSMDOCKD        FLAG DENOTING CSM DOCKED.
038860,000082:                                                                                                  #                        STEERSW         FLAG DENOTING INSUFF THRUST FOR THRUST DIR FLTR.
038861,000083: 
038862,000084:                                                                                                  #  OUTPUTS:              DELCDUX,Y,Z
038863,000085:                                                                                                  #                        OMEGAPD,+1,+2
038864,000086:                                                                                                  #                        DELPEROR,+1,+2
038865,000087:                                                                                                  #                        CPHI,+1,+2 FOR NOUN22
038866,000088: 
038867,000089:                                                                                                  #  DEBRIS:               FINDCDUW DESTROYS SINCDUX,Y,Z AND COSCDUX,Y,Z BY
038868,000090:                                                                                                  #                        WRITING INTO THESE LOCATIONS THE SINES AND COSINES
038869,000091:                                                                                                  #                        OF THE CDUD'S IN PNGCS-AUTO, OF THE CDU'S OTHERWISE.
038870,000092: 

Page 904

038872,000094:                                                                                                  #  INITIALIZATION FOR FINDCDUW
038873,000095: 
038874,000096: 30,3071                                           BANK     30                                    
038875,000097: 30,2000                                           SETLOC   FCDUW                                 
038876,000098: 30,2000                                           BANK                                           
038877,000099: 
038878,000100: 30,3071  E6,1645                                  EBANK=   ECDUW                                 
038879,000101: 30,3071                                           COUNT*   $$/FCDUW                              
038880,000102: 
038881,000103: 30,3071           77331        INITCDUW           SSP      VLOAD                                 
038882,000104: 30,3072           03300                                    OGABIAS                               
038883,000105: 30,3073           00000                                    0                                     
038884,000106: 30,3074           06522                                    UNITX                                 
038885,000107: 30,3075           03267                           STORE    UNFV/2                                
038886,000108: 30,3076           03261                           STORE    UNWC/2                                
038887,000109: 30,3077           77616                           RVQ                                            
038888,000110: 
038889,000111:                                                                                                  #  FINDCDUW PRELIMINARIES
038890,000112: 
038891,000113: 30,3100           77775                           VLOAD                                          #  FINDCDUW -2:  ENTRY WHEN UNFC/2 PRE-STORD
038892,000114: 30,3101           03253                                    UNFC/2                                #  INPUT VECTORS NEED NOT BE SEMI-UNIT
038893,000115: 30,3102           40200        FINDCDUW           BOV      SETPD                                 #  FINDCDUW: ENTRY WHEN UNFC/2 IN MPAC
038894,000116: 30,3103           61102                                    FINDCDUW                              #  INTERPRETER NOW INITIALIZED
038895,000117: 30,3104           00023                                    22                                    #  LOCS 0 THRU 21 FOR DIRECTION COSINE MAT
038896,000118: 30,3105           77420                           STQ      EXIT                                  
038897,000119: 30,3106           03246                                    QCDUWUSR                              #  SAVE RETURN ADDRESS
038898,000120: 
038899,000121:                                                                                                  #  MORE HAUSKEEPING
038900,000122: 30,3107           33752                           CA       ECDUWL                                
038901,000123: 30,3110           56003                           XCH      EBANK                                 #  SET EBANK
038902,000124: 30,3111           55645                           TS       ECDUWUSR                              #  SAVE USER'S EBANK
038903,000125: 
038904,000126: 30,3112           30111                           CA       DAPBOOLS                              
038905,000127: 30,3113           74737                           MASK     CSMDOCKD                              #  CSMDOCKD MUST NOT BE BIT15
038906,000128: 30,3114           10000                           CCS      A                                     
038907,000129: 30,3115           34753                           CA       ONE                                   #  INDEX IF CSM DOCKED
038908,000130: 30,3116           55647                           TS       NDXCDUW                               
038909,000131: 
038910,000132: 30,3117           34743                           CA       XOVINHIB                              #  XOVINHIB MUST NOT BE BIT15
038911,000133: 30,3120           55651                           TS       FLPAUTNO                              #  SET TO POS-NON-ZERO FLAG PNGCS AUTO NOT
038912,000134: 
038913,000135: 30,3121           70111                           MASK     DAPBOOLS                              
038914,000136: 30,3122           55650                           TS       FLAGOODW                              #  FLAGOODW = ANY PNZ NUMBER IF XOV INHIBTD
038915,000137: 

Page 905

038917,000139:                                                                                                  #  FETCH BASIC DATA
038918,000140: 30,3123           00004                           INHINT                                         #  RELINT AT PAUTNO (TC INTPRET)
038919,000141: 
038920,000142: 30,3124           30032                           CA       CDUX                                  #  FETCH CDUX,CDUY,CDUZ IN ALL CASES, BUT
038921,000143: 30,3125           54771                           TS       CDUSPOTX                              #        REPLACE BELOW IF PNGCS AUTO
038922,000144: 30,3126           30033                           CA       CDUY                                  
038923,000145: 30,3127           54765                           TS       CDUSPOTY                              
038924,000146: 30,3130           30034                           CA       CDUZ                                  
038925,000147: 30,3131           54767                           TS       CDUSPOTZ                              
038926,000148: 
038927,000149: 30,3132           34742                           CA       BIT10                                 #  PNGCS CONTROL BIT
038928,000150: 30,3133           00006                           EXTEND                                         
038929,000151: 30,3134           02030                           RAND     CHAN30                                
038930,000152: 30,3135           10000                           CCS      A                                     
038931,000153: 30,3136           13153                           TCF      PAUTNO                                #  NOT PNGCS (BITS INVERTED)
038932,000154: 
038933,000155: 30,3137           34736                           CA       BIT14                                 #  AUTO MODE BIT
038934,000156: 30,3140           00006                           EXTEND                                         
038935,000157: 30,3141           02031                           RAND     CHAN31                                
038936,000158: 30,3142           10000                           CCS      A                                     
038937,000159: 30,3143           13153                           TCF      PAUTNO                                #  NOT AUTO (BITS INVERTED)
038938,000160: 
038939,000161: 30,3144           55651                           TS       FLPAUTNO                              #  RESET FLAG PNGCS AUTO NOT
038940,000162: 
038941,000163: 30,3145           31634                           CA       CDUXD                                 #  PNGCS AUTO:  FETCH CDUXD,CDUYD,CDUZD
038942,000164: 30,3146           54771                           TS       CDUSPOTX                              
038943,000165: 30,3147           31635                           CA       CDUYD                                 
038944,000166: 30,3150           54765                           TS       CDUSPOTY                              
038945,000167: 30,3151           31636                           CA       CDUZD                                 
038946,000168: 30,3152           54767                           TS       CDUSPOTZ                              
038947,000169: 

Page 906

038949,000171:                                                                                                  #  FETCH INPUTS
038950,000172: 30,3153           06042        PAUTNO             TC       INTPRET                               #  ENTERING THRUST CMD STILL IN MPAC
038951,000173: 30,3154           77634                           RTB                                            
038952,000174: 30,3155           21727                                    NORMUNIT                              
038953,000175: 30,3156           24001                           STOVL    UNX/2                                 #  SEMI-UNIT THRUST CMD AS INITIAL UNX/2
038954,000176: 30,3157           03261                                    UNWC/2                                
038955,000177: 30,3160           47034                           RTB      RTB                                   
038956,000178: 30,3161           21727                                    NORMUNIT                              
038957,000179: 30,3162           47617                                    QUICTRIG                              #  ALWAYS RQD TO OBTAIN TRIGS OF CDUD'S
038958,000180: 30,3163           24015                           STOVL    UNZ/2                                 #  SEMI-UNIT WINDOW CMD AS INITIAL UNZ/2
038959,000181: 30,3164           00325                                    DELV                                  
038960,000182: 30,3165           53404                           BOVB     UNIT                                  
038961,000183: 30,3166           61741                                    NOATTCNT                              #  AT LEAST ONE ENTERING CMD VCT ZERO
038962,000184: 30,3167           45000                           BOV      CALL                                  
038963,000185: 30,3170           61204                                    AFTRFLTR                              #  IF UNIT DELV OVERFLOWS, SKIP FILTER
038964,000186: 30,3171           47673                                    *SMNB*                                #  YIELDS UNIT(DELV) IN VEH COORDS FOR FLTR
038965,000187: 
038966,000188:                                                                                                  #  THRUST DIRECTION FILTER
038967,000189: 
038968,000190: 30,3172           77776                           EXIT                                           
038969,000191: 
038970,000192: 30,3173           31670                           CA       UNFVY/2                               #  FOR RESTARTS, UNFV/2 ALWAYS INTACT, MPAC
038971,000193: 30,3174           22157                           LXCH     MPAC       +3                         #        RENEWED AFTER RETURN FROM CALLER,
038972,000194: 30,3175           03474                           TC       FLTRSUB                               #        TWO FILTER UPDATES MAY BE DONE.
038973,000195: 30,3176           55670                           TS       UNFVY/2                               #  UNFV/2 NEED NOT BE EXACTLY SEMI-UNIT.
038974,000196: 
038975,000197: 30,3177           31672                           CA       UNFVZ/2                               
038976,000198: 30,3200           22161                           LXCH     MPAC       +5                         
038977,000199: 30,3201           03474                           TC       FLTRSUB                               
038978,000200: 30,3202           55672                           TS       UNFVZ/2                               
038979,000201: 
038980,000202: 30,3203           06042                           TC       INTPRET                               #  COMPLETES FILTER
038981,000203: 

Page 907

038983,000205:                                                                                                  #  FIND A SUITABLE WINDOW POINTING VECTOR
038984,000206: 
038985,000207: 30,3204           46135        AFTRFLTR           SLOAD    BHIZ                                  #  IF XOV NOT INHIBITED, GO FETCH ZNB
038986,000208: 30,3205           03251                                    FLAGOODW                              
038987,000209: 30,3206           61212                                    FETCHZNB                              
038988,000210: 30,3207           45175                           VLOAD    CALL                                  
038989,000211: 30,3210           00015                                    UNZ/2                                 
038990,000212: 30,3211           61514                                    UNWCTEST                              
038991,000213: 
038992,000214: 30,3212           77775        FETCHZNB           VLOAD                                          
038993,000215: 30,3213           02162                                    ZNBPIP                                
038994,000216: 30,3214           34015                           STCALL   UNZ/2                                 
038995,000217: 30,3215           61514                                    UNWCTEST                              
038996,000218: 
038997,000219: 30,3216           57575                           VLOAD    VCOMP                                 #  Z AND -X CAN'T BOTH PARALLEL UNFC/2
038998,000220: 30,3217           02146                                    XNBPIP                                
038999,000221: 30,3220           00015                           STORE    UNZ/2                                 
039000,000222: 
039001,000223:                                                                                                  #  COMPUTE THE REQUIRED DIRECTION COSINE MATRIX
039002,000224: 
039003,000225: 30,3221           47375        DCMCL              VLOAD    VXV                                   
039004,000226: 30,3222           00015                                    UNZ/2                                 
039005,000227: 30,3223           00001                                    UNX/2                                 
039006,000228: 30,3224           41456                           UNIT     PUSH                                  #  UNY/2 FIRST ITERATION
039007,000229: 30,3225           76435                           VXV      VSL1                                  
039008,000230: 30,3226           00001                                    UNX/2                                 
039009,000231: 30,3227           00015                           STORE    UNZ/2                                 #  -UNZ/2 FIRST ITERATION
039010,000232: 30,3230           63361                           VXSC     PDVL                                  #  EXCHANGE -UNFVZ/2 UNZ/2 FOR UNY/2
039011,000233: 30,3231           03273                                    UNFVZ/2                               #  MUST BE SMALL
039012,000234: 30,3232           51361                           VXSC     BVSU                                  #  YIELDS -UNFVY/2 UNY/2-UNFVZ/2 UNZ/2
039013,000235: 30,3233           03271                                    UNFVY/2                               #  MUST BE SMALL
039014,000236: 30,3234           53372                           VSL1     VAD                                   
039015,000237: 30,3235           00001                                    UNX/2                                 
039016,000238: 30,3236           77656                           UNIT                                           #  TOTALLY ELIMINATES THRUST POINTING ERROR
039017,000239: 30,3237           00001                           STORE    UNX/2                                 #  UNX/2
039018,000240: 30,3240           76435                           VXV      VSL1                                  
039019,000241: 30,3241           00015                                    UNZ/2                                 #  -UNZ/2 WAS STORED HERE REMEMBER
039020,000242: 30,3242           00007                           STORE    UNY/2                                 #  UNY/2
039021,000243: 30,3243           47276                           VCOMP    VXV                                   
039022,000244: 30,3244           00001                                    UNX/2                                 
039023,000245: 30,3245           77772                           VSL1                                           
039024,000246: 30,3246           00015                           STORE    UNZ/2                                 #  UNZ/2
039025,000247: 

Page 908

039027,000249:                                                                                                  #  COMPUTE THE REQUIRED GIMBAL ANGLES
039028,000250: 
039029,000251: 30,3247           77624                           CALL                                           
039030,000252: 30,3250           61524                                    NB2CDUSP                              #  YIELDS THE RQD GIMBAL ANGLES, 2'S, PI
039031,000253: 30,3251           77776                           EXIT                                           
039032,000254: 
039033,000255:                                                                                                  #  BIAS OUTER GIMBAL ANGLE
039034,000256: 
039035,000257: 30,3252           31677                           CA       OGABIAS                               
039036,000258: 30,3253           26154                           ADS      MPAC                                  
039037,000259: 
039038,000260:                                                                                                  #  LIMIT THE MIDDLE GIMBAL ANGLE & COMPUTE THE UNLIMITED GIMBAL ANGLE CHGS
039039,000261: 
039040,000262: 30,3254           30156                           CA       MPAC       +2                         #  LIMIT THE MGA
039041,000263: 30,3255           54001                           TS       L                                     #  CAN'T LXCH:  NEED UNLIMITED MGA FOR ALARM
039042,000264: 30,3256           33764                           CA       CDUZDLIM                              
039043,000265: 30,3257           03720                           TC       LIMITSUB                              #  YIELDS LIMITED MGA.  1 BIT ERROR POSSIBLE
039044,000266: 30,3260           56156                           XCH      MPAC       +2                         #        BECAUSE USING 2'S COMP.  WHO CARES?
039045,000267: 30,3261           00006                           EXTEND                                         
039046,000268: 30,3262           20156                           MSU      MPAC       +2                         #  THIS BETTER YIELD ZERO
039047,000269: 30,3263           00006                           EXTEND                                         
039048,000270: 30,3264           13266                           BZF      +2                                    
039049,000271: 30,3265           13747                           TCF      ALARMMGA                              
039050,000272: 
039051,000273: 30,3266           00004        MGARET             INHINT                                         #  RELINT AT TC INTPRET AFTER TCQCDUW
039052,000274: 
039053,000275: 30,3267           22007                           ZL                                             
039054,000276: 30,3270           34752                           CA       TWO                                   
039055,000277: 30,3271           54142        DELGMBLP           TS       TEM2                                  
039056,000278: 
039057,000279: 30,3272           30001                           CA       L                                     #  TO PREVENT FALSE STARTS ABOUT X, ZERO
039058,000280: 30,3273           00006                           EXTEND                                         #        FLAGOODW IF DELGMBZ OR Y TOO BIG.
039059,000281: 30,3274           70000                           SQUARE                                         
039060,000282: 30,3275           64350                           AD       HI5                                   #  WITHIN 1 BIT OF -(45 DEG SQUARED)
039061,000283: 30,3276           00006                           EXTEND                                         
039062,000284: 30,3277           63302                           BZMF     +3                                    
039063,000285: 30,3300           34755                           CA       ZERO                                  
039064,000286: 30,3301           55650                           TS       FLAGOODW                              
039065,000287: 
039066,000288: 30,3302           50142                           INDEX    TEM2                                  
039067,000289: 30,3303           30154                           CA       MPAC                                  
039068,000290: 30,3304           50142                           INDEX    TEM2                                  
039069,000291: 30,3305           54321                           TS       CPHI                                  #  OUTPUTS TO NOUN22
039070,000292: 30,3306           00006                           EXTEND                                         
039071,000293: 30,3307           50142                           INDEX    TEM2                                  
039072,000294: 30,3310           21634                           MSU      CDUXD                                 #  NO MATTER THAT THESE SLIGHTLY DIFFERENT
039073,000295: 30,3311           40000                           COM                                            #       FROM WHEN WE INITIALLY FETCHED THEM
039074,000296: 30,3312           50142                           INDEX    TEM2                                  
039075,000297: 30,3313           55674                           TS       -DELGMB                               #  -UNLIMITED GIMBAL ANGLE CHGS, 1'S, PI
039076,000298: 30,3314           54001                           TS       L                                     #  FOR PRECEDING TEST ON NEXT LOOP PASS

Page 909

039078,000300: 30,3315           10142                           CCS      TEM2                                  
039079,000301: 30,3316           13271                           TCF      DELGMBLP                              
039080,000302: 

Page 910

039082,000304:                                                                                                  #  BRANCHES TO NOATTCNT
039083,000305: 30,3317           11651                           CCS      FLPAUTNO                              
039084,000306: 30,3320           13743                           TCF      NOATTCNT   +2                         #  NOT PNGCS AUTO
039085,000307: 
039086,000308: 30,3321           30101                           CA       FLAGWRD5                              
039087,000309: 30,3322           74745                           MASK     ENGONBIT                              
039088,000310: 30,3323           00006                           EXTEND                                         
039089,000311: 30,3324           13743                           BZF      NOATTCNT   +2                         #  ENGINE NOT ON
039090,000312: 

Page 911

039092,000314:                                                                                                  #  LIMIT THE ATTITUDE ANGLE CHANGES
039093,000315: 
039094,000316:                                                                                                  #  THIS SECTION LIMITS THE ATTITUDE ANGLE CHANGES ABOUT A SET OF ORTHOGONAL VEHICLE AXES X,YPRIME,ZPRIME.
039095,000317:                                                                                                  #  THESE AXES COINCIDE WITH THE COMMANDED VEHICLE AXES IF AND ONLY IF CDUXD IS ZERO.  THE PRIME SYSTEM IS
039096,000318:                                                                                                  #  THE COMMANDED VEHICLE SYSTEM ROTATED ABOUT THE X AXIS TO BRING THE Z AXIS INTO ALINEMENT WITH THE MIDDLE GIMBAL
039097,000319:                                                                                                  #  AXIS.  ATTITUDE ANGLE CHANGES IN THE PRIME SYSTEM ARE RELATED TO SMALL GIMBAL ANGLE CHANGES BY:
039098,000320: 
039099,000321:                                                                                                  #        *   -DELATTX    *   * 1     SIN(CDUZD)     0 * * -DELGMBX *
039100,000322:                                                                                                  #        *               *   *                        * *          *
039101,000323:                                                                                                  #        * -DELATTYPRIME * = * 0     COS(CDUZD)     0 * * -DELGMBY *
039102,000324:                                                                                                  #        *               *   *                        * *          *
039103,000325:                                                                                                  #        * -DELATTZPRIME *   * 0         0          1 * * -DELGMBZ *
039104,000326: 
039105,000327: 30,3325           23676                           LXCH     -DELGMB    +2                         #  SAME AS -DELATTZPRIME UNLIMITED
039106,000328: 30,3326           51647                           INDEX    NDXCDUW                               
039107,000329: 30,3327           33760                           CA       DAZMAX                                
039108,000330: 30,3330           03720                           TC       LIMITSUB                              
039109,000331: 30,3331           55676                           TS       -DELGMB    +2                         #  -DELGMBZ
039110,000332: 
039111,000333: 30,3332           31675                           CA       -DELGMB    +1                         
039112,000334: 30,3333           00006                           EXTEND                                         
039113,000335: 30,3334           70745                           MP       COSCDUZ                               #  YIELDS -DELATTYPRIME/2 UNLIMITED
039114,000336: 30,3335           54001                           TS       L                                     
039115,000337: 30,3336           51647                           INDEX    NDXCDUW                               
039116,000338: 30,3337           33762                           CA       DAY/2MAX                              
039117,000339: 30,3340           03720                           TC       LIMITSUB                              
039118,000340: 30,3341           00006                           EXTEND                                         
039119,000341: 30,3342           10745                           DV       COSCDUZ                               
039120,000342: 30,3343           57675                           XCH      -DELGMB    +1                         #  -DELGMBY, FETCHING UNLIMITED VALUE
039121,000343: 
039122,000344: 30,3344           00006                           EXTEND                                         
039123,000345: 30,3345           70737                           MP       SINCDUZ                               
039124,000346: 30,3346           20001                           DDOUBL                                         
039125,000347: 30,3347           40000                           COM                                            
039126,000348: 30,3350           00006                           EXTEND                                         #  YIELDS +DELATTX UNLIMITD, MAG < 180 DEG,
039127,000349: 30,3351           21674                           MSU      -DELGMB                               #        BASED ON UNLIMITED DELGMBY.
039128,000350: 30,3352           54001                           TS       L                                     #        ONE BIT ERROR IF OPERANDS IN MSU
039129,000351: 30,3353           51647                           INDEX    NDXCDUW                               #        OF MIXED SIGNS.  WHO CARES?
039130,000352: 30,3354           33760                           CA       DAXMAX                                
039131,000353: 30,3355           03720                           TC       LIMITSUB                              
039132,000354: 30,3356           55674                           TS       -DELGMB                               #  SAVE LIMITED +DELATTX
039133,000355: 30,3357           11650                           CCS      FLAGOODW                              
039134,000356: 30,3360           41674                           CS       -DELGMB                               #  FETCH IT BACK CHGING SIGN IF WINDOW GOOD
039135,000357: 30,3361           55674                           TS       -DELGMB                               #  OTHERWISE USE ZERO FOR -DELATTX
039136,000358: 30,3362           41675                           CS       -DELGMB    +1                         
039137,000359: 30,3363           00006                           EXTEND                                         
039138,000360: 30,3364           70737                           MP       SINCDUZ                               
039139,000361: 30,3365           20001                           DDOUBL                                         #  YIELDS -CNTRIB TO -DELATTX FROM -DELGMBY
039140,000362: 30,3366           27674                           ADS      -DELGMB                               #  -DELGMBX.  NO OVERFLOW SINCE LIMITED TO
039141,000363:                                                                                                  #  20DEG(1+SIN(70DEG)/COS(70DEG)) < 180DEG
039142,000364: 

Page 912

039144,000366:                                                                                                  #  COMPUTE COMMANDED ATTITUDE RATES
039145,000367: 
039146,000368:                                                                                                  #        * OMEGAPD *   * -2         -4 SINCDUZ              +0    * * -DELGMBX *
039147,000369:                                                                                                  #        *         *   *                                          * *          *
039148,000370:                                                                                                  #        * OMEGAQD * = * +0     -8 COSCDUZ COSCDUX     -4 SINCDUX * * -DELGMBY *
039149,000371:                                                                                                  #        *         *   *                                          * *          *
039150,000372:                                                                                                  #        * OMEGARD *   * +0     +8 COSCDUZ SINCDUX     -4 COSCDUX * * -DELGMBZ *
039151,000373: 
039152,000374:                                                                                                  #  ATTITUDE ANGLE RATES IN UNITS OF PI/4 RAD/SEC = K TRIG FCNS IN UNITS OF 2 X GIMBAL ANGLE RATES IN UNITS OF
039153,000375:                                                                                                  #  PI/2 RAD/SEC.  THE CONSTANTS ARE BASED ON DELGMB BEING THE GIMBAL ANGLE CHANGES IN UNITS OF PI RADIANS,
039154,000376:                                                                                                  #  AND 2 SECONDS BEING THE COMPUTATION PERIOD (THE PERIOD BETWEEN SUCCESSIVE PASSES THRU FINDCDUW).
039155,000377: 
039156,000378: 30,3367           41674                           CS       -DELGMB                               
039157,000379: 30,3370           55642                           TS       OMEGAPD                               
039158,000380: 30,3371           41675                           CS       -DELGMB    +1                         
039159,000381: 30,3372           00006                           EXTEND                                         
039160,000382: 30,3373           70737                           MP       SINCDUZ                               
039161,000383: 30,3374           20001                           DDOUBL                                         
039162,000384: 30,3375           27642                           ADS      OMEGAPD                               
039163,000385: 30,3376           27642                           ADS      OMEGAPD                               
039164,000386: 
039165,000387: 30,3377           41675                           CS       -DELGMB    +1                         
039166,000388: 30,3400           00006                           EXTEND                                         
039167,000389: 30,3401           70747                           MP       COSCDUX                               
039168,000390: 30,3402           20001                           DDOUBL                                         
039169,000391: 30,3403           00006                           EXTEND                                         
039170,000392: 30,3404           70745                           MP       COSCDUZ                               
039171,000393: 30,3405           55643                           TS       OMEGAQD                               
039172,000394: 30,3406           41676                           CS       -DELGMB    +2                         
039173,000395: 30,3407           00006                           EXTEND                                         
039174,000396: 30,3410           70741                           MP       SINCDUX                               
039175,000397: 30,3411           27643                           ADS      OMEGAQD                               
039176,000398: 30,3412           27643                           ADS      OMEGAQD                               
039177,000399: 30,3413           27643                           ADS      OMEGAQD                               
039178,000400: 
039179,000401: 30,3414           31675                           CA       -DELGMB    +1                         
039180,000402: 30,3415           00006                           EXTEND                                         
039181,000403: 30,3416           70741                           MP       SINCDUX                               
039182,000404: 30,3417           20001                           DDOUBL                                         
039183,000405: 30,3420           00006                           EXTEND                                         
039184,000406: 30,3421           70745                           MP       COSCDUZ                               
039185,000407: 30,3422           55644                           TS       OMEGARD                               
039186,000408: 30,3423           41676                           CS       -DELGMB    +2                         
039187,000409: 30,3424           00006                           EXTEND                                         
039188,000410: 30,3425           70747                           MP       COSCDUX                               
039189,000411: 30,3426           27644                           ADS      OMEGARD                               
039190,000412: 30,3427           27644                           ADS      OMEGARD                               
039191,000413: 30,3430           27644                           ADS      OMEGARD                               
039192,000414: 

Page 913

039194,000416:                                                                                                  #  FINAL TRANSFER
039195,000417: 
039196,000418: 30,3431           34752                           CA       TWO                                   
039197,000419: 30,3432           54142        CDUWXFR            TS       TEM2                                  
039198,000420: 30,3433           50142                           INDEX    TEM2                                  
039199,000421: 30,3434           31674                           CA       -DELGMB                               
039200,000422: 30,3435           00006                           EXTEND                                         
039201,000423: 30,3436           73765                           MP       DT/DELT                               #  RATIO OF DAP INTERVAL TO CDUW INTERVAL
039202,000424: 30,3437           03734                           TC       ONESTO2S                              
039203,000425: 30,3440           50142                           INDEX    TEM2                                  
039204,000426: 30,3441           55637                           TS       DELCDUX                               #  ANGLE INTERFACE
039205,000427: 
039206,000428: 30,3442           50142                           INDEX    TEM2                                  
039207,000429: 30,3443           11642                           CCS      OMEGAPD                               
039208,000430: 30,3444           64753                           AD       ONE                                   
039209,000431: 30,3445           13447                           TCF      +2                                    
039210,000432: 30,3446           64753                           AD       ONE                                   
039211,000433: 30,3447           00006                           EXTEND                                         #  WE NOW HAVE ABS(OMEGAPD,QD,RD)
039212,000434: 30,3450           50142                           INDEX    TEM2                                  
039213,000435: 30,3451           71642                           MP       OMEGAPD                               
039214,000436: 30,3452           00006                           EXTEND                                         
039215,000437: 30,3453           74741                           MP       BIT11                                 #  1/16
039216,000438: 30,3454           00006                           EXTEND                                         
039217,000439: 30,3455           50142                           INDEX    TEM2                                  #                    2
039218,000440: 30,3456           11530                           DV       1JACC                                 #  UNITS PI/4 RAD/SEC
039219,000441: 30,3457           54001                           TS       L                                     
039220,000442: 30,3460           33762                           CA       DELERLIM                              
039221,000443: 30,3461           03720                           TC       LIMITSUB                              
039222,000444: 30,3462           50142                           INDEX    TEM2                                  
039223,000445: 30,3463           55274                           TS       DELPEROR                              #  LAG ANGLE = OMEGA ABS(OMEGA)/2 ACCEL
039224,000446: 30,3464           10142                           CCS      TEM2                                  
039225,000447: 30,3465           13432                           TCF      CDUWXFR                               
039226,000448: 
039227,000449:                                                                                                  #  HAUSKEEPING AND RETURN
039228,000450: 
039229,000451: 30,3466           31645        TCQCDUW            CA       ECDUWUSR                              
039230,000452: 30,3467           54003                           TS       EBANK                                 #  RETURN USER'S EBANK
039231,000453: 
039232,000454: 30,3470           06042                           TC       INTPRET                               
039233,000455: 30,3471           52001                           SETPD    GOTO                                  
039234,000456: 30,3472           00001                                    0                                     
039235,000457: 30,3473           03246                                    QCDUWUSR                              #  NORMAL AND ABNORMAL RETURN TO USER
039236,000458: 

Page 914

039238,000460:                                                                                                  #  THRUST VECTOR FILTER SUBROUTINE
039239,000461: 
039240,000462: 30,3474           00006        FLTRSUB            EXTEND                                         
039241,000463: 30,3475           22142                           QXCH     TEM2                                  
039242,000464: 30,3476           54143                           TS       TEM3                                  #  SAVE ORIGINAL OFFSET
039243,000465: 30,3477           40000                           COM                                            #  ONE MCT, NO WDS, CAN BE SAVED IF NEG OF
039244,000466: 30,3500           60001                           AD       L                                     #        ORIG OFFSET ARRIVES IN A, BUT IT'S
039245,000467: 30,3501           00006                           EXTEND                                         #        NOT WORTH THE INCREASED OBSCURITY.
039246,000468: 30,3502           51647                           INDEX    NDXCDUW                               
039247,000469: 30,3503           73753                           MP       GAINFLTR                              
039248,000470: 30,3504           54001                           TS       L                                     #  INCR TO OFFSET, UNLIMITED
039249,000471: 30,3505           33755                           CA       DUNFVLIM                              #  SAME LIMIT FOR Y AND Z
039250,000472: 30,3506           03720                           TC       LIMITSUB                              #  YIELDS INCR TO OFFSET, LIMITED
039251,000473: 30,3507           60143                           AD       TEM3                                  #  ORIGINAL OFFSET
039252,000474: 30,3510           54001                           TS       L                                     #  TOTAL OFFSET, UNLIMITED
039253,000475: 30,3511           33756                           CA       UNFVLIM                               #  SAME LIMIT FOR Y AND Z
039254,000476: 30,3512           03720                           TC       LIMITSUB                              #  YIELDS TOTAL OFFSET, LIMITED
039255,000477: 30,3513           00142                           TC       TEM2                                  
039256,000478: 
039257,000479:                                                                                                  #  SUBR TO TEST THE ANGLE BETWEEN THE PROPOSED WINDOW AND THRUST CMD VCTS
039258,000480: 
039259,000481: 30,3514           63441        UNWCTEST           DOT      DSQ                                   
039260,000482: 30,3515           00001                                    UNX/2                                 
039261,000483: 30,3516           50025                           DSU      BMN                                   
039262,000484: 30,3517           21760                                    DOTSWFMX                              
039263,000485: 30,3520           61221                                    DCMCL                                 
039264,000486: 30,3521           43531                           SSP      RVQ                                   #  RVQ FOR ALT CHOICE IF DOT MAGN TOO LARGE
039265,000487: 30,3522           03251                                    FLAGOODW                              #        ZEROING WINDOW GOOD FLAG
039266,000488: 30,3523           00000                                    0                                     
039267,000489: 

Page 915

039269,000491:                                                                                                  #  NB2CDUSP RETURNS THE 2'S COMPLEMENT, PI, SP CDU ANGLES X,Y,Z IN MPAC,+1,+2 GIVEN THE MATRIX WHOSE ROW VECTORS
039270,000492:                                                                                                  #  ARE THE SEMI-UNIT NAV BASE VECTORS X,Y,Z EXPRESSED IN STABLE MEMBER COORDINATES, LOCATED AT 0 IN THE PUSH LIST.
039271,000493: 
039272,000494:                                                                                                  #  NB2CDUSP USES ARCTRGSP WHICH HAS A MAXIMUM ERROR OF +-4 BITS.
039273,000495: 
039274,000496: 30,3524           63545        NB2CDUSP           DLOAD    DSQ                                   
039275,000497: 30,3525           00003                                    2                                     
039276,000498: 30,3526           51021                           BDSU     BPL                                   
039277,000499: 30,3527           06514                                    DP1/4TH                               
039278,000500: 30,3530           61533                                    +3                                    
039279,000501: 30,3531           77745                           DLOAD                                          
039280,000502: 30,3532           06524                                    ZEROVECS                              #  IN CASE SIN WAS SLIGHTLY > 1/2
039281,000503: 30,3533           77566                           SQRT     EXIT                                  #  YIELDS COS(CDUZ) IN UNITS OF 2
039282,000504: 
039283,000505: 30,3534           00006                           EXTEND                                         
039284,000506: 30,3535           30155                           DCA      MPAC                                  
039285,000507: 30,3536           20001                           DDOUBL                                         
039286,000508: 30,3537           54145                           TS       TEM5                                  
039287,000509: 30,3540           13543                           TCF      +3                                    
039288,000510: 30,3541           34733                           CA       POSMAX                                #  OVERFLOW.  FETCH POSMAX, MPAC ALWAYS POS
039289,000511: 30,3542           54145                           TS       TEM5                                  #  COS(CDUZ) IN TEM5, UNITS 1
039290,000512: 
039291,000513: 30,3543           50120                           INDEX    FIXLOC                                
039292,000514: 30,3544           30002                           CA       2                                     
039293,000515: 30,3545           22154                           LXCH     MPAC                                  
039294,000516: 30,3546           03613                           TC       ARCTRGSP                              
039295,000517: 30,3547           54156                           TS       MPAC       +2                         #  CDUZ
039296,000518: 
039297,000519: 30,3550           34755                           CA       ZERO                                  
039298,000520: 30,3551           03571                           TC       DVBYCOSM                              
039299,000521: 30,3552           34751                           CA       FOUR                                  
039300,000522: 30,3553           03571                           TC       DVBYCOSM                              
039301,000523: 30,3554           40141                           CS       TEM1                                  
039302,000524: 30,3555           03613                           TC       ARCTRGSP                              
039303,000525: 30,3556           54155                           TS       MPAC       +1                         #  CDUY
039304,000526: 
039305,000527: 30,3557           34750                           CA       BIT4                                  
039306,000528: 30,3560           03571                           TC       DVBYCOSM                              
039307,000529: 30,3561           33570                           CA       16OCT                                 
039308,000530: 30,3562           03571                           TC       DVBYCOSM                              
039309,000531: 30,3563           40141                           CS       TEM1                                  
039310,000532: 30,3564           03613                           TC       ARCTRGSP                              
039311,000533: 30,3565           54154                           TS       MPAC                                  #  CDUX
039312,000534: 
039313,000535: 30,3566           06042                           TC       INTPRET                               
039314,000536: 30,3567           77616                           RVQ                                            
039315,000537: 
039316,000538: 30,3570           00016        16OCT              OCT      16                                    
039317,000539: 

Page 916

039319,000541:                                                                                                  #  THE ELEMENTS OF THE NAV BASE MATRIX WHICH WE MUST DIVIDE BY COS(MGA)
039320,000542:                                                                                                  #  ALREADY CONTAIN COS(MGA)/2 AS A FACTOR. THEREFORE THE QUOTIENT SHOULD
039321,000543:                                                                                                  #  ORDINARILY NEVER EXCEED 1/2 IN MAGNITUDE.  BUT IF THE MGA IS NEAR PI/2
039322,000544:                                                                                                  #  THEN COS(MGA) IS NEAR ZERO, AND THERE MAY BE SOME CHAFF IN THE OTHER
039323,000545:                                                                                                  #  ELEMENTS OF THE MATRIX WHICH WOULD PRODUCE CHAOS UNDER DIVISION.
039324,000546:                                                                                                  #  BEFORE DIVIDING WE MAKE SURE COS(MGA) IS AT LEAST ONE BIT LARGER
039325,000547:                                                                                                  #  THAN THE MAGNITUDE OF THE HIGH ORDER PART OF THE OPERAND.
039326,000548: 
039327,000549:                                                                                                  #  IF ONE OR MORE DIVIDES CANNOT BE PERFORMED, THIS MEANS THAT THE
039328,000550:                                                                                                  #  REQUIRED MGA IS VERY NEARLY +-PI/2 AND THEREFORE THE OTHER GIMBAL
039329,000551:                                                                                                  #  ANGLES ARE INDETERMINATE.  THE INNER AND OUTER GIMBAL ANGLES RETURNED
039330,000552:                                                                                                  #  IN THIS CASE WILL BE RANDOM MULTIPLES OF PI/2.
039331,000553: 
039332,000554: 30,3571           60120        DVBYCOSM           AD       FIXLOC                                
039333,000555: 30,3572           54116                           TS       ADDRWD                                #  ADRES OF OPERAND
039334,000556: 
039335,000557: 30,3573           50116                           INDEX    ADDRWD                                #  FETCH NEG ABS OF OPERAND, AD TEM5, AND
039336,000558: 30,3574           30000                           CA       0                                     #        SKIP DIVIDE IF RESULT NEG OR ZERO
039337,000559: 30,3575           00006                           EXTEND                                         
039338,000560: 30,3576           63600                           BZMF     +2                                    
039339,000561: 30,3577           40000                           COM                                            
039340,000562: 30,3600           60145                           AD       TEM5                                  #  C(A) ZERO OR NEG, C(TEM5) ZERO OR POS
039341,000563: 30,3601           00006                           EXTEND                                         
039342,000564: 30,3602           63610                           BZMF     TSL&TCQ                               #  DIFFERENCE ALWAYS SMALL IF BRANCH
039343,000565: 
039344,000566: 30,3603           00006                           EXTEND                                         #  TEM5 EXCEEDS ABS HIGH ORDER PART OF
039345,000567: 30,3604           50116                           INDEX    ADDRWD                                #        OPERAND BY AT LEAST ONE BIT.
039346,000568: 30,3605           30001                           DCA      0                                     #        THEREFORE IT EXCEEDS THE DP OPERAND
039347,000569: 30,3606           00006                           EXTEND                                         #        AND DIVISION WILL ALWAYS SUCCEED.
039348,000570: 30,3607           10145                           DV       TEM5                                  
039349,000571: 30,3610           54001        TSL&TCQ            TS       L                                     
039350,000572: 30,3611           22141                           LXCH     TEM1                                  
039351,000573: 30,3612           00002                           TC       Q                                     
039352,000574: 

Page 917

039354,000576:                                                                                                  #  ARCTRGSP RETURNS THE 2'S COMPLEMENT, PI, SP ANGLE IN THE A REGISTER GIVEN ITS SINE IN A AND ITS COSINE IN L IN
039355,000577:                                                                                                  #  UNITS OF 2.  THE RESULT IS AN UNAMBIGUOUS ANGLE ANYWHERE IN THE CIRCLE, WITH A MAXIMUM ERROR OF +-4 BITS.
039356,000578:                                                                                                  #  THE ERROR IS PRODUCED BY THE SUBROUTINE SPARCSIN WHICH IS USED ONLY IN THE REGION +-45 DEGREES.
039357,000579: 
039358,000580: 30,3613           00006        ARCTRGSP           EXTEND                                         
039359,000581: 30,3614           13656                           BZF      SINZERO                               #  TO AVOID DIVIDING BY ZERO
039360,000582: 
039361,000583: 30,3615           00006                           EXTEND                                         
039362,000584: 30,3616           22144                           QXCH     TEM4                                  
039363,000585: 30,3617           54142                           TS       TEM2                                  
039364,000586: 30,3620           30001                           CA       L                                     
039365,000587: 30,3621           54143                           TS       TEM3                                  
039366,000588: 30,3622           34755                           CA       ZERO                                  
039367,000589: 30,3623           00006                           EXTEND                                         
039368,000590: 30,3624           10142                           DV       TEM2                                  
039369,000591: 30,3625           00006                           EXTEND                                         
039370,000592: 30,3626           13645                           BZF      USECOS                                
039371,000593: 
039372,000594: 30,3627           10143                           CCS      TEM3                                  #  SIN IS SMALLER OR EQUAL
039373,000595: 30,3630           34755                           CA       ZERO                                  
039374,000596: 30,3631           13635                           TCF      +4                                    
039375,000597: 30,3632           40142                           CS       TEM2                                  #  IF COS NEG, REVERSE SIGN OF SIN,
039376,000598: 30,3633           54142                           TS       TEM2                                  #        ANGLE = PI-ARCSIN(SIN)
039377,000599: 30,3634           34735                           CA       NEGMAX                                #  PICK UP PI, 2'S COMPLEMENT
039378,000600: 30,3635           54143                           TS       TEM3                                  #  WE NO LONGER NEED COS
039379,000601: 30,3636           30142                           CA       TEM2                                  
039380,000602: 30,3637           03663                           TC       SPARCSIN   -1                         
039381,000603: 30,3640           03734                           TC       ONESTO2S                              
039382,000604: 30,3641           00006                           EXTEND                                         
039383,000605: 30,3642           20143                           MSU      TEM3                                  
039384,000606: 30,3643           03734        1TO2&TCQ           TC       ONESTO2S                              
039385,000607: 30,3644           00144                           TC       TEM4                                  
039386,000608: 
039387,000609: 30,3645           40143        USECOS             CS       TEM3                                  #  COS IS SMALLER
039388,000610: 30,3646           03663                           TC       SPARCSIN   -1                         #  ANGLE = SIGN(SIN)(PI/2-ARCSIN(COS))
039389,000611: 30,3647           64736                           AD       HALF                                  
039390,000612: 30,3650           54143                           TS       TEM3                                  #  WE NO LONGER NEED COS
039391,000613: 30,3651           10142                           CCS      TEM2                                  
039392,000614: 30,3652           30143                           CA       TEM3                                  
039393,000615: 30,3653           13643                           TCF      1TO2&TCQ                              
039394,000616: 30,3654           40143                           CS       TEM3                                  
039395,000617: 30,3655           13643                           TCF      1TO2&TCQ                              
039396,000618: 
039397,000619: 30,3656           10001        SINZERO            CCS      L                                     
039398,000620: 30,3657           34755                           CA       ZERO                                  
039399,000621: 30,3660           00002                           TC       Q                                     
039400,000622: 30,3661           34735                           CA       NEGMAX                                #  PI, 2'S COMP
039401,000623: 30,3662           00002                           TC       Q                                     
039402,000624: 

Page 918

039404,000626:                                                                                                  #  SPARCSIN TAKES AN ARGUMENT SCALED UNITY IN A AND RETURNS AN ANGLE SCALED
039405,000627:                                                                                                  #  180 DEGREES IN A.  IT HAS BEEN UNIT TESTED IN THE REGION +-.94 (+-70
039406,000628:                                                                                                  #  DEGREES) AND THE MAXIMUM ERROR IS +-5 BITS WITH AN AVERAGE TIME OF
039407,000629:                                                                                                  #  450 MICROSECONDS.  SPARCSIN -1 TAKES THE ARGUMENT SCALED TWO.  (BOB CRISP)
039408,000630: 
039409,000631: 30,3663           60000                           DOUBLE                                         
039410,000632: 30,3664           54021        SPARCSIN           TS       SR                                    
039411,000633: 30,3665           13671                           TCF      +4                                    
039412,000634: 30,3666           50000                           INDEX    A                                     
039413,000635: 30,3667           44734                           CS       LIMITS                                
039414,000636: 30,3670           54021                           TS       SR                                    
039415,000637: 30,3671           00006                           EXTEND                                         
039416,000638: 30,3672           70000                           MP       A                                     
039417,000639: 30,3673           54141                           TS       TEM1                                  
039418,000640: 30,3674           00006                           EXTEND                                         
039419,000641: 30,3675           73717                           MP       DPL9                                  
039420,000642: 30,3676           63716                           AD       DPL7                                  
039421,000643: 30,3677           00006                           EXTEND                                         
039422,000644: 30,3700           70141                           MP       TEM1                                  
039423,000645: 30,3701           63715                           AD       DPL5                                  
039424,000646: 30,3702           00006                           EXTEND                                         
039425,000647: 30,3703           70141                           MP       TEM1                                  
039426,000648: 30,3704           63714                           AD       DPL3                                  
039427,000649: 30,3705           00006                           EXTEND                                         
039428,000650: 30,3706           70141                           MP       TEM1                                  
039429,000651: 30,3707           63713                           AD       DPL1                                  
039430,000652: 30,3710           00006                           EXTEND                                         
039431,000653: 30,3711           70021                           MP       SR                                    
039432,000654: 30,3712           00002                           TC       Q                                     
039433,000655: 30,3713           24406        DPL1               DEC      10502      B-14                       
039434,000656: 30,3714           00660        DPL3               DEC      432        B-14                       
039435,000657: 30,3715           16204        DPL5               DEC      7300       B-14                       
039436,000658: 30,3716           50744        DPL7               DEC      -11803     B-14                       
039437,000659: 30,3717           20315        DPL9               DEC      8397       B-14                       
039438,000660: 

Page 919

039440,000662:                                                                                                  #  LIMITSUB LIMITS THE MAGNITUDE OF THE POSITIVE OR NEGATIVE VARIABLE
039441,000663:                                                                                                  #  ARRIVING IN L TO THE POSITIVE LIMIT ARRIVING IN A.
039442,000664:                                                                                                  #  THE SIGNED LIMITED VARIABLE IS RETURNED IN A.
039443,000665: 
039444,000666:                                                                                                  #  VERSION COURTESY HUGH BLAIR-SMITH
039445,000667: 
039446,000668: 30,3720           54141        LIMITSUB           TS       TEM1                                  
039447,000669: 30,3721           34755                           CA       ZERO                                  
039448,000670: 30,3722           00006                           EXTEND                                         
039449,000671: 30,3723           10141                           DV       TEM1                                  
039450,000672: 30,3724           10000                           CCS      A                                     
039451,000673: 30,3725           22141                           LXCH     TEM1                                  
039452,000674: 30,3726           13730                           TCF      +2                                    
039453,000675: 30,3727           13732                           TCF      +3                                    
039454,000676: 30,3730           30001                           CA       L                                     
039455,000677: 30,3731           00002                           TC       Q                                     
039456,000678: 30,3732           40141                           CS       TEM1                                  
039457,000679: 30,3733           00002                           TC       Q                                     
039458,000680: 
039459,000681:                                                                                                  #  SUBROUTINE TO CONVERT 1'S COMP SP TO 2'S COMP
039460,000682: 
039461,000683: 30,3734           10000        ONESTO2S           CCS      A                                     
039462,000684: 30,3735           64753                           AD       ONE                                   
039463,000685: 30,3736           00002                           TC       Q                                     
039464,000686: 30,3737           40000                           CS       A                                     
039465,000687: 30,3740           00002                           TC       Q                                     
039466,000688: 
039467,000689:                                                                                                  #  NO ATTITUDE CONTROL
039468,000690: 
039469,000691: 30,3741           05567        NOATTCNT           TC       ALARM                                 
039470,000692: 30,3742           00402                           OCT      00402                                 #  NO ATTITUDE CONTROL
039471,000693: 
039472,000694: 30,3743           00004                 +2        INHINT                                         #  COME HERE FOR NOATTCNT WITHOUT ALARM
039473,000695: 30,3744           04674                           TC       IBNKCALL                              #  RELINT AT TC INTPRET AFTER TCQCDUW
039474,000696: 30,3745           40166                           FCADR    STOPRATE                              
039475,000697: 30,3746           13466                           TCF      TCQCDUW                               #  RETURN TO USER SKIPPING AUTOPILOT CMDS
039476,000698: 
039477,000699:                                                                                                  #  MIDDLE GIMBAL ANGLE ALARM
039478,000700: 
039479,000701: 30,3747           05567        ALARMMGA           TC       ALARM                                 
039480,000702: 30,3750           00401                           OCT      00401                                 
039481,000703: 30,3751           13266                           TCF      MGARET                                
039482,000704: 

Page 920

039484,000706:                                                                                                  # ************************************************************************
039485,000707:                                                                                                  #  CONSTANTS
039486,000708:                                                                                                  # ************************************************************************
039487,000709: 
039488,000710:                                                                                                  #  ADDRESS CONSTANTS
039489,000711: 
039490,000712: 30,3752           03245        ECDUWL             ECADR    ECDUW                                 
039491,000713: 
039492,000714:                                                                                                  #  THRUST DIRECTION FILTER CONSTANTS
039493,000715: 
039494,000716: 30,3753           06315        GAINFLTR           DEC      .2                                    #  GAIN FILTER SANS CSM
039495,000717: 30,3754           03146                           DEC      .1                                    #  GAIN FILTER WITH CSM
039496,000718: 
039497,000719: 30,3755           00071        DUNFVLIM           DEC      .007       B-1                        #  7 MR MAX CHG IN F DIR IN VEH IN 2 SECS.
039498,000720:                                                                                                  #  THIS DOES NOT ALLOW FOR S/C ROT RATE.
039499,000721: 
039500,000722: 30,3756           02041        UNFVLIM            DEC      .129       B-1                        #  129 MR MAX THRUST OFFSET.  105 MR TRAVEL
039501,000723:                                                                                                  #  +10MR DEFL+5MR MECH MOUNT+9MR ABLATION.
039502,000724: 
039503,000725:                                                                                                  #  CONSTANTS RELATED TO GIMBAL ANGLE COMPUTATIONS
039504,000726: 
039505,000727: 30,3757           01673        DOTSWFMX           DEC      .93302     B-4                        #  LIM COLNRTY OF UNWC/2 & UNFC/2 TO 85 DEG
039506,000728:                                                                                                  #  LOWER PART COMES FROM NEXT CONSTANT
039507,000729: 
039508,000730: 30,3760           03434        DAXMAX             DEC      .11111111111                            #  DELATTX LIM TO 20 DEG IN 2 SECS, 1'S, PI
039509,000731: 30,3761           00266                           DEC      .0111111111                            #  2 DEG WHEN CSM DOCKED
039510,000732: 
039511,000733: 30,3762           01616        DAY/2MAX           DEC      .05555555555                            #  LIKEWISE FOR DELATTY
039512,000734: 30,3763           00133                           DEC      .0055555555                            
039513,000735: 
039514,000736: 30,3764  30,3760               DAZMAX             =        DAXMAX                                #  LIKEWISE FOR DELATTZ
039515,000737: 
039516,000738: 30,3764           14344        CDUZDLIM           DEC      .3888888888                            #  70 DEG LIMIT FOR MGA, 1'S, PI
039517,000739: 
039518,000740:                                                                                                  #  CONSTANTS FOR DATA TRANSFER
039519,000741: 
039520,000742: 30,3765           01463        DT/DELT            DEC      .05                                   #  .1 SEC/2 SEC WHICH IS THE AUTOPILOT
039521,000743:                                                                                                  #  CONTROL SAMPLE PERIOD/COMPUTATION PERIOD
039522,000744: 
039523,000745: 30,3766  30,3762               DELERLIM           =        DAY/2MAX                              #  10 DEG LIMIT FOR LAG ANGLES, 1'S, PI
039524,000746: 

End of include-file FINDCDUW_-_GUIDAP_INTERFACE.agc.  Parent file is MAIN.agc