Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

040254,000002:                                                                                                  ## Copyright:   Public domain.
040255,000003:                                                                                                  ## Filename:    FINDCDUW_-_GUIDAP_INTERFACE.agc
040256,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
040257,000005:                                                                                                  ##              It is part of the source code for the original release
040258,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
040259,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
040260,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
040261,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
040262,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
040263,000011:                                                                                                  ##              that the code format has been changed to conform to the
040264,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
040265,000013:                                                                                                  ##              original YUL assembler.
040266,000014:                                                                                                  ## Reference:   pp. 907-924
040267,000015:                                                                                                  ## Assembler:   yaYUL
040268,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
040269,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
040270,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
040271,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
040272,000020:                                                                                                  ##              2017-01-22 HG   Transcribed
040273,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
040274,000022:                                                                                                  ##                              and fixed errors found.
040275,000023:                                                                                                  ##              2017-03-10 RSB  Comment-text fixes noted in proofing Luminary 116.
040276,000024: 

Page 907

040278,000026:                                                                                                  #  PROGRAM NAME:   FINDCDUW
040279,000027: 
040280,000028:                                                                                                  #  MOD NUMBER:     1         68 07 15
040281,000029: 
040282,000030:                                                                                                  #  MOD AUTHOR:     KLUMPP
040283,000031: 
040284,000032:                                                                                                  #  OBJECTS OF MOD: 1.        TO SUPPLY COMMANDED GIMBAL ANGLES FOR NOUN 22.
040285,000033:                                                                                                  #                  2.        TO MAINTAIN CORRECT AND CURRENT THRUST
040286,000034:                                                                                                  #                            DIRECTION DATA IN ALL MODES.  THIS IS DONE BY
040287,000035:                                                                                                  #                            FETCHING FOR THE THRUST DIRECTION FILTER THE
040288,000036:                                                                                                  #                            CDUD'S IN PNGCS-AUTO, THE CDU'S IN ALL OTHER
040289,000037:                                                                                                  #                            MODES.
040290,000038:                                                                                                  #                  3.        TO SUBSTITUTE A STOPRATE FOR THE NORMAL
040291,000039:                                                                                                  #                            AUTOPILOT COMMANDS WHENEVER
040292,000040:                                                                                                  #                            1) NOT IN PNGCS-AUTO, OR
040293,000041:                                                                                                  #                            2) ENGINE IS OFF.
040294,000042: 
040295,000043:                                                                                                  #  FUNCTIONAL DESCRIPTION:
040296,000044: 
040297,000045:                                                                                                  #  FINDCDUW PROVIDES THE INTERFACES BETWEEN THE VARIOUS POWERED FLITE GUIDANCE PROGRAMS
040298,000046:                                                                                                  #  AND THE DIGITAL AUTOPILOT.  THE INPUTS TO FINDCDUW ARE THE THRUST COMMAND VECTOR
040299,000047:                                                                                                  #  AND THE WINDOW COMMAND VECTOR, AND THE OUTPUTS ARE THE GIMBAL ANGLE
040300,000048:                                                                                                  #  INCREMENTS, THE COMMANDED ATTITUDE ANGLE RATES, AND THE COMMANDED
040301,000049:                                                                                                  #  ATTITUDE LAG ANGLES (WHICH ACCOUNT FOR THE ANGLES BY WHICH THE BODY WILL
040302,000050:                                                                                                  #  LAG BEHIND A RAMP COMMAND IN ATTITUDE ANGLE DUE TO THE FINITE ANGULAR
040303,000051:                                                                                                  #  ACCELERATIONS AVAILABLE).
040304,000052: 
040305,000053:                                                                                                  #  FINDCDUW ALINES THE ESTIMATED THRUST VECTOR FROM THE THRUST DIRECTION
040306,000054:                                                                                                  #  FILTER WITH THE THRUST COMMAND VECTOR, AND, WHEN  XOVINHIB  SET,
040307,000055:                                                                                                  #  ALINES THE +Z HALF OF THE LM ZX PLANE WITH THE WINDOW COMMAND VECTOR.
040308,000056: 

Page 908

040310,000058:                                                                                                  #  SPECIFICATIONS:
040311,000059: 
040312,000060:                                                                                                  #  INITIALIZATION: A SINGLE INTERPRETIVE CALL TO  INITCDUW  IS REQUIRED
040313,000061:                                                                                                  #                  BEFORE EACH GUIDED MANEUVER USING FINDCDUW.
040314,000062: 
040315,000063:                                                                                                  #  CALL:           INTERPRETIVE CALL TO FINDCDUW WITH THE THRUST COMMAND
040316,000064:                                                                                                  #                  VECTOR IN MPAC.  INTERPRETIVE CALL TO FINDCDUW -2 WITH
040317,000065:                                                                                                  #                  THE THRUST COMMAND VECTOR IN UNFC/2 AND NOT IN MPAC.
040318,000066: 
040319,000067:                                                                                                  #  RETURNS:        NORMAL INTERPRETIVE IN ALL CASES
040320,000068: 
040321,000069:                                                                                                  #                  1.       NORMALLY ALL AUTOPILOT CMDS ARE ISSUED.
040322,000070: 
040323,000071:                                                                                                  #                  2.       IF NOT PNGCS AUTO, DO STOPRATE AND RETURN
040324,000072:                                                                                                  #                           WITHOUT ISSUING AUTOPILOT CMDS.
040325,000073: 
040326,000074:                                                                                                  #                  3.       IF ENGINE OFF, DO STOPRATE AND RETURN WITHOUT
040327,000075:                                                                                                  #                           ISSUING AUTOPILOT CMDS.
040328,000076: 
040329,000077:                                                                                                  #  ALARMS:         00401 IF INPUTS DETERMINE AN ATTITUDE IN GIMBAL LOCK.
040330,000078:                                                                                                  #                           FINDCDUW DRIVES CDUXD AND CDUYD TO THE RQD VALUES,
040331,000079:                                                                                                  #                           BUT DRIVES CDUZD ONLY TO THE GIMBAL LOCK CONE.
040332,000080:                                                                                                  #                  00402 IF UNFC/2 OR UNWC/2 PRODUCE OVERFLOW WHEN
040333,000081:                                                                                                  #                           UNITIZED USING NORMUNIT.  FINDCDUW ISSUES
040334,000082:                                                                                                  #                           STOPRATE AS ONLY INPUT TO AUTOPILOT.
040335,000083: 
040336,000084:                                                                                                  #  INPUTS:         UNFC/2   THRUST COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
040337,000085:                                                                                                  #                  UNWC/2   WINDOW COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
040338,000086:                                                                                                  #                  XOVINHIB FLAG DENOTING X AXIS OVERRIDE INHIBITED.
040339,000087:                                                                                                  #                  CSMDOCKD FLAG DENOTING CSM DOCKED.
040340,000088:                                                                                                  #                  STEERSW  FLAG DENOTING INSUFF THRUST FOR THRUST DIR FLTR.
040341,000089: 
040342,000090:                                                                                                  #  OUTPUTS:        DELCDUX,Y,Z
040343,000091:                                                                                                  #                  OMEGAPD,+1,+2
040344,000092:                                                                                                  #                  DELPEROR,+1,+2
040345,000093:                                                                                                  #                  CPHI,+1,+2 FOR NOUN22
040346,000094: 
040347,000095:                                                                                                  #  DEBRIS:         FINDCDUW DESTROYS SINCDUX,Y,Z AND COSCDUX,Y,Z BY
040348,000096:                                                                                                  #                  WRITING INTO THESE LOCATIONS THE SINES AND COSINES
040349,000097:                                                                                                  #                  OF THE CDUD'S IN PNGCS-AUTO, OF THE CDU'S OTHERWISE.
040350,000098: 

