Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

040075,000002:                                                                                                  ## Copyright:   Public domain.
040076,000003:                                                                                                  ## Filename:    FINDCDUW_-_GUIDAP_INTERFACE.agc
040077,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
040078,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
040079,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
040080,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
040081,000008:                                                                                                  ##              that the code format has been changed to conform to the
040082,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
040083,000010:                                                                                                  ##              original YUL assembler.
040084,000011:                                                                                                  ## Reference:   pp. 905-922
040085,000012:                                                                                                  ## Assembler:   yaYUL
040086,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
040087,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
040088,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
040089,000016:                                                                                                  ##              2016-12-09 HG   Transcribed
040090,000017:                                                                                                  ##              2016-12-12 MAS  Pushed in a +1 relative label.
040091,000018:                                                                                                  ##              2016-12-25 RSB  Comment-text proofed using ProoferComments
040092,000019:                                                                                                  ##                              and corrected errors found.
040093,000020:                                                                                                  ##              2017-03-10 RSB  Comment-text fixes noted in proofing Luminary 116.
040094,000021: 

Page 905

040096,000023:                                                                                                  #  PROGRAM NAME:   FINDCDUW
040097,000024: 
040098,000025:                                                                                                  #  MOD NUMBER:     1         68 07 15
040099,000026: 
040100,000027:                                                                                                  #  MOD AUTHOR:     KLUMPP
040101,000028: 
040102,000029:                                                                                                  #  OBJECTS OF MOD: 1.        TO SUPPLY COMMANDED GIMBAL ANGLES FOR NOUN 22.
040103,000030:                                                                                                  #                  2.        TO MAINTAIN CORRECT AND CURRENT THRUST
040104,000031:                                                                                                  #                            DIRECTION DATA IN ALL MODES.  THIS IS DONE BY
040105,000032:                                                                                                  #                            FETCHING FOR THE THRUST DIRECTION FILTER THE
040106,000033:                                                                                                  #                            CDUD'S IN PNGCS-AUTO, THE CDU'S IN ALL OTHER
040107,000034:                                                                                                  #                            MODES.
040108,000035:                                                                                                  #                  3.        TO SUBSTITUTE A STOPRATE FOR THE NORMAL
040109,000036:                                                                                                  #                            AUTOPILOT COMMANDS WHENEVER
040110,000037:                                                                                                  #                            1) NOT IN PNGCS-AUTO, OR
040111,000038:                                                                                                  #                            2) ENGINE IS OFF.
040112,000039: 
040113,000040:                                                                                                  #  MOD NUMBER:     2         10 DECEMBER 1970
040114,000041: 
040115,000042:                                                                                                  #  MOD AUTHOR:     P. S. WEISSMAN
040116,000043: 
040117,000044:                                                                                                  #  OBJECTIVE OF MOD:  TO ISSUE STEERING COMMANDS TO THE DAP EVEN WHEN AGS IS INDICATED (IN CASE THE INDICA-
040118,000045:                                                                                                  #                     TION IS FALSE).
040119,000046: 
040120,000047: 
040121,000048:                                                                                                  #  FUNCTIONAL DESCRIPTION:
040122,000049: 
040123,000050:                                                                                                  #  FINDCDUW PROVIDES THE INTERFACES BETWEEN THE VARIOUS POWERED FLITE GUIDANCE PROGRAMS
040124,000051:                                                                                                  #  AND THE DIGITAL AUTOPILOT.  THE INPUTS TO FINDCDUW ARE THE THRUST COMMAND VECTOR
040125,000052:                                                                                                  #  AND THE WINDOW COMMAND VECTOR, AND THE OUTPUTS ARE THE GIMBAL ANGLE
040126,000053:                                                                                                  #  INCREMENTS, THE COMMANDED ATTITUDE ANGLE RATES, AND THE COMMANDED
040127,000054:                                                                                                  #  ATTITUDE LAG ANGLES (WHICH ACCOUNT FOR THE ANGLES BY WHICH THE BODY WILL
040128,000055:                                                                                                  #  LAG BEHIND A RAMP COMMAND IN ATTITUDE ANGLE DUE TO THE FINITE ANGULAR
040129,000056:                                                                                                  #  ACCELERATIONS AVAILABLE).
040130,000057: 
040131,000058:                                                                                                  #  FINDCDUW ALINES THE ESTIMATED THRUST VECTOR FROM THE THRUST DIRECTION
040132,000059:                                                                                                  #  FILTER WITH THE THRUST COMMAND VECTOR, AND, WHEN  XOVINHIB  SET,
040133,000060:                                                                                                  #  ALINES THE +Z HALF OF THE LM ZX PLANE WITH THE WINDOW COMMAND VECTOR.
040134,000061: 

Page 906

040136,000063:                                                                                                  #  SPECIFICATIONS:
040137,000064: 
040138,000065:                                                                                                  #  INITIALIZATION: A SINGLE INTERPRETIVE CALL TO  INITCDUW  IS REQUIRED
040139,000066:                                                                                                  #                  BEFORE EACH GUIDED MANEUVER USING FINDCDUW.
040140,000067: 
040141,000068:                                                                                                  #  CALL:           INTERPRETIVE CALL TO FINDCDUW WITH THE THRUST COMMAND
040142,000069:                                                                                                  #                  VECTOR IN MPAC.  INTERPRETIVE CALL TO FINDCDUW -2 WITH
040143,000070:                                                                                                  #                  THE THRUST COMMAND VECTOR IN UNFC/2 AND NOT IN MPAC.
040144,000071: 
040145,000072:                                                                                                  #  RETURNS:        NORMAL INTERPRETIVE IN ALL CASES
040146,000073: 
040147,000074:                                                                                                  #                  1.       NORMALLY ALL AUTOPILOT CMDS ARE ISSUED.
040148,000075: 
040149,000076:                                                                                                  #                  2.       IF NOT PNGCS AUTO, DO STOPRATE AND RETURN
040150,000077:                                                                                                  #                           WITHOUT ISSUING AUTOPILOT CMDS.
040151,000078: 
040152,000079:                                                                                                  #                  3.       IF ENGINE OFF, DO STOPRATE AND RETURN WITHOUT
040153,000080:                                                                                                  #                           ISSUING AUTOPILOT CMDS.
040154,000081: 
040155,000082:                                                                                                  #  ALARMS:         00401 IF INPUTS DETERMINE AN ATTITUDE IN GIMBAL LOCK.
040156,000083:                                                                                                  #                           FINDCDUW DRIVES CDUXD AND CDUYD TO THE RQD VALUES,
040157,000084:                                                                                                  #                           BUT DRIVES CDUZD ONLY TO THE GIMBAL LOCK CONE.
040158,000085:                                                                                                  #                  00402 IF UNFC/2 OR UNWC/2 PRODUCE OVERFLOW WHEN
040159,000086:                                                                                                  #                           UNITIZED USING NORMUNIT.  FINDCDUW ISSUES
040160,000087:                                                                                                  #                           STOPRATE AS ONLY INPUT TO AUTOPILOT.
040161,000088: 
040162,000089:                                                                                                  #  INPUTS:         UNFC/2   THRUST COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
040163,000090:                                                                                                  #                  UNWC/2   WINDOW COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
040164,000091:                                                                                                  #                  OGABIAS  POSSIBLE BIAS FOR OUTER GIMBAL ANGLE (ZEROED IN INITCDUW), UNITS OF PI.
040165,000092:                                                                                                  #                  XOVINHIB FLAG DENOTING X AXIS OVERRIDE INHIBITED.
040166,000093:                                                                                                  #                  CSMDOCKD FLAG DENOTING CSM DOCKED.
040167,000094: 
040168,000095:                                                                                                  #  OUTPUTS:        DELCDUX,Y,Z
040169,000096:                                                                                                  #                  OMEGAPD,+1,+2
040170,000097:                                                                                                  #                  DELPEROR,+1,+2
040171,000098:                                                                                                  #                  CPHI,+1,+2 FOR NOUN22
040172,000099: 
040173,000100:                                                                                                  #  DEBRIS:         FINDCDUW DESTROYS SINCDUX,Y,Z AND COSCDUX,Y,Z BY
040174,000101:                                                                                                  #                  WRITING INTO THESE LOCATIONS THE SINES AND COSINES
040175,000102:                                                                                                  #                  OF THE CDUD'S IN PNGCS-AUTO, OF THE CDU'S OTHERWISE.
040176,000103: 

