Source Code

These source-code files are part of a reconstructed copy of LM131 revision 1, the final release of the Apollo 13 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The source reconstruction began with source code of Luminary 131 previously transcribed from a digitized copy of that program. A dump of the flight spare core rope memory module B5, part number 2010802-171, serial number RAY 411, was obtained. This module is the only module different between Luminary 131 and LM131 revision 1. The dump was disassembled and all changes were incorporated into these source files. Note that page numbers in the reconstructed code match those on the Luminary 131 printout, although the changed code would likely have changed page numbers for a real LM131 revision 1 listing.

Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

038756,000002:                                                                                                  ## Copyright:   Public domain.
038757,000003:                                                                                                  ## Filename:    FINDCDUW_-_GUIDAP_INTERFACE.agc
038758,000004:                                                                                                  ## Purpose:     A section of LM131 revision 1.
038759,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
038760,000006:                                                                                                  ##              release of the flight software for the Lunar Module's (LM)
038761,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13. The code has
038762,000008:                                                                                                  ##              been reconstructed from a listing of Luminary 131 and a dump
038763,000009:                                                                                                  ##              of a core rope memory module B5, part number 2010802-171,
038764,000010:                                                                                                  ##              which is the only module different between LM131 revision 1
038765,000011:                                                                                                  ##              and Luminary 131. The executable generated from this source
038766,000012:                                                                                                  ##              has been verified against the module dump, so while the names,
038767,000013:                                                                                                  ##              comments, and ordering may not be exactly correct, the
038768,000014:                                                                                                  ##              resulting binary is.
038769,000015:                                                                                                  ## Reference:   pp. 902-920
038770,000016:                                                                                                  ## Assembler:   yaYUL
038771,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
038772,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
038773,000019:                                                                                                  ## Mod history: 2022-10-28 MAS  Created from Luminary 131.
038774,000020: 

Page 902

038776,000022:                                                                                                  #  PROGRAM NAME:  FINDCDUW
038777,000023:                                                                                                  #  MOD NUMBER:  1        68 07 15
038778,000024:                                                                                                  #  MOD AUTHOR:  KLUMPP
038779,000025: 
038780,000026:                                                                                                  #  OBJECTS OF MOD:       1.      TO SUPPLY COMMANDED GIMBAL ANGLES FOR NOUN 22.
038781,000027:                                                                                                  #                        2.      TO MAINTAIN CORRECT AND CURRENT THRUST
038782,000028:                                                                                                  #                                DIRECTION DATA IN ALL MODES.  THIS IS DONE BY
038783,000029:                                                                                                  #                                FETCHING FOR THE THRUST DIRECTION FILTER THE
038784,000030:                                                                                                  #                                CDUD'S IN PNGCS-AUTO, THE CDU'S IN ALL OTHER
038785,000031:                                                                                                  #                                MODES.
038786,000032:                                                                                                  #                        3.      TO SUBSTITUTE A STOPRATE FOR THE NORMAL
038787,000033:                                                                                                  #                                AUTOPILOT COMMANDS WHENEVER
038788,000034:                                                                                                  #                                1) NOT IN PNGCS-AUTO, OR
038789,000035:                                                                                                  #                                2) ENGINE IS OFF.
038790,000036: 
038791,000037:                                                                                                  #  FUNCTIONAL DESCRIPTION:
038792,000038: 
038793,000039:                                                                                                  #  FINDCDUW PROVIDES THE INTERFACES BETWEEN THE VARIOUS POWERED FLITE GUIDANCE PROGRAMS
038794,000040:                                                                                                  #  AND THE DIGITAL AUTOPILOT.  THE INPUTS TO FINDCDUW ARE THE THRUST COMMAND VECTOR
038795,000041:                                                                                                  #  AND THE WINDOW COMMAND VECTOR, AND THE OUTPUTS ARE THE GIMBAL ANGLE
038796,000042:                                                                                                  #  INCREMENTS, THE COMMANDED ATTITUDE ANGLE RATES, AND THE COMMANDED
038797,000043:                                                                                                  #  ATTITUDE LAG ANGLES (WHICH ACCOUNT FOR THE ANGLES BY WHICH THE BODY WILL
038798,000044:                                                                                                  #  LAG BEHIND A RAMP COMMAND IN ATTITUDE ANGLE DUE TO THE FINITE ANGULAR
038799,000045:                                                                                                  #  ACCELERATIONS AVAILABLE).
038800,000046: 
038801,000047:                                                                                                  #  FINDCDUW ALINES THE ESTIMATED THRUST VECTOR FROM THE THRUST DIRECTION
038802,000048:                                                                                                  #  FILTER WITH THE THRUST COMMAND VECTOR, AND, WHEN XOVINHIB SET,
038803,000049:                                                                                                  #  ALINES THE +Z HALF OF THE LM ZX PLANE WITH THE WINDOW COMMAND VECTOR.
038804,000050: 

Page 903

