Source Code

These source-code files derive from a printout of Luminary 116 (the Apollo 12 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Ron Burkey, 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 116 OF AGC PROGRAM LUMINARY BY NASA 2021112-071
	19:09 AUG. 11,1969
Note that the date is the date of the printout, not the date of the program revision.

039035,000002:                                                                                                  ## Copyright:   Public domain.
039036,000003:                                                                                                  ## Filename:    FINDCDUW_-_GUIDAP_INTERFACE.agc
039037,000004:                                                                                                  ## Purpose:     A section of Luminary revision 116.
039038,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM) 
039039,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 12.
039040,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
039041,000008:                                                                                                  ##              that the code format has been changed to conform to the
039042,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
039043,000010:                                                                                                  ##              original YUL assembler.
039044,000011:                                                                                                  ## Reference:   pp. 901-918
039045,000012:                                                                                                  ## Assembler:   yaYUL
039046,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
039047,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
039048,000015:                                                                                                  ## Mod history: 2017-01-22 MAS  Created from Luminary 99.
039049,000016:                                                                                                  ##              2017-03-10 RSB  Transcribed, and then proofed comment-text using
039050,000017:                                                                                                  ##                              3-way diff vs Luminary 99 and Luminary 131.
039051,000018:                                                                                                  ##                              (Admittedly, the former is more for detecting errors
039052,000019:                                                                                                  ##                              in Luminary 99 than the other way around.)
039053,000020:                                                                                                  ##                              The label 1406P00 was replaced with 1406POO.
039054,000021:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 5-way
039055,000022:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
039056,000023: 

Page 901

039058,000025:                                                                                                  #  PROGRAM NAME:  FINDCDUW
039059,000026:                                                                                                  #  MOD NUMBER:  1        68 07 15
039060,000027:                                                                                                  #  MOD AUTHOR:  KLUMPP
039061,000028: 
039062,000029:                                                                                                  #  OBJECTS OF MOD:       1.      TO SUPPLY COMMANDED GIMBAL ANGLES FOR NOUN 22.
039063,000030:                                                                                                  #                        2.      TO MAINTAIN CORRECT AND CURRENT THRUST
039064,000031:                                                                                                  #                                DIRECTION DATA IN ALL MODES.  THIS IS DONE BY
039065,000032:                                                                                                  #                                FETCHING FOR THE THRUST DIRECTION FILTER THE
039066,000033:                                                                                                  #                                CDUD'S IN PNGCS-AUTO, THE CDU'S IN ALL OTHER
039067,000034:                                                                                                  #                                MODES.
039068,000035:                                                                                                  #                        3.      TO SUBSTITUTE A STOPRATE FOR THE NORMAL
039069,000036:                                                                                                  #                                AUTOPILOT COMMANDS WHENEVER
039070,000037:                                                                                                  #                                1) NOT IN PNGCS-AUTO, OR
039071,000038:                                                                                                  #                                2) ENGINE IS OFF.
039072,000039: 
039073,000040:                                                                                                  #  FUNCTIONAL DESCRIPTION:
039074,000041: 
039075,000042:                                                                                                  #  FINDCDUW PROVIDES THE INTERFACES BETWEEN THE VARIOUS POWERED FLITE GUIDANCE PROGRAMS
039076,000043:                                                                                                  #  AND THE DIGITAL AUTOPILOT.  THE INPUTS TO FINDCDUW ARE THE THRUST COMMAND VECTOR
039077,000044:                                                                                                  #  AND THE WINDOW COMMAND VECTOR, AND THE OUTPUTS ARE THE GIMBAL ANGLE
039078,000045:                                                                                                  #  INCREMENTS, THE COMMANDED ATTITUDE ANGLE RATES, AND THE COMMANDED
039079,000046:                                                                                                  #  ATTITUDE LAG ANGLES (WHICH ACCOUNT FOR THE ANGLES BY WHICH THE BODY WILL
039080,000047:                                                                                                  #  LAG BEHIND A RAMP COMMAND IN ATTITUDE ANGLE DUE TO THE FINITE ANGULAR
039081,000048:                                                                                                  #  ACCELERATIONS AVAILABLE).
039082,000049: 
039083,000050:                                                                                                  #  FINDCDUW ALINES THE ESTIMATED THRUST VECTOR FROM THE THRUST DIRECTION
039084,000051:                                                                                                  #  FILTER WITH THE THRUST COMMAND VECTOR, AND, WHEN XOVINHIB SET,
039085,000052:                                                                                                  #  ALINES THE +Z HALF OF THE LM ZX PLANE WITH THE WINDOW COMMAND VECTOR.
039086,000053: 

Page 902

039088,000055:                                                                                                  #  SPECIFICATIONS:
039089,000056: 
039090,000057:                                                                                                  #  INITIALIZATION:       A SINGLE INTERPRETIVE CALL TO INITCDUW IS REQUIRED
039091,000058:                                                                                                  #                        BEFORE EACH GUIDED MANEUVER USING FINDCDUW.
039092,000059: 
039093,000060:                                                                                                  #  CALL:                 INTERPRETIVE CALL TO FINDCDUW WITH THE THRUST COMMAND
039094,000061:                                                                                                  #                        VECTOR IN MPAC.  INTERPRETIVE CALL TO FINDCDUW -2 WITH
039095,000062:                                                                                                  #                        THE THRUST COMMAND VECTOR IN UNFC/2 AND NOT IN MPAC.
039096,000063: 
039097,000064:                                                                                                  #  RETURNS:              NORMAL INTERPRETIVE IN ALL CASES
039098,000065:                                                                                                  #                        1.      NORMALLY ALL AUTOPILOT CMDS ARE ISSUED.
039099,000066:                                                                                                  #                        2.      IF NOT PNGCS AUTO, DO STOPRATE AND RETURN
039100,000067:                                                                                                  #                                WITHOUT ISSUING AUTOPILOT CMDS.
039101,000068:                                                                                                  #                        3.      IF ENGINE OFF, DO STOPRATE AND RETURN WITHOUT
039102,000069:                                                                                                  #                                ISSUING AUTOPILOT CMDS.
039103,000070: 
039104,000071:                                                                                                  #  ALARMS:               00401   IF INPUTS DETERMINE AN ATTITUDE IN GIMBAL LOCK.
039105,000072:                                                                                                  #                                FINDCDUW DRIVES CDUXD AND CDUYD TO THE RQD VALUES,
039106,000073:                                                                                                  #                                BUT DRIVES CDUZD ONLY TO THE GIMBAL LOCK CONE.
039107,000074: 
039108,000075:                                                                                                  #                        00402   IF UNFC/2 OR UNWC/2 PRODUCE OVERFLOW WHEN
039109,000076:                                                                                                  #                                UNITIZED USING NORMUNIT.  FINDCDUW ISSUES
039110,000077:                                                                                                  #                                STOPRATE AS ONLY INPUT TO AUTOPILOT.
039111,000078: 
039112,000079:                                                                                                  #  INPUTS:               UNFC/2          THRUST COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
039113,000080:                                                                                                  #                        UNWC/2          WINDOW COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
039114,000081:                                                                                                  #                        XOVINHIB        FLAG DENOTING X AXIS OVERRIDE INHIBITED.
039115,000082:                                                                                                  #                        CSMDOCKD        FLAG DENOTING CSM DOCKED.
039116,000083:                                                                                                  #                        STEERSW         FLAG DENOTING INSUFF THRUST FOR THRUST DIR FLTR.
039117,000084: 
039118,000085:                                                                                                  #  OUTPUTS:              DELCDUX,Y,Z
039119,000086:                                                                                                  #                        OMEGAPD,+1,+2
039120,000087:                                                                                                  #                        DELPEROR,+1,+2
039121,000088:                                                                                                  #                        CPHI,+1,+2 FOR NOUN22
039122,000089: 
039123,000090:                                                                                                  #  DEBRIS:               FINDCDUW DESTROYS SINCDUX,Y,Z AND COSCDUX,Y,Z BY
039124,000091:                                                                                                  #                        WRITING INTO THESE LOCATIONS THE SINES AND COSINES
039125,000092:                                                                                                  #                        OF THE CDUD'S IN PNGCS-AUTO, OF THE CDU'S OTHERWISE.
039126,000093: 