Page 907

040178,000105:                                                                                                  #  INITIALIZATION FOR FINDCDUW
040179,000106: 
040180,000107: 30,3063                                           BANK     30                                    
040181,000108: 30,2000                                           SETLOC   FCDUW                                 
040182,000109: 30,2000                                           BANK                                           
040183,000110: 
040184,000111: 30,3063  E6,1645                                  EBANK=   ECDUW                                 
040185,000112: 
040186,000113: 30,3063                                           COUNT*   $$/FCDUW                              
040187,000114: 
040188,000115: 30,3063           77331        INITCDUW           SSP      VLOAD                                 
040189,000116: 30,3064           03277                                    OGABIAS                               
040190,000117: 30,3065           00000                                    0                                     
040191,000118: 30,3066           06503                                    UNITX                                 
040192,000119: 30,3067           03266                           STORE    UNFV/2                                
040193,000120: 30,3070           03260                           STORE    UNWC/2                                
040194,000121: 30,3071           77616                           RVQ                                            
040195,000122: 
040196,000123:                                                                                                  #  FINDCDUW PRELIMINARIES
040197,000124: 
040198,000125: 30,3072           77775                           VLOAD                                          #  FINDCDUW -2: ENTRY WHEN UNFC/2 PRE-STORD
040199,000126: 30,3073           03252                                    UNFC/2                                #  INPUT VECTORS NEED NOT BE SEMI-UNIT
040200,000127: 30,3074           40200        FINDCDUW           BOV      SETPD                                 #  FINDCDUW: ENTRY WHEN UNFC/2 IN MPAC
040201,000128: 30,3075           61074                                    FINDCDUW                              #  INTERPRETER NOW INITIALIZED
040202,000129: 30,3076           00023                                    22                                    #  LOCS 0 THRU 21 FOR DIRECTION COSINE MAT
040203,000130: 30,3077           77420                           STQ      EXIT                                  
040204,000131: 30,3100           03246                                    QCDUWUSR                              #  SAVE RETURN ADDRESS
040205,000132: 
040206,000133:                                                                                                  #  MORE HAUSKEEPING
040207,000134: 
040208,000135: 30,3101           33745                           CA       ECDUWL                                
040209,000136: 30,3102           56003                           XCH      EBANK                                 #  SET EBANK
040210,000137: 30,3103           55645                           TS       ECDUWUSR                              #  SAVE USER'S EBANK
040211,000138: 
040212,000139: 30,3104           30111                           CA       DAPBOOLS                              
040213,000140: 30,3105           74730                           MASK     CSMDOCKD                              #  CSMDOCKD MUST NOT BE BIT15
040214,000141: 30,3106           10000                           CCS      A                                     
040215,000142: 30,3107           34744                           CA       ONE                                   #  INDEX IF CSM DOCKED
040216,000143: 30,3110           55647                           TS       NDXCDUW                               
040217,000144: 
040218,000145: 30,3111           34734                           CA       XOVINHIB                              #  XOVINHIB MUST NOT BE BIT15
040219,000146: 30,3112           70111                           MASK     DAPBOOLS                              
040220,000147: 30,3113           55650                           TS       FLAGOODW                              #  FLAGOODW = ANY PNZ NUMBER IF XOV INHIBTD
040221,000148: 

Page 908

040223,000150:                                                                                                  #  FETCH BASIC DATA
040224,000151: 
040225,000152: 30,3114           00004                           INHINT                                         #  RELINT AT PAUTNO (TC INTPRET)
040226,000153: 
040227,000154: 30,3115           30032                           CA       CDUX                                  #  FETCH CDUX,CDUY,CDUZ IN ALL CASES, BUT
040228,000155: 30,3116           54771                           TS       CDUSPOTX                              #       REPLACE BELOW IF PNGCS AUTO
040229,000156: 30,3117           30033                           CA       CDUY                                  
040230,000157: 30,3120           54765                           TS       CDUSPOTY                              
040231,000158: 30,3121           30034                           CA       CDUZ                                  
040232,000159: 30,3122           54767                           TS       CDUSPOTZ                              
040233,000160: 
040234,000161: 30,3123           34733                           CA       BIT10                                 #  PNGCS CONTROL BIT
040235,000162: 30,3124           00006                           EXTEND                                         
040236,000163: 30,3125           02030                           RAND     CHAN30                                
040237,000164: 30,3126           10000                           CCS      A                                     
040238,000165: 30,3127           13143                           TCF      PAUTNO                                #  NOT PNGCS (BITS INVERTED)
040239,000166: 
040240,000167: 30,3130           34727                           CA       BIT14                                 #  AUTO MODE BIT
040241,000168: 30,3131           00006                           EXTEND                                         
040242,000169: 30,3132           02031                           RAND     CHAN31                                
040243,000170: 30,3133           10000                           CCS      A                                     
040244,000171: 30,3134           13143                           TCF      PAUTNO                                #  NOT AUTO (BITS INVERTED)
040245,000172: 
040246,000173: 30,3135           31634                           CA       CDUXD                                 #  PNGCS AUTO: FETCH CDUXD,CDUYD,CDUZD
040247,000174: 30,3136           54771                           TS       CDUSPOTX                              
040248,000175: 30,3137           31635                           CA       CDUYD                                 
040249,000176: 30,3140           54765                           TS       CDUSPOTY                              
040250,000177: 30,3141           31636                           CA       CDUZD                                 
040251,000178: 30,3142           54767                           TS       CDUSPOTZ                              
040252,000179: 

Page 909