038806,000052:                                                                                                  #  SPECIFICATIONS:
038807,000053: 
038808,000054:                                                                                                  #  INITIALIZATION:       A SINGLE INTERPRETIVE CALL TO INITCDUW IS REQUIRED
038809,000055:                                                                                                  #                        BEFORE EACH GUIDED MANEUVER USING FINDCDUW.
038810,000056: 
038811,000057:                                                                                                  #  CALL:                 INTERPRETIVE CALL TO FINDCDUW WITH THE THRUST COMMAND
038812,000058:                                                                                                  #                        VECTOR IN MPAC.  INTERPRETIVE CALL TO FINDCDUW -2 WITH
038813,000059:                                                                                                  #                        THE THRUST COMMAND VECTOR IN UNFC/2 AND NOT IN MPAC.
038814,000060: 
038815,000061:                                                                                                  #  RETURNS:              NORMAL INTERPRETIVE IN ALL CASES
038816,000062:                                                                                                  #                        1.      NORMALLY ALL AUTOPILOT CMDS ARE ISSUED.
038817,000063:                                                                                                  #                        2.      IF NOT PNGCS AUTO, DO STOPRATE AND RETURN
038818,000064:                                                                                                  #                                WITHOUT ISSUING AUTOPILOT CMDS.
038819,000065:                                                                                                  #                        3.      IF ENGINE OFF, DO STOPRATE AND RETURN WITHOUT
038820,000066:                                                                                                  #                                ISSUING AUTOPILOT CMDS.
038821,000067: 
038822,000068:                                                                                                  #  ALARMS:               00401   IF INPUTS DETERMINE AN ATTITUDE IN GIMBAL LOCK.
038823,000069:                                                                                                  #                                FINDCDUW DRIVES CDUXD AND CDUYD TO THE RQD VALUES,
038824,000070:                                                                                                  #                                BUT DRIVES CDUZD ONLY TO THE GIMBAL LOCK CONE.
038825,000071: 
038826,000072:                                                                                                  #                        00402   IF UNFC/2 OR UNWC/2 PRODUCE OVERFLOW WHEN
038827,000073:                                                                                                  #                                UNITIZED USING NORMUNIT.  FINDCDUW ISSUES
038828,000074:                                                                                                  #                                STOPRATE AS ONLY INPUT TO AUTOPILOT.
038829,000075: 
038830,000076:                                                                                                  #  INPUTS:               UNFC/2          THRUST COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
038831,000077:                                                                                                  #                        UNWC/2          WINDOW COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
038832,000078:                                                                                                  #                        OGABIAS         POSSIBLE BIAS FOR OUTER GIMBAL ANGLE (ZEROED IN INITCDUW), UNITS OF PI.
038833,000079:                                                                                                  #                        XOVINHIB        FLAG DENOTING X AXIS OVERRIDE INHIBITED.
038834,000080:                                                                                                  #                        CSMDOCKD        FLAG DENOTING CSM DOCKED.
038835,000081:                                                                                                  #                        STEERSW         FLAG DENOTING INSUFF THRUST FOR THRUST DIR FLTR.
038836,000082: 
038837,000083:                                                                                                  #  OUTPUTS:              DELCDUX,Y,Z
038838,000084:                                                                                                  #                        OMEGAPD,+1,+2
038839,000085:                                                                                                  #                        DELPEROR,+1,+2
038840,000086:                                                                                                  #                        CPHI,+1,+2 FOR NOUN22
038841,000087: 
038842,000088:                                                                                                  #  DEBRIS:               FINDCDUW DESTROYS SINCDUX,Y,Z AND COSCDUX,Y,Z BY
038843,000089:                                                                                                  #                        WRITING INTO THESE LOCATIONS THE SINES AND COSINES
038844,000090:                                                                                                  #                        OF THE CDUD'S IN PNGCS-AUTO, OF THE CDU'S OTHERWISE.
038845,000091: 

Page 904

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

Page 905

038892,000138:                                                                                                  #  FETCH BASIC DATA
038893,000139: 30,3123           00004                           INHINT                                         #  RELINT AT PAUTNO (TC INTPRET)
038894,000140: 
038895,000141: 30,3124           30032                           CA       CDUX                                  #  FETCH CDUX,CDUY,CDUZ IN ALL CASES, BUT
038896,000142: 30,3125           54771                           TS       CDUSPOTX                              #        REPLACE BELOW IF PNGCS AUTO
038897,000143: 30,3126           30033                           CA       CDUY                                  
038898,000144: 30,3127           54765                           TS       CDUSPOTY                              
038899,000145: 30,3130           30034                           CA       CDUZ                                  
038900,000146: 30,3131           54767                           TS       CDUSPOTZ                              
038901,000147: 
038902,000148: 30,3132           34742                           CA       BIT10                                 #  PNGCS CONTROL BIT
038903,000149: 30,3133           00006                           EXTEND                                         
038904,000150: 30,3134           02030                           RAND     CHAN30                                
038905,000151: 30,3135           10000                           CCS      A                                     
038906,000152: 30,3136           13153                           TCF      PAUTNO                                #  NOT PNGCS (BITS INVERTED)
038907,000153: 
038908,000154: 30,3137           34736                           CA       BIT14                                 #  AUTO MODE BIT
038909,000155: 30,3140           00006                           EXTEND                                         
038910,000156: 30,3141           02031                           RAND     CHAN31                                
038911,000157: 30,3142           10000                           CCS      A                                     
038912,000158: 30,3143           13153                           TCF      PAUTNO                                #  NOT AUTO (BITS INVERTED)
038913,000159: 
038914,000160: 30,3144           55651                           TS       FLPAUTNO                              #  RESET FLAG PNGCS AUTO NOT
038915,000161: 
038916,000162: 30,3145           31634                           CA       CDUXD                                 #  PNGCS AUTO:  FETCH CDUXD,CDUYD,CDUZD
038917,000163: 30,3146           54771                           TS       CDUSPOTX                              
038918,000164: 30,3147           31635                           CA       CDUYD                                 
038919,000165: 30,3150           54765                           TS       CDUSPOTY                              
038920,000166: 30,3151           31636                           CA       CDUZD                                 
038921,000167: 30,3152           54767                           TS       CDUSPOTZ                              
038922,000168: 