Page 909

040352,000100:                                                                                                  #  INITIALIZATION FOR FINDCDUW
040353,000101: 
040354,000102: 30,3055                                           BANK     30                                    
040355,000103: 30,2000                                           SETLOC   FCDUW                                 
040356,000104: 30,2000                                           BANK                                           
040357,000105: 
040358,000106: 30,3055  E6,1644                                  EBANK=   ECDUW                                 
040359,000107: 
040360,000108: 30,3055                                           COUNT*   $$/FCDUW                              
040361,000109: 
040362,000110: 30,3055           77775        INITCDUW           VLOAD                                          
040363,000111: 30,3056           06422                                    UNITX                                 
040364,000112: 30,3057           03266                           STORE    UNFV/2                                
040365,000113: 30,3060           03260                           STORE    UNWC/2                                
040366,000114: 30,3061           77616                           RVQ                                            
040367,000115: 
040368,000116:                                                                                                  #  FINDCDUW PRELIMINARIES
040369,000117: 
040370,000118: 30,3062           77775                           VLOAD                                          #  FINDCDUW -2: ENTRY WHEN UNFC/2 PRE-STORD
040371,000119: 30,3063           03252                                    UNFC/2                                #  INPUT VECTORS NEED NOT BE SEMI-UNIT
040372,000120: 30,3064           40200        FINDCDUW           BOV      SETPD                                 #  FINDCDUW: ENTRY WHEN UNFC/2 IN MPAC
040373,000121: 30,3065           61064                                    FINDCDUW                              #  INTERPRETER NOW INITIALIZED
040374,000122: 30,3066           00023                                    22                                    #  LOCS 0 THRU 21 FOR DIRECTION COSINE MAT
040375,000123: 30,3067           77420                           STQ      EXIT                                  
040376,000124: 30,3070           03245                                    QCDUWUSR                              #  SAVE RETURN ADDRESS
040377,000125: 
040378,000126:                                                                                                  #  MORE HAUSKEEPING
040379,000127: 30,3071           33732                           CA       ECDUWL                                
040380,000128: 30,3072           56003                           XCH      EBANK                                 #  SET EBANK
040381,000129: 30,3073           55644                           TS       ECDUWUSR                              #  SAVE USER'S EBANK
040382,000130: 
040383,000131: 30,3074           30111                           CA       DAPBOOLS                              
040384,000132: 30,3075           74737                           MASK     CSMDOCKD                              #  CSMDOCKD MUST NOT BE BIT15
040385,000133: 30,3076           10000                           CCS      A                                     
040386,000134: 30,3077           34753                           CA       ONE                                   #  INDEX IF CSM DOCKED
040387,000135: 30,3100           55646                           TS       NDXCDUW                               
040388,000136: 
040389,000137: 30,3101           34743                           CA       XOVINHIB                              #  XOVINHIB MUST NOT BE BIT15
040390,000138: 30,3102           55650                           TS       FLPAUTNO                              #  SET TO POS-NON-ZERO FLAG PNGCS AUTO NOT
040391,000139: 
040392,000140: 30,3103           70111                           MASK     DAPBOOLS                              
040393,000141: 30,3104           55647                           TS       FLAGOODW                              #  FLAGOODW = ANY PNZ NUMBER IF XOV INHIBTD
040394,000142: 

Page 910

040396,000144:                                                                                                  #  FETCH BASIC DATA
040397,000145: 
040398,000146: 30,3105           00004                           INHINT                                         #  RELINT AT PAUTNO (TC INTPRET)
040399,000147: 
040400,000148: 30,3106           30032                           CA       CDUX                                  #  FETCH CDUX,CDUY,CDUZ IN ALL CASES, BUT
040401,000149: 30,3107           54772                           TS       CDUSPOTX                              #       REPLACE BELOW IF PNGCS AUTO
040402,000150: 30,3110           30033                           CA       CDUY                                  
040403,000151: 30,3111           54766                           TS       CDUSPOTY                              
040404,000152: 30,3112           30034                           CA       CDUZ                                  
040405,000153: 30,3113           54770                           TS       CDUSPOTZ                              
040406,000154: 
040407,000155: 30,3114           34742                           CA       BIT10                                 #  PNGCS CONTROL BIT
040408,000156: 30,3115           00006                           EXTEND                                         
040409,000157: 30,3116           02030                           RAND     CHAN30                                
040410,000158: 30,3117           10000                           CCS      A                                     
040411,000159: 30,3120           13135                           TCF      PAUTNO                                #  NOT PNGCS (BITS INVERTED)
040412,000160: 
040413,000161: 30,3121           34736                           CA       BIT14                                 #  AUTO MODE BIT
040414,000162: 30,3122           00006                           EXTEND                                         
040415,000163: 30,3123           02031                           RAND     CHAN31                                
040416,000164: 30,3124           10000                           CCS      A                                     
040417,000165: 30,3125           13135                           TCF      PAUTNO                                #  NOT AUTO (BITS INVERTED)
040418,000166: 
040419,000167: 30,3126           55650                           TS       FLPAUTNO                              #  RESET FLAG PNGCS AUTO NOT
040420,000168: 
040421,000169: 30,3127           31633                           CA       CDUXD                                 #  PNGCS AUTO: FETCH CDUXD,CDUYD,CDUZD
040422,000170: 30,3130           54772                           TS       CDUSPOTX                              
040423,000171: 30,3131           31634                           CA       CDUYD                                 
040424,000172: 30,3132           54766                           TS       CDUSPOTY                              
040425,000173: 30,3133           31635                           CA       CDUZD                                 
040426,000174: 30,3134           54770                           TS       CDUSPOTZ                              
040427,000175: 

Page 911