040254,000181:                                                                                                  #  FETCH INPUTS
040255,000182: 30,3143           06060        PAUTNO             TC       INTPRET                               #  ENTERING THRUST CMD STILL IN MPAC
040256,000183: 30,3144           77634                           RTB                                            
040257,000184: 30,3145           21724                                    NORMUNIT                              
040258,000185: 30,3146           24001                           STOVL    UNX/2                                 #  SEMI-UNIT THRUST CMD AS INITIAL UNX/2
040259,000186: 30,3147           03260                                    UNWC/2                                
040260,000187: 30,3150           47034                           RTB      RTB                                   
040261,000188: 30,3151           21724                                    NORMUNIT                              
040262,000189: 30,3152           47607                                    QUICTRIG                              #  ALWAYS RQD TO OBTAIN TRIGS OF CDUD'S
040263,000190: 30,3153           24015                           STOVL    UNZ/2                                 #  SEMI-UNIT WINDOW CMD AS INITIAL UNZ/2
040264,000191: 30,3154           00325                                    DELV                                  
040265,000192: 30,3155           53404                           BOVB     UNIT                                  
040266,000193: 30,3156           61734                                    NOATTCNT                              #  AT LEAST ONE ENTERING CMD VCT ZERO
040267,000194: 30,3157           45000                           BOV      CALL                                  
040268,000195: 30,3160           61174                                    AFTRFLTR                              #  IF UNIT DELV OVERFLOWS, SKIP FILTER
040269,000196: 30,3161           47663                                    *SMNB*                                #  YIELDS UNIT(DELV) IN VEH COORDS FOR FLTR
040270,000197: 
040271,000198:                                                                                                  #  THRUST DIRECTION FILTER
040272,000199: 
040273,000200: 30,3162           77776                           EXIT                                           
040274,000201: 
040275,000202: 30,3163           31667                           CA       UNFVY/2                               #  FOR RESTARTS, UNFV/2 ALWAYS INTACT, MPAC
040276,000203: 30,3164           22157                           LXCH     MPAC       +3                         #       RENEWED AFTER RETURN FROM CALLER,
040277,000204: 30,3165           03467                           TC       FLTRSUB                               #       TWO FILTER UPDATES MAY BE DONE.
040278,000205: 30,3166           55667                           TS       UNFVY/2                               #  UNFV/2 NEED NOT BE EXACTLY SEMI-UNIT.
040279,000206: 
040280,000207: 30,3167           31671                           CA       UNFVZ/2                               
040281,000208: 30,3170           22161                           LXCH     MPAC       +5                         
040282,000209: 30,3171           03467                           TC       FLTRSUB                               
040283,000210: 30,3172           55671                           TS       UNFVZ/2                               
040284,000211: 
040285,000212: 30,3173           06060                           TC       INTPRET                               #  COMPLETES FILTER
040286,000213: 

Page 910

040288,000215:                                                                                                  #  FIND A SUITABLE WINDOW POINTING VECTOR
040289,000216: 
040290,000217: 30,3174           46135        AFTRFLTR           SLOAD    BHIZ                                  #  IF XOV NOT INHIBITED, GO FETCH ZNB
040291,000218: 30,3175           03251                                    FLAGOODW                              
040292,000219: 30,3176           61202                                    FETCHZNB                              
040293,000220: 30,3177           45175                           VLOAD    CALL                                  
040294,000221: 30,3200           00015                                    UNZ/2                                 
040295,000222: 30,3201           61507                                    UNWCTEST                              
040296,000223: 
040297,000224: 30,3202           77775        FETCHZNB           VLOAD                                          
040298,000225: 30,3203           02153                                    ZNBPIP                                
040299,000226: 30,3204           34015                           STCALL   UNZ/2                                 
040300,000227: 30,3205           61507                                    UNWCTEST                              
040301,000228: 
040302,000229: 30,3206           57575                           VLOAD    VCOMP                                 #  Z AND -X CAN'T BOTH PARALLEL UNFC/2
040303,000230: 30,3207           02137                                    XNBPIP                                
040304,000231: 30,3210           00015                           STORE    UNZ/2                                 
040305,000232: 
040306,000233:                                                                                                  #  COMPUTE THE REQUIRED DIRECTION COSINE MATRIX
040307,000234: 
040308,000235: 30,3211           47375        DCMCL              VLOAD    VXV                                   
040309,000236: 30,3212           00015                                    UNZ/2                                 
040310,000237: 30,3213           00001                                    UNX/2                                 
040311,000238: 30,3214           41456                           UNIT     PUSH                                  #  UNY/2 FIRST ITERATION
040312,000239: 30,3215           76435                           VXV      VSL1                                  
040313,000240: 30,3216           00001                                    UNX/2                                 
040314,000241: 30,3217           00015                           STORE    UNZ/2                                 #  -UNZ/2 FIRST ITERATION
040315,000242: 30,3220           63361                           VXSC     PDVL                                  #  EXCHANGE -UNFVZ/2 UNZ/2 FOR UNY/2
040316,000243: 30,3221           03272                                    UNFVZ/2                               #  MUST BE SMALL
040317,000244: 30,3222           51361                           VXSC     BVSU                                  #  YIELDS -UNFVY/2 UNY/2-UNFVZ/2 UNZ/2
040318,000245: 30,3223           03270                                    UNFVY/2                               #  MUST BE SMALL
040319,000246: 30,3224           53372                           VSL1     VAD                                   
040320,000247: 30,3225           00001                                    UNX/2                                 
040321,000248: 30,3226           77656                           UNIT                                           #  TOTALLY ELIMINATES THRUST POINTING ERROR
040322,000249: 30,3227           00001                           STORE    UNX/2                                 #  UNX/2
040323,000250: 30,3230           76435                           VXV      VSL1                                  
040324,000251: 30,3231           00015                                    UNZ/2                                 #  -UNZ/2 WAS STORED HERE REMEMBER
040325,000252: 30,3232           00007                           STORE    UNY/2                                 #  UNY/2
040326,000253: 30,3233           47276                           VCOMP    VXV                                   
040327,000254: 30,3234           00001                                    UNX/2                                 
040328,000255: 30,3235           77772                           VSL1                                           
040329,000256: 30,3236           00015                           STORE    UNZ/2                                 #  UNZ/2
040330,000257: 
040331,000258:                                                                                                  #  COMPUTE THE REQUIRED GIMBAL ANGLES
040332,000259: 
040333,000260: 30,3237           77624                           CALL                                           
040334,000261: 30,3240           61517                                    NB2CDUSP                              #  YIELDS THE RQD GIMBAL ANGLES, 2'S, PI
040335,000262: 30,3241           77776                           EXIT                                           
040336,000263: 

Page 911

040338,000265:                                                                                                  #  BIAS OUTER GIMBAL ANGLE
040339,000266: 
040340,000267: 30,3242           31676                           CA       OGABIAS                               
040341,000268: 30,3243           26154                           ADS      MPAC                                  
040342,000269: 
040343,000270:                                                                                                  #  LIMIT THE MIDDLE GIMBAL ANGLE & COMPUTE THE UNLIMITED GIMBAL ANGLE CHGS
040344,000271: 
040345,000272: 30,3244           30156                           CA       MPAC       +2                         #  LIMIT THE MGA
040346,000273: 30,3245           54001                           TS       L                                     #  CAN'T LXCH: NEED UNLIMITED MGA FOR ALARM
040347,000274: 30,3246           33757                           CA       CDUZDLIM                              
040348,000275: 30,3247           03713                           TC       LIMITSUB                              #  YIELDS LIMITED MGA. 1 BIT ERROR POSSIBLE
040349,000276: 30,3250           56156                           XCH      MPAC       +2                         #       BECAUSE USING 2'S COMP. WHO CARES?
040350,000277: 30,3251           00006                           EXTEND                                         
040351,000278: 30,3252           20156                           MSU      MPAC       +2                         #  THIS BETTER YIELD ZERO
040352,000279: 30,3253           00006                           EXTEND                                         
040353,000280: 30,3254           13256                           BZF      +2                                    
040354,000281: 30,3255           13742                           TCF      ALARMMGA                              
040355,000282: 
040356,000283: 30,3256           00004        MGARET             INHINT                                         #  RELINT AT TC INTPRET AFTER TCQCDUW
040357,000284: 
040358,000285: 30,3257           22007                           ZL                                             
040359,000286: 30,3260           34743                           CA       TWO                                   
040360,000287: 30,3261           54142        DELGMBLP           TS       TEM2                                  
040361,000288: 
040362,000289: 30,3262           30001                           CA       L                                     #  TO PREVENT FALSE STARTS ABOUT X, ZERO
040363,000290: 30,3263           00006                           EXTEND                                         #       FLAGOODW IF DELGMBZ OR Y TOO BIG.
040364,000291: 30,3264           70000                           SQUARE                                         
040365,000292: 30,3265           64341                           AD       HI5                                   #  WITHIN 1 BIT OF -(45 DEG SQUARED)
040366,000293: 30,3266           00006                           EXTEND                                         
040367,000294: 30,3267           63272                           BZMF     +3                                    
040368,000295: 30,3270           34746                           CA       ZERO                                  
040369,000296: 30,3271           55650                           TS       FLAGOODW                              
040370,000297: 
040371,000298: 30,3272           50142                           INDEX    TEM2                                  
040372,000299: 30,3273           30154                           CA       MPAC                                  
040373,000300: 30,3274           50142                           INDEX    TEM2                                  
040374,000301: 30,3275           54321                           TS       CPHI                                  #  OUTPUTS TO NOUN22
040375,000302: 30,3276           00006                           EXTEND                                         
040376,000303: 30,3277           50142                           INDEX    TEM2                                  
040377,000304: 30,3300           21634                           MSU      CDUXD                                 #  NO MATTER THAT THESE SLIGHTLY DIFFERENT
040378,000305: 30,3301           40000                           COM                                            #       FROM WHEN WE INITIALLY FETCHED THEM
040379,000306: 30,3302           50142                           INDEX    TEM2                                  
040380,000307: 30,3303           55673                           TS       -DELGMB                               #  -UNLIMITED GIMBAL ANGLE CHGS, 1'S, PI
040381,000308: 30,3304           54001                           TS       L                                     #  FOR PRECEDING TEST ON NEXT LOOP PASS
040382,000309: 30,3305           10142                           CCS      TEM2                                  
040383,000310: 30,3306           13261                           TCF      DELGMBLP                              
040384,000311: 

