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.

038801,000002:                                                                                                  ## Copyright:   Public domain.
038802,000003:                                                                                                  ## Filename:    FINDCDUW--GUIDAP_INTERFACE.agc
038803,000004:                                                                                                  ## Purpose:     A section of Luminary 1C, revision 131.
038804,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
038805,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13.
038806,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
038807,000008:                                                                                                  ##              that the code format has been changed to conform to the
038808,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
038809,000010:                                                                                                  ##              original YUL assembler.
038810,000011:                                                                                                  ## Reference:   pp. 902-920
038811,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
038812,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
038813,000014:                                                                                                  ## Mod history: 05/28/03 RSB.   Began transcribing.
038814,000015:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
038815,000016:                                                                                                  ##              2017-02-26 RSB  Proofed comment text using octopus/ProoferComments.
038816,000017:                                                                                                  ##              2017-03-01 RSB  Fixed lingering typos.
038817,000018:                                                                                                  ##              2017-03-10 RSB  Comment-text fixes noted in proofing Luminary 116.
038818,000019:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 5-way
038819,000020:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
038820,000021: 

Page 902

038822,000023:                                                                                                  #  PROGRAM NAME:  FINDCDUW
038823,000024:                                                                                                  #  MOD NUMBER:  1        68 07 15
038824,000025:                                                                                                  #  MOD AUTHOR:  KLUMPP
038825,000026: 
038826,000027:                                                                                                  #  OBJECTS OF MOD:       1.      TO SUPPLY COMMANDED GIMBAL ANGLES FOR NOUN 22.
038827,000028:                                                                                                  #                        2.      TO MAINTAIN CORRECT AND CURRENT THRUST
038828,000029:                                                                                                  #                                DIRECTION DATA IN ALL MODES.  THIS IS DONE BY
038829,000030:                                                                                                  #                                FETCHING FOR THE THRUST DIRECTION FILTER THE
038830,000031:                                                                                                  #                                CDUD'S IN PNGCS-AUTO, THE CDU'S IN ALL OTHER
038831,000032:                                                                                                  #                                MODES.
038832,000033:                                                                                                  #                        3.      TO SUBSTITUTE A STOPRATE FOR THE NORMAL
038833,000034:                                                                                                  #                                AUTOPILOT COMMANDS WHENEVER
038834,000035:                                                                                                  #                                1) NOT IN PNGCS-AUTO, OR
038835,000036:                                                                                                  #                                2) ENGINE IS OFF.
038836,000037: 
038837,000038:                                                                                                  #  FUNCTIONAL DESCRIPTION:
038838,000039: 
038839,000040:                                                                                                  #  FINDCDUW PROVIDES THE INTERFACES BETWEEN THE VARIOUS POWERED FLITE GUIDANCE PROGRAMS
038840,000041:                                                                                                  #  AND THE DIGITAL AUTOPILOT.  THE INPUTS TO FINDCDUW ARE THE THRUST COMMAND VECTOR
038841,000042:                                                                                                  #  AND THE WINDOW COMMAND VECTOR, AND THE OUTPUTS ARE THE GIMBAL ANGLE
038842,000043:                                                                                                  #  INCREMENTS, THE COMMANDED ATTITUDE ANGLE RATES, AND THE COMMANDED
038843,000044:                                                                                                  #  ATTITUDE LAG ANGLES (WHICH ACCOUNT FOR THE ANGLES BY WHICH THE BODY WILL
038844,000045:                                                                                                  #  LAG BEHIND A RAMP COMMAND IN ATTITUDE ANGLE DUE TO THE FINITE ANGULAR
038845,000046:                                                                                                  #  ACCELERATIONS AVAILABLE).
038846,000047: 
038847,000048:                                                                                                  #  FINDCDUW ALINES THE ESTIMATED THRUST VECTOR FROM THE THRUST DIRECTION
038848,000049:                                                                                                  #  FILTER WITH THE THRUST COMMAND VECTOR, AND, WHEN XOVINHIB SET,
038849,000050:                                                                                                  #  ALINES THE +Z HALF OF THE LM ZX PLANE WITH THE WINDOW COMMAND VECTOR.
038850,000051: 

Page 903

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

Page 904

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

Page 905

