Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061
	16:27 JULY 14,1969
Note that the date is the date of the printout, not the date of the program revision.

039776,000002:                                                                                                  ## Copyright:   Public domain.
039777,000003:                                                                                                  ## Filename:    FINDCDUW--GUIDAP_INTERFACE.agc
039778,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
039779,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
039780,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
039781,000007:                                                                                                  ## Assembler:   yaYUL
039782,000008:                                                                                                  ## Contact:     Hartmuth Gutsche <hgutsche@xplornet.com>.
039783,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
039784,000010:                                                                                                  ## Pages:       908-925
039785,000011:                                                                                                  ## Mod history: 2009-05-28 HG   Transcribed from page images.
039786,000012:                                                                                                  ##              2016-12-17 RSB  Proofed text comments with octopus/ProoferComments
039787,000013:                                                                                                  ##                              and corrected the errors found.
039788,000014:                                                                                                  ##              2017-03-10 RSB  Comment-text fixes noted in proofing Luminary 116.
039789,000015:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 5-way
039790,000016:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
039791,000017: 
039792,000018:                                                                                                  ## This source code has been transcribed or otherwise adapted from
039793,000019:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
039794,000020:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
039795,000021:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
039796,000022:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
039797,000023:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
039798,000024:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
039799,000025:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
039800,000026:                                                                                                  ## actually created.
039801,000027:                                                                                                  ##
039802,000028:                                                                                                  ## Notations on the hardcopy document read, in part:
039803,000029:                                                                                                  ##
039804,000030:                                                                                                  ##      Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
039805,000031:                                                                                                  ##      16:27 JULY 14, 1969 
039806,000032: 

Page 908

039808,000034:                                                                                                  #  PROGRAM NAME:  FINDCDUW
039809,000035:                                                                                                  #  MOD NUMBER:  1        68 07 15
039810,000036:                                                                                                  #  MOD AUTHOR:  KLUMPP
039811,000037: 
039812,000038:                                                                                                  #  OBJECTS OF MOD:       1.      TO SUPPLY COMMANDED GIMBAL ANGLES FOR NOUN 22.
039813,000039:                                                                                                  #                        2.      TO MAINTAIN CORRECT AND CURRENT THRUST
039814,000040:                                                                                                  #                                DIRECTION DATA IN ALL MODES.  THIS IS DONE BY
039815,000041:                                                                                                  #                                FETCHING FOR THE THRUST DIRECTION FILTER THE
039816,000042:                                                                                                  #                                CDUD'S IN PNGCS-AUTO, THE CDU'S IN ALL OTHER
039817,000043:                                                                                                  #                                MODES.
039818,000044:                                                                                                  #                        3.      TO SUBSTITUTE A STOPRATE FOR THE NORMAL
039819,000045:                                                                                                  #                                AUTOPILOT COMMANDS WHENEVER
039820,000046:                                                                                                  #                                1) NOT IN PNGCS-AUTO, OR
039821,000047:                                                                                                  #                                2) ENGINE IS OFF.
039822,000048: 
039823,000049:                                                                                                  #  FUNCTIONAL DESCRIPTION:
039824,000050: 
039825,000051:                                                                                                  #  FINDCDUW PROVIDES THE INTERFACES BETWEEN THE VARIOUS POWERED FLITE GUIDANCE PROGRAMS
039826,000052:                                                                                                  #  AND THE DIGITAL AUTOPILOT.  THE INPUTS TO FINDCDUW ARE THE THRUST COMMAND VECTOR
039827,000053:                                                                                                  #  AND THE WINDOW COMMAND VECTOR, AND THE OUTPUTS ARE THE GIMBAL ANGLE
039828,000054:                                                                                                  #  INCREMENTS, THE COMMANDED ATTITUDE ANGLE RATES, AND THE COMMANDED
039829,000055:                                                                                                  #  ATTITUDE LAG ANGLES (WHICH ACCOUNT FOR THE ANGLES BY WHICH THE BODY WILL
039830,000056:                                                                                                  #  LAG BEHIND A RAMP COMMAND IN ATTITUDE ANGLE DUE TO THE FINITE ANGULAR
039831,000057:                                                                                                  #  ACCELERATIONS AVAILABLE).
039832,000058: 
039833,000059:                                                                                                  #  FINDCDUW ALINES THE ESTIMATED THRUST VECTOR FROM THE THRUST DIRECTION
039834,000060:                                                                                                  #  FILTER WITH THE THRUST COMMAND VECTOR, AND, WHEN XOVINHIB SET,
039835,000061:                                                                                                  #  ALINES THE +Z HALF OF THE LM ZX PLANE WITH THE WINDOW COMMAND VECTOR.
039836,000062: 

Page 909

039838,000064:                                                                                                  #  SPECIFICATIONS:
039839,000065: 
039840,000066:                                                                                                  #  INITIALIZATION:       A SINGLE INTERPRETIVE CALL TO INITCDUW IS REQUIRED
039841,000067:                                                                                                  #                        BEFORE EACH GUIDED MANEUVER USING FINDCDUW.
039842,000068: 
039843,000069:                                                                                                  #  CALL:                 INTERPRETIVE CALL TO FINDCDUW WITH THE THRUST COMMAND
039844,000070:                                                                                                  #                        VECTOR IN MPAC.  INTERPRETIVE CALL TO FINDCDUW -2 WITH
039845,000071:                                                                                                  #                        THE THRUST COMMAND VECTOR IN UNFC/2 AND NOT IN MPAC.
039846,000072: 
039847,000073:                                                                                                  #  RETURNS:              NORMAL INTERPRETIVE IN ALL CASES
039848,000074:                                                                                                  #                        1.      NORMALLY ALL AUTOPILOT CMDS ARE ISSUED.
039849,000075:                                                                                                  #                        2.      IF NOT PNGCS AUTO, DO STOPRATE AND RETURN
039850,000076:                                                                                                  #                                WITHOUT ISSUING AUTOPILOT CMDS.
039851,000077:                                                                                                  #                        3.      IF ENGINE OFF, DO STOPRATE AND RETURN WITHOUT
039852,000078:                                                                                                  #                                ISSUING AUTOPILOT CMDS.
039853,000079: 
039854,000080:                                                                                                  #  ALARMS:               00401   IF INPUTS DETERMINE AN ATTITUDE IN GIMBAL LOCK.
039855,000081:                                                                                                  #                                FINDCDUW DRIVES CDUXD AND CDUYD TO THE RQD VALUES,
039856,000082:                                                                                                  #                                BUT DRIVES CDUZD ONLY TO THE GIMBAL LOCK CONE.
039857,000083: 
039858,000084:                                                                                                  #                        00402   IF UNFC/2 OR UNWC/2 PRODUCE OVERFLOW WHEN
039859,000085:                                                                                                  #                                UNITIZED USING NORMUNIT.  FINDCDUW ISSUES
039860,000086:                                                                                                  #                                STOPRATE AS ONLY INPUT TO AUTOPILOT.
039861,000087: 
039862,000088:                                                                                                  #  INPUTS:               UNFC/2          THRUST COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
039863,000089:                                                                                                  #                        UNWC/2          WINDOW COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
039864,000090:                                                                                                  #                        XOVINHIB        FLAG DENOTING X AXIS OVERRIDE INHIBITED.
039865,000091:                                                                                                  #                        CSMDOCKD        FLAG DENOTING CSM DOCKED.
039866,000092:                                                                                                  #                        STEERSW         FLAG DENOTING INSUFF THRUST FOR THRUST DIR FLTR.
039867,000093: 
039868,000094:                                                                                                  #  OUTPUTS:              DELCDUX,Y,Z
039869,000095:                                                                                                  #                        OMEGAPD,+1,+2
039870,000096:                                                                                                  #                        DELPEROR,+1,+2
039871,000097:                                                                                                  #                        CPHI,+1,+2 FOR NOUN22
039872,000098: 
039873,000099:                                                                                                  #  DEBRIS:               FINDCDUW DESTROYS SINCDUX,Y,Z AND COSCDUX,Y,Z BY
039874,000100:                                                                                                  #                        WRITING INTO THESE LOCATIONS THE SINES AND COSINES
039875,000101:                                                                                                  #                        OF THE CDUD'S IN PNGCS-AUTO, OF THE CDU'S OTHERWISE.
039876,000102: 