040429,000177:                                                                                                  #  FETCH INPUTS
040430,000178: 
040431,000179: 30,3135           06036        PAUTNO             TC       INTPRET                               #  ENTERING THRUST CMD STILL IN MPAC
040432,000180: 30,3136           77634                           RTB                                            
040433,000181: 30,3137           21700                                    NORMUNIT                              
040434,000182: 30,3140           24001                           STOVL    UNX/2                                 #  SEMI-UNIT THRUST CMD AS INITIAL UNX/2
040435,000183: 30,3141           03260                                    UNWC/2                                
040436,000184: 30,3142           47034                           RTB      RTB                                   
040437,000185: 30,3143           21700                                    NORMUNIT                              
040438,000186: 30,3144           47521                                    QUICTRIG                              #  ALWAYS RQD TO OBTAIN TRIGS OF CDUD'S
040439,000187: 30,3145           24015                           STOVL    UNZ/2                                 #  SEMI-UNIT WINDOW CMD AS INITIAL UNZ/2
040440,000188: 30,3146           00325                                    DELV                                  
040441,000189: 30,3147           53404                           BOVB     UNIT                                  
040442,000190: 30,3150           61721                                    NOATTCNT                              #  AT LEAST ONE ENTERING CMD VCT ZERO
040443,000191: 30,3151           45000                           BOV      CALL                                  
040444,000192: 30,3152           61166                                    AFTRFLTR                              #  IF UNIT DELV OVERFLOWS, SKIP FILTER
040445,000193: 30,3153           47575                                    *SMNB*                                #  YIELDS UNIT(DELV) IN VEH COORDS FOR FLTR
040446,000194: 
040447,000195:                                                                                                  #  THRUST DIRECTION FILTER
040448,000196: 
040449,000197: 30,3154           77776                           EXIT                                           
040450,000198: 
040451,000199: 30,3155           31667                           CA       UNFVY/2                               #  FOR RESTARTS, UNFV/2 ALWAYS INTACT, MPAC
040452,000200: 30,3156           22157                           LXCH     MPAC       +3                         #        RENEWED AFTER RETURN FROM CALLER,
040453,000201: 30,3157           03454                           TC       FLTRSUB                               #        TWO FILTER UPDATES MAY BE DONE.
040454,000202: 30,3160           55667                           TS       UNFVY/2                               #  UNFV/2 NEED NOT BE EXACTLY SEMI-UNIT.
040455,000203: 
040456,000204: 30,3161           31671                           CA       UNFVZ/2                               
040457,000205: 30,3162           22161                           LXCH     MPAC       +5                         
040458,000206: 30,3163           03454                           TC       FLTRSUB                               
040459,000207: 30,3164           55671                           TS       UNFVZ/2                               
040460,000208: 
040461,000209: 30,3165           06036                           TC       INTPRET                               #  COMPLETES FILTER
040462,000210: 

Page 912

040464,000212:                                                                                                  #  FIND A SUITABLE WINDOW POINTING VECTOR
040465,000213: 
040466,000214: 30,3166           46135        AFTRFLTR           SLOAD    BHIZ                                  #  IF XOV NOT INHIBITED, GO FETCH ZNB
040467,000215: 30,3167           03250                                    FLAGOODW                              
040468,000216: 30,3170           61174                                    FETCHZNB                              
040469,000217: 30,3171           45175                           VLOAD    CALL                                  
040470,000218: 30,3172           00015                                    UNZ/2                                 
040471,000219: 30,3173           61474                                    UNWCTEST                              
040472,000220: 
040473,000221: 30,3174           77775        FETCHZNB           VLOAD                                          
040474,000222: 30,3175           02162                                    ZNBPIP                                
040475,000223: 30,3176           34015                           STCALL   UNZ/2                                 
040476,000224: 30,3177           61474                                    UNWCTEST                              
040477,000225: 
040478,000226: 30,3200           57575                           VLOAD    VCOMP                                 #  Z AND -X CAN'T BOTH PARALLEL UNFC/2
040479,000227: 30,3201           02146                                    XNBPIP                                
040480,000228: 30,3202           00015                           STORE    UNZ/2                                 
040481,000229: 
040482,000230:                                                                                                  #  COMPUTE THE REQUIRED DIRECTION COSINE MATRIX
040483,000231: 
040484,000232: 30,3203           47375        DCMCL              VLOAD    VXV                                   
040485,000233: 30,3204           00015                                    UNZ/2                                 
040486,000234: 30,3205           00001                                    UNX/2                                 
040487,000235: 30,3206           41456                           UNIT     PUSH                                  #  UNY/2 FIRST ITERATION
040488,000236: 30,3207           76435                           VXV      VSL1                                  
040489,000237: 30,3210           00001                                    UNX/2                                 
040490,000238: 30,3211           00015                           STORE    UNZ/2                                 #  -UNZ/2 FIRST ITERATION
040491,000239: 30,3212           63361                           VXSC     PDVL                                  #  EXCHANGE -UNFVZ/2 UNZ/2 FOR UNY/2
040492,000240: 30,3213           03272                                    UNFVZ/2                               #  MUST BE SMALL
040493,000241: 30,3214           51361                           VXSC     BVSU                                  #  YIELDS -UNFVY/2 UNY/2-UNFVZ/2 UNZ/2
040494,000242: 30,3215           03270                                    UNFVY/2                               #  MUST BE SMALL
040495,000243: 30,3216           53372                           VSL1     VAD                                   
040496,000244: 30,3217           00001                                    UNX/2                                 
040497,000245: 30,3220           77656                           UNIT                                           #  TOTALLY ELIMINATES THRUST POINTING ERROR
040498,000246: 30,3221           00001                           STORE    UNX/2                                 #  UNX/2
040499,000247: 30,3222           76435                           VXV      VSL1                                  
040500,000248: 30,3223           00015                                    UNZ/2                                 #  -UNZ/2 WAS STORED HERE REMEMBER
040501,000249: 30,3224           00007                           STORE    UNY/2                                 #  UNY/2
040502,000250: 30,3225           47276                           VCOMP    VXV                                   
040503,000251: 30,3226           00001                                    UNX/2                                 
040504,000252: 30,3227           77772                           VSL1                                           
040505,000253: 30,3230           00015                           STORE    UNZ/2                                 #  UNZ/2
040506,000254: 

Page 913

040508,000256:                                                                                                  #  COMPUTE THE REQUIRED GIMBAL ANGLES
040509,000257: 
040510,000258: 30,3231           77624                           CALL                                           
040511,000259: 30,3232           61504                                    NB2CDUSP                              #  YIELDS THE RQD GIMBAL ANGLES, 2'S, PI
040512,000260: 30,3233           77776                           EXIT                                           
040513,000261: 
040514,000262:                                                                                                  #  LIMIT THE MIDDLE GIMBAL ANGLE & COMPUTE THE UNLIMITED GIMBAL ANGLE CHGS
040515,000263: 
040516,000264: 30,3234           30156                           CA       MPAC       +2                         #  LIMIT THE MGA
040517,000265: 30,3235           54001                           TS       L                                     #  CAN'T LXCH: NEED UNLIMITED MGA FOR ALARM
040518,000266: 30,3236           33744                           CA       CDUZDLIM                              
040519,000267: 30,3237           03700                           TC       LIMITSUB                              #  YIELDS LIMITED MGA. 1 BIT ERROR POSSIBLE
040520,000268: 30,3240           56156                           XCH      MPAC       +2                         #       BECAUSE USING 2'S COMP. WHO CARES?
040521,000269: 30,3241           00006                           EXTEND                                         
040522,000270: 30,3242           20156                           MSU      MPAC       +2                         #  THIS BETTER YIELD ZERO
040523,000271: 30,3243           00006                           EXTEND                                         
040524,000272: 30,3244           13246                           BZF      +2                                    
040525,000273: 30,3245           13727                           TCF      ALARMMGA                              
040526,000274: 
040527,000275: 30,3246           00004        MGARET             INHINT                                         #  RELINT AT TC INTPRET AFTER TCQCDUW
040528,000276: 
040529,000277: 30,3247           22007                           ZL                                             
040530,000278: 30,3250           34752                           CA       TWO                                   
040531,000279: 30,3251           54142        DELGMBLP           TS       TEM2                                  
040532,000280: 
040533,000281: 30,3252           30001                           CA       L                                     #  TO PREVENT FALSE STARTS ABOUT X, ZERO
040534,000282: 30,3253           00006                           EXTEND                                         #       FLAGOODW IF DELGMBZ OR Y TOO BIG.
040535,000283: 30,3254           70000                           SQUARE                                         
040536,000284: 30,3255           64350                           AD       HI5                                   #  WITHIN 1 BIT OF -(45 DEG SQUARED)
040537,000285: 30,3256           00006                           EXTEND                                         
040538,000286: 30,3257           63262                           BZMF     +3                                    
040539,000287: 30,3260           34755                           CA       ZERO                                  
040540,000288: 30,3261           55647                           TS       FLAGOODW                              
040541,000289: 
040542,000290: 30,3262           50142                           INDEX    TEM2                                  
040543,000291: 30,3263           30154                           CA       MPAC                                  
040544,000292: 30,3264           50142                           INDEX    TEM2                                  
040545,000293: 30,3265           54321                           TS       CPHI                                  #  OUTPUTS TO NOUN22
040546,000294: 30,3266           00006                           EXTEND                                         
040547,000295: 30,3267           50142                           INDEX    TEM2                                  
040548,000296: 30,3270           21633                           MSU      CDUXD                                 #  NO MATTER THAT THESE SLIGHTLY DIFFERENT
040549,000297: 30,3271           40000                           COM                                            #       FROM WHEN WE INITIALLY FETCHED THEM
040550,000298: 30,3272           50142                           INDEX    TEM2                                  
040551,000299: 30,3273           55673                           TS       -DELGMB                               #  -UNLIMITED GIMBAL ANGLE CHGS, 1'S, PI
040552,000300: 30,3274           54001                           TS       L                                     #  FOR PRECEDING TEST ON NEXT LOOP PASS
040553,000301: 30,3275           10142                           CCS      TEM2                                  
040554,000302: 30,3276           13251                           TCF      DELGMBLP                              
040555,000303: 