038938,000139:                                                                                                  #  FETCH BASIC DATA
038939,000140: 30,3123           00004                           INHINT                                         #  RELINT AT PAUTNO (TC INTPRET)
038940,000141: 
038941,000142: 30,3124           30032                           CA       CDUX                                  #  FETCH CDUX,CDUY,CDUZ IN ALL CASES, BUT
038942,000143: 30,3125           54771                           TS       CDUSPOTX                              #        REPLACE BELOW IF PNGCS AUTO
038943,000144: 30,3126           30033                           CA       CDUY                                  
038944,000145: 30,3127           54765                           TS       CDUSPOTY                              
038945,000146: 30,3130           30034                           CA       CDUZ                                  
038946,000147: 30,3131           54767                           TS       CDUSPOTZ                              
038947,000148: 
038948,000149: 30,3132           34742                           CA       BIT10                                 #  PNGCS CONTROL BIT
038949,000150: 30,3133           00006                           EXTEND                                         
038950,000151: 30,3134           02030                           RAND     CHAN30                                
038951,000152: 30,3135           10000                           CCS      A                                     
038952,000153: 30,3136           13153                           TCF      PAUTNO                                #  NOT PNGCS (BITS INVERTED)
038953,000154: 
038954,000155: 30,3137           34736                           CA       BIT14                                 #  AUTO MODE BIT
038955,000156: 30,3140           00006                           EXTEND                                         
038956,000157: 30,3141           02031                           RAND     CHAN31                                
038957,000158: 30,3142           10000                           CCS      A                                     
038958,000159: 30,3143           13153                           TCF      PAUTNO                                #  NOT AUTO (BITS INVERTED)
038959,000160: 
038960,000161: 30,3144           55651                           TS       FLPAUTNO                              #  RESET FLAG PNGCS AUTO NOT
038961,000162: 
038962,000163: 30,3145           31634                           CA       CDUXD                                 #  PNGCS AUTO:  FETCH CDUXD,CDUYD,CDUZD
038963,000164: 30,3146           54771                           TS       CDUSPOTX                              
038964,000165: 30,3147           31635                           CA       CDUYD                                 
038965,000166: 30,3150           54765                           TS       CDUSPOTY                              
038966,000167: 30,3151           31636                           CA       CDUZD                                 
038967,000168: 30,3152           54767                           TS       CDUSPOTZ                              
038968,000169: 

Page 906

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

Page 907

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

Page 908

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

Page 909

039099,000300: 30,3315           10142                           CCS      TEM2                                  
039100,000301: 30,3316           13271                           TCF      DELGMBLP                              
039101,000302: 

Page 910

039103,000304:                                                                                                  #  BRANCHES TO NOATTCNT
039104,000305: 30,3317           11651                           CCS      FLPAUTNO                              
039105,000306: 30,3320           13743                           TCF      NOATTCNT   +2                         #  NOT PNGCS AUTO
039106,000307: 
039107,000308: 30,3321           30101                           CA       FLAGWRD5                              
039108,000309: 30,3322           74745                           MASK     ENGONBIT                              
039109,000310: 30,3323           00006                           EXTEND                                         
039110,000311: 30,3324           13743                           BZF      NOATTCNT   +2                         #  ENGINE NOT ON
039111,000312: 

Page 911

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

Page 912

039165,000366:                                                                                                  #  COMPUTE COMMANDED ATTITUDE RATES
039166,000367: 
039167,000368:                                                                                                  #        * OMEGAPD *   * -2         -4 SINCDUZ              +0    * * -DELGMBX *
039168,000369:                                                                                                  #        *         *   *                                          * *          *
039169,000370:                                                                                                  #        * OMEGAQD * = * +0     -8 COSCDUZ COSCDUX     -4 SINCDUX * * -DELGMBY *
039170,000371:                                                                                                  #        *         *   *                                          * *          *
039171,000372:                                                                                                  #        * OMEGARD *   * +0     +8 COSCDUZ SINCDUX     -4 COSCDUX * * -DELGMBZ *
039172,000373: 
039173,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
039174,000375:                                                                                                  #  PI/2 RAD/SEC.  THE CONSTANTS ARE BASED ON DELGMB BEING THE GIMBAL ANGLE CHANGES IN UNITS OF PI RADIANS,
039175,000376:                                                                                                  #  AND 2 SECONDS BEING THE COMPUTATION PERIOD (THE PERIOD BETWEEN SUCCESSIVE PASSES THRU FINDCDUW).
039176,000377: 
039177,000378: 30,3367           41674                           CS       -DELGMB                               
039178,000379: 30,3370           55642                           TS       OMEGAPD                               
039179,000380: 30,3371           41675                           CS       -DELGMB    +1                         
039180,000381: 30,3372           00006                           EXTEND                                         
039181,000382: 30,3373           70737                           MP       SINCDUZ                               
039182,000383: 30,3374           20001                           DDOUBL                                         
039183,000384: 30,3375           27642                           ADS      OMEGAPD                               
039184,000385: 30,3376           27642                           ADS      OMEGAPD                               
039185,000386: 
039186,000387: 30,3377           41675                           CS       -DELGMB    +1                         
039187,000388: 30,3400           00006                           EXTEND                                         
039188,000389: 30,3401           70747                           MP       COSCDUX                               
039189,000390: 30,3402           20001                           DDOUBL                                         
039190,000391: 30,3403           00006                           EXTEND                                         
039191,000392: 30,3404           70745                           MP       COSCDUZ                               
039192,000393: 30,3405           55643                           TS       OMEGAQD                               
039193,000394: 30,3406           41676                           CS       -DELGMB    +2                         
039194,000395: 30,3407           00006                           EXTEND                                         
039195,000396: 30,3410           70741                           MP       SINCDUX                               
039196,000397: 30,3411           27643                           ADS      OMEGAQD                               
039197,000398: 30,3412           27643                           ADS      OMEGAQD                               
039198,000399: 30,3413           27643                           ADS      OMEGAQD                               
039199,000400: 
039200,000401: 30,3414           31675                           CA       -DELGMB    +1                         
039201,000402: 30,3415           00006                           EXTEND                                         
039202,000403: 30,3416           70741                           MP       SINCDUX                               
039203,000404: 30,3417           20001                           DDOUBL                                         
039204,000405: 30,3420           00006                           EXTEND                                         
039205,000406: 30,3421           70745                           MP       COSCDUZ                               
039206,000407: 30,3422           55644                           TS       OMEGARD                               
039207,000408: 30,3423           41676                           CS       -DELGMB    +2                         
039208,000409: 30,3424           00006                           EXTEND                                         
039209,000410: 30,3425           70747                           MP       COSCDUX                               
039210,000411: 30,3426           27644                           ADS      OMEGARD                               
039211,000412: 30,3427           27644                           ADS      OMEGARD                               
039212,000413: 30,3430           27644                           ADS      OMEGARD                               
039213,000414: 