Page 903

039128,000095:                                                                                                  #  INITIALIZATION FOR FINDCDUW
039129,000096: 
039130,000097: 30,3071                                           BANK     30                                    
039131,000098: 30,2000                                           SETLOC   FCDUW                                 
039132,000099: 30,2000                                           BANK                                           
039133,000100: 
039134,000101: 30,3071  E6,1646                                  EBANK=   ECDUW                                 
039135,000102: 30,3071                                           COUNT*   $$/FCDUW                              
039136,000103: 
039137,000104: 30,3071           77775        INITCDUW           VLOAD                                          
039138,000105: 30,3072           06522                                    UNITX                                 
039139,000106: 30,3073           03270                           STORE    UNFV/2                                
039140,000107: 30,3074           03262                           STORE    UNWC/2                                
039141,000108: 30,3075           77616                           RVQ                                            
039142,000109: 
039143,000110:                                                                                                  #  FINDCDUW PRELIMINARIES
039144,000111: 
039145,000112: 30,3076           77775                           VLOAD                                          #  FINDCDUW -2:  ENTRY WHEN UNFC/2 PRE-STORD
039146,000113: 30,3077           03254                                    UNFC/2                                #  INPUT VECTORS NEED NOT BE SEMI-UNIT
039147,000114: 30,3100           40200        FINDCDUW           BOV      SETPD                                 #  FINDCDUW: ENTRY WHEN UNFC/2 IN MPAC
039148,000115: 30,3101           61100                                    FINDCDUW                              #  INTERPRETER NOW INITIALIZED
039149,000116: 30,3102           00023                                    22                                    #  LOCS 0 THRU 21 FOR DIRECTION COSINE MAT
039150,000117: 30,3103           77420                           STQ      EXIT                                  
039151,000118: 30,3104           03247                                    QCDUWUSR                              #  SAVE RETURN ADDRESS
039152,000119: 
039153,000120:                                                                                                  #  MORE HAUSKEEPING
039154,000121: 30,3105           33746                           CA       ECDUWL                                
039155,000122: 30,3106           56003                           XCH      EBANK                                 #  SET EBANK
039156,000123: 30,3107           55646                           TS       ECDUWUSR                              #  SAVE USER'S EBANK
039157,000124: 
039158,000125: 30,3110           30111                           CA       DAPBOOLS                              
039159,000126: 30,3111           74737                           MASK     CSMDOCKD                              #  CSMDOCKD MUST NOT BE BIT15
039160,000127: 30,3112           10000                           CCS      A                                     
039161,000128: 30,3113           34753                           CA       ONE                                   #  INDEX IF CSM DOCKED
039162,000129: 30,3114           55650                           TS       NDXCDUW                               
039163,000130: 
039164,000131: 30,3115           34743                           CA       XOVINHIB                              #  XOVINHIB MUST NOT BE BIT15
039165,000132: 30,3116           55652                           TS       FLPAUTNO                              #  SET TO POS-NON-ZERO FLAG PNGCS AUTO NOT
039166,000133: 
039167,000134: 30,3117           70111                           MASK     DAPBOOLS                              
039168,000135: 30,3120           55651                           TS       FLAGOODW                              #  FLAGOODW = ANY PNZ NUMBER IF XOV INHIBTD
039169,000136: 

Page 904

039171,000138:                                                                                                  #  FETCH BASIC DATA
039172,000139: 30,3121           00004                           INHINT                                         #  RELINT AT PAUTNO (TC INTPRET)
039173,000140: 
039174,000141: 30,3122           30032                           CA       CDUX                                  #  FETCH CDUX,CDUY,CDUZ IN ALL CASES, BUT
039175,000142: 30,3123           54771                           TS       CDUSPOTX                              #        REPLACE BELOW IF PNGCS AUTO
039176,000143: 30,3124           30033                           CA       CDUY                                  
039177,000144: 30,3125           54765                           TS       CDUSPOTY                              
039178,000145: 30,3126           30034                           CA       CDUZ                                  
039179,000146: 30,3127           54767                           TS       CDUSPOTZ                              
039180,000147: 
039181,000148: 30,3130           34742                           CA       BIT10                                 #  PNGCS CONTROL BIT
039182,000149: 30,3131           00006                           EXTEND                                         
039183,000150: 30,3132           02030                           RAND     CHAN30                                
039184,000151: 30,3133           10000                           CCS      A                                     
039185,000152: 30,3134           13151                           TCF      PAUTNO                                #  NOT PNGCS (BITS INVERTED)
039186,000153: 
039187,000154: 30,3135           34736                           CA       BIT14                                 #  AUTO MODE BIT
039188,000155: 30,3136           00006                           EXTEND                                         
039189,000156: 30,3137           02031                           RAND     CHAN31                                
039190,000157: 30,3140           10000                           CCS      A                                     
039191,000158: 30,3141           13151                           TCF      PAUTNO                                #  NOT AUTO (BITS INVERTED)
039192,000159: 
039193,000160: 30,3142           55652                           TS       FLPAUTNO                              #  RESET FLAG PNGCS AUTO NOT
039194,000161: 
039195,000162: 30,3143           31635                           CA       CDUXD                                 #  PNGCS AUTO:  FETCH CDUXD,CDUYD,CDUZD
039196,000163: 30,3144           54771                           TS       CDUSPOTX                              
039197,000164: 30,3145           31636                           CA       CDUYD                                 
039198,000165: 30,3146           54765                           TS       CDUSPOTY                              
039199,000166: 30,3147           31637                           CA       CDUZD                                 
039200,000167: 30,3150           54767                           TS       CDUSPOTZ                              
039201,000168: 

Page 905

039203,000170:                                                                                                  #  FETCH INPUTS
039204,000171: 30,3151           06042        PAUTNO             TC       INTPRET                               #  ENTERING THRUST CMD STILL IN MPAC
039205,000172: 30,3152           77634                           RTB                                            
039206,000173: 30,3153           21727                                    NORMUNIT                              
039207,000174: 30,3154           24001                           STOVL    UNX/2                                 #  SEMI-UNIT THRUST CMD AS INITIAL UNX/2
039208,000175: 30,3155           03262                                    UNWC/2                                
039209,000176: 30,3156           47034                           RTB      RTB                                   
039210,000177: 30,3157           21727                                    NORMUNIT                              
039211,000178: 30,3160           47617                                    QUICTRIG                              #  ALWAYS RQD TO OBTAIN TRIGS OF CDUD'S
039212,000179: 30,3161           24015                           STOVL    UNZ/2                                 #  SEMI-UNIT WINDOW CMD AS INITIAL UNZ/2
039213,000180: 30,3162           00325                                    DELV                                  
039214,000181: 30,3163           53404                           BOVB     UNIT                                  
039215,000182: 30,3164           61735                                    NOATTCNT                              #  AT LEAST ONE ENTERING CMD VCT ZERO