Page 910

039878,000104:                                                                                                  #  INITIALIZATION FOR FINDCDUW
039879,000105: 
039880,000106: 30,3104                                           BANK     30                                    
039881,000107: 30,2000                                           SETLOC   FCDUW                                 
039882,000108: 30,2000                                           BANK                                           
039883,000109: 
039884,000110: 30,3104  E6,1646                                  EBANK=   ECDUW                                 
039885,000111: 30,3104                                           COUNT*   $$/FCDUW                              
039886,000112: 
039887,000113: 30,3104           77775        INITCDUW           VLOAD                                          
039888,000114: 30,3105           06520                                    UNITX                                 
039889,000115: 30,3106           03270                           STORE    UNFV/2                                
039890,000116: 30,3107           03262                           STORE    UNWC/2                                
039891,000117: 30,3110           77616                           RVQ                                            
039892,000118: 
039893,000119:                                                                                                  #  FINDCDUW PRELIMINARIES
039894,000120: 
039895,000121: 30,3111           77775                           VLOAD                                          #  FINDCDUW -2:  ENTRY WHEN UNFC/2 PRE-STORD
039896,000122: 30,3112           03254                                    UNFC/2                                #  INPUT VECTORS NEED NOT BE SEMI-UNIT
039897,000123: 30,3113           40200        FINDCDUW           BOV      SETPD                                 #  FINDCDUW: ENTRY WHEN UNFC/2 IN MPAC
039898,000124: 30,3114           61113                                    FINDCDUW                              #  INTERPRETER NOW INITIALIZED
039899,000125: 30,3115           00023                                    22                                    #  LOCS 0 THRU 21 FOR DIRECTION COSINE MAT
039900,000126: 30,3116           77420                           STQ      EXIT                                  
039901,000127: 30,3117           03247                                    QCDUWUSR                              #  SAVE RETURN ADDRESS
039902,000128: 
039903,000129:                                                                                                  #  MORE HAUSKEEPING
039904,000130: 30,3120           33761                           CA       ECDUWL                                
039905,000131: 30,3121           56003                           XCH      EBANK                                 #  SET EBANK
039906,000132: 30,3122           55646                           TS       ECDUWUSR                              #  SAVE USER'S EBANK
039907,000133: 
039908,000134: 30,3123           30111                           CA       DAPBOOLS                              
039909,000135: 30,3124           74737                           MASK     CSMDOCKD                              #  CSMDOCKD MUST NOT BE BIT15
039910,000136: 30,3125           10000                           CCS      A                                     
039911,000137: 30,3126           34753                           CA       ONE                                   #  INDEX IF CSM DOCKED
039912,000138: 30,3127           55650                           TS       NDXCDUW                               
039913,000139: 
039914,000140: 30,3130           34743                           CA       XOVINHIB                              #  XOVINHIB MUST NOT BE BIT15
039915,000141: 30,3131           55652                           TS       FLPAUTNO                              #  SET TO POS-NON-ZERO FLAG PNGCS AUTO NOT
039916,000142: 
039917,000143: 30,3132           70111                           MASK     DAPBOOLS                              
039918,000144: 30,3133           55651                           TS       FLAGOODW                              #  FLAGOODW = ANY PNZ NUMBER IF XOV INHIBTD
039919,000145: 

Page 911

039921,000147:                                                                                                  #  FETCH BASIC DATA
039922,000148: 30,3134           00004                           INHINT                                         #  RELINT AT PAUTNO (TC INTPRET)
039923,000149: 
039924,000150: 30,3135           30032                           CA       CDUX                                  #  FETCH CDUX,CDUY,CDUZ IN ALL CASES, BUT
039925,000151: 30,3136           54772                           TS       CDUSPOTX                              #        REPLACE BELOW IF PNGCS AUTO
039926,000152: 30,3137           30033                           CA       CDUY                                  
039927,000153: 30,3140           54766                           TS       CDUSPOTY                              
039928,000154: 30,3141           30034                           CA       CDUZ                                  
039929,000155: 30,3142           54770                           TS       CDUSPOTZ                              
039930,000156: 
039931,000157: 30,3143           34742                           CA       BIT10                                 #  PNGCS CONTROL BIT
039932,000158: 30,3144           00006                           EXTEND                                         
039933,000159: 30,3145           02030                           RAND     CHAN30                                
039934,000160: 30,3146           10000                           CCS      A                                     
039935,000161: 30,3147           13164                           TCF      PAUTNO                                #  NOT PNGCS (BITS INVERTED)
039936,000162: 
039937,000163: 30,3150           34736                           CA       BIT14                                 #  AUTO MODE BIT
039938,000164: 30,3151           00006                           EXTEND                                         
039939,000165: 30,3152           02031                           RAND     CHAN31                                
039940,000166: 30,3153           10000                           CCS      A                                     
039941,000167: 30,3154           13164                           TCF      PAUTNO                                #  NOT AUTO (BITS INVERTED)
039942,000168: 
039943,000169: 30,3155           55652                           TS       FLPAUTNO                              #  RESET FLAG PNGCS AUTO NOT
039944,000170: 
039945,000171: 30,3156           31635                           CA       CDUXD                                 #  PNGCS AUTO:  FETCH CDUXD,CDUYD,CDUZD
039946,000172: 30,3157           54772                           TS       CDUSPOTX                              
039947,000173: 30,3160           31636                           CA       CDUYD                                 
039948,000174: 30,3161           54766                           TS       CDUSPOTY                              
039949,000175: 30,3162           31637                           CA       CDUZD                                 
039950,000176: 30,3163           54770                           TS       CDUSPOTZ                              
039951,000177: 

Page 912