Page 913

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

Page 914

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

Page 915

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

Page 916

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

Page 917

039375,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
039376,000577:                                                                                                  #  UNITS OF 2.  THE RESULT IS AN UNAMBIGUOUS ANGLE ANYWHERE IN THE CIRCLE, WITH A MAXIMUM ERROR OF +-4 BITS.
039377,000578:                                                                                                  #  THE ERROR IS PRODUCED BY THE SUBROUTINE SPARCSIN WHICH IS USED ONLY IN THE REGION +-45 DEGREES.
039378,000579: 
039379,000580: 30,3613           00006        ARCTRGSP           EXTEND                                         
039380,000581: 30,3614           13656                           BZF      SINZERO                               #  TO AVOID DIVIDING BY ZERO
039381,000582: 
039382,000583: 30,3615           00006                           EXTEND                                         
039383,000584: 30,3616           22144                           QXCH     TEM4                                  
039384,000585: 30,3617           54142                           TS       TEM2                                  
039385,000586: 30,3620           30001                           CA       L                                     
039386,000587: 30,3621           54143                           TS       TEM3                                  
039387,000588: 30,3622           34755                           CA       ZERO                                  
039388,000589: 30,3623           00006                           EXTEND                                         
039389,000590: 30,3624           10142                           DV       TEM2                                  
039390,000591: 30,3625           00006                           EXTEND                                         
039391,000592: 30,3626           13645                           BZF      USECOS                                
039392,000593: 
039393,000594: 30,3627           10143                           CCS      TEM3                                  #  SIN IS SMALLER OR EQUAL
039394,000595: 30,3630           34755                           CA       ZERO                                  
039395,000596: 30,3631           13635                           TCF      +4                                    
039396,000597: 30,3632           40142                           CS       TEM2                                  #  IF COS NEG, REVERSE SIGN OF SIN,
039397,000598: 30,3633           54142                           TS       TEM2                                  #        ANGLE = PI-ARCSIN(SIN)
039398,000599: 30,3634           34735                           CA       NEGMAX                                #  PICK UP PI, 2'S COMPLEMENT
039399,000600: 30,3635           54143                           TS       TEM3                                  #  WE NO LONGER NEED COS
039400,000601: 30,3636           30142                           CA       TEM2                                  
039401,000602: 30,3637           03663                           TC       SPARCSIN   -1                         
039402,000603: 30,3640           03734                           TC       ONESTO2S                              
039403,000604: 30,3641           00006                           EXTEND                                         
039404,000605: 30,3642           20143                           MSU      TEM3                                  
039405,000606: 30,3643           03734        1TO2&TCQ           TC       ONESTO2S                              
039406,000607: 30,3644           00144                           TC       TEM4                                  
039407,000608: 
039408,000609: 30,3645           40143        USECOS             CS       TEM3                                  #  COS IS SMALLER
039409,000610: 30,3646           03663                           TC       SPARCSIN   -1                         #  ANGLE = SIGN(SIN)(PI/2-ARCSIN(COS))
039410,000611: 30,3647           64736                           AD       HALF                                  
039411,000612: 30,3650           54143                           TS       TEM3                                  #  WE NO LONGER NEED COS
039412,000613: 30,3651           10142                           CCS      TEM2                                  
039413,000614: 30,3652           30143                           CA       TEM3                                  
039414,000615: 30,3653           13643                           TCF      1TO2&TCQ                              
039415,000616: 30,3654           40143                           CS       TEM3                                  
039416,000617: 30,3655           13643                           TCF      1TO2&TCQ                              
039417,000618: 
039418,000619: 30,3656           10001        SINZERO            CCS      L                                     
039419,000620: 30,3657           34755                           CA       ZERO                                  
039420,000621: 30,3660           00002                           TC       Q                                     
039421,000622: 30,3661           34735                           CA       NEGMAX                                #  PI, 2'S COMP
039422,000623: 30,3662           00002                           TC       Q                                     
039423,000624: 

Page 918

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

Page 919

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

Page 920

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

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