Page 912

040386,000313:                                                                                                  #  BRANCHES TO NOATTCNT
040387,000314: 
040388,000315: 30,3307           34727                           CA       BIT14                                 #  AUTO MODE BIT
040389,000316: 30,3310           00006                           EXTEND                                         
040390,000317: 30,3311           02031                           RAND     CHAN31                                
040391,000318: 30,3312           10000                           CCS      A                                     
040392,000319: 30,3313           13736                           TCF      NOATTCNT   +2                         #  NOT AUTO
040393,000320: 
040394,000321: 30,3314           30101                           CA       FLAGWRD5                              
040395,000322: 30,3315           74736                           MASK     ENGONBIT                              
040396,000323: 30,3316           00006                           EXTEND                                         
040397,000324: 30,3317           13736                           BZF      NOATTCNT   +2                         #  ENGINE NOT ON
040398,000325: 

Page 913

040400,000327:                                                                                                  #  LIMIT THE ATTITUDE ANGLE CHANGES
040401,000328: 
040402,000329:                                                                                                  #  THIS SECTION LIMITS THE ATTITUDE ANGLE CHANGES ABOUT A SET OF ORTHOGONAL VEHICLE AXES X,YPRIME,ZPRIME.
040403,000330:                                                                                                  #  THESE AXES COINCIDE WITH THE COMMANDED VEHICLE AXES IF AND ONLY IF CDUXD IS ZERO.  THE PRIME SYSTEM IS
040404,000331:                                                                                                  #  THE COMMANDED VEHICLE SYSTEM ROTATED ABOUT THE X AXIS TO BRING THE Z AXIS INTO ALINEMENT WITH THE MIDDLE GIMBAL
040405,000332:                                                                                                  #  AXIS.  ATTITUDE ANGLE CHANGES IN THE PRIME SYSTEM ARE RELATED TO SMALL GIMBAL ANGLE CHANGES BY:
040406,000333: 
040407,000334:                                                                                                  #  * -DELATTX      *   * 1  SIN(CDUZD)  0 * * -DELGMBX *
040408,000335:                                                                                                  #  *               *   *                  * *          *
040409,000336:                                                                                                  #  * -DELATTYPRIME * = * 0  COS(CDUZD)  0 * * -DELGMBY *
040410,000337:                                                                                                  #  *               *   *                  * *          *
040411,000338:                                                                                                  #  * -DELATTZPRIME *   * 0  0           1 * * -DELGMBZ *
040412,000339: 
040413,000340: 30,3320           23675                           LXCH     -DELGMB    +2                         #  SAME AS -DELATTZPRIME UNLIMITED
040414,000341: 30,3321           51647                           INDEX    NDXCDUW                               
040415,000342: 30,3322           33753                           CA       DAZMAX                                
040416,000343: 30,3323           03713                           TC       LIMITSUB                              
040417,000344: 30,3324           55675                           TS       -DELGMB    +2                         #  -DELGMBZ
040418,000345: 
040419,000346: 30,3325           31674                           CA       -DELGMB    +1                         
040420,000347: 30,3326           00006                           EXTEND                                         
040421,000348: 30,3327           70745                           MP       COSCDUZ                               #  YIELDS -DELATTYPRIME/2 UNLIMITED
040422,000349: 30,3330           54001                           TS       L                                     
040423,000350: 30,3331           51647                           INDEX    NDXCDUW                               
040424,000351: 30,3332           33755                           CA       DAY/2MAX                              
040425,000352: 30,3333           03713                           TC       LIMITSUB                              
040426,000353: 30,3334           00006                           EXTEND                                         
040427,000354: 30,3335           10745                           DV       COSCDUZ                               
040428,000355: 30,3336           57674                           XCH      -DELGMB    +1                         #  -DELGMBY, FETCHING UNLIMITED VALUE
040429,000356: 
040430,000357: 30,3337           00006                           EXTEND                                         
040431,000358: 30,3340           70737                           MP       SINCDUZ                               
040432,000359: 30,3341           20001                           DDOUBL                                         
040433,000360: 30,3342           40000                           COM                                            
040434,000361: 30,3343           00006                           EXTEND                                         #  YIELDS +DELATTX UNLIMITD, MAG < 180 DEG,
040435,000362: 30,3344           21673                           MSU      -DELGMB                               #       BASED ON UNLIMITED DELGMBY.
040436,000363: 30,3345           54001                           TS       L                                     #       ONE BIT ERROR IF OPERANDS IN MSU
040437,000364: 30,3346           51647                           INDEX    NDXCDUW                               #       OF MIXED SIGNS.  WHO CARES?
040438,000365: 30,3347           33753                           CA       DAXMAX                                
040439,000366: 30,3350           03713                           TC       LIMITSUB                              
040440,000367: 30,3351           55673                           TS       -DELGMB                               #  SAVE LIMITED +DELATTX
040441,000368: 30,3352           11650                           CCS      FLAGOODW                              
040442,000369: 30,3353           41673                           CS       -DELGMB                               #  FETCH IT BACK CHGING SIGN IF WINDOW GOOD
040443,000370: 30,3354           55673                           TS       -DELGMB                               #  OTHERWISE USE ZERO FOR -DELATTX
040444,000371: 30,3355           41674                           CS       -DELGMB    +1                         
040445,000372: 30,3356           00006                           EXTEND                                         
040446,000373: 30,3357           70737                           MP       SINCDUZ                               
040447,000374: 30,3360           20001                           DDOUBL                                         #  YIELDS -CNTRIB TO -DELATTX FROM -DELGMBY
040448,000375: 30,3361           27673                           ADS      -DELGMB                               #  -DELGMBX.  NO OVERFLOW SINCE LIMITED TO
040449,000376:                                                                                                  #  20DEG(1+SIN(70DEG)/COS(70DEG)) < 180DEG
040450,000377: 