Page 906

038924,000170:                                                                                                  #  FETCH INPUTS
038925,000171: 30,3153           06042        PAUTNO             TC       INTPRET                               #  ENTERING THRUST CMD STILL IN MPAC
038926,000172: 30,3154           77634                           RTB                                            
038927,000173: 30,3155           21727                                    NORMUNIT                              
038928,000174: 30,3156           24001                           STOVL    UNX/2                                 #  SEMI-UNIT THRUST CMD AS INITIAL UNX/2
038929,000175: 30,3157           03261                                    UNWC/2                                
038930,000176: 30,3160           47034                           RTB      RTB                                   
038931,000177: 30,3161           21727                                    NORMUNIT                              
038932,000178: 30,3162           47617                                    QUICTRIG                              #  ALWAYS RQD TO OBTAIN TRIGS OF CDUD'S
038933,000179: 30,3163           24015                           STOVL    UNZ/2                                 #  SEMI-UNIT WINDOW CMD AS INITIAL UNZ/2
038934,000180: 30,3164           00325                                    DELV                                  
038935,000181: 30,3165           53404                           BOVB     UNIT                                  
038936,000182: 30,3166           61741                                    NOATTCNT                              #  AT LEAST ONE ENTERING CMD VCT ZERO
038937,000183: 30,3167           45000                           BOV      CALL                                  
038938,000184: 30,3170           61204                                    AFTRFLTR                              #  IF UNIT DELV OVERFLOWS, SKIP FILTER
038939,000185: 30,3171           47673                                    *SMNB*                                #  YIELDS UNIT(DELV) IN VEH COORDS FOR FLTR
038940,000186: 
038941,000187:                                                                                                  #  THRUST DIRECTION FILTER
038942,000188: 
038943,000189: 30,3172           77776                           EXIT                                           
038944,000190: 
038945,000191: 30,3173           31670                           CA       UNFVY/2                               #  FOR RESTARTS, UNFV/2 ALWAYS INTACT, MPAC
038946,000192: 30,3174           22157                           LXCH     MPAC       +3                         #        RENEWED AFTER RETURN FROM CALLER,
038947,000193: 30,3175           03474                           TC       FLTRSUB                               #        TWO FILTER UPDATES MAY BE DONE.
038948,000194: 30,3176           55670                           TS       UNFVY/2                               #  UNFV/2 NEED NOT BE EXACTLY SEMI-UNIT.
038949,000195: 
038950,000196: 30,3177           31672                           CA       UNFVZ/2                               
038951,000197: 30,3200           22161                           LXCH     MPAC       +5                         
038952,000198: 30,3201           03474                           TC       FLTRSUB                               
038953,000199: 30,3202           55672                           TS       UNFVZ/2                               
038954,000200: 
038955,000201: 30,3203           06042                           TC       INTPRET                               #  COMPLETES FILTER
038956,000202: 

Page 907