039953,000179:                                                                                                  #  FETCH INPUTS
039954,000180: 30,3164           06037        PAUTNO             TC       INTPRET                               #  ENTERING THRUST CMD STILL IN MPAC
039955,000181: 30,3165           77634                           RTB                                            
039956,000182: 30,3166           21726                                    NORMUNIT                              
039957,000183: 30,3167           24001                           STOVL    UNX/2                                 #  SEMI-UNIT THRUST CMD AS INITIAL UNX/2
039958,000184: 30,3170           03262                                    UNWC/2                                
039959,000185: 30,3171           47034                           RTB      RTB                                   
039960,000186: 30,3172           21726                                    NORMUNIT                              
039961,000187: 30,3173           47615                                    QUICTRIG                              #  ALWAYS RQD TO OBTAIN TRIGS OF CDUD'S
039962,000188: 30,3174           24015                           STOVL    UNZ/2                                 #  SEMI-UNIT WINDOW CMD AS INITIAL UNZ/2
039963,000189: 30,3175           00325                                    DELV                                  
039964,000190: 30,3176           53404                           BOVB     UNIT                                  
039965,000191: 30,3177           61750                                    NOATTCNT                              #  AT LEAST ONE ENTERING CMD VCT ZERO
039966,000192: 30,3200           45000                           BOV      CALL                                  
039967,000193: 30,3201           61215                                    AFTRFLTR                              #  IF UNIT DELV OVERFLOWS, SKIP FILTER
039968,000194: 30,3202           47671                                    *SMNB*                                #  YIELDS UNIT(DELV) IN VEH COORDS FOR FLTR
039969,000195: 
039970,000196:                                                                                                  #  THRUST DIRECTION FILTER
039971,000197: 
039972,000198: 30,3203           77776                           EXIT                                           
039973,000199: 
039974,000200: 30,3204           31671                           CA       UNFVY/2                               #  FOR RESTARTS, UNFV/2 ALWAYS INTACT, MPAC
039975,000201: 30,3205           22157                           LXCH     MPAC       +3                         #        RENEWED AFTER RETURN FROM CALLER,
039976,000202: 30,3206           03503                           TC       FLTRSUB                               #        TWO FILTER UPDATES MAY BE DONE.
039977,000203: 30,3207           55671                           TS       UNFVY/2                               #  UNFV/2 NEED NOT BE EXACTLY SEMI-UNIT.
039978,000204: 
039979,000205: 30,3210           31673                           CA       UNFVZ/2                               
039980,000206: 30,3211           22161                           LXCH     MPAC       +5                         
039981,000207: 30,3212           03503                           TC       FLTRSUB                               
039982,000208: 30,3213           55673                           TS       UNFVZ/2                               
039983,000209: 
039984,000210: 30,3214           06037                           TC       INTPRET                               #  COMPLETES FILTER
039985,000211: 

Page 913

039987,000213:                                                                                                  #  FIND A SUITABLE WINDOW POINTING VECTOR
039988,000214: 
039989,000215: 30,3215           46135        AFTRFLTR           SLOAD    BHIZ                                  #  IF XOV NOT INHIBITED, GO FETCH ZNB
039990,000216: 30,3216           03252                                    FLAGOODW                              
039991,000217: 30,3217           61223                                    FETCHZNB                              
039992,000218: 30,3220           45175                           VLOAD    CALL                                  
039993,000219: 30,3221           00015                                    UNZ/2                                 
039994,000220: 30,3222           61523                                    UNWCTEST                              
039995,000221: 
039996,000222: 30,3223           77775        FETCHZNB           VLOAD                                          
039997,000223: 30,3224           02162                                    ZNBPIP                                
039998,000224: 30,3225           34015                           STCALL   UNZ/2                                 
039999,000225: 30,3226           61523                                    UNWCTEST                              
040000,000226: 
040001,000227: 30,3227           57575                           VLOAD    VCOMP                                 #  Z AND -X CAN'T BOTH PARALLEL UNFC/2
040002,000228: 30,3230           02146                                    XNBPIP                                
040003,000229: 30,3231           00015                           STORE    UNZ/2                                 
040004,000230: 
040005,000231:                                                                                                  #  COMPUTE THE REQUIRED DIRECTION COSINE MATRIX
040006,000232: 
040007,000233: 30,3232           47375        DCMCL              VLOAD    VXV                                   
040008,000234: 30,3233           00015                                    UNZ/2                                 
040009,000235: 30,3234           00001                                    UNX/2                                 
040010,000236: 30,3235           41456                           UNIT     PUSH                                  #  UNY/2 FIRST ITERATION
040011,000237: 30,3236           76435                           VXV      VSL1                                  
040012,000238: 30,3237           00001                                    UNX/2                                 
040013,000239: 30,3240           00015                           STORE    UNZ/2                                 #  -UNZ/2 FIRST ITERATION
040014,000240: 30,3241           63361                           VXSC     PDVL                                  #  EXCHANGE -UNFVZ/2 UNZ/2 FOR UNY/2
040015,000241: 30,3242           03274                                    UNFVZ/2                               #  MUST BE SMALL
040016,000242: 30,3243           51361                           VXSC     BVSU                                  #  YIELDS -UNFVY/2 UNY/2-UNFVZ/2 UNZ/2
040017,000243: 30,3244           03272                                    UNFVY/2                               #  MUST BE SMALL
040018,000244: 30,3245           53372                           VSL1     VAD                                   
040019,000245: 30,3246           00001                                    UNX/2                                 
040020,000246: 30,3247           77656                           UNIT                                           #  TOTALLY ELIMINATES THRUST POINTING ERROR
040021,000247: 30,3250           00001                           STORE    UNX/2                                 #  UNX/2
040022,000248: 30,3251           76435                           VXV      VSL1                                  
040023,000249: 30,3252           00015                                    UNZ/2                                 #  -UNZ/2 WAS STORED HERE REMEMBER
040024,000250: 30,3253           00007                           STORE    UNY/2                                 #  UNY/2
040025,000251: 30,3254           47276                           VCOMP    VXV                                   
040026,000252: 30,3255           00001                                    UNX/2                                 
040027,000253: 30,3256           77772                           VSL1                                           
040028,000254: 30,3257           00015                           STORE    UNZ/2                                 #  UNZ/2
040029,000255: 

Page 914

040031,000257:                                                                                                  #  COMPUTE THE REQUIRED GIMBAL ANGLES
040032,000258: 
040033,000259: 30,3260           77624                           CALL                                           
040034,000260: 30,3261           61533                                    NB2CDUSP                              #  YIELDS THE RQD GIMBAL ANGLES, 2'S, PI
040035,000261: 30,3262           77776                           EXIT                                           
040036,000262: 
040037,000263:                                                                                                  #  LIMIT THE MIDDLE GIMBAL ANGLE & COMPUTE THE UNLIMITED GIMBAL ANGLE CHGS
040038,000264: 
040039,000265: 30,3263           30156                           CA       MPAC       +2                         #  LIMIT THE MGA
040040,000266: 30,3264           54001                           TS       L                                     #  CAN'T LXCH:  NEED UNLIMITED MGA FOR ALARM
040041,000267: 30,3265           33773                           CA       CDUZDLIM                              
040042,000268: 30,3266           03727                           TC       LIMITSUB                              #  YIELDS LIMITED MGA.  1 BIT ERROR POSSIBLE
040043,000269: 30,3267           56156                           XCH      MPAC       +2                         #        BECAUSE USING 2'S COMP.  WHO CARES?
040044,000270: 30,3270           00006                           EXTEND                                         
040045,000271: 30,3271           20156                           MSU      MPAC       +2                         #  THIS BETTER YIELD ZERO
040046,000272: 30,3272           00006                           EXTEND                                         
040047,000273: 30,3273           13275                           BZF      +2                                    
040048,000274: 30,3274           13756                           TCF      ALARMMGA                              
040049,000275: 
040050,000276: 30,3275           00004        MGARET             INHINT                                         #  RELINT AT TC INTPRET AFTER TCQCDUW
040051,000277: 
040052,000278: 30,3276           22007                           ZL                                             
040053,000279: 30,3277           34752                           CA       TWO                                   
040054,000280: 30,3300           54142        DELGMBLP           TS       TEM2                                  
040055,000281: 
040056,000282: 30,3301           30001                           CA       L                                     #  TO PREVENT FALSE STARTS ABOUT X, ZERO
040057,000283: 30,3302           00006                           EXTEND                                         #        FLAGOODW IF DELGMBZ OR Y TOO BIG.
040058,000284: 30,3303           70000                           SQUARE                                         
040059,000285: 30,3304           64350                           AD       HI5                                   #  WITHIN 1 BIT OF -(45 DEG SQUARED)
040060,000286: 30,3305           00006                           EXTEND                                         
040061,000287: 30,3306           63311                           BZMF     +3                                    
040062,000288: 30,3307           34755                           CA       ZERO                                  
040063,000289: 30,3310           55651                           TS       FLAGOODW                              
040064,000290: 
040065,000291: 30,3311           50142                           INDEX    TEM2                                  
040066,000292: 30,3312           30154                           CA       MPAC                                  
040067,000293: 30,3313           50142                           INDEX    TEM2                                  
040068,000294: 30,3314           54321                           TS       CPHI                                  #  OUTPUTS TO NOUN22
040069,000295: 30,3315           00006                           EXTEND                                         
040070,000296: 30,3316           50142                           INDEX    TEM2                                  
040071,000297: 30,3317           21635                           MSU      CDUXD                                 #  NO MATTER THAT THESE SLIGHTLY DIFFERENT
040072,000298: 30,3320           40000                           COM                                            #  FROM WHEN WE INITIALLY FETCHED THEM
040073,000299: 30,3321           50142                           INDEX    TEM2                                  
040074,000300: 30,3322           55675                           TS       -DELGMB                               #  -UNLIMITED GIMBAL ANGLE CHGS, 1'S, PI
040075,000301: 30,3323           54001                           TS       L                                     #  FOR PRECEDING TEST ON NEXT LOOP PASS
040076,000302: 30,3324           10142                           CCS      TEM2                                  
040077,000303: 30,3325           13300                           TCF      DELGMBLP                              
040078,000304: 