Page 914

040557,000305:                                                                                                  #  BRANCHES TO NOATTCNT
040558,000306: 
040559,000307: 30,3277           11650                           CCS      FLPAUTNO                              
040560,000308: 30,3300           13723                           TCF      NOATTCNT   +2                         #  NOT PNGCS AUTO
040561,000309: 
040562,000310: 30,3301           30101                           CA       FLAGWRD5                              
040563,000311: 30,3302           74745                           MASK     ENGONBIT                              
040564,000312: 30,3303           00006                           EXTEND                                         
040565,000313: 30,3304           13723                           BZF      NOATTCNT   +2                         #  ENGINE NOT ON
040566,000314: 

Page 915

040568,000316:                                                                                                  #  LIMIT THE ATTITUDE ANGLE CHANGES
040569,000317: 
040570,000318:                                                                                                  #  THIS SECTION LIMITS THE ATTITUDE ANGLE CHANGES ABOUT A SET OF ORTHOGONAL VEHICLE AXES X,YPRIME,ZPRIME.
040571,000319:                                                                                                  #  THESE AXES COINCIDE WITH THE COMMANDED VEHICLE AXES IF AND ONLY IF CDUXD IS ZERO.  THE PRIME SYSTEM IS
040572,000320:                                                                                                  #  THE COMMANDED VEHICLE SYSTEM ROTATED ABOUT THE X AXIS TO BRING THE Z AXIS INTO ALINEMENT WITH THE MIDDLE GIMBAL
040573,000321:                                                                                                  #  AXIS.  ATTITUDE ANGLE CHANGES IN THE PRIME SYSTEM ARE RELATED TO SMALL GIMBAL ANGLE CHANGES BY:
040574,000322: 
040575,000323:                                                                                                  #  * -DELATTX      *   * 1  SIN(CDUZD)  0 * * -DELGMBX *
040576,000324:                                                                                                  #  *               *   *                  * *          *
040577,000325:                                                                                                  #  * -DELATTYPRIME * = * 0  COS(CDUZD)  0 * * -DELGMBY *
040578,000326:                                                                                                  #  *               *   *                  * *          *
040579,000327:                                                                                                  #  * -DELATTZPRIME *   * 0  0           1 * * -DELGMBZ *
040580,000328: 
040581,000329: 30,3305           23675                           LXCH     -DELGMB    +2                         #  SAME AS -DELATTZPRIME UNLIMITED
040582,000330: 30,3306           51646                           INDEX    NDXCDUW                               
040583,000331: 30,3307           33740                           CA       DAZMAX                                
040584,000332: 30,3310           03700                           TC       LIMITSUB                              
040585,000333: 30,3311           55675                           TS       -DELGMB    +2                         #  -DELGMBZ
040586,000334: 
040587,000335: 30,3312           31674                           CA       -DELGMB    +1                         
040588,000336: 30,3313           00006                           EXTEND                                         
040589,000337: 30,3314           70746                           MP       COSCDUZ                               #  YIELDS -DELATTYPRIME/2 UNLIMITED
040590,000338: 30,3315           54001                           TS       L                                     
040591,000339: 30,3316           51646                           INDEX    NDXCDUW                               
040592,000340: 30,3317           33742                           CA       DAY/2MAX                              
040593,000341: 30,3320           03700                           TC       LIMITSUB                              
040594,000342: 30,3321           00006                           EXTEND                                         
040595,000343: 30,3322           10746                           DV       COSCDUZ                               
040596,000344: 30,3323           57674                           XCH      -DELGMB    +1                         #  -DELGMBY, FETCHING UNLIMITED VALUE
040597,000345: 
040598,000346: 30,3324           00006                           EXTEND                                         
040599,000347: 30,3325           70740                           MP       SINCDUZ                               
040600,000348: 30,3326           20001                           DDOUBL                                         
040601,000349: 30,3327           40000                           COM                                            
040602,000350: 30,3330           00006                           EXTEND                                         #  YIELDS +DELATTX UNLIMITD, MAG < 180 DEG,
040603,000351: 30,3331           21673                           MSU      -DELGMB                               #        BASED ON UNLIMITED DELGMBY.
040604,000352: 30,3332           54001                           TS       L                                     #        ONE BIT ERROR IF OPERANDS IN MSU
040605,000353: 30,3333           51646                           INDEX    NDXCDUW                               #        OF MIXED SIGNS.  WHO CARES?
040606,000354: 30,3334           33740                           CA       DAXMAX                                
040607,000355: 30,3335           03700                           TC       LIMITSUB                              
040608,000356: 30,3336           55673                           TS       -DELGMB                               #  SAVE LIMITED +DELATTX
040609,000357: 30,3337           11647                           CCS      FLAGOODW                              
040610,000358: 30,3340           41673                           CS       -DELGMB                               #  FETCH IT BACK CHGING SIGN IF WINDOW GOOD
040611,000359: 30,3341           55673                           TS       -DELGMB                               #  OTHERWISE USE ZERO FOR -DELATTX
040612,000360: 30,3342           41674                           CS       -DELGMB    +1                         
040613,000361: 30,3343           00006                           EXTEND                                         
040614,000362: 30,3344           70740                           MP       SINCDUZ                               
040615,000363: 30,3345           20001                           DDOUBL                                         #  YIELDS -CNTRIB TO -DELATTX FROM -DELGMBY
040616,000364: 30,3346           27673                           ADS      -DELGMB                               #  -DELGMBX.  NO OVERFLOW SINCE LIMITED TO
040617,000365:                                                                                                  #  20DEG(1+SIN(70DEG)/COS(70DEG)) < 180DEG
040618,000366: 

Page 916