A horizontal line is hand-drawn here in the printout, but from the vertical positioning, it's unclear whether it is underlining the NOATTCNT above or if it is crossing out the CALL below.

039219,000186: 30,3165           45000                           BOV      CALL                                  
039220,000187: 30,3166           61202                                    AFTRFLTR                              #  IF UNIT DELV OVERFLOWS, SKIP FILTER
039221,000188: 30,3167           47673                                    *SMNB*                                #  YIELDS UNIT(DELV) IN VEH COORDS FOR FLTR
039222,000189: 
039223,000190:                                                                                                  #  THRUST DIRECTION FILTER
039224,000191: 
039225,000192: 30,3170           77776                           EXIT                                           
039226,000193: 
039227,000194: 30,3171           31671                           CA       UNFVY/2                               #  FOR RESTARTS, UNFV/2 ALWAYS INTACT, MPAC
039228,000195: 30,3172           22157                           LXCH     MPAC       +3                         #        RENEWED AFTER RETURN FROM CALLER,
039229,000196: 30,3173           03470                           TC       FLTRSUB                               #        TWO FILTER UPDATES MAY BE DONE.
039230,000197: 30,3174           55671                           TS       UNFVY/2                               #  UNFV/2 NEED NOT BE EXACTLY SEMI-UNIT.
039231,000198: 
039232,000199: 30,3175           31673                           CA       UNFVZ/2                               
039233,000200: 30,3176           22161                           LXCH     MPAC       +5                         
039234,000201: 30,3177           03470                           TC       FLTRSUB                               
039235,000202: 30,3200           55673                           TS       UNFVZ/2                               
039236,000203: 
039237,000204: 30,3201           06042                           TC       INTPRET                               #  COMPLETES FILTER
039238,000205: 

Page 906

039240,000207:                                                                                                  #  FIND A SUITABLE WINDOW POINTING VECTOR
039241,000208: 
039242,000209: 30,3202           46135        AFTRFLTR           SLOAD    BHIZ                                  #  IF XOV NOT INHIBITED, GO FETCH ZNB
039243,000210: 30,3203           03252                                    FLAGOODW                              
039244,000211: 30,3204           61210                                    FETCHZNB                              
039245,000212: 30,3205           45175                           VLOAD    CALL                                  
039246,000213: 30,3206           00015                                    UNZ/2                                 
039247,000214: 30,3207           61510                                    UNWCTEST                              
039248,000215: 
039249,000216: 30,3210           77775        FETCHZNB           VLOAD                                          
039250,000217: 30,3211           02162                                    ZNBPIP                                
039251,000218: 30,3212           34015                           STCALL   UNZ/2                                 
039252,000219: 30,3213           61510                                    UNWCTEST                              
039253,000220: 
039254,000221: 30,3214           57575                           VLOAD    VCOMP                                 #  Z AND -X CAN'T BOTH PARALLEL UNFC/2
039255,000222: 30,3215           02146                                    XNBPIP                                
039256,000223: 30,3216           00015                           STORE    UNZ/2                                 
039257,000224: 
039258,000225:                                                                                                  #  COMPUTE THE REQUIRED DIRECTION COSINE MATRIX
039259,000226: 
039260,000227: 30,3217           47375        DCMCL              VLOAD    VXV                                   
039261,000228: 30,3220           00015                                    UNZ/2                                 
039262,000229: 30,3221           00001                                    UNX/2                                 
039263,000230: 30,3222           41456                           UNIT     PUSH                                  #  UNY/2 FIRST ITERATION
039264,000231: 30,3223           76435                           VXV      VSL1                                  
039265,000232: 30,3224           00001                                    UNX/2                                 
039266,000233: 30,3225           00015                           STORE    UNZ/2                                 #  -UNZ/2 FIRST ITERATION
039267,000234: 30,3226           63361                           VXSC     PDVL                                  #  EXCHANGE -UNFVZ/2 UNZ/2 FOR UNY/2
039268,000235: 30,3227           03274                                    UNFVZ/2                               #  MUST BE SMALL
039269,000236: 30,3230           51361                           VXSC     BVSU                                  #  YIELDS -UNFVY/2 UNY/2-UNFVZ/2 UNZ/2
039270,000237: 30,3231           03272                                    UNFVY/2                               #  MUST BE SMALL
039271,000238: 30,3232           53372                           VSL1     VAD                                   
039272,000239: 30,3233           00001                                    UNX/2                                 
039273,000240: 30,3234           77656                           UNIT                                           #  TOTALLY ELIMINATES THRUST POINTING ERROR
039274,000241: 30,3235           00001                           STORE    UNX/2                                 #  UNX/2
039275,000242: 30,3236           76435                           VXV      VSL1                                  
039276,000243: 30,3237           00015                                    UNZ/2                                 #  -UNZ/2 WAS STORED HERE REMEMBER
039277,000244: 30,3240           00007                           STORE    UNY/2                                 #  UNY/2
039278,000245: 30,3241           47276                           VCOMP    VXV                                   
039279,000246: 30,3242           00001                                    UNX/2                                 
039280,000247: 30,3243           77772                           VSL1                                           
039281,000248: 30,3244           00015                           STORE    UNZ/2                                 #  UNZ/2
039282,000249: 

Page 907

039284,000251:                                                                                                  #  COMPUTE THE REQUIRED GIMBAL ANGLES
039285,000252: 
039286,000253: 30,3245           77624                           CALL                                           
039287,000254: 30,3246           61520                                    NB2CDUSP                              #  YIELDS THE RQD GIMBAL ANGLES, 2'S, PI
039288,000255: 30,3247           77776                           EXIT                                           
039289,000256: 
039290,000257:                                                                                                  #  LIMIT THE MIDDLE GIMBAL ANGLE & COMPUTE THE UNLIMITED GIMBAL ANGLE CHGS
039291,000258: 
039292,000259: 30,3250           30156                           CA       MPAC       +2                         #  LIMIT THE MGA
039293,000260: 30,3251           54001                           TS       L                                     #  CAN'T LXCH:  NEED UNLIMITED MGA FOR ALARM
039294,000261: 30,3252           33760                           CA       CDUZDLIM                              
039295,000262: 30,3253           03714                           TC       LIMITSUB                              #  YIELDS LIMITED MGA.  1 BIT ERROR POSSIBLE
039296,000263: 30,3254           56156                           XCH      MPAC       +2                         #        BECAUSE USING 2'S COMP.  WHO CARES?
039297,000264: 30,3255           00006                           EXTEND                                         
039298,000265: 30,3256           20156                           MSU      MPAC       +2                         #  THIS BETTER YIELD ZERO
039299,000266: 30,3257           00006                           EXTEND                                         
039300,000267: 30,3260           13262                           BZF      +2                                    
039301,000268: 30,3261           13743                           TCF      ALARMMGA                              
039302,000269: 
039303,000270: 30,3262           00004        MGARET             INHINT                                         #  RELINT AT TC INTPRET AFTER TCQCDUW
039304,000271: 
039305,000272: 30,3263           22007                           ZL                                             
039306,000273: 30,3264           34752                           CA       TWO                                   
039307,000274: 30,3265           54142        DELGMBLP           TS       TEM2                                  
039308,000275: 
039309,000276: 30,3266           30001                           CA       L                                     #  TO PREVENT FALSE STARTS ABOUT X, ZERO
039310,000277: 30,3267           00006                           EXTEND                                         #        FLAGOODW IF DELGMBZ OR Y TOO BIG.
039311,000278: 30,3270           70000                           SQUARE                                         
039312,000279: 30,3271           64350                           AD       HI5                                   #  WITHIN 1 BIT OF -(45 DEG SQUARED)
039313,000280: 30,3272           00006                           EXTEND                                         
039314,000281: 30,3273           63276                           BZMF     +3                                    
039315,000282: 30,3274           34755                           CA       ZERO                                  
039316,000283: 30,3275           55651                           TS       FLAGOODW                              
039317,000284: 
039318,000285: 30,3276           50142                           INDEX    TEM2                                  
039319,000286: 30,3277           30154                           CA       MPAC                                  
039320,000287: 30,3300           50142                           INDEX    TEM2                                  
039321,000288: 30,3301           54321                           TS       CPHI                                  #  OUTPUTS TO NOUN22
039322,000289: 30,3302           00006                           EXTEND                                         
039323,000290: 30,3303           50142                           INDEX    TEM2                                  
039324,000291: 30,3304           21635                           MSU      CDUXD                                 #  NO MATTER THAT THESE SLIGHTLY DIFFERENT
039325,000292: 30,3305           40000                           COM                                            #  FROM WHEN WE INITIALLY FETCHED THEM
039326,000293: 30,3306           50142                           INDEX    TEM2                                  
039327,000294: 30,3307           55675                           TS       -DELGMB                               #  -UNLIMITED GIMBAL ANGLE CHGS, 1'S, PI
039328,000295: 30,3310           54001                           TS       L                                     #  FOR PRECEDING TEST ON NEXT LOOP PASS
039329,000296: 30,3311           10142                           CCS      TEM2                                  
039330,000297: 30,3312           13265                           TCF      DELGMBLP                              
039331,000298: 