Page 915

040080,000306:                                                                                                  #  BRANCHES TO NOATTCNT
040081,000307: 30,3326           11652                           CCS      FLPAUTNO                              
040082,000308: 30,3327           13752                           TCF      NOATTCNT   +2                         #  NOT PNGCS AUTO
040083,000309: 
040084,000310: 30,3330           30101                           CA       FLAGWRD5                              
040085,000311: 30,3331           74745                           MASK     ENGONBIT                              
040086,000312: 30,3332           00006                           EXTEND                                         
040087,000313: 30,3333           13752                           BZF      NOATTCNT   +2                         #  ENGINE NOT ON
040088,000314: 

Page 916

040090,000316:                                                                                                  #  LIMIT THE ATTITUDE ANGLE CHANGES
040091,000317: 
040092,000318:                                                                                                  #  THIS SECTION LIMITS THE ATTITUDE ANGLE CHANGES ABOUT A SET OF ORTHOGONAL VEHICLE AXES X,YPRIME,ZPRIME.
040093,000319:                                                                                                  #  THESE AXES COINCIDE WITH THE COMMANDED VEHICLE AXES IF AND ONLY IF CDUXD IS ZERO.  THE PRIME SYSTEM IS
040094,000320:                                                                                                  #  THE COMMANDED VEHICLE SYSTEM ROTATED ABOUT THE X AXIS TO BRING THE Z AXIS INTO ALINEMENT WITH THE MIDDLE GIMBAL
040095,000321:                                                                                                  #  AXIS.  ATTITUDE ANGLE CHANGES IN THE PRIME SYSTEM ARE RELATED TO SMALL GIMBAL ANGLE CHANGES BY:
040096,000322: 
040097,000323:                                                                                                  #        *   -DELATTX    *   * 1     SIN(CDUZD)     0 * * -DELGMBX *
040098,000324:                                                                                                  #        *               *   *                        * *          *
040099,000325:                                                                                                  #        * -DELATTYPRIME * = * 0     COS(CDUZD)     0 * * -DELGMBY *
040100,000326:                                                                                                  #        *               *   *                        * *          *
040101,000327:                                                                                                  #        * -DELATTZPRIME *   * 0         0          1 * * -DELGMBZ *
040102,000328: 
040103,000329: 30,3334           23677                           LXCH     -DELGMB    +2                         #  SAME AS -DELATTZPRIME UNLIMITED
040104,000330: 30,3335           51650                           INDEX    NDXCDUW                               
040105,000331: 30,3336           33767                           CA       DAZMAX                                
040106,000332: 30,3337           03727                           TC       LIMITSUB                              
040107,000333: 30,3340           55677                           TS       -DELGMB    +2                         #  -DELGMBZ
040108,000334: 
040109,000335: 30,3341           31676                           CA       -DELGMB    +1                         
040110,000336: 30,3342           00006                           EXTEND                                         
040111,000337: 30,3343           70746                           MP       COSCDUZ                               #  YIELDS -DELATTYPRIME/2 UNLIMITED
040112,000338: 30,3344           54001                           TS       L                                     
040113,000339: 30,3345           51650                           INDEX    NDXCDUW                               
040114,000340: 30,3346           33771                           CA       DAY/2MAX                              
040115,000341: 30,3347           03727                           TC       LIMITSUB                              
040116,000342: 30,3350           00006                           EXTEND                                         
040117,000343: 30,3351           10746                           DV       COSCDUZ                               
040118,000344: 30,3352           57676                           XCH      -DELGMB    +1                         #  -DELGMBY, FETCHING UNLIMITED VALUE
040119,000345: 
040120,000346: 30,3353           00006                           EXTEND                                         
040121,000347: 30,3354           70740                           MP       SINCDUZ                               
040122,000348: 30,3355           20001                           DDOUBL                                         
040123,000349: 30,3356           40000                           COM                                            
040124,000350: 30,3357           00006                           EXTEND                                         #  YIELDS +DELATTX UNLIMITD, MAG < 180 DEG,
040125,000351: 30,3360           21675                           MSU      -DELGMB                               #        BASED ON UNLIMITED DELGMBY.
040126,000352: 30,3361           54001                           TS       L                                     #        ONE BIT ERROR IF OPERANDS IN MSU
040127,000353: 30,3362           51650                           INDEX    NDXCDUW                               #        OF MIXED SIGNS.  WHO CARES?
040128,000354: 30,3363           33767                           CA       DAXMAX                                
040129,000355: 30,3364           03727                           TC       LIMITSUB                              
040130,000356: 30,3365           55675                           TS       -DELGMB                               #  SAVE LIMITED +DELATTX
040131,000357: 30,3366           11651                           CCS      FLAGOODW                              
040132,000358: 30,3367           41675                           CS       -DELGMB                               #  FETCH IT BACK CHGING SIGN IF WINDOW GOOD
040133,000359: 30,3370           55675                           TS       -DELGMB                               #  OTHERWISE USE ZERO FOR -DELATTX
040134,000360: 30,3371           41676                           CS       -DELGMB    +1                         
040135,000361: 30,3372           00006                           EXTEND                                         
040136,000362: 30,3373           70740                           MP       SINCDUZ                               
040137,000363: 30,3374           20001                           DDOUBL                                         #  YIELDS -CNTRIB TO -DELATTX FROM -DELGMBY
040138,000364: 30,3375           27675                           ADS      -DELGMB                               #  -DELGMBX.  NO OVERFLOW SINCE LIMITED TO
040139,000365:                                                                                                  #  20DEG(1+SIN(70DEG)/COS(70DEG)) < 180DEG
040140,000366: 

Page 917