Page 914

040452,000379:                                                                                                  #  COMPUTE COMMANDED ATTITUDE RATES
040453,000380: 
040454,000381:                                                                                                  #  * OMEGAPD *   * -2  -4 SINCDUZ          +0         * * -DELGMBX *
040455,000382:                                                                                                  #  *         *   *                                    * *          *
040456,000383:                                                                                                  #  * OMEGAQD * = * +0  -8 COSCDUZ COSCDUX  -4 SINCDUX * * -DELGMBY *
040457,000384:                                                                                                  #  *         *   *                                    * *          *
040458,000385:                                                                                                  #  * OMEGARD *   * +0  +8 COSCDUZ SINCDUX  -4 COSCDUX * * -DELGMBZ *
040459,000386: 
040460,000387:                                                                                                  #  ATTITUDE ANGLE RATES IN UNITS OF PI/4 RAD/SEC = K TRIG FCNS IN UNITS OF 2 X GIMBAL ANGLE RATES IN UNITS OF
040461,000388:                                                                                                  #  PI/2 RAD/SEC.  THE CONSTANTS ARE BASED ON DELGMB BEING THE GIMBAL ANGLE CHANGES IN UNITS OF PI RADIANS,
040462,000389:                                                                                                  #  AND 2 SECONDS BEING THE COMPUTATION PERIOD (THE PERIOD BETWEEN SUCCESSIVE PASSES THRU FINDCDUW).
040463,000390: 
040464,000391: 30,3362           41673                           CS       -DELGMB                               
040465,000392: 30,3363           55642                           TS       OMEGAPD                               
040466,000393: 30,3364           41674                           CS       -DELGMB    +1                         
040467,000394: 30,3365           00006                           EXTEND                                         
040468,000395: 30,3366           70737                           MP       SINCDUZ                               
040469,000396: 30,3367           20001                           DDOUBL                                         
040470,000397: 30,3370           27642                           ADS      OMEGAPD                               
040471,000398: 30,3371           27642                           ADS      OMEGAPD                               
040472,000399: 
040473,000400: 30,3372           41674                           CS       -DELGMB    +1                         
040474,000401: 30,3373           00006                           EXTEND                                         
040475,000402: 30,3374           70747                           MP       COSCDUX                               
040476,000403: 30,3375           20001                           DDOUBL                                         
040477,000404: 30,3376           00006                           EXTEND                                         
040478,000405: 30,3377           70745                           MP       COSCDUZ                               
040479,000406: 30,3400           55643                           TS       OMEGAQD                               
040480,000407: 30,3401           41675                           CS       -DELGMB    +2                         
040481,000408: 30,3402           00006                           EXTEND                                         
040482,000409: 30,3403           70741                           MP       SINCDUX                               
040483,000410: 30,3404           27643                           ADS      OMEGAQD                               
040484,000411: 30,3405           27643                           ADS      OMEGAQD                               
040485,000412: 30,3406           27643                           ADS      OMEGAQD                               
040486,000413: 
040487,000414: 30,3407           31674                           CA       -DELGMB    +1                         
040488,000415: 30,3410           00006                           EXTEND                                         
040489,000416: 30,3411           70741                           MP       SINCDUX                               
040490,000417: 30,3412           20001                           DDOUBL                                         
040491,000418: 30,3413           00006                           EXTEND                                         
040492,000419: 30,3414           70745                           MP       COSCDUZ                               
040493,000420: 30,3415           55644                           TS       OMEGARD                               
040494,000421: 30,3416           41675                           CS       -DELGMB    +2                         
040495,000422: 30,3417           00006                           EXTEND                                         
040496,000423: 30,3420           70747                           MP       COSCDUX                               
040497,000424: 30,3421           27644                           ADS      OMEGARD                               
040498,000425: 30,3422           27644                           ADS      OMEGARD                               
040499,000426: 30,3423           27644                           ADS      OMEGARD                               
040500,000427: 

Page 915

040502,000429:                                                                                                  #  FINAL TRANSFER
040503,000430: 
040504,000431: 30,3424           34743                           CA       TWO                                   
040505,000432: 30,3425           54142        CDUWXFR            TS       TEM2                                  
040506,000433: 30,3426           50142                           INDEX    TEM2                                  
040507,000434: 30,3427           31673                           CA       -DELGMB                               
040508,000435: 30,3430           00006                           EXTEND                                         
040509,000436: 30,3431           73760                           MP       DT/DELT                               #  RATIO OF DAP INTERVAL TO CDUW INTERVAL
040510,000437: 30,3432           03727                           TC       ONESTO2S                              
040511,000438: 30,3433           50142                           INDEX    TEM2                                  
040512,000439: 30,3434           55637                           TS       DELCDUX                               #  ANGLE INTERFACE
040513,000440: 
040514,000441: 30,3435           50142                           INDEX    TEM2                                  
040515,000442: 30,3436           11642                           CCS      OMEGAPD                               
040516,000443: 30,3437           64744                           AD       ONE                                   
040517,000444: 30,3440           13442                           TCF      +2                                    
040518,000445: 30,3441           64744                           AD       ONE                                   
040519,000446: 30,3442           00006                           EXTEND                                         #  WE NOW HAVE ABS(OMEGAPD,QD,RD)
040520,000447: 30,3443           50142                           INDEX    TEM2                                  
040521,000448: 30,3444           71642                           MP       OMEGAPD                               
040522,000449: 30,3445           00006                           EXTEND                                         
040523,000450: 30,3446           74732                           MP       BIT11                                 #  1/16
040524,000451: 30,3447           00006                           EXTEND                                         
040525,000452: 30,3450           50142                           INDEX    TEM2                                  #                    2
040526,000453: 30,3451           11530                           DV       1JACC                                 #  UNITS PI/4 RAD/SEC
040527,000454: 30,3452           54001                           TS       L                                     
040528,000455: 30,3453           33755                           CA       DELERLIM                              
040529,000456: 30,3454           03713                           TC       LIMITSUB                              
040530,000457: 30,3455           50142                           INDEX    TEM2                                  
040531,000458: 30,3456           55274                           TS       DELPEROR                              #  LAG ANGLE = OMEGA ABS(OMEGA)/2 ACCEL
040532,000459: 30,3457           10142                           CCS      TEM2                                  
040533,000460: 30,3460           13425                           TCF      CDUWXFR                               
040534,000461: 
040535,000462:                                                                                                  #  HAUSKEEPING AND RETURN
040536,000463: 
040537,000464: 30,3461           31645        TCQCDUW            CA       ECDUWUSR                              
040538,000465: 30,3462           54003                           TS       EBANK                                 #  RETURN USER'S EBANK
040539,000466: 
040540,000467: 30,3463           06060                           TC       INTPRET                               
040541,000468: 30,3464           52001                           SETPD    GOTO                                  
040542,000469: 30,3465           00001                                    0                                     
040543,000470: 30,3466           03246                                    QCDUWUSR                              #  NORMAL AND ABNORMAL RETURN TO USER
040544,000471: 

Page 916