Page 908

039333,000300:                                                                                                  #  BRANCHES TO NOATTCNT
039334,000301: 30,3313           11652                           CCS      FLPAUTNO                              
039335,000302: 30,3314           13737                           TCF      NOATTCNT   +2                         #  NOT PNGCS AUTO
039336,000303: 
039337,000304: 30,3315           30101                           CA       FLAGWRD5                              
039338,000305: 30,3316           74745                           MASK     ENGONBIT                              
039339,000306: 30,3317           00006                           EXTEND                                         
039340,000307: 30,3320           13737                           BZF      NOATTCNT   +2                         #  ENGINE NOT ON
039341,000308: 

Page 909

039343,000310:                                                                                                  #  LIMIT THE ATTITUDE ANGLE CHANGES
039344,000311: 
039345,000312:                                                                                                  #  THIS SECTION LIMITS THE ATTITUDE ANGLE CHANGES ABOUT A SET OF ORTHOGONAL VEHICLE AXES X,YPRIME,ZPRIME.
039346,000313:                                                                                                  #  THESE AXES COINCIDE WITH THE COMMANDED VEHICLE AXES IF AND ONLY IF CDUXD IS ZERO.  THE PRIME SYSTEM IS
039347,000314:                                                                                                  #  THE COMMANDED VEHICLE SYSTEM ROTATED ABOUT THE X AXIS TO BRING THE Z AXIS INTO ALINEMENT WITH THE MIDDLE GIMBAL
039348,000315:                                                                                                  #  AXIS.  ATTITUDE ANGLE CHANGES IN THE PRIME SYSTEM ARE RELATED TO SMALL GIMBAL ANGLE CHANGES BY:
039349,000316: 
039350,000317:                                                                                                  #        *   -DELATTX    *   * 1     SIN(CDUZD)     0 * * -DELGMBX *
039351,000318:                                                                                                  #        *               *   *                        * *          *
039352,000319:                                                                                                  #        * -DELATTYPRIME * = * 0     COS(CDUZD)     0 * * -DELGMBY *
039353,000320:                                                                                                  #        *               *   *                        * *          *
039354,000321:                                                                                                  #        * -DELATTZPRIME *   * 0         0          1 * * -DELGMBZ *
039355,000322: 
039356,000323: 30,3321           23677                           LXCH     -DELGMB    +2                         #  SAME AS -DELATTZPRIME UNLIMITED
039357,000324: 30,3322           51650                           INDEX    NDXCDUW                               
039358,000325: 30,3323           33754                           CA       DAZMAX                                
039359,000326: 30,3324           03714                           TC       LIMITSUB                              
039360,000327: 30,3325           55677                           TS       -DELGMB    +2                         #  -DELGMBZ
039361,000328: 
039362,000329: 30,3326           31676                           CA       -DELGMB    +1                         
039363,000330: 30,3327           00006                           EXTEND                                         
039364,000331: 30,3330           70745                           MP       COSCDUZ                               #  YIELDS -DELATTYPRIME/2 UNLIMITED
039365,000332: 30,3331           54001                           TS       L                                     
039366,000333: 30,3332           51650                           INDEX    NDXCDUW                               
039367,000334: 30,3333           33756                           CA       DAY/2MAX                              
039368,000335: 30,3334           03714                           TC       LIMITSUB                              
039369,000336: 30,3335           00006                           EXTEND                                         
039370,000337: 30,3336           10745                           DV       COSCDUZ                               
039371,000338: 30,3337           57676                           XCH      -DELGMB    +1                         #  -DELGMBY, FETCHING UNLIMITED VALUE
039372,000339: 
039373,000340: 30,3340           00006                           EXTEND                                         
039374,000341: 30,3341           70737                           MP       SINCDUZ                               
039375,000342: 30,3342           20001                           DDOUBL                                         
039376,000343: 30,3343           40000                           COM                                            
039377,000344: 30,3344           00006                           EXTEND                                         #  YIELDS +DELATTX UNLIMITD, MAG < 180 DEG,
039378,000345: 30,3345           21675                           MSU      -DELGMB                               #        BASED ON UNLIMITED DELGMBY.
039379,000346: 30,3346           54001                           TS       L                                     #        ONE BIT ERROR IF OPERANDS IN MSU
039380,000347: 30,3347           51650                           INDEX    NDXCDUW                               #        OF MIXED SIGNS.  WHO CARES?
039381,000348: 30,3350           33754                           CA       DAXMAX                                
039382,000349: 30,3351           03714                           TC       LIMITSUB                              
039383,000350: 30,3352           55675                           TS       -DELGMB                               #  SAVE LIMITED +DELATTX
039384,000351: 30,3353           11651                           CCS      FLAGOODW                              
039385,000352: 30,3354           41675                           CS       -DELGMB                               #  FETCH IT BACK CHGING SIGN IF WINDOW GOOD
039386,000353: 30,3355           55675                           TS       -DELGMB                               #  OTHERWISE USE ZERO FOR -DELATTX
039387,000354: 30,3356           41676                           CS       -DELGMB    +1                         
039388,000355: 30,3357           00006                           EXTEND                                         
039389,000356: 30,3360           70737                           MP       SINCDUZ                               
039390,000357: 30,3361           20001                           DDOUBL                                         #  YIELDS -CNTRIB TO -DELATTX FROM -DELGMBY
039391,000358: 30,3362           27675                           ADS      -DELGMB                               #  -DELGMBX.  NO OVERFLOW SINCE LIMITED TO
039392,000359:                                                                                                  #  20DEG(1+SIN(70DEG)/COS(70DEG)) < 180DEG
039393,000360: 

Page 910