040142,000368:                                                                                                  #  COMPUTE COMMANDED ATTITUDE RATES
040143,000369: 
040144,000370:                                                                                                  #        * OMEGAPD *   * -2         -4 SINCDUZ              +0    * * -DELGMBX *
040145,000371:                                                                                                  #        *         *   *                                          * *          *
040146,000372:                                                                                                  #        * OMEGAQD * = * +0     -8 COSCDUZ COSCDUX     -4 SINCDUX * * -DELGMBY *
040147,000373:                                                                                                  #        *         *   *                                          * *          *
040148,000374:                                                                                                  #        * OMEGARD *   * +0     +8 COSCDUZ SINCDUX     -4 COSCDUX * * -DELGMBZ *
040149,000375: 
040150,000376:                                                                                                  #  ATTITUDE ANGLE RATES IN UNITS OF PI/4 RAD/SEC = K TRIG FCNS IN UNITS OF 2 X GIMBAL ANGLE RATES IN UNITS OF
040151,000377:                                                                                                  #  PI/2 RAD/SEC.  THE CONSTANTS ARE BASED ON DELGMB BEING THE GIMBAL ANGLE CHANGES IN UNITS OF PI RADIANS,
040152,000378:                                                                                                  #  AND 2 SECONDS BEING THE COMPUTATION PERIOD (THE PERIOD BETWEEN SUCCESSIVE PASSES THRU FINDCDUW).
040153,000379: 
040154,000380: 30,3376           41675                           CS       -DELGMB                               
040155,000381: 30,3377           55643                           TS       OMEGAPD                               
040156,000382: 30,3400           41676                           CS       -DELGMB    +1                         
040157,000383: 30,3401           00006                           EXTEND                                         
040158,000384: 30,3402           70740                           MP       SINCDUZ                               
040159,000385: 30,3403           20001                           DDOUBL                                         
040160,000386: 30,3404           27643                           ADS      OMEGAPD                               
040161,000387: 30,3405           27643                           ADS      OMEGAPD                               
040162,000388: 
040163,000389: 30,3406           41676                           CS       -DELGMB    +1                         
040164,000390: 30,3407           00006                           EXTEND                                         
040165,000391: 30,3410           70750                           MP       COSCDUX                               
040166,000392: 30,3411           20001                           DDOUBL                                         
040167,000393: 30,3412           00006                           EXTEND                                         
040168,000394: 30,3413           70746                           MP       COSCDUZ                               
040169,000395: 30,3414           55644                           TS       OMEGAQD                               
040170,000396: 30,3415           41677                           CS       -DELGMB    +2                         
040171,000397: 30,3416           00006                           EXTEND                                         
040172,000398: 30,3417           70742                           MP       SINCDUX                               
040173,000399: 30,3420           27644                           ADS      OMEGAQD                               
040174,000400: 30,3421           27644                           ADS      OMEGAQD                               
040175,000401: 30,3422           27644                           ADS      OMEGAQD                               
040176,000402: 
040177,000403: 30,3423           31676                           CA       -DELGMB    +1                         
040178,000404: 30,3424           00006                           EXTEND                                         
040179,000405: 30,3425           70742                           MP       SINCDUX                               
040180,000406: 30,3426           20001                           DDOUBL                                         
040181,000407: 30,3427           00006                           EXTEND                                         
040182,000408: 30,3430           70746                           MP       COSCDUZ                               
040183,000409: 30,3431           55645                           TS       OMEGARD                               
040184,000410: 30,3432           41677                           CS       -DELGMB    +2                         
040185,000411: 30,3433           00006                           EXTEND                                         
040186,000412: 30,3434           70750                           MP       COSCDUX                               
040187,000413: 30,3435           27645                           ADS      OMEGARD                               
040188,000414: 30,3436           27645                           ADS      OMEGARD                               
040189,000415: 30,3437           27645                           ADS      OMEGARD                               
040190,000416: 

Page 918

040192,000418:                                                                                                  #  FINAL TRANSFER
040193,000419: 
040194,000420: 30,3440           34752                           CA       TWO                                   
040195,000421: 30,3441           54142        CDUWXFR            TS       TEM2                                  
040196,000422: 30,3442           50142                           INDEX    TEM2                                  
040197,000423: 30,3443           31675                           CA       -DELGMB                               
040198,000424: 30,3444           00006                           EXTEND                                         
040199,000425: 30,3445           73774                           MP       DT/DELT                               #  RATIO OF DAP INTERVAL TO CDUW INTERVAL
040200,000426: 30,3446           03743                           TC       ONESTO2S                              
040201,000427: 30,3447           50142                           INDEX    TEM2                                  
040202,000428: 30,3450           55640                           TS       DELCDUX                               #  ANGLE INTERFACE
040203,000429: 
040204,000430: 30,3451           50142                           INDEX    TEM2                                  
040205,000431: 30,3452           11643                           CCS      OMEGAPD                               
040206,000432: 30,3453           64753                           AD       ONE                                   
040207,000433: 30,3454           13456                           TCF      +2                                    
040208,000434: 30,3455           64753                           AD       ONE                                   
040209,000435: 30,3456           00006                           EXTEND                                         #  WE NOW HAVE ABS(OMEGAPD,QD,RD)
040210,000436: 30,3457           50142                           INDEX    TEM2                                  
040211,000437: 30,3460           71643                           MP       OMEGAPD                               
040212,000438: 30,3461           00006                           EXTEND                                         
040213,000439: 30,3462           74741                           MP       BIT11                                 #  1/16
040214,000440: 30,3463           00006                           EXTEND                                         
040215,000441: 30,3464           50142                           INDEX    TEM2                                  #                   2
040216,000442: 30,3465           11530                           DV       1JACC                                 #  UNITS PI/4 RAD/SEC
040217,000443: 30,3466           54001                           TS       L                                     
040218,000444: 30,3467           33771                           CA       DELERLIM                              
040219,000445: 30,3470           03727                           TC       LIMITSUB                              
040220,000446: 30,3471           50142                           INDEX    TEM2                                  
040221,000447: 30,3472           55277                           TS       DELPEROR                              #  LAG ANGLE = OMEGA ABS(OMEGA)/2 ACCEL
040222,000448: 30,3473           10142                           CCS      TEM2                                  
040223,000449: 30,3474           13441                           TCF      CDUWXFR                               
040224,000450: 
040225,000451:                                                                                                  #  HAUSKEEPING AND RETURN
040226,000452: 
040227,000453: 30,3475           31646        TCQCDUW            CA       ECDUWUSR                              
040228,000454: 30,3476           54003                           TS       EBANK                                 #  RETURN USER'S EBANK
040229,000455: 
040230,000456: 30,3477           06037                           TC       INTPRET                               
040231,000457: 30,3500           52001                           SETPD    GOTO                                  
040232,000458: 30,3501           00001                                    0                                     
040233,000459: 30,3502           03247                                    QCDUWUSR                              #  NORMAL AND ABNORMAL RETURN TO USER
040234,000460: 

Page 919