038958,000204:                                                                                                  #  FIND A SUITABLE WINDOW POINTING VECTOR
038959,000205: 
038960,000206: 30,3204           46135        AFTRFLTR           SLOAD    BHIZ                                  #  IF XOV NOT INHIBITED, GO FETCH ZNB
038961,000207: 30,3205           03251                                    FLAGOODW                              
038962,000208: 30,3206           61212                                    FETCHZNB                              
038963,000209: 30,3207           45175                           VLOAD    CALL                                  
038964,000210: 30,3210           00015                                    UNZ/2                                 
038965,000211: 30,3211           61514                                    UNWCTEST                              
038966,000212: 
038967,000213: 30,3212           77775        FETCHZNB           VLOAD                                          
038968,000214: 30,3213           02162                                    ZNBPIP                                
038969,000215: 30,3214           34015                           STCALL   UNZ/2                                 
038970,000216: 30,3215           61514                                    UNWCTEST                              
038971,000217: 
038972,000218: 30,3216           57575                           VLOAD    VCOMP                                 #  Z AND -X CAN'T BOTH PARALLEL UNFC/2
038973,000219: 30,3217           02146                                    XNBPIP                                
038974,000220: 30,3220           00015                           STORE    UNZ/2                                 
038975,000221: 
038976,000222:                                                                                                  #  COMPUTE THE REQUIRED DIRECTION COSINE MATRIX
038977,000223: 
038978,000224: 30,3221           47375        DCMCL              VLOAD    VXV                                   
038979,000225: 30,3222           00015                                    UNZ/2                                 
038980,000226: 30,3223           00001                                    UNX/2                                 
038981,000227: 30,3224           41456                           UNIT     PUSH                                  #  UNY/2 FIRST ITERATION
038982,000228: 30,3225           76435                           VXV      VSL1                                  
038983,000229: 30,3226           00001                                    UNX/2                                 
038984,000230: 30,3227           00015                           STORE    UNZ/2                                 #  -UNZ/2 FIRST ITERATION
038985,000231: 30,3230           63361                           VXSC     PDVL                                  #  EXCHANGE -UNFVZ/2 UNZ/2 FOR UNY/2
038986,000232: 30,3231           03273                                    UNFVZ/2                               #  MUST BE SMALL
038987,000233: 30,3232           51361                           VXSC     BVSU                                  #  YIELDS -UNFVY/2 UNY/2-UNFVZ/2 UNZ/2
038988,000234: 30,3233           03271                                    UNFVY/2                               #  MUST BE SMALL
038989,000235: 30,3234           53372                           VSL1     VAD                                   
038990,000236: 30,3235           00001                                    UNX/2                                 
038991,000237: 30,3236           77656                           UNIT                                           #  TOTALLY ELIMINATES THRUST POINTING ERROR
038992,000238: 30,3237           00001                           STORE    UNX/2                                 #  UNX/2
038993,000239: 30,3240           76435                           VXV      VSL1                                  
038994,000240: 30,3241           00015                                    UNZ/2                                 #  -UNZ/2 WAS STORED HERE REMEMBER
038995,000241: 30,3242           00007                           STORE    UNY/2                                 #  UNY/2
038996,000242: 30,3243           47276                           VCOMP    VXV                                   
038997,000243: 30,3244           00001                                    UNX/2                                 
038998,000244: 30,3245           77772                           VSL1                                           
038999,000245: 30,3246           00015                           STORE    UNZ/2                                 #  UNZ/2
039000,000246: 

Page 908

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

Page 909

039053,000299: 30,3315           10142                           CCS      TEM2                                  
039054,000300: 30,3316           13271                           TCF      DELGMBLP                              
039055,000301: 

Page 910

039057,000303:                                                                                                  #  BRANCHES TO NOATTCNT
039058,000304: 30,3317           11651                           CCS      FLPAUTNO                              
039059,000305: 30,3320           13743                           TCF      NOATTCNT   +2                         #  NOT PNGCS AUTO
039060,000306: 
039061,000307: 30,3321           30101                           CA       FLAGWRD5                              
039062,000308: 30,3322           74745                           MASK     ENGONBIT                              
039063,000309: 30,3323           00006                           EXTEND                                         
039064,000310: 30,3324           13743                           BZF      NOATTCNT   +2                         #  ENGINE NOT ON
039065,000311: 

Page 911

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

Page 912

039119,000365:                                                                                                  #  COMPUTE COMMANDED ATTITUDE RATES
039120,000366: 
039121,000367:                                                                                                  #        * OMEGAPD *   * -2         -4 SINCDUZ              +0    * * -DELGMBX *
039122,000368:                                                                                                  #        *         *   *                                          * *          *
039123,000369:                                                                                                  #        * OMEGAQD * = * +0     -8 COSCDUZ COSCDUX     -4 SINCDUX * * -DELGMBY *
039124,000370:                                                                                                  #        *         *   *                                          * *          *
039125,000371:                                                                                                  #        * OMEGARD *   * +0     +8 COSCDUZ SINCDUX     -4 COSCDUX * * -DELGMBZ *
039126,000372: 
039127,000373:                                                                                                  #  ATTITUDE ANGLE RATES IN UNITS OF PI/4 RAD/SEC = K TRIG FCNS IN UNITS OF 2 X GIMBAL ANGLE RATES IN UNITS OF
039128,000374:                                                                                                  #  PI/2 RAD/SEC.  THE CONSTANTS ARE BASED ON DELGMB BEING THE GIMBAL ANGLE CHANGES IN UNITS OF PI RADIANS,
039129,000375:                                                                                                  #  AND 2 SECONDS BEING THE COMPUTATION PERIOD (THE PERIOD BETWEEN SUCCESSIVE PASSES THRU FINDCDUW).
039130,000376: 
039131,000377: 30,3367           41674                           CS       -DELGMB                               
039132,000378: 30,3370           55642                           TS       OMEGAPD                               
039133,000379: 30,3371           41675                           CS       -DELGMB    +1                         
039134,000380: 30,3372           00006                           EXTEND                                         
039135,000381: 30,3373           70737                           MP       SINCDUZ                               
039136,000382: 30,3374           20001                           DDOUBL                                         
039137,000383: 30,3375           27642                           ADS      OMEGAPD                               
039138,000384: 30,3376           27642                           ADS      OMEGAPD                               
039139,000385: 
039140,000386: 30,3377           41675                           CS       -DELGMB    +1                         
039141,000387: 30,3400           00006                           EXTEND                                         
039142,000388: 30,3401           70747                           MP       COSCDUX                               
039143,000389: 30,3402           20001                           DDOUBL                                         
039144,000390: 30,3403           00006                           EXTEND                                         
039145,000391: 30,3404           70745                           MP       COSCDUZ                               
039146,000392: 30,3405           55643                           TS       OMEGAQD                               
039147,000393: 30,3406           41676                           CS       -DELGMB    +2                         
039148,000394: 30,3407           00006                           EXTEND                                         
039149,000395: 30,3410           70741                           MP       SINCDUX                               
039150,000396: 30,3411           27643                           ADS      OMEGAQD                               
039151,000397: 30,3412           27643                           ADS      OMEGAQD                               
039152,000398: 30,3413           27643                           ADS      OMEGAQD                               
039153,000399: 
039154,000400: 30,3414           31675                           CA       -DELGMB    +1                         
039155,000401: 30,3415           00006                           EXTEND                                         
039156,000402: 30,3416           70741                           MP       SINCDUX                               
039157,000403: 30,3417           20001                           DDOUBL                                         
039158,000404: 30,3420           00006                           EXTEND                                         
039159,000405: 30,3421           70745                           MP       COSCDUZ                               
039160,000406: 30,3422           55644                           TS       OMEGARD                               
039161,000407: 30,3423           41676                           CS       -DELGMB    +2                         
039162,000408: 30,3424           00006                           EXTEND                                         
039163,000409: 30,3425           70747                           MP       COSCDUX                               
039164,000410: 30,3426           27644                           ADS      OMEGARD                               
039165,000411: 30,3427           27644                           ADS      OMEGARD                               
039166,000412: 30,3430           27644                           ADS      OMEGARD                               
039167,000413: 