040620,000368:                                                                                                  #  COMPUTE COMMANDED ATTITUDE RATES
040621,000369: 
040622,000370:                                                                                                  #  * OMEGAPD *   * -2  -4 SINCDUZ          +0         * * -DELGMBX *
040623,000371:                                                                                                  #  *         *   *                                    * *          *
040624,000372:                                                                                                  #  * OMEGAQD * = * +0  -8 COSCDUZ COSCDUX  -4 SINCDUX * * -DELGMBY *
040625,000373:                                                                                                  #  *         *   *                                    * *          *
040626,000374:                                                                                                  #  * OMEGARD *   * +0  +8 COSCDUZ SINCDUX  -4 COSCDUX * * -DELGMBZ *
040627,000375: 
040628,000376:                                                                                                  #  ATTITUDE ANGLE RATES IN UNITS OF PI/4 RAD/SEC = K TRIG FCNS IN UNITS OF 2 X GIMBAL ANGLE RATES IN UNITS OF
040629,000377:                                                                                                  #  PI/2 RAD/SEC.  THE CONSTANTS ARE BASED ON DELGMB BEING THE GIMBAL ANGLE CHANGES IN UNITS OF PI RADIANS,
040630,000378:                                                                                                  #  AND 2 SECONDS BEING THE COMPUTATION PERIOD (THE PERIOD BETWEEN SUCCESSIVE PASSES THRU FINDCDUW).
040631,000379: 
040632,000380: 30,3347           41673                           CS       -DELGMB                               
040633,000381: 30,3350           55641                           TS       OMEGAPD                               
040634,000382: 30,3351           41674                           CS       -DELGMB    +1                         
040635,000383: 30,3352           00006                           EXTEND                                         
040636,000384: 30,3353           70740                           MP       SINCDUZ                               
040637,000385: 30,3354           20001                           DDOUBL                                         
040638,000386: 30,3355           27641                           ADS      OMEGAPD                               
040639,000387: 30,3356           27641                           ADS      OMEGAPD                               
040640,000388: 
040641,000389: 30,3357           41674                           CS       -DELGMB    +1                         
040642,000390: 30,3360           00006                           EXTEND                                         
040643,000391: 30,3361           70750                           MP       COSCDUX                               
040644,000392: 30,3362           20001                           DDOUBL                                         
040645,000393: 30,3363           00006                           EXTEND                                         
040646,000394: 30,3364           70746                           MP       COSCDUZ                               
040647,000395: 30,3365           55642                           TS       OMEGAQD                               
040648,000396: 30,3366           41675                           CS       -DELGMB    +2                         
040649,000397: 30,3367           00006                           EXTEND                                         
040650,000398: 30,3370           70742                           MP       SINCDUX                               
040651,000399: 30,3371           27642                           ADS      OMEGAQD                               
040652,000400: 30,3372           27642                           ADS      OMEGAQD                               
040653,000401: 30,3373           27642                           ADS      OMEGAQD                               
040654,000402: 
040655,000403: 30,3374           31674                           CA       -DELGMB    +1                         
040656,000404: 30,3375           00006                           EXTEND                                         
040657,000405: 30,3376           70742                           MP       SINCDUX                               
040658,000406: 30,3377           20001                           DDOUBL                                         
040659,000407: 30,3400           00006                           EXTEND                                         
040660,000408: 30,3401           70746                           MP       COSCDUZ                               
040661,000409: 30,3402           55643                           TS       OMEGARD                               
040662,000410: 30,3403           41675                           CS       -DELGMB    +2                         
040663,000411: 30,3404           00006                           EXTEND                                         
040664,000412: 30,3405           70750                           MP       COSCDUX                               
040665,000413: 30,3406           27643                           ADS      OMEGARD                               
040666,000414: 30,3407           27643                           ADS      OMEGARD                               
040667,000415: 30,3410           27643                           ADS      OMEGARD                               
040668,000416: 

Page 917

040670,000418:                                                                                                  #  FINAL TRANSFER
040671,000419: 
040672,000420: 30,3411           34752                           CA       TWO                                   
040673,000421: 30,3412           54142        CDUWXFR            TS       TEM2                                  
040674,000422: 30,3413           50142                           INDEX    TEM2                                  
040675,000423: 30,3414           31673                           CA       -DELGMB                               
040676,000424: 30,3415           00006                           EXTEND                                         
040677,000425: 30,3416           73745                           MP       DT/DELT                               #  RATIO OF DAP INTERVAL TO CDUW INTERVAL
040678,000426: 30,3417           03714                           TC       ONESTO2S                              
040679,000427: 30,3420           50142                           INDEX    TEM2                                  
040680,000428: 30,3421           55636                           TS       DELCDUX                               #  ANGLE INTERFACE
040681,000429: 
040682,000430: 30,3422           50142                           INDEX    TEM2                                  
040683,000431: 30,3423           11641                           CCS      OMEGAPD                               
040684,000432: 30,3424           64753                           AD       ONE                                   
040685,000433: 30,3425           13427                           TCF      +2                                    
040686,000434: 30,3426           64753                           AD       ONE                                   
040687,000435: 30,3427           00006                           EXTEND                                         #  WE NOW HAVE ABS(OMEGAPD,QD,RD)
040688,000436: 30,3430           50142                           INDEX    TEM2                                  
040689,000437: 30,3431           71641                           MP       OMEGAPD                               
040690,000438: 30,3432           00006                           EXTEND                                         
040691,000439: 30,3433           74741                           MP       BIT11                                 #  1/16
040692,000440: 30,3434           00006                           EXTEND                                         
040693,000441: 30,3435           50142                           INDEX    TEM2                                  #                   2
040694,000442: 30,3436           11530                           DV       1JACC                                 #  UNITS PI/4 RAD/SEC
040695,000443: 30,3437           54001                           TS       L                                     
040696,000444: 30,3440           33742                           CA       DELERLIM                              
040697,000445: 30,3441           03700                           TC       LIMITSUB                              
040698,000446: 30,3442           50142                           INDEX    TEM2                                  
040699,000447: 30,3443           55277                           TS       DELPEROR                              #  LAG ANGLE = OMEGA ABS(OMEGA)/2 ACCEL
040700,000448: 30,3444           10142                           CCS      TEM2                                  
040701,000449: 30,3445           13412                           TCF      CDUWXFR                               
040702,000450: 
040703,000451:                                                                                                  #  HAUSKEEPING AND RETURN
040704,000452: 
040705,000453: 30,3446           31644        TCQCDUW            CA       ECDUWUSR                              
040706,000454: 30,3447           54003                           TS       EBANK                                 #  RETURN USER'S EBANK
040707,000455: 
040708,000456: 30,3450           06036                           TC       INTPRET                               
040709,000457: 30,3451           52001                           SETPD    GOTO                                  
040710,000458: 30,3452           00001                                    0                                     
040711,000459: 30,3453           03245                                    QCDUWUSR                              #  NORMAL AND ABNORMAL RETURN TO USER
040712,000460: 

Page 918