039395,000362:                                                                                                  #  COMPUTE COMMANDED ATTITUDE RATES
039396,000363: 
039397,000364:                                                                                                  #        * OMEGAPD *   * -2         -4 SINCDUZ              +0    * * -DELGMBX *
039398,000365:                                                                                                  #        *         *   *                                          * *          *
039399,000366:                                                                                                  #        * OMEGAQD * = * +0     -8 COSCDUZ COSCDUX     -4 SINCDUX * * -DELGMBY *
039400,000367:                                                                                                  #        *         *   *                                          * *          *
039401,000368:                                                                                                  #        * OMEGARD *   * +0     +8 COSCDUZ SINCDUX     -4 COSCDUX * * -DELGMBZ *
039402,000369: 
039403,000370:                                                                                                  #  ATTITUDE ANGLE RATES IN UNITS OF PI/4 RAD/SEC = K TRIG FCNS IN UNITS OF 2 X GIMBAL ANGLE RATES IN UNITS OF
039404,000371:                                                                                                  #  PI/2 RAD/SEC.  THE CONSTANTS ARE BASED ON DELGMB BEING THE GIMBAL ANGLE CHANGES IN UNITS OF PI RADIANS,
039405,000372:                                                                                                  #  AND 2 SECONDS BEING THE COMPUTATION PERIOD (THE PERIOD BETWEEN SUCCESSIVE PASSES THRU FINDCDUW).
039406,000373: 
039407,000374: 30,3363           41675                           CS       -DELGMB                               
039408,000375: 30,3364           55643                           TS       OMEGAPD                               
039409,000376: 30,3365           41676                           CS       -DELGMB    +1                         
039410,000377: 30,3366           00006                           EXTEND                                         
039411,000378: 30,3367           70737                           MP       SINCDUZ                               
039412,000379: 30,3370           20001                           DDOUBL                                         
039413,000380: 30,3371           27643                           ADS      OMEGAPD                               
039414,000381: 30,3372           27643                           ADS      OMEGAPD                               
039415,000382: 
039416,000383: 30,3373           41676                           CS       -DELGMB    +1                         
039417,000384: 30,3374           00006                           EXTEND                                         
039418,000385: 30,3375           70747                           MP       COSCDUX                               
039419,000386: 30,3376           20001                           DDOUBL                                         
039420,000387: 30,3377           00006                           EXTEND                                         
039421,000388: 30,3400           70745                           MP       COSCDUZ                               
039422,000389: 30,3401           55644                           TS       OMEGAQD                               
039423,000390: 30,3402           41677                           CS       -DELGMB    +2                         
039424,000391: 30,3403           00006                           EXTEND                                         
039425,000392: 30,3404           70741                           MP       SINCDUX                               
039426,000393: 30,3405           27644                           ADS      OMEGAQD                               
039427,000394: 30,3406           27644                           ADS      OMEGAQD                               
039428,000395: 30,3407           27644                           ADS      OMEGAQD                               
039429,000396: 
039430,000397: 30,3410           31676                           CA       -DELGMB    +1                         
039431,000398: 30,3411           00006                           EXTEND                                         
039432,000399: 30,3412           70741                           MP       SINCDUX                               
039433,000400: 30,3413           20001                           DDOUBL                                         
039434,000401: 30,3414           00006                           EXTEND                                         
039435,000402: 30,3415           70745                           MP       COSCDUZ                               
039436,000403: 30,3416           55645                           TS       OMEGARD                               
039437,000404: 30,3417           41677                           CS       -DELGMB    +2                         
039438,000405: 30,3420           00006                           EXTEND                                         
039439,000406: 30,3421           70747                           MP       COSCDUX                               
039440,000407: 30,3422           27645                           ADS      OMEGARD                               
039441,000408: 30,3423           27645                           ADS      OMEGARD                               
039442,000409: 30,3424           27645                           ADS      OMEGARD                               
039443,000410: 

Page 911

039445,000412:                                                                                                  #  FINAL TRANSFER
039446,000413: 
039447,000414: 30,3425           34752                           CA       TWO                                   
039448,000415: 30,3426           54142        CDUWXFR            TS       TEM2                                  
039449,000416: 30,3427           50142                           INDEX    TEM2                                  
039450,000417: 30,3430           31675                           CA       -DELGMB                               
039451,000418: 30,3431           00006                           EXTEND                                         
039452,000419: 30,3432           73761                           MP       DT/DELT                               #  RATIO OF DAP INTERVAL TO CDUW INTERVAL
039453,000420: 30,3433           03730                           TC       ONESTO2S                              
039454,000421: 30,3434           50142                           INDEX    TEM2                                  
039455,000422: 30,3435           55640                           TS       DELCDUX                               #  ANGLE INTERFACE
039456,000423: 
039457,000424: 30,3436           50142                           INDEX    TEM2                                  
039458,000425: 30,3437           11643                           CCS      OMEGAPD                               
039459,000426: 30,3440           64753                           AD       ONE                                   
039460,000427: 30,3441           13443                           TCF      +2                                    
039461,000428: 30,3442           64753                           AD       ONE                                   
039462,000429: 30,3443           00006                           EXTEND                                         #  WE NOW HAVE ABS(OMEGAPD,QD,RD)
039463,000430: 30,3444           50142                           INDEX    TEM2                                  
039464,000431: 30,3445           71643                           MP       OMEGAPD                               
039465,000432: 30,3446           00006                           EXTEND                                         
039466,000433: 30,3447           74741                           MP       BIT11                                 #  1/16
039467,000434: 30,3450           00006                           EXTEND                                         
039468,000435: 30,3451           50142                           INDEX    TEM2                                  #                    2
039469,000436: 30,3452           11530                           DV       1JACC                                 #  UNITS PI/4 RAD/SEC
039470,000437: 30,3453           54001                           TS       L                                     
039471,000438: 30,3454           33756                           CA       DELERLIM                              
039472,000439: 30,3455           03714                           TC       LIMITSUB                              
039473,000440: 30,3456           50142                           INDEX    TEM2                                  
039474,000441: 30,3457           55274                           TS       DELPEROR                              #  LAG ANGLE = OMEGA ABS(OMEGA)/2 ACCEL
039475,000442: 30,3460           10142                           CCS      TEM2                                  
039476,000443: 30,3461           13426                           TCF      CDUWXFR                               
039477,000444: 
039478,000445:                                                                                                  #  HAUSKEEPING AND RETURN
039479,000446: 
039480,000447: 30,3462           31646        TCQCDUW            CA       ECDUWUSR                              
039481,000448: 30,3463           54003                           TS       EBANK                                 #  RETURN USER'S EBANK
039482,000449: 
039483,000450: 30,3464           06042                           TC       INTPRET                               
039484,000451: 30,3465           52001                           SETPD    GOTO                                  
039485,000452: 30,3466           00001                                    0                                     
039486,000453: 30,3467           03247                                    QCDUWUSR                              #  NORMAL AND ABNORMAL RETURN TO USER
039487,000454: 

Page 912