Page 913

039169,000415:                                                                                                  #  FINAL TRANSFER
039170,000416: 
039171,000417: 30,3431           34752                           CA       TWO                                   
039172,000418: 30,3432           54142        CDUWXFR            TS       TEM2                                  
039173,000419: 30,3433           50142                           INDEX    TEM2                                  
039174,000420: 30,3434           31674                           CA       -DELGMB                               
039175,000421: 30,3435           00006                           EXTEND                                         
039176,000422: 30,3436           73765                           MP       DT/DELT                               #  RATIO OF DAP INTERVAL TO CDUW INTERVAL
039177,000423: 30,3437           03734                           TC       ONESTO2S                              
039178,000424: 30,3440           50142                           INDEX    TEM2                                  
039179,000425: 30,3441           55637                           TS       DELCDUX                               #  ANGLE INTERFACE
039180,000426: 
039181,000427: 30,3442           50142                           INDEX    TEM2                                  
039182,000428: 30,3443           11642                           CCS      OMEGAPD                               
039183,000429: 30,3444           64753                           AD       ONE                                   
039184,000430: 30,3445           13447                           TCF      +2                                    
039185,000431: 30,3446           64753                           AD       ONE                                   
039186,000432: 30,3447           00006                           EXTEND                                         #  WE NOW HAVE ABS(OMEGAPD,QD,RD)
039187,000433: 30,3450           50142                           INDEX    TEM2                                  
039188,000434: 30,3451           71642                           MP       OMEGAPD                               
039189,000435: 30,3452           00006                           EXTEND                                         
039190,000436: 30,3453           74741                           MP       BIT11                                 #  1/16
039191,000437: 30,3454           00006                           EXTEND                                         
039192,000438: 30,3455           50142                           INDEX    TEM2                                  #                    2
039193,000439: 30,3456           11530                           DV       1JACC                                 #  UNITS PI/4 RAD/SEC
039194,000440: 30,3457           54001                           TS       L                                     
039195,000441: 30,3460           33762                           CA       DELERLIM                              
039196,000442: 30,3461           03720                           TC       LIMITSUB                              
039197,000443: 30,3462           50142                           INDEX    TEM2                                  
039198,000444: 30,3463           55274                           TS       DELPEROR                              #  LAG ANGLE = OMEGA ABS(OMEGA)/2 ACCEL
039199,000445: 30,3464           10142                           CCS      TEM2                                  
039200,000446: 30,3465           13432                           TCF      CDUWXFR                               
039201,000447: 
039202,000448:                                                                                                  #  HAUSKEEPING AND RETURN
039203,000449: 
039204,000450: 30,3466           31645        TCQCDUW            CA       ECDUWUSR                              
039205,000451: 30,3467           54003                           TS       EBANK                                 #  RETURN USER'S EBANK
039206,000452: 
039207,000453: 30,3470           06042                           TC       INTPRET                               
039208,000454: 30,3471           52001                           SETPD    GOTO                                  
039209,000455: 30,3472           00001                                    0                                     
039210,000456: 30,3473           03246                                    QCDUWUSR                              #  NORMAL AND ABNORMAL RETURN TO USER
039211,000457: 

Page 914

