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.

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

Page 905

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

Page 906

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

Page 907

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

Page 908

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

Page 909

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

Page 910

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

Page 911

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

Page 912

040394,000313:                                                                                                  #  BRANCHES TO NOATTCNT
040395,000314: 
040396,000315: 30,3307           34727                           CA       BIT14                                 #  AUTO MODE BIT
040397,000316: 30,3310           00006                           EXTEND                                         
040398,000317: 30,3311           02031                           RAND     CHAN31                                
040399,000318: 30,3312           10000                           CCS      A                                     
040400,000319: 30,3313           13736                           TCF      NOATTCNT   +2                         #  NOT AUTO
040401,000320: 
040402,000321: 30,3314           30101                           CA       FLAGWRD5                              
040403,000322: 30,3315           74736                           MASK     ENGONBIT                              
040404,000323: 30,3316           00006                           EXTEND                                         
040405,000324: 30,3317           13736                           BZF      NOATTCNT   +2                         #  ENGINE NOT ON
040406,000325: 

Page 913

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

Page 914

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

Page 915

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

Page 916

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

Page 917

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

Page 918

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

Page 919

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

Page 920

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

Page 921

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

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

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