039489,000456:                                                                                                  #  THRUST VECTOR FILTER SUBROUTINE
039490,000457: 
039491,000458: 30,3470           00006        FLTRSUB            EXTEND                                         
039492,000459: 30,3471           22142                           QXCH     TEM2                                  
039493,000460: 30,3472           54143                           TS       TEM3                                  #  SAVE ORIGINAL OFFSET
039494,000461: 30,3473           40000                           COM                                            #  ONE MCT, NO WDS, CAN BE SAVED IF NEG OF
039495,000462: 30,3474           60001                           AD       L                                     #        ORIG OFFSET ARRIVES IN A, BUT IT'S
039496,000463: 30,3475           00006                           EXTEND                                         #        NOT WORTH THE INCREASED OBSCURITY.
039497,000464: 30,3476           51650                           INDEX    NDXCDUW                               
039498,000465: 30,3477           73747                           MP       GAINFLTR                              
039499,000466: 30,3500           54001                           TS       L                                     #  INCR TO OFFSET, UNLIMITED
039500,000467: 30,3501           33751                           CA       DUNFVLIM                              #  SAME LIMIT FOR Y AND Z
039501,000468: 30,3502           03714                           TC       LIMITSUB                              #  YIELDS INCR TO OFFSET, LIMITED
039502,000469: 30,3503           60143                           AD       TEM3                                  #  ORIGINAL OFFSET
039503,000470: 30,3504           54001                           TS       L                                     #  TOTAL OFFSET, UNLIMITED
039504,000471: 30,3505           33752                           CA       UNFVLIM                               #  SAME LIMIT FOR Y AND Z
039505,000472: 30,3506           03714                           TC       LIMITSUB                              #  YIELDS TOTAL OFFSET, LIMITED
039506,000473: 30,3507           00142                           TC       TEM2                                  
039507,000474: 
039508,000475:                                                                                                  #  SUBR TO TEST THE ANGLE BETWEEN THE PROPOSED WINDOW AND THRUST CMD VCTS
039509,000476: 
039510,000477: 30,3510           63441        UNWCTEST           DOT      DSQ                                   
039511,000478: 30,3511           00001                                    UNX/2                                 
039512,000479: 30,3512           50025                           DSU      BMN                                   
039513,000480: 30,3513           21754                                    DOTSWFMX                              
039514,000481: 30,3514           61217                                    DCMCL                                 
039515,000482: 30,3515           43531                           SSP      RVQ                                   #  RVQ FOR ALT CHOICE IF DOT MAGN TOO LARGE
039516,000483: 30,3516           03252                                    FLAGOODW                              #        ZEROING WINDOW GOOD FLAG
039517,000484: 30,3517           00000                                    0                                     
039518,000485: 

Page 913

039520,000487:                                                                                                  #  NB2CDUSP RETURNS THE 2'S COMPLEMENT, PI, SP CDU ANGLES X,Y,Z IN MPAC,+1,+2 GIVEN THE MATRIX WHOSE ROW VECTORS
039521,000488:                                                                                                  #  ARE THE SEMI-UNIT NAV BASE VECTORS X,Y,Z EXPRESSED IN STABLE MEMBER COORDINATES, LOCATED AT 0 IN THE PUSH LIST.
039522,000489:                                                                                                  #  NB2CDUSP USES ARCTRGSP WHICH HAS A MAXIMUM ERROR OF +-4 BITS.
039523,000490: 
039524,000491: 30,3520           63545        NB2CDUSP           DLOAD    DSQ                                   
039525,000492: 30,3521           00003                                    2                                     
039526,000493: 30,3522           51021                           BDSU     BPL                                   
039527,000494: 30,3523           06514                                    DP1/4TH                               
039528,000495: 30,3524           61527                                    +3                                    
039529,000496: 30,3525           77745                           DLOAD                                          
039530,000497: 30,3526           06524                                    ZEROVECS                              #  IN CASE SIN WAS SLIGHTLY > 1/2
039531,000498: 30,3527           77566                           SQRT     EXIT                                  #  YIELDS COS(CDUZ) IN UNITS OF 2
039532,000499: 
039533,000500: 30,3530           00006                           EXTEND                                         
039534,000501: 30,3531           30155                           DCA      MPAC                                  
039535,000502: 30,3532           20001                           DDOUBL                                         
039536,000503: 30,3533           54145                           TS       TEM5                                  
039537,000504: 30,3534           13537                           TCF      +3                                    
039538,000505: 30,3535           34733                           CA       POSMAX                                #  OVERFLOW.  FETCH POSMAX, MPAC ALWAYS POS
039539,000506: 30,3536           54145                           TS       TEM5                                  #  COS(CDUZ) IN TEM5, UNITS 1
039540,000507: 
039541,000508: 30,3537           50120                           INDEX    FIXLOC                                
039542,000509: 30,3540           30002                           CA       2                                     
039543,000510: 30,3541           22154                           LXCH     MPAC                                  
039544,000511: 30,3542           03607                           TC       ARCTRGSP                              
039545,000512: 30,3543           54156                           TS       MPAC       +2                         #  CDUZ
039546,000513: 
039547,000514: 30,3544           34755                           CA       ZERO                                  
039548,000515: 30,3545           03565                           TC       DVBYCOSM                              
039549,000516: 30,3546           34751                           CA       FOUR                                  
039550,000517: 30,3547           03565                           TC       DVBYCOSM                              
039551,000518: 30,3550           40141                           CS       TEM1                                  
039552,000519: 30,3551           03607                           TC       ARCTRGSP                              
039553,000520: 30,3552           54155                           TS       MPAC       +1                         #  CDUY
039554,000521: 
039555,000522: 30,3553           34750                           CA       BIT4                                  
039556,000523: 30,3554           03565                           TC       DVBYCOSM                              
039557,000524: 30,3555           33564                           CA       16OCT                                 
039558,000525: 30,3556           03565                           TC       DVBYCOSM                              
039559,000526: 30,3557           40141                           CS       TEM1                                  
039560,000527: 30,3560           03607                           TC       ARCTRGSP                              
039561,000528: 30,3561           54154                           TS       MPAC                                  #  CDUX
039562,000529: 
039563,000530: 30,3562           06042                           TC       INTPRET                               
039564,000531: 30,3563           77616                           RVQ                                            
039565,000532: 
039566,000533: 30,3564           00016        16OCT              OCT      16                                    
039567,000534: 

Page 914