039213,000459:                                                                                                  #  THRUST VECTOR FILTER SUBROUTINE
039214,000460: 
039215,000461: 30,3474           00006        FLTRSUB            EXTEND                                         
039216,000462: 30,3475           22142                           QXCH     TEM2                                  
039217,000463: 30,3476           54143                           TS       TEM3                                  #  SAVE ORIGINAL OFFSET
039218,000464: 30,3477           40000                           COM                                            #  ONE MCT, NO WDS, CAN BE SAVED IF NEG OF
039219,000465: 30,3500           60001                           AD       L                                     #        ORIG OFFSET ARRIVES IN A, BUT IT'S
039220,000466: 30,3501           00006                           EXTEND                                         #        NOT WORTH THE INCREASED OBSCURITY.
039221,000467: 30,3502           51647                           INDEX    NDXCDUW                               
039222,000468: 30,3503           73753                           MP       GAINFLTR                              
039223,000469: 30,3504           54001                           TS       L                                     #  INCR TO OFFSET, UNLIMITED
039224,000470: 30,3505           33755                           CA       DUNFVLIM                              #  SAME LIMIT FOR Y AND Z
039225,000471: 30,3506           03720                           TC       LIMITSUB                              #  YIELDS INCR TO OFFSET, LIMITED
039226,000472: 30,3507           60143                           AD       TEM3                                  #  ORIGINAL OFFSET
039227,000473: 30,3510           54001                           TS       L                                     #  TOTAL OFFSET, UNLIMITED
039228,000474: 30,3511           33756                           CA       UNFVLIM                               #  SAME LIMIT FOR Y AND Z
039229,000475: 30,3512           03720                           TC       LIMITSUB                              #  YIELDS TOTAL OFFSET, LIMITED
039230,000476: 30,3513           00142                           TC       TEM2                                  
039231,000477: 
039232,000478:                                                                                                  #  SUBR TO TEST THE ANGLE BETWEEN THE PROPOSED WINDOW AND THRUST CMD VCTS
039233,000479: 
039234,000480: 30,3514           63441        UNWCTEST           DOT      DSQ                                   
039235,000481: 30,3515           00001                                    UNX/2                                 
039236,000482: 30,3516           50025                           DSU      BMN                                   
039237,000483: 30,3517           21760                                    DOTSWFMX                              
039238,000484: 30,3520           61221                                    DCMCL                                 
039239,000485: 30,3521           43531                           SSP      RVQ                                   #  RVQ FOR ALT CHOICE IF DOT MAGN TOO LARGE
039240,000486: 30,3522           03251                                    FLAGOODW                              #        ZEROING WINDOW GOOD FLAG
039241,000487: 30,3523           00000                                    0                                     
039242,000488: 

Page 915

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

Page 916

039294,000540:                                                                                                  #  THE ELEMENTS OF THE NAV BASE MATRIX WHICH WE MUST DIVIDE BY COS(MGA)
039295,000541:                                                                                                  #  ALREADY CONTAIN COS(MGA)/2 AS A FACTOR. THEREFORE THE QUOTIENT SHOULD
039296,000542:                                                                                                  #  ORDINARILY NEVER EXCEED 1/2 IN MAGNITUDE.  BUT IF THE MGA IS NEAR PI/2
039297,000543:                                                                                                  #  THEN COS(MGA) IS NEAR ZERO, AND THERE MAY BE SOME CHAFF IN THE OTHER
039298,000544:                                                                                                  #  ELEMENTS OF THE MATRIX WHICH WOULD PRODUCE CHAOS UNDER DIVISION.
039299,000545:                                                                                                  #  BEFORE DIVIDING WE MAKE SURE COS(MGA) IS AT LEAST ONE BIT LARGER
039300,000546:                                                                                                  #  THAN THE MAGNITUDE OF THE HIGH ORDER PART OF THE OPERAND.
039301,000547: 
039302,000548:                                                                                                  #  IF ONE OR MORE DIVIDES CANNOT BE PERFORMED, THIS MEANS THAT THE
039303,000549:                                                                                                  #  REQUIRED MGA IS VERY NEARLY +-PI/2 AND THEREFORE THE OTHER GIMBAL
039304,000550:                                                                                                  #  ANGLES ARE INDETERMINATE.  THE INNER AND OUTER GIMBAL ANGLES RETURNED
039305,000551:                                                                                                  #  IN THIS CASE WILL BE RANDOM MULTIPLES OF PI/2.
039306,000552: 
039307,000553: 30,3571           60120        DVBYCOSM           AD       FIXLOC                                
039308,000554: 30,3572           54116                           TS       ADDRWD                                #  ADRES OF OPERAND
039309,000555: 
039310,000556: 30,3573           50116                           INDEX    ADDRWD                                #  FETCH NEG ABS OF OPERAND, AD TEM5, AND
039311,000557: 30,3574           30000                           CA       0                                     #        SKIP DIVIDE IF RESULT NEG OR ZERO
039312,000558: 30,3575           00006                           EXTEND                                         
039313,000559: 30,3576           63600                           BZMF     +2                                    
039314,000560: 30,3577           40000                           COM                                            
039315,000561: 30,3600           60145                           AD       TEM5                                  #  C(A) ZERO OR NEG, C(TEM5) ZERO OR POS
039316,000562: 30,3601           00006                           EXTEND                                         
039317,000563: 30,3602           63610                           BZMF     TSL&TCQ                               #  DIFFERENCE ALWAYS SMALL IF BRANCH
039318,000564: 
039319,000565: 30,3603           00006                           EXTEND                                         #  TEM5 EXCEEDS ABS HIGH ORDER PART OF
039320,000566: 30,3604           50116                           INDEX    ADDRWD                                #        OPERAND BY AT LEAST ONE BIT.
039321,000567: 30,3605           30001                           DCA      0                                     #        THEREFORE IT EXCEEDS THE DP OPERAND
039322,000568: 30,3606           00006                           EXTEND                                         #        AND DIVISION WILL ALWAYS SUCCEED.
039323,000569: 30,3607           10145                           DV       TEM5                                  
039324,000570: 30,3610           54001        TSL&TCQ            TS       L                                     
039325,000571: 30,3611           22141                           LXCH     TEM1                                  
039326,000572: 30,3612           00002                           TC       Q                                     
039327,000573: 