040714,000462:                                                                                                  #  THRUST VECTOR FILTER SUBROUTINE
040715,000463: 
040716,000464: 30,3454           00006        FLTRSUB            EXTEND                                         
040717,000465: 30,3455           22142                           QXCH     TEM2                                  
040718,000466: 30,3456           54143                           TS       TEM3                                  #  SAVE ORIGINAL OFFSET
040719,000467: 30,3457           40000                           COM                                            #  ONE MCT, NO WDS, CAN BE SAVED IF NEG OF
040720,000468: 30,3460           60001                           AD       L                                     #       ORIG OFFSET ARRIVES IN A, BUT IT'S
040721,000469: 30,3461           00006                           EXTEND                                         #       NOT WORTH THE INCREASED OBSCURITY.
040722,000470: 30,3462           51646                           INDEX    NDXCDUW                               
040723,000471: 30,3463           73733                           MP       GAINFLTR                              
040724,000472: 30,3464           54001                           TS       L                                     #  INCR TO OFFSET, UNLIMITED
040725,000473: 30,3465           33735                           CA       DUNFVLIM                              #  SAME LIMIT FOR Y AND Z
040726,000474: 30,3466           03700                           TC       LIMITSUB                              #  YIELDS INCR TO OFFSET, LIMITED
040727,000475: 30,3467           60143                           AD       TEM3                                  #  ORIGINAL OFFSET
040728,000476: 30,3470           54001                           TS       L                                     #  TOTAL OFFSET, UNLIMITED
040729,000477: 30,3471           33736                           CA       UNFVLIM                               #  SAME LIMIT FOR Y AND Z
040730,000478: 30,3472           03700                           TC       LIMITSUB                              #  YIELDS TOTAL OFFSET, LIMITED
040731,000479: 30,3473           00142                           TC       TEM2                                  
040732,000480: 
040733,000481:                                                                                                  #  SUBR TO TEST THE ANGLE BETWEEN THE PROPOSED WINDOW AND THRUST CMD VCTS
040734,000482: 
040735,000483: 30,3474           63441        UNWCTEST           DOT      DSQ                                   
040736,000484: 30,3475           00001                                    UNX/2                                 
040737,000485: 30,3476           50025                           DSU      BMN                                   
040738,000486: 30,3477           21740                                    DOTSWFMX                              
040739,000487: 30,3500           61203                                    DCMCL                                 
040740,000488: 30,3501           43531                           SSP      RVQ                                   #  RVQ FOR ALT CHOICE IF DOT MAGN TOO LARGE
040741,000489: 30,3502           03250                                    FLAGOODW                              #       ZEROING WINDOW GOOD FLAG
040742,000490: 30,3503           00000                                    0                                     
040743,000491: 

Page 919

040745,000493:                                                                                                  #  NB2CDUSP RETURNS THE 2'S COMPLEMENT, PI, SP CDU ANGLES X,Y,Z IN MPAC,+1,+2 GIVEN THE MATRIX WHOSE ROW VECTORS
040746,000494:                                                                                                  #  ARE THE SEMI-UNIT NAV BASE VECTORS X,Y,Z EXPRESSED IN STABLE MEMBER COORDINATES, LOCATED AT 0 IN THE PUSH LIST.
040747,000495: 
040748,000496:                                                                                                  #  NB2CDUSP USES ARCTRGSP WHICH HAS A MAXIMUM ERROR OF +-4 BITS.
040749,000497: 
040750,000498: 30,3504           63545        NB2CDUSP           DLOAD    DSQ                                   
040751,000499: 30,3505           00003                                    2                                     
040752,000500: 30,3506           51021                           BDSU     BPL                                   
040753,000501: 30,3507           06414                                    DP1/4TH                               
040754,000502: 30,3510           61513                                    +3                                    
040755,000503: 30,3511           77745                           DLOAD                                          
040756,000504: 30,3512           06424                                    ZEROVECS                              #  IN CASE SIN WAS SLIGHTLY > 1/2
040757,000505: 30,3513           77566                           SQRT     EXIT                                  #  YIELDS COS(CDUZ) IN UNITS OF 2
040758,000506: 
040759,000507: 30,3514           00006                           EXTEND                                         
040760,000508: 30,3515           30155                           DCA      MPAC                                  
040761,000509: 30,3516           20001                           DDOUBL                                         
040762,000510: 30,3517           54145                           TS       TEM5                                  
040763,000511: 30,3520           13523                           TCF      +3                                    
040764,000512: 30,3521           34733                           CA       POSMAX                                #  OVERFLOW. FETCH POSMAX, MPAC ALWAYS POS
040765,000513: 30,3522           54145                           TS       TEM5                                  #  COS(CDUZ) IN TEM5, UNITS 1
040766,000514: 
040767,000515: 30,3523           50120                           INDEX    FIXLOC                                
040768,000516: 30,3524           30002                           CA       2                                     
040769,000517: 30,3525           22154                           LXCH     MPAC                                  
040770,000518: 30,3526           03573                           TC       ARCTRGSP                              
040771,000519: 30,3527           54156                           TS       MPAC       +2                         #  CDUZ
040772,000520: 
040773,000521: 30,3530           34755                           CA       ZERO                                  
040774,000522: 30,3531           03551                           TC       DVBYCOSM                              
040775,000523: 30,3532           34751                           CA       FOUR                                  
040776,000524: 30,3533           03551                           TC       DVBYCOSM                              
040777,000525: 30,3534           40141                           CS       TEM1                                  
040778,000526: 30,3535           03573                           TC       ARCTRGSP                              
040779,000527: 30,3536           54155                           TS       MPAC       +1                         #  CDUY
040780,000528: 
040781,000529: 30,3537           34750                           CA       BIT4                                  
040782,000530: 30,3540           03551                           TC       DVBYCOSM                              
040783,000531: 30,3541           33550                           CA       16OCT                                 
040784,000532: 30,3542           03551                           TC       DVBYCOSM                              
040785,000533: 30,3543           40141                           CS       TEM1                                  
040786,000534: 30,3544           03573                           TC       ARCTRGSP                              
040787,000535: 30,3545           54154                           TS       MPAC                                  #  CDUX
040788,000536: 
040789,000537: 30,3546           06036                           TC       INTPRET                               
040790,000538: 30,3547           77616                           RVQ                                            
040791,000539: 
040792,000540: 30,3550           00016        16OCT              OCT      16                                    
040793,000541: 

Page 920