039569,000536:                                                                                                  #  THE ELEMENTS OF THE NAV BASE MATRIX WHICH WE MUST DIVIDE BY COS(MGA)
039570,000537:                                                                                                  #  ALREADY CONTAIN COS(MGA)/2 AS A FACTOR. THEREFORE THE QUOTIENT SHOULD
039571,000538:                                                                                                  #  ORDINARILY NEVER EXCEED 1/2 IN MAGNITUDE.  BUT IF THE MGA IS NEAR PI/2
039572,000539:                                                                                                  #  THEN COS(MGA) IS NEAR ZERO, AND THERE MAY BE SOME CHAFF IN THE OTHER
039573,000540:                                                                                                  #  ELEMENTS OF THE MATRIX WHICH WOULD PRODUCE CHAOS UNDER DIVISION.
039574,000541:                                                                                                  #  BEFORE DIVIDING WE MAKE SURE COS(MGA) IS AT LEAST ONE BIT LARGER
039575,000542:                                                                                                  #  THAN THE MAGNITUDE OF THE HIGH ORDER PART OF THE OPERAND.
039576,000543: 
039577,000544:                                                                                                  #  IF ONE OR MORE DIVIDES CANNOT BE PERFORMED, THIS MEANS THAT THE
039578,000545:                                                                                                  #  REQUIRED MGA IS VERY NEARLY +-PI/2 AND THEREFORE THE OTHER GIMBAL
039579,000546:                                                                                                  #  ANGLES ARE INDETERMINATE.  THE INNER AND OUTER GIMBAL ANGLES RETURNED
039580,000547:                                                                                                  #  IN THIS CASE WILL BE RANDOM MULTIPLES OF PI/2.
039581,000548: 
039582,000549: 30,3565           60120        DVBYCOSM           AD       FIXLOC                                
039583,000550: 30,3566           54116                           TS       ADDRWD                                #  ADRES OF OPERAND
039584,000551: 
039585,000552: 30,3567           50116                           INDEX    ADDRWD                                #  FETCH NEG ABS OF OPERAND, AD TEM5, AND
039586,000553: 30,3570           30000                           CA       0                                     #        SKIP DIVIDE IF RESULT NEG OR ZERO
039587,000554: 30,3571           00006                           EXTEND                                         
039588,000555: 30,3572           63574                           BZMF     +2                                    
039589,000556: 30,3573           40000                           COM                                            
039590,000557: 30,3574           60145                           AD       TEM5                                  #  C(A) ZERO OR NEG, C(TEM5) ZERO OR POS
039591,000558: 30,3575           00006                           EXTEND                                         
039592,000559: 30,3576           63604                           BZMF     TSL&TCQ                               #  DIFFERENCE ALWAYS SMALL IF BRANCH
039593,000560: 
039594,000561: 30,3577           00006                           EXTEND                                         #  TEM5 EXCEEDS ABS HIGH ORDER PART OF
039595,000562: 30,3600           50116                           INDEX    ADDRWD                                #        OPERAND BY AT LEAST ONE BIT.
039596,000563: 30,3601           30001                           DCA      0                                     #        THEREFORE IT EXCEEDS THE DP OPERAND
039597,000564: 30,3602           00006                           EXTEND                                         #        AND DIVISION WILL ALWAYS SUCCEED.
039598,000565: 30,3603           10145                           DV       TEM5                                  
039599,000566: 30,3604           54001        TSL&TCQ            TS       L                                     
039600,000567: 30,3605           22141                           LXCH     TEM1                                  
039601,000568: 30,3606           00002                           TC       Q                                     
039602,000569: 

Page 915

039604,000571:                                                                                                  #  ARCTRGSP RETURNS THE 2'S COMPLEMENT, PI, SP ANGLE IN THE A REGISTER GIVEN ITS SINE IN A AND ITS COSINE IN L IN
039605,000572:                                                                                                  #  UNITS OF 2.  THE RESULT IS AN UNAMBIGUOUS ANGLE ANYWHERE IN THE CIRCLE, WITH A MAXIMUM ERROR OF +-4 BITS.
039606,000573:                                                                                                  #  THE ERROR IS PRODUCED BY THE SUBROUTINE SPARCSIN WHICH IS USED ONLY IN THE REGION +-45 DEGREES.
039607,000574: 
039608,000575: 30,3607           00006        ARCTRGSP           EXTEND                                         
039609,000576: 30,3610           13652                           BZF      SINZERO                               #  TO AVOID DIVIDING BY ZERO
039610,000577: 
039611,000578: 30,3611           00006                           EXTEND                                         
039612,000579: 30,3612           22144                           QXCH     TEM4                                  
039613,000580: 30,3613           54142                           TS       TEM2                                  
039614,000581: 30,3614           30001                           CA       L                                     
039615,000582: 30,3615           54143                           TS       TEM3                                  
039616,000583: 30,3616           34755                           CA       ZERO                                  
039617,000584: 30,3617           00006                           EXTEND                                         
039618,000585: 30,3620           10142                           DV       TEM2                                  
039619,000586: 30,3621           00006                           EXTEND                                         
039620,000587: 30,3622           13641                           BZF      USECOS                                
039621,000588: 
039622,000589: 30,3623           10143                           CCS      TEM3                                  #  SIN IS SMALLER OR EQUAL
039623,000590: 30,3624           34755                           CA       ZERO                                  
039624,000591: 30,3625           13631                           TCF      +4                                    
039625,000592: 30,3626           40142                           CS       TEM2                                  #  IF COS NEG, REVERSE SIGN OF SIN,
039626,000593: 30,3627           54142                           TS       TEM2                                  #        ANGLE = PI-ARCSIN(SIN)
039627,000594: 30,3630           34735                           CA       NEGMAX                                #  PICK UP PI, 2'S COMPLEMENT
039628,000595: 30,3631           54143                           TS       TEM3                                  #  WE NO LONGER NEED COS
039629,000596: 30,3632           30142                           CA       TEM2                                  
039630,000597: 30,3633           03657                           TC       SPARCSIN   -1                         
039631,000598: 30,3634           03730                           TC       ONESTO2S                              
039632,000599: 30,3635           00006                           EXTEND                                         
039633,000600: 30,3636           20143                           MSU      TEM3                                  
039634,000601: 30,3637           03730        1TO2&TCQ           TC       ONESTO2S                              
039635,000602: 30,3640           00144                           TC       TEM4                                  
039636,000603: 
039637,000604: 30,3641           40143        USECOS             CS       TEM3                                  #  COS IS SMALLER
039638,000605: 30,3642           03657                           TC       SPARCSIN   -1                         #  ANGLE = SIGN(SIN)(PI/2-ARCSIN(COS))
039639,000606: 30,3643           64736                           AD       HALF                                  
039640,000607: 30,3644           54143                           TS       TEM3                                  #  WE NO LONGER NEED COS
039641,000608: 30,3645           10142                           CCS      TEM2                                  
039642,000609: 30,3646           30143                           CA       TEM3                                  
039643,000610: 30,3647           13637                           TCF      1TO2&TCQ                              
039644,000611: 30,3650           40143                           CS       TEM3                                  
039645,000612: 30,3651           13637                           TCF      1TO2&TCQ                              
039646,000613: 
039647,000614: 30,3652           10001        SINZERO            CCS      L                                     
039648,000615: 30,3653           34755                           CA       ZERO                                  
039649,000616: 30,3654           00002                           TC       Q                                     
039650,000617: 30,3655           34735                           CA       NEGMAX                                #  PI, 2'S COMP
039651,000618: 30,3656           00002                           TC       Q                                     
039652,000619: 

Page 916

039654,000621:                                                                                                  #  SPARCSIN TAKES AN ARGUMENT SCALED UNITY IN A AND RETURNS AN ANGLE SCALED
039655,000622:                                                                                                  #  180 DEGREES IN A.  IT HAS BEEN UNIT TESTED IN THE REGION +-.94 (+-70
039656,000623:                                                                                                  #  DEGREES) AND THE MAXIMUM ERROR IS +-5 BITS WITH AN AVERAGE TIME OF
039657,000624:                                                                                                  #  450 MICROSECONDS.  SPARCSIN -1 TAKES THE ARGUMENT SCALED TWO.  (BOB CRISP)
039658,000625: 
039659,000626: 30,3657           60000                           DOUBLE                                         
039660,000627: 30,3660           54021        SPARCSIN           TS       SR                                    
039661,000628: 30,3661           13665                           TCF      +4                                    
039662,000629: 30,3662           50000                           INDEX    A                                     
039663,000630: 30,3663           44734                           CS       LIMITS                                
039664,000631: 30,3664           54021                           TS       SR                                    
039665,000632: 30,3665           00006                           EXTEND                                         
039666,000633: 30,3666           70000                           MP       A                                     
039667,000634: 30,3667           54141                           TS       TEM1                                  
039668,000635: 30,3670           00006                           EXTEND                                         
039669,000636: 30,3671           73713                           MP       DPL9                                  
039670,000637: 30,3672           63712                           AD       DPL7                                  
039671,000638: 30,3673           00006                           EXTEND                                         
039672,000639: 30,3674           70141                           MP       TEM1                                  
039673,000640: 30,3675           63711                           AD       DPL5                                  
039674,000641: 30,3676           00006                           EXTEND                                         
039675,000642: 30,3677           70141                           MP       TEM1                                  
039676,000643: 30,3700           63710                           AD       DPL3                                  
039677,000644: 30,3701           00006                           EXTEND                                         
039678,000645: 30,3702           70141                           MP       TEM1                                  
039679,000646: 30,3703           63707                           AD       DPL1                                  
039680,000647: 30,3704           00006                           EXTEND                                         
039681,000648: 30,3705           70021                           MP       SR                                    
039682,000649: 30,3706           00002                           TC       Q                                     
039683,000650: 30,3707           24406        DPL1               DEC      10502      B-14                       
039684,000651: 30,3710           00660        DPL3               DEC      432        B-14                       
039685,000652: 30,3711           16204        DPL5               DEC      7300       B-14                       
039686,000653: 30,3712           50744        DPL7               DEC      -11803     B-14                       
039687,000654: 30,3713           20315        DPL9               DEC      8397       B-14                       
039688,000655: 