Page 917

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

Page 918

039379,000625:                                                                                                  #  SPARCSIN TAKES AN ARGUMENT SCALED UNITY IN A AND RETURNS AN ANGLE SCALED
039380,000626:                                                                                                  #  180 DEGREES IN A.  IT HAS BEEN UNIT TESTED IN THE REGION +-.94 (+-70
039381,000627:                                                                                                  #  DEGREES) AND THE MAXIMUM ERROR IS +-5 BITS WITH AN AVERAGE TIME OF
039382,000628:                                                                                                  #  450 MICROSECONDS.  SPARCSIN -1 TAKES THE ARGUMENT SCALED TWO.  (BOB CRISP)
039383,000629: 
039384,000630: 30,3663           60000                           DOUBLE                                         
039385,000631: 30,3664           54021        SPARCSIN           TS       SR                                    
039386,000632: 30,3665           13671                           TCF      +4                                    
039387,000633: 30,3666           50000                           INDEX    A                                     
039388,000634: 30,3667           44734                           CS       LIMITS                                
039389,000635: 30,3670           54021                           TS       SR                                    
039390,000636: 30,3671           00006                           EXTEND                                         
039391,000637: 30,3672           70000                           MP       A                                     
039392,000638: 30,3673           54141                           TS       TEM1                                  
039393,000639: 30,3674           00006                           EXTEND                                         
039394,000640: 30,3675           73717                           MP       DPL9                                  
039395,000641: 30,3676           63716                           AD       DPL7                                  
039396,000642: 30,3677           00006                           EXTEND                                         
039397,000643: 30,3700           70141                           MP       TEM1                                  
039398,000644: 30,3701           63715                           AD       DPL5                                  
039399,000645: 30,3702           00006                           EXTEND                                         
039400,000646: 30,3703           70141                           MP       TEM1                                  
039401,000647: 30,3704           63714                           AD       DPL3                                  
039402,000648: 30,3705           00006                           EXTEND                                         
039403,000649: 30,3706           70141                           MP       TEM1                                  
039404,000650: 30,3707           63713                           AD       DPL1                                  
039405,000651: 30,3710           00006                           EXTEND                                         
039406,000652: 30,3711           70021                           MP       SR                                    
039407,000653: 30,3712           00002                           TC       Q                                     
039408,000654: 30,3713           24406        DPL1               DEC      10502      B-14                       
039409,000655: 30,3714           00660        DPL3               DEC      432        B-14                       
039410,000656: 30,3715           16204        DPL5               DEC      7300       B-14                       
039411,000657: 30,3716           50744        DPL7               DEC      -11803     B-14                       
039412,000658: 30,3717           20315        DPL9               DEC      8397       B-14                       
039413,000659: 

Page 919