040546,000473:                                                                                                  #  THRUST VECTOR FILTER SUBROUTINE
040547,000474: 
040548,000475: 30,3467           00006        FLTRSUB            EXTEND                                         
040549,000476: 30,3470           22142                           QXCH     TEM2                                  
040550,000477: 30,3471           54143                           TS       TEM3                                  #  SAVE ORIGINAL OFFSET
040551,000478: 30,3472           40000                           COM                                            #  ONE MCT, NO WDS, CAN BE SAVED IF NEG OF
040552,000479: 30,3473           60001                           AD       L                                     #       ORIG OFFSET ARRIVES IN A, BUT IT'S
040553,000480: 30,3474           00006                           EXTEND                                         #       NOT WORTH THE INCREASED OBSCURITY.
040554,000481: 30,3475           51647                           INDEX    NDXCDUW                               
040555,000482: 30,3476           73746                           MP       GAINFLTR                              
040556,000483: 30,3477           54001                           TS       L                                     #  INCR TO OFFSET, UNLIMITED
040557,000484: 30,3500           33750                           CA       DUNFVLIM                              #  SAME LIMIT FOR Y AND Z
040558,000485: 30,3501           03713                           TC       LIMITSUB                              #  YIELDS INCR TO OFFSET, LIMITED
040559,000486: 30,3502           60143                           AD       TEM3                                  #  ORIGINAL OFFSET
040560,000487: 30,3503           54001                           TS       L                                     #  TOTAL OFFSET, UNLIMITED
040561,000488: 30,3504           33751                           CA       UNFVLIM                               #  SAME LIMIT FOR Y AND Z
040562,000489: 30,3505           03713                           TC       LIMITSUB                              #  YIELDS TOTAL OFFSET, LIMITED
040563,000490: 30,3506           00142                           TC       TEM2                                  
040564,000491: 
040565,000492:                                                                                                  #  SUBR TO TEST THE ANGLE BETWEEN THE PROPOSED WINDOW AND THRUST CMD VCTS
040566,000493: 
040567,000494: 30,3507           63441        UNWCTEST           DOT      DSQ                                   
040568,000495: 30,3510           00001                                    UNX/2                                 
040569,000496: 30,3511           50025                           DSU      BMN                                   
040570,000497: 30,3512           21753                                    DOTSWFMX                              
040571,000498: 30,3513           61211                                    DCMCL                                 
040572,000499: 30,3514           43531                           SSP      RVQ                                   #  RVQ FOR ALT CHOICE IF DOT MAGN TOO LARGE
040573,000500: 30,3515           03251                                    FLAGOODW                              #       ZEROING WINDOW GOOD FLAG
040574,000501: 30,3516           00000                                    0                                     
040575,000502: 

Page 917

040577,000504:                                                                                                  #  NB2CDUSP RETURNS THE 2'S COMPLEMENT, PI, SP CDU ANGLES X,Y,Z IN MPAC,+1,+2 GIVEN THE MATRIX WHOSE ROW VECTORS
040578,000505:                                                                                                  #  ARE THE SEMI-UNIT NAV BASE VECTORS X,Y,Z EXPRESSED IN STABLE MEMBER COORDINATES, LOCATED AT 0 IN THE PUSH LIST.
040579,000506: 
040580,000507:                                                                                                  #  NB2CDUSP USES ARCTRGSP WHICH HAS A MAXIMUM ERROR OF +-4 BITS.
040581,000508: 
040582,000509: 30,3517           63545        NB2CDUSP           DLOAD    DSQ                                   
040583,000510: 30,3520           00003                                    2                                     
040584,000511: 30,3521           51021                           BDSU     BPL                                   
040585,000512: 30,3522           06475                                    DP1/4TH                               
040586,000513: 30,3523           61526                                    +3                                    
040587,000514: 30,3524           77745                           DLOAD                                          
040588,000515: 30,3525           06505                                    ZEROVECS                              #  IN CASE SIN WAS SLIGHTLY > 1/2
040589,000516: 30,3526           77566                           SQRT     EXIT                                  #  YIELDS COS(CDUZ) IN UNITS OF 2
040590,000517: 
040591,000518: 30,3527           00006                           EXTEND                                         
040592,000519: 30,3530           30155                           DCA      MPAC                                  
040593,000520: 30,3531           20001                           DDOUBL                                         
040594,000521: 30,3532           54145                           TS       TEM5                                  
040595,000522: 30,3533           13536                           TCF      +3                                    
040596,000523: 30,3534           34724                           CA       POSMAX                                #  OVERFLOW. FETCH POSMAX, MPAC ALWAYS POS
040597,000524: 30,3535           54145                           TS       TEM5                                  #  COS(CDUZ) IN TEM5, UNITS 1
040598,000525: 
040599,000526: 30,3536           50120                           INDEX    FIXLOC                                
040600,000527: 30,3537           30002                           CA       2                                     
040601,000528: 30,3540           22154                           LXCH     MPAC                                  
040602,000529: 30,3541           03606                           TC       ARCTRGSP                              
040603,000530: 30,3542           54156                           TS       MPAC       +2                         #  CDUZ
040604,000531: 
040605,000532: 30,3543           34746                           CA       ZERO                                  
040606,000533: 30,3544           03564                           TC       DVBYCOSM                              
040607,000534: 30,3545           34742                           CA       FOUR                                  
040608,000535: 30,3546           03564                           TC       DVBYCOSM                              
040609,000536: 30,3547           40141                           CS       TEM1                                  
040610,000537: 30,3550           03606                           TC       ARCTRGSP                              
040611,000538: 30,3551           54155                           TS       MPAC       +1                         #  CDUY
040612,000539: 
040613,000540: 30,3552           34741                           CA       BIT4                                  
040614,000541: 30,3553           03564                           TC       DVBYCOSM                              
040615,000542: 30,3554           33563                           CA       16OCT                                 
040616,000543: 30,3555           03564                           TC       DVBYCOSM                              
040617,000544: 30,3556           40141                           CS       TEM1                                  
040618,000545: 30,3557           03606                           TC       ARCTRGSP                              
040619,000546: 30,3560           54154                           TS       MPAC                                  #  CDUX
040620,000547: 
040621,000548: 30,3561           06060                           TC       INTPRET                               
040622,000549: 30,3562           77616                           RVQ                                            
040623,000550: 
040624,000551: 30,3563           00016        16OCT              OCT      16                                    
040625,000552: 

Page 918