040236,000462:                                                                                                  #  THRUST VECTOR FILTER SUBROUTINE
040237,000463: 
040238,000464: 30,3503           00006        FLTRSUB            EXTEND                                         
040239,000465: 30,3504           22142                           QXCH     TEM2                                  
040240,000466: 30,3505           54143                           TS       TEM3                                  #  SAVE ORIGINAL OFFSET
040241,000467: 30,3506           40000                           COM                                            #  ONE MCT, NO WDS, CAN BE SAVED IF NEG OF
040242,000468: 30,3507           60001                           AD       L                                     #        ORIG OFFSET ARRIVES IN A, BUT IT'S
040243,000469: 30,3510           00006                           EXTEND                                         #        NOT WORTH THE INCREASED OBSCURITY.
040244,000470: 30,3511           51650                           INDEX    NDXCDUW                               
040245,000471: 30,3512           73762                           MP       GAINFLTR                              
040246,000472: 30,3513           54001                           TS       L                                     #  INCR TO OFFSET, UNLIMITED
040247,000473: 30,3514           33764                           CA       DUNFVLIM                              #  SAME LIMIT FOR Y AND Z
040248,000474: 30,3515           03727                           TC       LIMITSUB                              #  YIELDS INCR TO OFFSET, LIMITED
040249,000475: 30,3516           60143                           AD       TEM3                                  #  ORIGINAL OFFSET
040250,000476: 30,3517           54001                           TS       L                                     #  TOTAL OFFSET, UNLIMITED
040251,000477: 30,3520           33765                           CA       UNFVLIM                               #  SAME LIMIT FOR Y AND Z
040252,000478: 30,3521           03727                           TC       LIMITSUB                              #  YIELDS TOTAL OFFSET, LIMITED
040253,000479: 30,3522           00142                           TC       TEM2                                  
040254,000480: 
040255,000481:                                                                                                  #  SUBR TO TEST THE ANGLE BETWEEN THE PROPOSED WINDOW AND THRUST CMD VCTS
040256,000482: 
040257,000483: 30,3523           63441        UNWCTEST           DOT      DSQ                                   
040258,000484: 30,3524           00001                                    UNX/2                                 
040259,000485: 30,3525           50025                           DSU      BMN                                   
040260,000486: 30,3526           21767                                    DOTSWFMX                              
040261,000487: 30,3527           61232                                    DCMCL                                 
040262,000488: 30,3530           43531                           SSP      RVQ                                   #  RVQ FOR ALT CHOICE IF DOT MAGN TOO LARGE
040263,000489: 30,3531           03252                                    FLAGOODW                              #        ZEROING WINDOW GOOD FLAG
040264,000490: 30,3532           00000                                    0                                     
040265,000491: 

Page 920

040267,000493:                                                                                                  #  NB2CDUSP RETURNS THE 2'S COMPLEMENT, PI, SP CDU ANGLES X,Y,Z IN MPAC,+1,+2 GIVEN THE MATRIX WHOSE ROW VECTORS
040268,000494:                                                                                                  #  ARE THE SEMI-UNIT NAV BASE VECTORS X,Y,Z EXPRESSED IN STABLE MEMBER COORDINATES, LOCATED AT 0 IN THE PUSH LIST.
040269,000495:                                                                                                  #  NB2CDUSP USES ARCTRGSP WHICH HAS A MAXIMUM ERROR OF +-4 BITS.
040270,000496: 
040271,000497: 30,3533           63545        NB2CDUSP           DLOAD    DSQ                                   
040272,000498: 30,3534           00003                                    2                                     
040273,000499: 30,3535           51021                           BDSU     BPL                                   
040274,000500: 30,3536           06512                                    DP1/4TH                               
040275,000501: 30,3537           61542                                    +3                                    
040276,000502: 30,3540           77745                           DLOAD                                          
040277,000503: 30,3541           06522                                    ZEROVECS                              #  IN CASE SIN WAS SLIGHTLY > 1/2
040278,000504: 30,3542           77566                           SQRT     EXIT                                  #  YIELDS COS(CDUZ) IN UNITS OF 2
040279,000505: 
040280,000506: 30,3543           00006                           EXTEND                                         
040281,000507: 30,3544           30155                           DCA      MPAC                                  
040282,000508: 30,3545           20001                           DDOUBL                                         
040283,000509: 30,3546           54145                           TS       TEM5                                  
040284,000510: 30,3547           13552                           TCF      +3                                    
040285,000511: 30,3550           34733                           CA       POSMAX                                #  OVERFLOW.  FETCH POSMAX, MPAC ALWAYS POS
040286,000512: 30,3551           54145                           TS       TEM5                                  #  COS(CDUZ) IN TEM5, UNITS 1
040287,000513: 
040288,000514: 30,3552           50120                           INDEX    FIXLOC                                
040289,000515: 30,3553           30002                           CA       2                                     
040290,000516: 30,3554           22154                           LXCH     MPAC                                  
040291,000517: 30,3555           03622                           TC       ARCTRGSP                              
040292,000518: 30,3556           54156                           TS       MPAC       +2                         #  CDUZ
040293,000519: 
040294,000520: 30,3557           34755                           CA       ZERO                                  
040295,000521: 30,3560           03600                           TC       DVBYCOSM                              
040296,000522: 30,3561           34751                           CA       FOUR                                  
040297,000523: 30,3562           03600                           TC       DVBYCOSM                              
040298,000524: 30,3563           40141                           CS       TEM1                                  
040299,000525: 30,3564           03622                           TC       ARCTRGSP                              
040300,000526: 30,3565           54155                           TS       MPAC       +1                         #  CDUY
040301,000527: 
040302,000528: 30,3566           34750                           CA       BIT4                                  
040303,000529: 30,3567           03600                           TC       DVBYCOSM                              
040304,000530: 30,3570           33577                           CA       16OCT                                 
040305,000531: 30,3571           03600                           TC       DVBYCOSM                              
040306,000532: 30,3572           40141                           CS       TEM1                                  
040307,000533: 30,3573           03622                           TC       ARCTRGSP                              
040308,000534: 30,3574           54154                           TS       MPAC                                  #  CDUX
040309,000535: 
040310,000536: 30,3575           06037                           TC       INTPRET                               
040311,000537: 30,3576           77616                           RVQ                                            
040312,000538: 
040313,000539: 30,3577           00016        16OCT              OCT      16                                    
040314,000540: 

Page 921