Page 917

039690,000657:                                                                                                  #  LIMITSUB LIMITS THE MAGNITUDE OF THE POSITIVE OR NEGATIVE VARIABLE
039691,000658:                                                                                                  #  ARRIVING IN L TO THE POSITIVE LIMIT ARRIVING IN A.
039692,000659:                                                                                                  #  THE SIGNED LIMITED VARIABLE IS RETURNED IN A.
039693,000660: 
039694,000661:                                                                                                  #  VERSION COURTESY HUGH BLAIR-SMITH
039695,000662: 
039696,000663: 30,3714           54141        LIMITSUB           TS       TEM1                                  
039697,000664: 30,3715           34755                           CA       ZERO                                  
039698,000665: 30,3716           00006                           EXTEND                                         
039699,000666: 30,3717           10141                           DV       TEM1                                  
039700,000667: 30,3720           10000                           CCS      A                                     
039701,000668: 30,3721           22141                           LXCH     TEM1                                  
039702,000669: 30,3722           13724                           TCF      +2                                    
039703,000670: 30,3723           13726                           TCF      +3                                    
039704,000671: 30,3724           30001                           CA       L                                     
039705,000672: 30,3725           00002                           TC       Q                                     
039706,000673: 30,3726           40141                           CS       TEM1                                  
039707,000674: 30,3727           00002                           TC       Q                                     
039708,000675: 
039709,000676:                                                                                                  #  SUBROUTINE TO CONVERT 1'S COMP SP TO 2'S COMP
039710,000677: 
039711,000678: 30,3730           10000        ONESTO2S           CCS      A                                     
039712,000679: 30,3731           64753                           AD       ONE                                   
039713,000680: 30,3732           00002                           TC       Q                                     
039714,000681: 30,3733           40000                           CS       A                                     
039715,000682: 30,3734           00002                           TC       Q                                     
039716,000683: 
039717,000684:                                                                                                  #  NO ATTITUDE CONTROL
039718,000685: 
039719,000686: 30,3735           05567        NOATTCNT           TC       ALARM                                 
039720,000687: 30,3736           00402                           OCT      00402                                 #  NO ATTITUDE CONTROL
039721,000688: 
039722,000689: 30,3737           00004                 +2        INHINT                                         #  COME HERE FOR NOATTCNT WITHOUT ALARM
039723,000690: 30,3740           04674                           TC       IBNKCALL                              #  RELINT AT TC INTPRET AFTER TCQCDUW
039724,000691: 30,3741           40166                           FCADR    STOPRATE                              
039725,000692: 30,3742           13462                           TCF      TCQCDUW                               #  RETURN TO USER SKIPPING AUTOPILOT CMDS
039726,000693: 
039727,000694:                                                                                                  #  MIDDLE GIMBAL ANGLE ALARM
039728,000695: 
039729,000696: 30,3743           05567        ALARMMGA           TC       ALARM                                 
039730,000697: 30,3744           00401                           OCT      00401                                 
039731,000698: 30,3745           13262                           TCF      MGARET                                
039732,000699: 

Page 918

039734,000701:                                                                                                  # ************************************************************************
039735,000702:                                                                                                  #  CONSTANTS
039736,000703:                                                                                                  # ************************************************************************
039737,000704: 
039738,000705:                                                                                                  #  ADDRESS CONSTANTS
039739,000706: 
039740,000707: 30,3746           03246        ECDUWL             ECADR    ECDUW                                 
039741,000708: 
039742,000709:                                                                                                  #  THRUST DIRECTION FILTER CONSTANTS
039743,000710: 
039744,000711: 30,3747           06315        GAINFLTR           DEC      .2                                    #  GAIN FILTER SANS CSM
039745,000712: 30,3750           03146                           DEC      .1                                    #  GAIN FILTER WITH CSM
039746,000713: 
039747,000714: 30,3751           00071        DUNFVLIM           DEC      .007       B-1                        #  7 MR MAX CHG IN F DIR IN VEH IN 2 SECS.
039748,000715:                                                                                                  #  THIS DOES NOT ALLOW FOR S/C ROT RATE.
039749,000716: 
039750,000717: 30,3752           02041        UNFVLIM            DEC      .129       B-1                        #  129 MR MAX THRUST OFFSET.  105 MR TRAVEL
039751,000718:                                                                                                  #  +10MR DEFL+5MR MECH MOUNT+9MR ABLATION.
039752,000719: 
039753,000720:                                                                                                  #  CONSTANTS RELATED TO GIMBAL ANGLE COMPUTATIONS
039754,000721: 
039755,000722: 30,3753           01673        DOTSWFMX           DEC      .93302     B-4                        #  LIM COLNRTY OF UNWC/2 & UNFC/2 TO 85 DEG
039756,000723:                                                                                                  #  LOWER PART COMES FROM NEXT CONSTANT
039757,000724: 
039758,000725: 30,3754           03434        DAXMAX             DEC      .11111111111                            #  DELATTX LIM TO 20 DEG IN 2 SECS, 1'S, PI
039759,000726: 30,3755           00266                           DEC      .0111111111                            #  2 DEG WHEN CSM DOCKED
039760,000727: 
039761,000728: 30,3756           01616        DAY/2MAX           DEC      .05555555555                            #  LIKEWISE FOR DELATTY
039762,000729: 30,3757           00133                           DEC      .0055555555                            
039763,000730: 
039764,000731: 30,3760  30,3754               DAZMAX             =        DAXMAX                                #  LIKEWISE FOR DELATTZ
039765,000732: 
039766,000733: 30,3760           14344        CDUZDLIM           DEC      .3888888888                            #  70 DEG LIMIT FOR MGA, 1'S, PI
039767,000734: 
039768,000735:                                                                                                  #  CONSTANTS FOR DATA TRANSFER
039769,000736: 
039770,000737: 30,3761           01463        DT/DELT            DEC      .05                                   #  .1 SEC/2 SEC WHICH IS THE AUTOPILOT
039771,000738:                                                                                                  #  CONTROL SAMPLE PERIOD/COMPUTATION PERIOD
039772,000739: 
039773,000740: 30,3762  30,3756               DELERLIM           =        DAY/2MAX                              #  10 DEG LIMIT FOR LAG ANGLES, 1'S, PI
039774,000741: 

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