040795,000543:                                                                                                  #  THE ELEMENTS OF THE NAV BASE MATRIX WHICH WE MUST DIVIDE BY COS(MGA)
040796,000544:                                                                                                  #  ALREADY CONTAIN COS(MGA)/2 AS A FACTOR. THEREFORE THE QUOTIENT SHOULD
040797,000545:                                                                                                  #  ORDINARILY NEVER EXCEED 1/2 IN MAGNITUDE.  BUT IF THE MGA IS NEAR PI/2
040798,000546:                                                                                                  #  THEN COS(MGA) IS NEAR ZERO, AND THERE MAY BE SOME CHAFF IN THE OTHER
040799,000547:                                                                                                  #  ELEMENTS OF THE MATRIX WHICH WOULD PRODUCE CHAOS UNDER DIVISION.
040800,000548:                                                                                                  #  BEFORE DIVIDING WE MAKE SURE COS(MGA) IS AT LEAST ONE BIT LARGER
040801,000549:                                                                                                  #  THAN THE MAGNITUDE OF THE HIGH ORDER PART OF THE OPERAND.
040802,000550: 
040803,000551:                                                                                                  #  IF ONE OR MORE DIVIDES CANNOT BE PERFORMED, THIS MEANS THAT THE
040804,000552:                                                                                                  #  REQUIRED MGA IS VERY NEARLY +-PI/2 AND THEREFORE THE OTHER GIMBAL
040805,000553:                                                                                                  #  ANGLES ARE INDETERMINATE.  THE INNER AND OUTER GIMBAL ANGLES RETURNED
040806,000554:                                                                                                  #  IN THIS CASE WILL BE RANDOM MULTIPLES OF PI/2.
040807,000555: 
040808,000556: 30,3551           60120        DVBYCOSM           AD       FIXLOC                                
040809,000557: 30,3552           54116                           TS       ADDRWD                                #  ADRES OF OPERAND
040810,000558: 
040811,000559: 30,3553           50116                           INDEX    ADDRWD                                #  FETCH NEG ABS OF OPERAND, AD TEM5, AND
040812,000560: 30,3554           30000                           CA       0                                     #      SKIP DIVIDE IF RESULT NEG OR ZERO
040813,000561: 30,3555           00006                           EXTEND                                         
040814,000562: 30,3556           63560                           BZMF     +2                                    
040815,000563: 30,3557           40000                           COM                                            
040816,000564: 30,3560           60145                           AD       TEM5                                  #  C(A) ZERO OR NEG, C(TEM5) ZERO OR POS
040817,000565: 30,3561           00006                           EXTEND                                         
040818,000566: 30,3562           63570                           BZMF     TSL&TCQ                               #  DIFFERENCE ALWAYS SMALL IF BRANCH
040819,000567: 
040820,000568: 30,3563           00006                           EXTEND                                         #  TEM5 EXCEEDS ABS HIGH ORDER PART OF
040821,000569: 30,3564           50116                           INDEX    ADDRWD                                #       OPERAND BY AT LEAST ONE BIT.
040822,000570: 30,3565           30001                           DCA      0                                     #       THEREFORE IT EXCEEDS THE DP OPERAND
040823,000571: 30,3566           00006                           EXTEND                                         #       AND DIVISION WILL ALWAYS SUCCEED.
040824,000572: 30,3567           10145                           DV       TEM5                                  
040825,000573: 30,3570           54001        TSL&TCQ            TS       L                                     
040826,000574: 30,3571           22141                           LXCH     TEM1                                  
040827,000575: 30,3572           00002                           TC       Q                                     
040828,000576: 

Page 921

040830,000578:                                                                                                  #  ARCTRGSP RETURNS THE 2'S COMPLEMENT, PI, SP ANGLE IN THE A REGISTER GIVEN ITS SINE IN A AND ITS COSINE IN L IN
040831,000579:                                                                                                  #  UNITS OF 2.  THE RESULT IS AN UNAMBIGUOUS ANGLE ANYWHERE IN THE CIRCLE, WITH A MAXIMUM ERROR OF +-4 BITS.
040832,000580:                                                                                                  #  THE ERROR IS PRODUCED BY THE SUBROUTINE SPARCSIN WHICH IS USED ONLY IN THE REGION +-45 DEGREES.
040833,000581: 
040834,000582: 30,3573           00006        ARCTRGSP           EXTEND                                         
040835,000583: 30,3574           13636                           BZF      SINZERO                               #  TO AVOID DIVIDING BY ZERO
040836,000584: 
040837,000585: 30,3575           00006                           EXTEND                                         
040838,000586: 30,3576           22144                           QXCH     TEM4                                  
040839,000587: 30,3577           54142                           TS       TEM2                                  
040840,000588: 30,3600           30001                           CA       L                                     
040841,000589: 30,3601           54143                           TS       TEM3                                  
040842,000590: 30,3602           34755                           CA       ZERO                                  
040843,000591: 30,3603           00006                           EXTEND                                         
040844,000592: 30,3604           10142                           DV       TEM2                                  
040845,000593: 30,3605           00006                           EXTEND                                         
040846,000594: 30,3606           13625                           BZF      USECOS                                
040847,000595: 
040848,000596: 30,3607           10143                           CCS      TEM3                                  #  SIN IS SMALLER OR EQUAL
040849,000597: 30,3610           34755                           CA       ZERO                                  
040850,000598: 30,3611           13615                           TCF      +4                                    
040851,000599: 30,3612           40142                           CS       TEM2                                  #  IF COS NEG, REVERSE SIGN OF SIN,
040852,000600: 30,3613           54142                           TS       TEM2                                  #       ANGLE = PI-ARCSIN(SIN)
040853,000601: 30,3614           34735                           CA       NEGMAX                                #  PICK UP PI, 2'S COMPLEMENT
040854,000602: 30,3615           54143                           TS       TEM3                                  #  WE NO LONGER NEED COS
040855,000603: 30,3616           30142                           CA       TEM2                                  
040856,000604: 30,3617           03643                           TC       SPARCSIN   -1                         
040857,000605: 30,3620           03714                           TC       ONESTO2S                              
040858,000606: 30,3621           00006                           EXTEND                                         
040859,000607: 30,3622           20143                           MSU      TEM3                                  
040860,000608: 30,3623           03714        1TO2&TCQ           TC       ONESTO2S                              
040861,000609: 30,3624           00144                           TC       TEM4                                  
040862,000610: 
040863,000611: 30,3625           40143        USECOS             CS       TEM3                                  #  COS IS SMALLER
040864,000612: 30,3626           03643                           TC       SPARCSIN   -1                         #  ANGLE = SIGN(SIN)(PI/2-ARCSIN(COS))
040865,000613: 30,3627           64736                           AD       HALF                                  
040866,000614: 30,3630           54143                           TS       TEM3                                  #  WE NO LONGER NEED COS
040867,000615: 30,3631           10142                           CCS      TEM2                                  
040868,000616: 30,3632           30143                           CA       TEM3                                  
040869,000617: 30,3633           13623                           TCF      1TO2&TCQ                              
040870,000618: 30,3634           40143                           CS       TEM3                                  
040871,000619: 30,3635           13623                           TCF      1TO2&TCQ                              
040872,000620: 
040873,000621: 30,3636           10001        SINZERO            CCS      L                                     
040874,000622: 30,3637           34755                           CA       ZERO                                  
040875,000623: 30,3640           00002                           TC       Q                                     
040876,000624: 30,3641           34735                           CA       NEGMAX                                #  PI, 2'S COMP
040877,000625: 30,3642           00002                           TC       Q                                     
040878,000626: 

Page 922

040880,000628:                                                                                                  #  SPARCSIN TAKES AN ARGUMENT SCALED UNITY IN A AND RETURNS AN ANGLE SCALED
040881,000629:                                                                                                  #  180 DEGREES IN A.  IT HAS BEEN UNIT TESTED IN THE REGION +-.94 (+-70
040882,000630:                                                                                                  #  DEGREES) AND THE MAXIMUM ERROR IS +-5 BITS WITH AN AVERAGE TIME OF
040883,000631:                                                                                                  #  450 MICROSECONDS.  SPARCSIN -1 TAKES THE ARGUMENT SCALED TWO.(BOB CRISP)
040884,000632: 
040885,000633: 30,3643           60000                           DOUBLE                                         
040886,000634: 30,3644           54021        SPARCSIN           TS       SR                                    
040887,000635: 30,3645           13651                           TCF      +4                                    
040888,000636: 30,3646           50000                           INDEX    A                                     
040889,000637: 30,3647           44734                           CS       LIMITS                                
040890,000638: 30,3650           54021                           TS       SR                                    
040891,000639: 30,3651           00006                           EXTEND                                         
040892,000640: 30,3652           70000                           MP       A                                     
040893,000641: 30,3653           54141                           TS       TEM1                                  
040894,000642: 30,3654           00006                           EXTEND                                         
040895,000643: 30,3655           73677                           MP       DPL9                                  
040896,000644: 30,3656           63676                           AD       DPL7                                  
040897,000645: 30,3657           00006                           EXTEND                                         
040898,000646: 30,3660           70141                           MP       TEM1                                  
040899,000647: 30,3661           63675                           AD       DPL5                                  
040900,000648: 30,3662           00006                           EXTEND                                         
040901,000649: 30,3663           70141                           MP       TEM1                                  
040902,000650: 30,3664           63674                           AD       DPL3                                  
040903,000651: 30,3665           00006                           EXTEND                                         
040904,000652: 30,3666           70141                           MP       TEM1                                  
040905,000653: 30,3667           63673                           AD       DPL1                                  
040906,000654: 30,3670           00006                           EXTEND                                         
040907,000655: 30,3671           70021                           MP       SR                                    
040908,000656: 30,3672           00002                           TC       Q                                     
040909,000657: 30,3673           24406        DPL1               DEC      10502      B-14                       
040910,000658: 30,3674           00660        DPL3               DEC      432        B-14                       
040911,000659: 30,3675           16204        DPL5               DEC      7300       B-14                       
040912,000660: 30,3676           50744        DPL7               DEC      -11803     B-14                       
040913,000661: 30,3677           20315        DPL9               DEC      8397       B-14                       
040914,000662: 