040316,000542:                                                                                                  #  THE ELEMENTS OF THE NAV BASE MATRIX WHICH WE MUST DIVIDE BY COS(MGA)
040317,000543:                                                                                                  #  ALREADY CONTAIN COS(MGA)/2 AS A FACTOR. THEREFORE THE QUOTIENT SHOULD
040318,000544:                                                                                                  #  ORDINARILY NEVER EXCEED 1/2 IN MAGNITUDE.  BUT IF THE MGA IS NEAR PI/2
040319,000545:                                                                                                  #  THEN COS(MGA) IS NEAR ZERO, AND THERE MAY BE SOME CHAFF IN THE OTHER
040320,000546:                                                                                                  #  ELEMENTS OF THE MATRIX WHICH WOULD PRODUCE CHAOS UNDER DIVISION.
040321,000547:                                                                                                  #  BEFORE DIVIDING WE MAKE SURE COS(MGA) IS AT LEAST ONE BIT LARGER
040322,000548:                                                                                                  #  THAN THE MAGNITUDE OF THE HIGH ORDER PART OF THE OPERAND.
040323,000549: 
040324,000550:                                                                                                  #  IF ONE OR MORE DIVIDES CANNOT BE PERFORMED, THIS MEANS THAT THE
040325,000551:                                                                                                  #  REQUIRED MGA IS VERY NEARLY +-PI/2 AND THEREFORE THE OTHER GIMBAL
040326,000552:                                                                                                  #  ANGLES ARE INDETERMINATE.  THE INNER AND OUTER GIMBAL ANGLES RETURNED
040327,000553:                                                                                                  #  IN THIS CASE WILL BE RANDOM MULTIPLES OF PI/2.
040328,000554: 
040329,000555: 30,3600           60120        DVBYCOSM           AD       FIXLOC                                
040330,000556: 30,3601           54116                           TS       ADDRWD                                #  ADRES OF OPERAND
040331,000557: 
040332,000558: 30,3602           50116                           INDEX    ADDRWD                                #  FETCH NEG ABS OF OPERAND, AD TEM5, AND
040333,000559: 30,3603           30000                           CA       0                                     #        SKIP DIVIDE IF RESULT NEG OR ZERO
040334,000560: 30,3604           00006                           EXTEND                                         
040335,000561: 30,3605           63607                           BZMF     +2                                    
040336,000562: 30,3606           40000                           COM                                            
040337,000563: 30,3607           60145                           AD       TEM5                                  #  C(A) ZERO OR NEG, C(TEM5) ZERO OR POS
040338,000564: 30,3610           00006                           EXTEND                                         
040339,000565: 30,3611           63617                           BZMF     TSL&TCQ                               #  DIFFERENCE ALWAYS SMALL IF BRANCH
040340,000566: 
040341,000567: 30,3612           00006                           EXTEND                                         #  TEM5 EXCEEDS ABS HIGH ORDER PART OF
040342,000568: 30,3613           50116                           INDEX    ADDRWD                                #        OPERAND BY AT LEAST ONE BIT.
040343,000569: 30,3614           30001                           DCA      0                                     #        THEREFORE IT EXCEEDS THE DP OPERAND
040344,000570: 30,3615           00006                           EXTEND                                         #        AND DIVISION WILL ALWAYS SUCCEED.
040345,000571: 30,3616           10145                           DV       TEM5                                  
040346,000572: 30,3617           54001        TSL&TCQ            TS       L                                     
040347,000573: 30,3620           22141                           LXCH     TEM1                                  
040348,000574: 30,3621           00002                           TC       Q                                     
040349,000575: 

Page 922

040351,000577:                                                                                                  #  ARCTRGSP RETURNS THE 2'S COMPLEMENT, PI, SP ANGLE IN THE A REGISTER GIVEN ITS SINE IN A AND ITS COSINE IN L IN
040352,000578:                                                                                                  #  UNITS OF 2.  THE RESULT IS AN UNAMBIGUOUS ANGLE ANYWHERE IN THE CIRCLE, WITH A MAXIMUM ERROR OF +-4 BITS.
040353,000579:                                                                                                  #  THE ERROR IS PRODUCED BY THE SUBROUTINE SPARCSIN WHICH IS USED ONLY IN THE REGION +-45 DEGREES.
040354,000580: 
040355,000581: 30,3622           00006        ARCTRGSP           EXTEND                                         
040356,000582: 30,3623           13665                           BZF      SINZERO                               #  TO AVOID DIVIDING BY ZERO
040357,000583: 
040358,000584: 30,3624           00006                           EXTEND                                         
040359,000585: 30,3625           22144                           QXCH     TEM4                                  
040360,000586: 30,3626           54142                           TS       TEM2                                  
040361,000587: 30,3627           30001                           CA       L                                     
040362,000588: 30,3630           54143                           TS       TEM3                                  
040363,000589: 30,3631           34755                           CA       ZERO                                  
040364,000590: 30,3632           00006                           EXTEND                                         
040365,000591: 30,3633           10142                           DV       TEM2                                  
040366,000592: 30,3634           00006                           EXTEND                                         
040367,000593: 30,3635           13654                           BZF      USECOS                                
040368,000594: 
040369,000595: 30,3636           10143                           CCS      TEM3                                  #  SIN IS SMALLER OR EQUAL
040370,000596: 30,3637           34755                           CA       ZERO                                  
040371,000597: 30,3640           13644                           TCF      +4                                    
040372,000598: 30,3641           40142                           CS       TEM2                                  #  IF COS NEG, REVERSE SIGN OF SIN,
040373,000599: 30,3642           54142                           TS       TEM2                                  #        ANGLE = PI-ARCSIN(SIN)
040374,000600: 30,3643           34735                           CA       NEGMAX                                #  PICK UP PI, 2'S COMPLEMENT
040375,000601: 30,3644           54143                           TS       TEM3                                  #  WE NO LONGER NEED COS
040376,000602: 30,3645           30142                           CA       TEM2                                  
040377,000603: 30,3646           03672                           TC       SPARCSIN   -1                         
040378,000604: 30,3647           03743                           TC       ONESTO2S                              
040379,000605: 30,3650           00006                           EXTEND                                         
040380,000606: 30,3651           20143                           MSU      TEM3                                  
040381,000607: 30,3652           03743        1TO2&TCQ           TC       ONESTO2S                              
040382,000608: 30,3653           00144                           TC       TEM4                                  
040383,000609: 
040384,000610: 30,3654           40143        USECOS             CS       TEM3                                  #  COS IS SMALLER
040385,000611: 30,3655           03672                           TC       SPARCSIN   -1                         #  ANGLE = SIGN(SIN)(PI/2-ARCSIN(COS))
040386,000612: 30,3656           64736                           AD       HALF                                  
040387,000613: 30,3657           54143                           TS       TEM3                                  #  WE NO LONGER NEED COS
040388,000614: 30,3660           10142                           CCS      TEM2                                  
040389,000615: 30,3661           30143                           CA       TEM3                                  
040390,000616: 30,3662           13652                           TCF      1TO2&TCQ                              
040391,000617: 30,3663           40143                           CS       TEM3                                  
040392,000618: 30,3664           13652                           TCF      1TO2&TCQ                              
040393,000619: 
040394,000620: 30,3665           10001        SINZERO            CCS      L                                     
040395,000621: 30,3666           34755                           CA       ZERO                                  
040396,000622: 30,3667           00002                           TC       Q                                     
040397,000623: 30,3670           34735                           CA       NEGMAX                                #  PI, 2'S COMP
040398,000624: 30,3671           00002                           TC       Q                                     
040399,000625: 

Page 923

040401,000627:                                                                                                  #  SPARCSIN TAKES AN ARGUMENT SCALED UNITY IN A AND RETURNS AN ANGLE SCALED
040402,000628:                                                                                                  #  180 DEGREES IN A.  IT HAS BEEN UNIT TESTED IN THE REGION +-.94 (+-70
040403,000629:                                                                                                  #  DEGREES) AND THE MAXIMUM ERROR IS +-5 BITS WITH AN AVERAGE TIME OF
040404,000630:                                                                                                  #  450 MICROSECONDS.  SPARCSIN -1 TAKES THE ARGUMENT SCALED TWO.  (BOB CRISP)
040405,000631: 
040406,000632: 30,3672           60000                           DOUBLE                                         
040407,000633: 30,3673           54021        SPARCSIN           TS       SR                                    
040408,000634: 30,3674           13700                           TCF      +4                                    
040409,000635: 30,3675           50000                           INDEX    A                                     
040410,000636: 30,3676           44734                           CS       LIMITS                                
040411,000637: 30,3677           54021                           TS       SR                                    
040412,000638: 30,3700           00006                           EXTEND                                         
040413,000639: 30,3701           70000                           MP       A                                     
040414,000640: 30,3702           54141                           TS       TEM1                                  
040415,000641: 30,3703           00006                           EXTEND                                         
040416,000642: 30,3704           73726                           MP       DPL9                                  
040417,000643: 30,3705           63725                           AD       DPL7                                  
040418,000644: 30,3706           00006                           EXTEND                                         
040419,000645: 30,3707           70141                           MP       TEM1                                  
040420,000646: 30,3710           63724                           AD       DPL5                                  
040421,000647: 30,3711           00006                           EXTEND                                         
040422,000648: 30,3712           70141                           MP       TEM1                                  
040423,000649: 30,3713           63723                           AD       DPL3                                  
040424,000650: 30,3714           00006                           EXTEND                                         
040425,000651: 30,3715           70141                           MP       TEM1                                  
040426,000652: 30,3716           63722                           AD       DPL1                                  
040427,000653: 30,3717           00006                           EXTEND                                         
040428,000654: 30,3720           70021                           MP       SR                                    
040429,000655: 30,3721           00002                           TC       Q                                     
040430,000656: 30,3722           24406        DPL1               DEC      10502      B-14                       
040431,000657: 30,3723           00660        DPL3               DEC      432        B-14                       
040432,000658: 30,3724           16204        DPL5               DEC      7300       B-14                       
040433,000659: 30,3725           50744        DPL7               DEC      -11803     B-14                       
040434,000660: 30,3726           20315        DPL9               DEC      8397       B-14                       
040435,000661: 