040627,000554:                                                                                                  #  THE ELEMENTS OF THE NAV BASE MATRIX WHICH WE MUST DIVIDE BY COS(MGA)
040628,000555:                                                                                                  #  ALREADY CONTAIN COS(MGA)/2 AS A FACTOR.  THEREFORE THE QUOTIENT SHOULD
040629,000556:                                                                                                  #  ORDINARILY NEVER EXCEED 1/2 IN MAGNITUDE.  BUT IF THE MGA IS NEAR PI/2
040630,000557:                                                                                                  #  THEN COS(MGA) IS NEAR ZERO, AND THERE MAY BE SOME CHAFF IN THE OTHER
040631,000558:                                                                                                  #  ELEMENTS OF THE MATRIX WHICH WOULD PRODUCE CHAOS UNDER DIVISION.
040632,000559:                                                                                                  #  BEFORE DIVIDING WE MAKE SURE COS(MGA) IS AT LEAST ONE BIT LARGER
040633,000560:                                                                                                  #  THAN THE MAGNITUDE OF THE HIGH ORDER PART OF THE OPERAND.
040634,000561: 
040635,000562:                                                                                                  #  IF ONE OR MORE DIVIDES CANNOT BE PERFORMED, THIS MEANS THAT THE
040636,000563:                                                                                                  #  REQUIRED MGA IS VERY NEARLY +-PI/2 AND THEREFORE THE OTHER GIMBAL
040637,000564:                                                                                                  #  ANGLES ARE INDETERMINATE.  THE INNER AND OUTER GIMBAL ANGLES RETURNED
040638,000565:                                                                                                  #  IN THIS CASE WILL BE RANDOM MULTIPLES OF PI/2.
040639,000566: 
040640,000567: 30,3564           60120        DVBYCOSM           AD       FIXLOC                                
040641,000568: 30,3565           54116                           TS       ADDRWD                                #  ADRES OF OPERAND
040642,000569: 
040643,000570: 30,3566           50116                           INDEX    ADDRWD                                #  FETCH NEG ABS OF OPERAND, AD TEM5, AND
040644,000571: 30,3567           30000                           CA       0                                     #      SKIP DIVIDE IF RESULT NEG OR ZERO
040645,000572: 30,3570           00006                           EXTEND                                         
040646,000573: 30,3571           63573                           BZMF     +2                                    
040647,000574: 30,3572           40000                           COM                                            
040648,000575: 30,3573           60145                           AD       TEM5                                  #  C(A) ZERO OR NEG, C(TEM5) ZERO OR POS
040649,000576: 30,3574           00006                           EXTEND                                         
040650,000577: 30,3575           63603                           BZMF     TSL&TCQ                               #  DIFFERENCE ALWAYS SMALL IF BRANCH
040651,000578: 
040652,000579: 30,3576           00006                           EXTEND                                         #  TEM5 EXCEEDS ABS HIGH ORDER PART OF
040653,000580: 30,3577           50116                           INDEX    ADDRWD                                #       OPERAND BY AT LEAST ONE BIT.
040654,000581: 30,3600           30001                           DCA      0                                     #       THEREFORE IT EXCEEDS THE DP OPERAND
040655,000582: 30,3601           00006                           EXTEND                                         #       AND DIVISION WILL ALWAYS SUCCEED.
040656,000583: 30,3602           10145                           DV       TEM5                                  
040657,000584: 30,3603           54001        TSL&TCQ            TS       L                                     
040658,000585: 30,3604           22141                           LXCH     TEM1                                  
040659,000586: 30,3605           00002                           TC       Q                                     
040660,000587: 

Page 919

040662,000589:                                                                                                  #  ARCTRGSP RETURNS THE 2'S COMPLEMENT, PI, SP ANGLE IN THE A REGISTER GIVEN ITS SINE IN A AND ITS COSINE IN L IN
040663,000590:                                                                                                  #  UNITS OF 2.  THE RESULT IS AN UNAMBIGUOUS ANGLE ANYWHERE IN THE CIRCLE, WITH A MAXIMUM ERROR OF +-4 BITS.
040664,000591:                                                                                                  #  THE ERROR IS PRODUCED BY THE SUBROUTINE SPARCSIN WHICH IS USED ONLY IN THE REGION +-45 DEGREES.
040665,000592: 
040666,000593: 30,3606           00006        ARCTRGSP           EXTEND                                         
040667,000594: 30,3607           13651                           BZF      SINZERO                               #  TO AVOID DIVIDING BY ZERO
040668,000595: 
040669,000596: 30,3610           00006                           EXTEND                                         
040670,000597: 30,3611           22144                           QXCH     TEM4                                  
040671,000598: 30,3612           54142                           TS       TEM2                                  
040672,000599: 30,3613           30001                           CA       L                                     
040673,000600: 30,3614           54143                           TS       TEM3                                  
040674,000601: 30,3615           34746                           CA       ZERO                                  
040675,000602: 30,3616           00006                           EXTEND                                         
040676,000603: 30,3617           10142                           DV       TEM2                                  
040677,000604: 30,3620           00006                           EXTEND                                         
040678,000605: 30,3621           13640                           BZF      USECOS                                
040679,000606: 
040680,000607: 30,3622           10143                           CCS      TEM3                                  #  SIN IS SMALLER OR EQUAL
040681,000608: 30,3623           34746                           CA       ZERO                                  
040682,000609: 30,3624           13630                           TCF      +4                                    
040683,000610: 30,3625           40142                           CS       TEM2                                  #  IF COS NEG, REVERSE SIGN OF SIN,
040684,000611: 30,3626           54142                           TS       TEM2                                  #       ANGLE = PI-ARCSIN(SIN)
040685,000612: 30,3627           34726                           CA       NEGMAX                                #  PICK UP PI, 2'S COMPLEMENT
040686,000613: 30,3630           54143                           TS       TEM3                                  #  WE NO LONGER NEED COS
040687,000614: 30,3631           30142                           CA       TEM2                                  
040688,000615: 30,3632           03656                           TC       SPARCSIN   -1                         
040689,000616: 30,3633           03727                           TC       ONESTO2S                              
040690,000617: 30,3634           00006                           EXTEND                                         
040691,000618: 30,3635           20143                           MSU      TEM3                                  
040692,000619: 30,3636           03727        1TO2&TCQ           TC       ONESTO2S                              
040693,000620: 30,3637           00144                           TC       TEM4                                  
040694,000621: 
040695,000622: 30,3640           40143        USECOS             CS       TEM3                                  #  COS IS SMALLER
040696,000623: 30,3641           03656                           TC       SPARCSIN   -1                         #  ANGLE = SIGN(SIN)(PI/2-ARCSIN(COS))
040697,000624: 30,3642           64727                           AD       HALF                                  
040698,000625: 30,3643           54143                           TS       TEM3                                  #  WE NO LONGER NEED COS
040699,000626: 30,3644           10142                           CCS      TEM2                                  
040700,000627: 30,3645           30143                           CA       TEM3                                  
040701,000628: 30,3646           13636                           TCF      1TO2&TCQ                              
040702,000629: 30,3647           40143                           CS       TEM3                                  
040703,000630: 30,3650           13636                           TCF      1TO2&TCQ                              
040704,000631: 
040705,000632: 30,3651           10001        SINZERO            CCS      L                                     
040706,000633: 30,3652           34746                           CA       ZERO                                  
040707,000634: 30,3653           00002                           TC       Q                                     
040708,000635: 30,3654           34726                           CA       NEGMAX                                #  PI, 2'S COMP
040709,000636: 30,3655           00002                           TC       Q                                     
040710,000637: 

Page 920

040712,000639:                                                                                                  #  SPARCSIN TAKES AN ARGUMENT SCALED UNITY IN A AND RETURNS AN ANGLE SCALED
040713,000640:                                                                                                  #  180 DEGREES IN A.  IT HAS BEEN UNIT TESTED IN THE REGION +-.94 (+- 70
040714,000641:                                                                                                  #  DEGREES) AND THE MAXIMUM ERROR IS +-5 BITS WITH AN AVERAGE TIME OF
040715,000642:                                                                                                  #  450 MICROSECONDS.  SPARCSIN -1 TAKES THE ARGUMENT SCALED TWO.(BOB CRISP)
040716,000643: 
040717,000644: 30,3656           60000                           DOUBLE                                         
040718,000645: 30,3657           54021        SPARCSIN           TS       SR                                    
040719,000646: 30,3660           13664                           TCF      +4                                    
040720,000647: 30,3661           50000                           INDEX    A                                     
040721,000648: 30,3662           44725                           CS       LIMITS                                
040722,000649: 30,3663           54021                           TS       SR                                    
040723,000650: 30,3664           00006                           EXTEND                                         
040724,000651: 30,3665           70000                           MP       A                                     
040725,000652: 30,3666           54141                           TS       TEM1                                  
040726,000653: 30,3667           00006                           EXTEND                                         
040727,000654: 30,3670           73712                           MP       DPL9                                  
040728,000655: 30,3671           63711                           AD       DPL7                                  
040729,000656: 30,3672           00006                           EXTEND                                         
040730,000657: 30,3673           70141                           MP       TEM1                                  
040731,000658: 30,3674           63710                           AD       DPL5                                  
040732,000659: 30,3675           00006                           EXTEND                                         
040733,000660: 30,3676           70141                           MP       TEM1                                  
040734,000661: 30,3677           63707                           AD       DPL3                                  
040735,000662: 30,3700           00006                           EXTEND                                         
040736,000663: 30,3701           70141                           MP       TEM1                                  
040737,000664: 30,3702           63706                           AD       DPL1                                  
040738,000665: 30,3703           00006                           EXTEND                                         
040739,000666: 30,3704           70021                           MP       SR                                    
040740,000667: 30,3705           00002                           TC       Q                                     
040741,000668: 30,3706           24406        DPL1               DEC      10502      B-14                       
040742,000669: 30,3707           00660        DPL3               DEC      432        B-14                       
040743,000670: 30,3710           16204        DPL5               DEC      7300       B-14                       
040744,000671: 30,3711           50744        DPL7               DEC      -11803     B-14                       
040745,000672: 30,3712           20315        DPL9               DEC      8397       B-14                       
040746,000673: 