039415,000661:                                                                                                  #  LIMITSUB LIMITS THE MAGNITUDE OF THE POSITIVE OR NEGATIVE VARIABLE
039416,000662:                                                                                                  #  ARRIVING IN L TO THE POSITIVE LIMIT ARRIVING IN A.
039417,000663:                                                                                                  #  THE SIGNED LIMITED VARIABLE IS RETURNED IN A.
039418,000664: 
039419,000665:                                                                                                  #  VERSION COURTESY HUGH BLAIR-SMITH
039420,000666: 
039421,000667: 30,3720           54141        LIMITSUB           TS       TEM1                                  
039422,000668: 30,3721           34755                           CA       ZERO                                  
039423,000669: 30,3722           00006                           EXTEND                                         
039424,000670: 30,3723           10141                           DV       TEM1                                  
039425,000671: 30,3724           10000                           CCS      A                                     
039426,000672: 30,3725           22141                           LXCH     TEM1                                  
039427,000673: 30,3726           13730                           TCF      +2                                    
039428,000674: 30,3727           13732                           TCF      +3                                    
039429,000675: 30,3730           30001                           CA       L                                     
039430,000676: 30,3731           00002                           TC       Q                                     
039431,000677: 30,3732           40141                           CS       TEM1                                  
039432,000678: 30,3733           00002                           TC       Q                                     
039433,000679: 
039434,000680:                                                                                                  #  SUBROUTINE TO CONVERT 1'S COMP SP TO 2'S COMP
039435,000681: 
039436,000682: 30,3734           10000        ONESTO2S           CCS      A                                     
039437,000683: 30,3735           64753                           AD       ONE                                   
039438,000684: 30,3736           00002                           TC       Q                                     
039439,000685: 30,3737           40000                           CS       A                                     
039440,000686: 30,3740           00002                           TC       Q                                     
039441,000687: 
039442,000688:                                                                                                  #  NO ATTITUDE CONTROL
039443,000689: 
039444,000690: 30,3741           05567        NOATTCNT           TC       ALARM                                 
039445,000691: 30,3742           00402                           OCT      00402                                 #  NO ATTITUDE CONTROL
039446,000692: 
039447,000693: 30,3743           00004                 +2        INHINT                                         #  COME HERE FOR NOATTCNT WITHOUT ALARM
039448,000694: 30,3744           04674                           TC       IBNKCALL                              #  RELINT AT TC INTPRET AFTER TCQCDUW
039449,000695: 30,3745           40166                           FCADR    STOPRATE                              
039450,000696: 30,3746           13466                           TCF      TCQCDUW                               #  RETURN TO USER SKIPPING AUTOPILOT CMDS
039451,000697: 
039452,000698:                                                                                                  #  MIDDLE GIMBAL ANGLE ALARM
039453,000699: 
039454,000700: 30,3747           05567        ALARMMGA           TC       ALARM                                 
039455,000701: 30,3750           00401                           OCT      00401                                 
039456,000702: 30,3751           13266                           TCF      MGARET                                
039457,000703: 

Page 920

039459,000705:                                                                                                  # ************************************************************************
039460,000706:                                                                                                  #  CONSTANTS
039461,000707:                                                                                                  # ************************************************************************
039462,000708: 
039463,000709:                                                                                                  #  ADDRESS CONSTANTS
039464,000710: 
039465,000711: 30,3752           03245        ECDUWL             ECADR    ECDUW                                 
039466,000712: 
039467,000713:                                                                                                  #  THRUST DIRECTION FILTER CONSTANTS
039468,000714: 
039469,000715: 30,3753           06315        GAINFLTR           DEC      .2                                    #  GAIN FILTER SANS CSM
039470,000716: 30,3754           03146                           DEC      .1                                    #  GAIN FILTER WITH CSM
039471,000717: 
039472,000718: 30,3755           00071        DUNFVLIM           DEC      .007       B-1                        #  7 MR MAX CHG IN F DIR IN VEH IN 2 SECS.
039473,000719:                                                                                                  #  THIS DOES NOT ALLOW FOR S/C ROT RATE.
039474,000720: 
039475,000721: 30,3756           02041        UNFVLIM            DEC      .129       B-1                        #  129 MR MAX THRUST OFFSET.  105 MR TRAVEL
039476,000722:                                                                                                  #  +10MR DEFL+5MR MECH MOUNT+9MR ABLATION.
039477,000723: 
039478,000724:                                                                                                  #  CONSTANTS RELATED TO GIMBAL ANGLE COMPUTATIONS
039479,000725: 
039480,000726: 30,3757           01673        DOTSWFMX           DEC      .93302     B-4                        #  LIM COLNRTY OF UNWC/2 & UNFC/2 TO 85 DEG
039481,000727:                                                                                                  #  LOWER PART COMES FROM NEXT CONSTANT
039482,000728: 
039483,000729: 30,3760           03434        DAXMAX             DEC      .11111111111                            #  DELATTX LIM TO 20 DEG IN 2 SECS, 1'S, PI
039484,000730: 30,3761           00266                           DEC      .0111111111                            #  2 DEG WHEN CSM DOCKED
039485,000731: 
039486,000732: 30,3762           01616        DAY/2MAX           DEC      .05555555555                            #  LIKEWISE FOR DELATTY
039487,000733: 30,3763           00133                           DEC      .0055555555                            
039488,000734: 
039489,000735: 30,3764  30,3760               DAZMAX             =        DAXMAX                                #  LIKEWISE FOR DELATTZ
039490,000736: 
039491,000737: 30,3764           14344        CDUZDLIM           DEC      .3888888888                            #  70 DEG LIMIT FOR MGA, 1'S, PI
039492,000738: 
039493,000739:                                                                                                  #  CONSTANTS FOR DATA TRANSFER
039494,000740: 
039495,000741: 30,3765           01463        DT/DELT            DEC      .05                                   #  .1 SEC/2 SEC WHICH IS THE AUTOPILOT
039496,000742:                                                                                                  #  CONTROL SAMPLE PERIOD/COMPUTATION PERIOD
039497,000743: 
039498,000744: 30,3766  30,3762               DELERLIM           =        DAY/2MAX                              #  10 DEG LIMIT FOR LAG ANGLES, 1'S, PI
039499,000745: 

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