Page 924

040437,000663:                                                                                                  #  LIMITSUB LIMITS THE MAGNITUDE OF THE POSITIVE OR NEGATIVE VARIABLE
040438,000664:                                                                                                  #  ARRIVING IN L TO THE POSITIVE LIMIT ARRIVING IN A.
040439,000665:                                                                                                  #  THE SIGNED LIMITED VARIABLE IS RETURNED IN A.
040440,000666: 
040441,000667:                                                                                                  #  VERSION COURTESY HUGH BLAIR-SMITH
040442,000668: 
040443,000669: 30,3727           54141        LIMITSUB           TS       TEM1                                  
040444,000670: 30,3730           34755                           CA       ZERO                                  
040445,000671: 30,3731           00006                           EXTEND                                         
040446,000672: 30,3732           10141                           DV       TEM1                                  
040447,000673: 30,3733           10000                           CCS      A                                     
040448,000674: 30,3734           22141                           LXCH     TEM1                                  
040449,000675: 30,3735           13737                           TCF      +2                                    
040450,000676: 30,3736           13741                           TCF      +3                                    
040451,000677: 30,3737           30001                           CA       L                                     
040452,000678: 30,3740           00002                           TC       Q                                     
040453,000679: 30,3741           40141                           CS       TEM1                                  
040454,000680: 30,3742           00002                           TC       Q                                     
040455,000681: 
040456,000682:                                                                                                  #  SUBROUTINE TO CONVERT 1'S COMP SP TO 2'S COMP
040457,000683: 
040458,000684: 30,3743           10000        ONESTO2S           CCS      A                                     
040459,000685: 30,3744           64753                           AD       ONE                                   
040460,000686: 30,3745           00002                           TC       Q                                     
040461,000687: 30,3746           40000                           CS       A                                     
040462,000688: 30,3747           00002                           TC       Q                                     
040463,000689: 
040464,000690:                                                                                                  #  NO ATTITUDE CONTROL
040465,000691: 
040466,000692: 30,3750           05567        NOATTCNT           TC       ALARM                                 
040467,000693: 30,3751           00402                           OCT      00402                                 #  NO ATTITUDE CONTROL
040468,000694: 
040469,000695: 30,3752           00004                 +2        INHINT                                         #  COME HERE FOR NOATTCNT WITHOUT ALARM
040470,000696: 30,3753           04674                           TC       IBNKCALL                              #  RELINT AT TC INTPRET AFTER TCQCDUW
040471,000697: 30,3754           40165                           FCADR    STOPRATE                              
040472,000698: 30,3755           13475                           TCF      TCQCDUW                               #  RETURN TO USER SKIPPING AUTOPILOT CMDS
040473,000699: 
040474,000700:                                                                                                  #  MIDDLE GIMBAL ANGLE ALARM
040475,000701: 
040476,000702: 30,3756           05567        ALARMMGA           TC       ALARM                                 
040477,000703: 30,3757           00401                           OCT      00401                                 
040478,000704: 30,3760           13275                           TCF      MGARET                                
040479,000705: 

Page 925

040481,000707:                                                                                                  # ************************************************************************
040482,000708:                                                                                                  #  CONSTANTS
040483,000709:                                                                                                  # ************************************************************************
040484,000710: 
040485,000711:                                                                                                  #  ADDRESS CONSTANTS
040486,000712: 
040487,000713: 30,3761           03246        ECDUWL             ECADR    ECDUW                                 
040488,000714: 
040489,000715:                                                                                                  #  THRUST DIRECTION FILTER CONSTANTS
040490,000716: 
040491,000717: 30,3762           06315        GAINFLTR           DEC      .2                                    #  GAIN FILTER SANS CSM
040492,000718: 30,3763           03146                           DEC      .1                                    #  GAIN FILTER WITH CSM
040493,000719: 
040494,000720: 30,3764           00071        DUNFVLIM           DEC      .007       B-1                        #  7 MR MAX CHG IN F DIR IN VEH IN 2 SECS.
040495,000721:                                                                                                  #  THIS DOES NOT ALLOW FOR S/C ROT RATE.
040496,000722: 
040497,000723: 30,3765           02041        UNFVLIM            DEC      .129       B-1                        #  129 MR MAX THRUST OFFSET.  105 MR TRAVEL
040498,000724:                                                                                                  #  +10MR DEFL+5MR MECH MOUNT+9MR ABLATION.
040499,000725: 
040500,000726:                                                                                                  #  CONSTANTS RELATED TO GIMBAL ANGLE COMPUTATIONS
040501,000727: 
040502,000728: 30,3766           01673        DOTSWFMX           DEC      .93302     B-4                        #  LIM COLNRTY OF UNWC/2 & UNFC/2 TO 85 DEG
040503,000729:                                                                                                  #  LOWER PART COMES FROM NEXT CONSTANT
040504,000730: 
040505,000731: 30,3767           03434        DAXMAX             DEC      .11111111111                            #  DELATTX LIM TO 20 DEG IN 2 SECS, 1'S, PI
040506,000732: 30,3770           00266                           DEC      .0111111111                            #  2 DEG WHEN CSM DOCKED
040507,000733: 
040508,000734: 30,3771           01616        DAY/2MAX           DEC      .05555555555                            #  LIKEWISE FOR DELATTY
040509,000735: 30,3772           00133                           DEC      .0055555555                            
040510,000736: 
040511,000737: 30,3773  30,3767               DAZMAX             =        DAXMAX                                #  LIKEWISE FOR DELATTZ
040512,000738: 
040513,000739: 30,3773           14344        CDUZDLIM           DEC      .3888888888                            #  70 DEG LIMIT FOR MGA, 1'S, PI
040514,000740: 
040515,000741:                                                                                                  #  CONSTANTS FOR DATA TRANSFER
040516,000742: 
040517,000743: 30,3774           01463        DT/DELT            DEC      .05                                   #  .1 SEC/2 SEC WHICH IS THE AUTOPILOT
040518,000744:                                                                                                  #  CONTROL SAMPLE PERIOD/COMPUTATION PERIOD
040519,000745: 
040520,000746: 30,3775  30,3771               DELERLIM           =        DAY/2MAX                              #  10 DEG LIMIT FOR LAG ANGLES, 1'S, PI
040521,000747: 

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