Page 921

040748,000675:                                                                                                  #  LIMITSUB LIMITS THE MAGNITUDE OF THE POSITIVE OR NEGATIVE VARIABLE
040749,000676:                                                                                                  #  ARRIVING IN L TO THE POSITIVE LIMIT ARRIVING IN A.
040750,000677:                                                                                                  #  THE SIGNED LIMITED VARIABLE IS RETURNED IN A.
040751,000678: 
040752,000679:                                                                                                  #  VERSION COURTESY HUGH BLAIR-SMITH
040753,000680: 
040754,000681: 30,3713           54141        LIMITSUB           TS       TEM1                                  
040755,000682: 30,3714           34746                           CA       ZERO                                  
040756,000683: 30,3715           00006                           EXTEND                                         
040757,000684: 30,3716           10141                           DV       TEM1                                  
040758,000685: 30,3717           10000                           CCS      A                                     
040759,000686: 30,3720           22141                           LXCH     TEM1                                  
040760,000687: 30,3721           13723                           TCF      +2                                    
040761,000688: 30,3722           13725                           TCF      +3                                    
040762,000689: 30,3723           30001                           CA       L                                     
040763,000690: 30,3724           00002                           TC       Q                                     
040764,000691: 30,3725           40141                           CS       TEM1                                  
040765,000692: 30,3726           00002                           TC       Q                                     
040766,000693: 
040767,000694:                                                                                                  #  SUBROUTINE TO CONVERT 1'S COMP SP TO 2'S COMP
040768,000695: 
040769,000696: 30,3727           10000        ONESTO2S           CCS      A                                     
040770,000697: 30,3730           64744                           AD       ONE                                   
040771,000698: 30,3731           00002                           TC       Q                                     
040772,000699: 30,3732           40000                           CS       A                                     
040773,000700: 30,3733           00002                           TC       Q                                     
040774,000701: 
040775,000702:                                                                                                  #  NO ATTITUDE CONTROL
040776,000703: 
040777,000704: 30,3734           05571        NOATTCNT           TC       ALARM                                 
040778,000705: 30,3735           00402                           OCT      00402                                 #  NO ATTITUDE CONTROL
040779,000706: 
040780,000707: 30,3736           00004                 +2        INHINT                                         #  COME HERE FOR NOATTCNT WITHOUT ALARM
040781,000708: 30,3737           04665                           TC       IBNKCALL                              #  RELINT AT TC INTPRET AFTER TCQCDUW
040782,000709: 30,3740           40166                           FCADR    STOPRATE                              
040783,000710: 30,3741           13461                           TCF      TCQCDUW                               #  RETURN TO USER SKIPPING AUTOPILOT CMDS
040784,000711: 
040785,000712:                                                                                                  #  MIDDLE GIMBAL ANGLE ALARM
040786,000713: 
040787,000714: 30,3742           05571        ALARMMGA           TC       ALARM                                 
040788,000715: 30,3743           00401                           OCT      00401                                 
040789,000716: 30,3744           13256                           TCF      MGARET                                
040790,000717: 

Page 922 The ':' at the end of the 2nd divider below is a workaround for our proof-reading system, but was simply another '=' in the original printout.

040794,000721:                                                                                                  # ================================================================================================================
040795,000722:                                                                                                  #  CONSTANTS
040796,000723:                                                                                                  # ===============================================================================================================:
040797,000724: 
040798,000725:                                                                                                  #  ADDRESS CONSTANTS
040799,000726: 
040800,000727: 30,3745           03245        ECDUWL             ECADR    ECDUW                                 
040801,000728: 
040802,000729:                                                                                                  #  THRUST DIRECTION FILTER CONSTANTS
040803,000730: 
040804,000731: 30,3746           06315        GAINFLTR           DEC      .2                                    #  GAIN FILTER SANS CSM
040805,000732: 30,3747           03146                           DEC      .1                                    #  GAIN FILTER WITH CSM
040806,000733: 
040807,000734: 30,3750           00071        DUNFVLIM           DEC      .007       B-1                        #  7 MR MAX CHG IN F DIR IN VEH IN 2 SECS.
040808,000735:                                                                                                  #  THIS DOES NOT ALLOW FOR S/C ROT RATE.
040809,000736: 
040810,000737: 30,3751           02041        UNFVLIM            DEC      .129       B-1                        #  129 MR MAX THRUST OFFSET. 105 MR TRAVEL
040811,000738:                                                                                                  #  +10MR DEFL+5MR MECH MOUNT+9MR ABLATION.
040812,000739: 
040813,000740:                                                                                                  #  CONSTANTS RELATED TO GIMBAL ANGLE COMPUTATIONS
040814,000741: 
040815,000742: 30,3752           01673        DOTSWFMX           DEC      .93302     B-4                        #  LIM COLNRTY OF UNWC/2 & UNFC/2 TO 85 DEG
040816,000743:                                                                                                  #  LOWER PART COMES FROM NEXT CONSTANT
040817,000744: 
040818,000745: 30,3753           03434        DAXMAX             DEC      .11111111111                            #  DELATTX LIM TO 20 DEG IN 2 SECS, 1'S, PI
040819,000746: 30,3754           00266                           DEC      .0111111111                            #  2 DEG WHEN CSM DOCKED
040820,000747: 
040821,000748: 30,3755           01616        DAY/2MAX           DEC      .05555555555                            #  LIKEWISE FOR DELATTY
040822,000749: 30,3756           00133                           DEC      .0055555555                            
040823,000750: 
040824,000751: 30,3757  30,3753               DAZMAX             =        DAXMAX                                #  LIKEWISE FOR DELATTZ
040825,000752: 
040826,000753: 30,3757           14344        CDUZDLIM           DEC      .3888888888                            #  70 DEG LIMIT FOR MGA, 1'S, PI
040827,000754: 
040828,000755:                                                                                                  #  CONSTANTS FOR DATA TRANSFER
040829,000756: 
040830,000757: 30,3760           01463        DT/DELT            DEC      .05                                   #  .1 SEC/2 SEC WHICH IS THE AUTOPILOT
040831,000758:                                                                                                  #  CONTROL SAMPLE PERIOD/COMPUTATION PERIOD
040832,000759: 
040833,000760: 30,3761  30,3755               DELERLIM           =        DAY/2MAX                              #  10 DEG LIMIT FOR LAG ANGLES, 1'S, PI
040834,000761: 
040835,000762: 

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