Page 923

040916,000664:                                                                                                  #  LIMITSUB LIMITS THE MAGNITUDE OF THE POSITIVE OR NEGATIVE VARIABLE
040917,000665:                                                                                                  #  ARRIVING IN L TO THE POSITIVE LIMIT ARRIVING IN A.
040918,000666:                                                                                                  #  THE SIGNED LIMITED VARIABLE IS RETURNED IN A.
040919,000667: 
040920,000668:                                                                                                  #  VERSION COURTESY HUGH BLAIR-SMITH
040921,000669: 
040922,000670: 30,3700           54141        LIMITSUB           TS       TEM1                                  
040923,000671: 30,3701           34755                           CA       ZERO                                  
040924,000672: 30,3702           00006                           EXTEND                                         
040925,000673: 30,3703           10141                           DV       TEM1                                  
040926,000674: 30,3704           10000                           CCS      A                                     
040927,000675: 30,3705           22141                           LXCH     TEM1                                  
040928,000676: 30,3706           13710                           TCF      +2                                    
040929,000677: 30,3707           13712                           TCF      +3                                    
040930,000678: 30,3710           30001                           CA       L                                     
040931,000679: 30,3711           00002                           TC       Q                                     
040932,000680: 30,3712           40141                           CS       TEM1                                  
040933,000681: 30,3713           00002                           TC       Q                                     
040934,000682: 
040935,000683:                                                                                                  #  SUBROUTINE TO CONVERT 1'S COMP SP TO 2'S COMP
040936,000684: 
040937,000685: 30,3714           10000        ONESTO2S           CCS      A                                     
040938,000686: 30,3715           64753                           AD       ONE                                   
040939,000687: 30,3716           00002                           TC       Q                                     
040940,000688: 30,3717           40000                           CS       A                                     
040941,000689: 30,3720           00002                           TC       Q                                     
040942,000690: 
040943,000691:                                                                                                  #  NO ATTITUDE CONTROL
040944,000692: 
040945,000693: 30,3721           05567        NOATTCNT           TC       ALARM                                 
040946,000694: 30,3722           00402                           OCT      00402                                 #  NO ATTITUDE CONTROL
040947,000695: 
040948,000696: 30,3723           00004                 +2        INHINT                                         #  COME HERE FOR NOATTCNT WITHOUT ALARM
040949,000697: 30,3724           04674                           TC       IBNKCALL                              #  RELINT AT TC INTPRET AFTER TCQCDUW
040950,000698: 30,3725           40165                           FCADR    STOPRATE                              
040951,000699: 30,3726           13446                           TCF      TCQCDUW                               #  RETURN TO USER SKIPPING AUTOPILOT CMDS
040952,000700: 
040953,000701:                                                                                                  #  MIDDLE GIMBAL ANGLE ALARM
040954,000702: 
040955,000703: 30,3727           05567        ALARMMGA           TC       ALARM                                 
040956,000704: 30,3730           00401                           OCT      00401                                 
040957,000705: 30,3731           13246                           TCF      MGARET                                
040958,000706: 

Page 924

040960,000708:                                                                                                  # ************************************************************************
040961,000709:                                                                                                  #  CONSTANTS
040962,000710:                                                                                                  # ************************************************************************
040963,000711: 
040964,000712:                                                                                                  #  ADDRESS CONSTANTS
040965,000713: 
040966,000714: 30,3732           03244        ECDUWL             ECADR    ECDUW                                 
040967,000715: 
040968,000716:                                                                                                  #  THRUST DIRECTION FILTER CONSTANTS
040969,000717: 
040970,000718: 30,3733           06315        GAINFLTR           DEC      .2                                    #  GAIN FILTER SANS CSM
040971,000719: 30,3734           03146                           DEC      .1                                    #  GAIN FILTER WITH CSM
040972,000720: 
040973,000721: 30,3735           00071        DUNFVLIM           DEC      .007       B-1                        #  7 MR MAX CHG IN F DIR IN VEH IN 2 SECS.
040974,000722:                                                                                                  #  THIS DOES NOT ALLOW FOR S/C ROT RATE.
040975,000723: 
040976,000724: 30,3736           02041        UNFVLIM            DEC      .129       B-1                        #  129 MR MAX THRUST OFFSET.  105 MR TRAVEL
040977,000725:                                                                                                  #  +10MR DEFL+5MR MECH MOUNT+9MR ABLATION.
040978,000726: 
040979,000727:                                                                                                  #  CONSTANTS RELATED TO GIMBAL ANGLE COMPUTATIONS
040980,000728: 
040981,000729: 30,3737           01673        DOTSWFMX           DEC      .93302     B-4                        #  LIM COLNRTY OF UNWC/2 & UNFC/2 TO 85 DEG
040982,000730:                                                                                                  #  LOWER PART COMES FROM NEXT CONSTANT
040983,000731: 
040984,000732: 30,3740           03434        DAXMAX             DEC      .11111111111                            #  DELATTX LIM TO 20 DEG IN 2 SECS, 1'S, PI
040985,000733: 30,3741           00266                           DEC      .0111111111                            #  2 DEG WHEN CSM DOCKED
040986,000734: 
040987,000735: 30,3742           01616        DAY/2MAX           DEC      .05555555555                            #  LIKEWISE FOR DELATTY
040988,000736: 30,3743           00133                           DEC      .0055555555                            
040989,000737: 
040990,000738: 30,3744  30,3740               DAZMAX             =        DAXMAX                                #  LIKEWISE FOR DELATTZ
040991,000739: 
040992,000740: 30,3744           14344        CDUZDLIM           DEC      .3888888888                            #  70 DEG LIMIT FOR MGA, 1'S, PI
040993,000741: 
040994,000742:                                                                                                  #  CONSTANTS FOR DATA TRANSFER
040995,000743: 
040996,000744: 30,3745           01463        DT/DELT            DEC      .05                                   #  .1 SEC/2 SEC WHICH IS THE AUTOPILOT
040997,000745:                                                                                                  #  CONTROL SAMPLE PERIOD/COMPUTATION PERIOD
040998,000746: 
040999,000747: 30,3746  30,3742               DELERLIM           =        DAY/2MAX                              #  10 DEG LIMIT FOR LAG ANGLES, 1'S, PI
041000,000748: 
041001,000749: 

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