Source Code

These source code files are an attempted reconstruction of Sundance revision 306, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
These dumps were then modified using memos, checklists, observed address changes, and the Sundance GSOPs to get the entire program to match Sundance revision 306 as closely as possible. Without more information, it is not possible to say how close it actually is; however, this code should be quite close. It is capable of flying the whole Apollo 9 mission using the original checklists and padload. Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

036027,000002:                                                                                                  ## Copyright:   Public domain.
036028,000003:                                                                                                  ## Filename:    FINDCDUW_-_GUIDAP_INTERFACE.agc
036029,000004:                                                                                                  ## Purpose:     A section of an attempt to reconstruct Sundance revision 306
036030,000005:                                                                                                  ##              as closely as possible with available information. Sundance
036031,000006:                                                                                                  ##              306 is the source code for the Lunar Module's (LM) Apollo
036032,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 9. This program was created
036033,000008:                                                                                                  ##              using the mixed-revision SundanceXXX as a starting point, and
036034,000009:                                                                                                  ##              pulling back features from Luminary 69 believed to have been
036035,000010:                                                                                                  ##              added based on memos, checklists, observed address changes,
036036,000011:                                                                                                  ##              or the Sundance GSOPs.
036037,000012:                                                                                                  ## Assembler:   yaYUL
036038,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
036039,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
036040,000015:                                                                                                  ## Mod history: 2020-07-24 MAS  Created from SundanceXXX.
036041,000016: 
036042,000017: 
036043,000018: 
036044,000019:                                                                                                  #  PROGRAM NAME:   FINDCDUW
036045,000020: 
036046,000021:                                                                                                  #  MOD NUMBER:     1         68 07 15
036047,000022: 
036048,000023:                                                                                                  #  MOD AUTHOR:     KLUMPP
036049,000024: 
036050,000025:                                                                                                  #  OBJECTS OF MOD: 1.        TO SUPPLY COMMANDED GIMBAL ANGLES FOR NOUN 22.
036051,000026:                                                                                                  #                  2.        TO MAINTAIN CORRECT AND CURRENT THRUST
036052,000027:                                                                                                  #                            DIRECTION DATA IN ALL MODES.  THIS IS DONE BY
036053,000028:                                                                                                  #                            FETCHING FOR THE THRUST DIRECTION FILTER THE
036054,000029:                                                                                                  #                            CDUD'S IN PNGCS-AUTO, THE CDU'S IN ALL OTHER
036055,000030:                                                                                                  #                            MODES.
036056,000031:                                                                                                  #                  3.        TO SUBSTITUTE A STOPRATE FOR THE NORMAL
036057,000032:                                                                                                  #                            AUTOPILOT COMMANDS WHENEVER
036058,000033:                                                                                                  #                            1) NOT IN PNGCS-AUTO, OR
036059,000034:                                                                                                  #                            2) ENGINE IS OFF.
036060,000035: 
036061,000036:                                                                                                  #  FUNCTIONAL DESCRIPTION:
036062,000037: 
036063,000038:                                                                                                  #  FINDCDUW PROVIDES THE INTERFACES BETWEEN THE VARIOUS POWERED FLITE GUIDANCE PROGRAMS
036064,000039:                                                                                                  #  AND THE DIGITAL AUTOPILOT.  THE INPUTS TO FINDCDUW ARE THE THRUST COMMAND VECTOR
036065,000040:                                                                                                  #  AND THE WINDOW COMMAND VECTOR, AND THE OUTPUTS ARE THE GIMBAL ANGLE
036066,000041:                                                                                                  #  INCREMENTS, THE COMMANDED ATTITUDE ANGLE RATES, AND THE COMMANDED
036067,000042:                                                                                                  #  ATTITUDE LAG ANGLES (WHICH ACCOUNT FOR THE ANGLES BY WHICH THE BODY WILL
036068,000043:                                                                                                  #  LAG BEHIND A RAMP COMMAND IN ATTITUDE ANGLE DUE TO THE FINITE ANGULAR
036069,000044:                                                                                                  #  ACCELERATIONS AVAILABLE).
036070,000045: 
036071,000046:                                                                                                  #  FINDCDUW ALINES THE ESTIMATED THRUST VECTOR FROM THE THRUST DIRECTION
036072,000047:                                                                                                  #  FILTER WITH THE THRUST COMMAND VECTOR, AND, WHEN  XOVINHIB  SET,
036073,000048:                                                                                                  #  ALINES THE +Z HALF OF THE LM ZX PLANE WITH THE WINDOW COMMAND VECTOR.
036074,000049: 
036075,000050:                                                                                                  #  SPECIFICATIONS:
036076,000051: 
036077,000052:                                                                                                  #  INITIALIZATION: A SINGLE INTERPRETIVE CALL TO  INITCDUW  IS REQUIRED
036078,000053:                                                                                                  #                  BEFORE EACH GUIDED MANEUVER USING FINDCDUW.
036079,000054: 
036080,000055:                                                                                                  #  CALL:           INTERPRETIVE CALL TO FINDCDUW WITH THE THRUST COMMAND
036081,000056:                                                                                                  #                  VECTOR IN MPAC.  INTERPRETIVE CALL TO FINDCDUW -2 WITH
036082,000057:                                                                                                  #                  THE THRUST COMMAND VECTOR IN UNFC/2 AND NOT IN MPAC.
036083,000058: 
036084,000059:                                                                                                  #  RETURNS:        NORMAL INTERPRETIVE IN ALL CASES
036085,000060: 
036086,000061:                                                                                                  #                  1.       NORMALLY ALL AUTOPILOT CMDS ARE ISSUED.
036087,000062: 
036088,000063:                                                                                                  #                  2.       IF NOT PNGCS AUTO, DO STOPRATE AND RETURN
036089,000064:                                                                                                  #                           WITHOUT ISSUING AUTOPILOT CMDS.
036090,000065: 
036091,000066:                                                                                                  #                  3.       IF ENGINE OFF, DO STOPRATE AND RETURN WITHOUT
036092,000067:                                                                                                  #                           ISSUING AUTOPILOT CMDS.
036093,000068: 
036094,000069:                                                                                                  #  ALARMS:         00401 IF INPUTS DETERMINE AN ATTITUDE IN GIMBAL LOCK.
036095,000070:                                                                                                  #                           FINDCDUW DRIVES CDUXD AND CDUYD TO THE RQD VALUES,
036096,000071:                                                                                                  #                           BUT DRIVES CDUZD ONLY TO THE GIMBAL LOCK CONE.
036097,000072:                                                                                                  #                  00402 IF UNFC/2 OR UNWC/2 PRODUCE OVERFLOW WHEN
036098,000073:                                                                                                  #                           UNITIZED USING NORMUNIT.  FINDCDUW ISSUES
036099,000074:                                                                                                  #                           STOPRATE AS ONLY INPUT TO AUTOPILOT.
036100,000075: 
036101,000076:                                                                                                  #  INPUTS:         UNFC/2   THRUST COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
036102,000077:                                                                                                  #                  UNWC/2   WINDOW COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
036103,000078:                                                                                                  #                  XOVINHIB FLAG DENOTING X AXIS OVERRIDE INHIBITED.
036104,000079:                                                                                                  #                  CSMDOCKD FLAG DENOTING CSM DOCKED.
036105,000080:                                                                                                  #                  STEERSW  FLAG DENOTING INSUFF THRUST FOR THRUST DIR FLTR.
036106,000081: 
036107,000082:                                                                                                  #  OUTPUTS:        DELCDUX,Y,Z
036108,000083:                                                                                                  #                  OMEGAPD,+1,+2
036109,000084:                                                                                                  #                  DELPEROR,+1,+2
036110,000085:                                                                                                  #                  CPHI,+1,+2 FOR NOUN22
036111,000086: 
036112,000087:                                                                                                  #  DEBRIS:         FINDCDUW DESTROYS SINCDUX,Y,Z AND COSCDUX,Y,Z BY
036113,000088:                                                                                                  #                  WRITING INTO THESE LOCATIONS THE SINES AND COSINES
036114,000089:                                                                                                  #                  OF THE CDUD'S IN PNGCS-AUTO, OF THE CDU'S OTHERWISE.
036115,000090: 
036116,000091:                                                                                                  #  INITIALIZATION FOR FINDCDUW
036117,000092: 
036118,000093: 30,3213                                           BANK     30                                    
036119,000094: 30,2000                                           SETLOC   FCDUW                                 
036120,000095: 30,2000                                           BANK                                           
036121,000096: 
036122,000097: 30,3213  E6,1643                                  EBANK=   ECDUW                                 
036123,000098: 
036124,000099: 30,3213                                           COUNT*   $$/FCDUW                              
036125,000100: 
036126,000101: 30,3213           77775        INITCDUW           VLOAD                                          
036127,000102: 30,3214           06231                                    UNITX                                 
036128,000103: 30,3215           03264                           STORE    UNFV/2                                
036129,000104: 30,3216           03256                           STORE    UNWC/2                                
036130,000105: 30,3217           77616                           RVQ                                            
036131,000106: 
036132,000107:                                                                                                  #  FINDCDUW PRELIMINARIES
036133,000108: 
036134,000109: 30,3220           77775                           VLOAD                                          #  FINDCDUW -2: ENTRY WHEN UNFC/2 PRE-STORD
036135,000110: 30,3221           03250                                    UNFC/2                                #  INPUT VECTORS NEED NOT BE SEMI-UNIT
036136,000111: 30,3222           40200        FINDCDUW           BOV      SETPD                                 #  FINDCDUW: ENTRY WHEN UNFC/2 IN MPAC
036137,000112: 30,3223           61222                                    FINDCDUW                              #  INTERPRETER NOW INITIALIZED
036138,000113: 30,3224           00023                                    22                                    #  LOCS 0 THRU 21 FOR DIRECTION COSINE MAT
036139,000114: 30,3225           77420                           STQ      EXIT                                  
036140,000115: 30,3226           03244                                    QCDUWUSR                              #  SAVE RETURN ADDRESS
036141,000116: 
036142,000117:                                                                                                  #  MORE HAUSKEEPING
036143,000118: 30,3227           33632                           CA       ECDUWL                                
036144,000119: 30,3230           56003                           XCH      EBANK                                 #  SET EBANK
036145,000120: 30,3231           55643                           TS       ECDUWUSR                              #  SAVE USER'S EBANK
036146,000121: 
036147,000122: 30,3232           31102                           CA       DAPBOOLS                              
036148,000123: 30,3233           75012                           MASK     CSMDOCKD                              #  CSMDOCKD MUST NOT BE BIT15
036149,000124: 30,3234           10000                           CCS      A                                     
036150,000125: 30,3235           35026                           CA       ONE                                   #  INDEX IF CSM DOCKED
036151,000126: 30,3236           55645                           TS       NDXCDUW                               
036152,000127: 
036153,000128: 30,3237           31102                           CA       DAPBOOLS                              
036154,000129: 30,3240           75016                           MASK     XOVINHIB                              #  XOVINHIB MUST NOT BE BIT15
036155,000130: 30,3241           55646                           TS       FLAGOODW                              #  FLAGOODW = ANY PNZ NUMBER IF XOV INHIBTD
036156,000131: 
036157,000132:                                                                                                  #  FETCH BASIC DATA
036158,000133: 
036159,000134: 30,3242           00004                           INHINT                                         #  RELINT AT PAUTNO (TC INTPRET)
036160,000135: 
036161,000136: 30,3243           31632                           CA       CDUXD                                 #  PNGCS AUTO: FETCH CDUXD,CDUYD,CDUZD
036162,000137: 30,3244           54772                           TS       CDUSPOTX                              
036163,000138: 30,3245           31633                           CA       CDUYD                                 
036164,000139: 30,3246           54766                           TS       CDUSPOTY                              
036165,000140: 30,3247           31634                           CA       CDUZD                                 
036166,000141: 30,3250           54770                           TS       CDUSPOTZ                              
036167,000142: 
036168,000143: 30,3251           00003                           RELINT                                         
036169,000144: 
036170,000145:                                                                                                  #  FETCH INPUTS
036171,000146: 
036172,000147: 30,3252           06014                           TC       INTPRET                               #  ENTERING THRUST CMD STILL IN MPAC
036173,000148: 30,3253           77634                           RTB                                            
036174,000149: 30,3254           21672                                    NORMUNIT                              
036175,000150: 30,3255           24001                           STOVL    UNX/2                                 #  SEMI-UNIT THRUST CMD AS INITIAL UNX/2
036176,000151: 30,3256           03256                                    UNWC/2                                
036177,000152: 30,3257           77634                           RTB                                            
036178,000153: 30,3260           21672                                    NORMUNIT                              
036179,000154: 30,3261           24015                           STOVL    UNZ/2                                 #  SEMI-UNIT WINDOW CMD AS INITIAL UNZ/2
036180,000155: 30,3262           01212                                    DELV                                  
036181,000156: 30,3263           45004                           BOVB     CALL                                  
036182,000157: 30,3264           61622                                    NOATTCNT                              #  AT LEAST ONE ENTERING CMD VCT ZERO
036183,000158: 30,3265           47457                                    TRG*SMNB                              
036184,000159: 30,3266           53414                           BOFF     UNIT                                  #  YIELDS UNIT(DELV) IN VEH COORDS FOR FLTR
036185,000160: 30,3267           01344                                    STEERSW                               
036186,000161: 30,3270           61303                                    AFTRFLTR                              #  IF UNIT DELV OVERFLOWS, SKIP FILTER
036187,000162: 
036188,000163:                                                                                                  #  THRUST DIRECTION FILTER
036189,000164: 
036190,000165: 30,3271           77776                           EXIT                                           
036191,000166: 
036192,000167: 30,3272           31665                           CA       UNFVY/2                               #  FOR RESTARTS, UNFV/2 ALWAYS INTACT, MPAC
036193,000168: 30,3273           22157                           LXCH     MPAC       +3                         #        RENEWED AFTER RETURN FROM CALLER,
036194,000169: 30,3274           03527                           TC       FLTRSUB                               #        TWO FILTER UPDATES MAY BE DONE.
036195,000170: 30,3275           55665                           TS       UNFVY/2                               #  UNFV/2 NEED NOT BE EXACTLY SEMI-UNIT.
036196,000171: 
036197,000172: 30,3276           31667                           CA       UNFVZ/2                               
036198,000173: 30,3277           22161                           LXCH     MPAC       +5                         
036199,000174: 30,3300           03527                           TC       FLTRSUB                               
036200,000175: 30,3301           55667                           TS       UNFVZ/2                               
036201,000176: 
036202,000177: 30,3302           06014                           TC       INTPRET                               #  COMPLETES FILTER
036203,000178: 
036204,000179:                                                                                                  #  FIND A SUITABLE WINDOW POINTING VECTOR
036205,000180: 
036206,000181: 30,3303           46135        AFTRFLTR           SLOAD    BHIZ                                  #  IF XOV NOT INHIBITED, GO FETCH ZNB
036207,000182: 30,3304           03247                                    FLAGOODW                              
036208,000183: 30,3305           61311                                    FETCHZNB                              
036209,000184: 30,3306           45175                           VLOAD    CALL                                  
036210,000185: 30,3307           00015                                    UNZ/2                                 
036211,000186: 30,3310           61546                                    UNWCTEST                              
036212,000187: 
036213,000188: 30,3311           77775        FETCHZNB           VLOAD                                          
036214,000189: 30,3312           02164                                    ZNBPIP                                
036215,000190: 30,3313           34015                           STCALL   UNZ/2                                 
036216,000191: 30,3314           61546                                    UNWCTEST                              
036217,000192: 
036218,000193: 30,3315           57575                           VLOAD    VCOMP                                 #  Z AND -X CAN'T BOTH PARALLEL UNFC/2
036219,000194: 30,3316           02150                                    XNBPIP                                
036220,000195: 30,3317           00015                           STORE    UNZ/2                                 
036221,000196: 
036222,000197:                                                                                                  #  COMPUTE THE REQUIRED DIRECTION COSINE MATRIX
036223,000198: 
036224,000199: 30,3320           45175        DCMCL              VLOAD    CALL                                  
036225,000200: 30,3321           00001                                    UNX/2                                 
036226,000201: 30,3322           61570                                    DCMCL1                                
036227,000202: 30,3323           77624                           CALL                                           
036228,000203: 30,3324           61556                                    DCMCL2                                
036229,000204: 30,3325           77624                           CALL                                           
036230,000205: 30,3326           44331                                    TRNSPSPD                              
036231,000206: 30,3327           45160                           AXC,1    CALL                                  
036232,000207: 30,3330           00000                                    0                                     
036233,000208: 30,3331           44650                                    DCMTOCDU                              
036234,000209: 30,3332           77434                           RTB      EXIT                                  
036235,000210: 30,3333           21516                                    V1STO2S                               
036236,000211: 
036237,000212:                                                                                                  #  LIMIT THE MIDDLE GIMBAL ANGLE & COMPUTE THE UNLIMITED GIMBAL ANGLE CHGS
036238,000213: 
036239,000214: 30,3334           30156                           CA       MPAC       +2                         #  LIMIT THE MGA
036240,000215: 30,3335           54001                           TS       L                                     #  CAN'T LXCH: NEED UNLIMITED MGA FOR ALARM
036241,000216: 30,3336           33643                           CA       CDUZDLIM                              
036242,000217: 30,3337           03601                           TC       LIMITSUB                              #  YIELDS LIMITED MGA. 1 BIT ERROR POSSIBLE
036243,000218: 30,3340           56156                           XCH      MPAC       +2                         #       BECAUSE USING 2'S COMP. WHO CARES?
036244,000219: 30,3341           00006                           EXTEND                                         
036245,000220: 30,3342           60156                           SU       MPAC       +2                         #  THIS BETTER YIELD ZERO
036246,000221: 30,3343           10000                           CCS      A                                     
036247,000222: 30,3344           13627                           TCF      ALARMMGA                              
036248,000223: 30,3345           13347                           TCF      +2                                    
036249,000224: 30,3346           13627                           TCF      ALARMMGA                              
036250,000225: 
036251,000226: 30,3347           00004        MGARET             INHINT                                         #  RELINT AT TC INTPRET AFTER TCQCDUW
036252,000227: 
036253,000228: 30,3350           35025                           CA       TWO                                   
036254,000229: 30,3351           54142        DELGMBLP           TS       TEM2                                  
036255,000230: 
036256,000231: 30,3352           50142                           INDEX    TEM2                                  
036257,000232: 30,3353           31632                           CA       CDUXD                                 
036258,000233: 30,3354           00006                           EXTEND                                         
036259,000234: 30,3355           50142                           INDEX    TEM2                                  
036260,000235: 30,3356           20154                           MSU      MPAC                                  
036261,000236: 30,3357           50142                           INDEX    TEM2                                  
036262,000237: 30,3360           55671                           TS       -DELGMB                               #  -UNLIMITED GIMBAL ANGLE CHGS, 1'S, PI
036263,000238: 30,3361           10142                           CCS      TEM2                                  
036264,000239: 30,3362           13351                           TCF      DELGMBLP                              
036265,000240: 
036266,000241:                                                                                                  #  LIMIT THE ATTITUDE ANGLE CHANGES
036267,000242: 
036268,000243:                                                                                                  #  THIS SECTION LIMITS THE ATTITUDE ANGLE CHANGES ABOUT A SET OF ORTHOGONAL VEHICLE AXES X,YPRIME,ZPRIME.
036269,000244:                                                                                                  #  THESE AXES COINCIDE WITH THE COMMANDED VEHICLE AXES IF AND ONLY IF CDUXD IS ZERO.  THE PRIME SYSTEM IS
036270,000245:                                                                                                  #  THE COMMANDED VEHICLE SYSTEM ROTATED ABOUT THE X AXIS TO BRING THE Z AXIS INTO ALINEMENT WITH THE MIDDLE GIMBAL
036271,000246:                                                                                                  #  AXIS.  ATTITUDE ANGLE CHANGES IN THE PRIME SYSTEM ARE RELATED TO SMALL GIMBAL ANGLE CHANGES BY:
036272,000247: 
036273,000248:                                                                                                  #  * -DELATTX      *   * 1  SIN(CDUZD)  0 * * -DELGMBX *
036274,000249:                                                                                                  #  *               *   *                  * *          *
036275,000250:                                                                                                  #  * -DELATTYPRIME * = * 0  COS(CDUZD)  0 * * -DELGMBY *
036276,000251:                                                                                                  #  *               *   *                  * *          *
036277,000252:                                                                                                  #  * -DELATTZPRIME *   * 0  0           1 * * -DELGMBZ *
036278,000253: 
036279,000254: 30,3363           23673                           LXCH     -DELGMB    +2                         #  SAME AS -DELATTZPRIME UNLIMITED
036280,000255: 30,3364           51645                           INDEX    NDXCDUW                               
036281,000256: 30,3365           33637                           CA       DAZMAX                                
036282,000257: 30,3366           03601                           TC       LIMITSUB                              
036283,000258: 30,3367           55673                           TS       -DELGMB    +2                         #  -DELGMBZ
036284,000259: 
036285,000260: 30,3370           31672                           CA       -DELGMB    +1                         
036286,000261: 30,3371           00006                           EXTEND                                         
036287,000262: 30,3372           70746                           MP       COSCDUZ                               #  YIELDS -DELATTYPRIME/2 UNLIMITED
036288,000263: 30,3373           54001                           TS       L                                     
036289,000264: 30,3374           51645                           INDEX    NDXCDUW                               
036290,000265: 30,3375           33641                           CA       DAY/2MAX                              
036291,000266: 30,3376           03601                           TC       LIMITSUB                              
036292,000267: 30,3377           00006                           EXTEND                                         
036293,000268: 30,3400           10746                           DV       COSCDUZ                               
036294,000269: 30,3401           57672                           XCH      -DELGMB    +1                         #  -DELGMBY, FETCHING UNLIMITED VALUE
036295,000270: 
036296,000271: 30,3402           00006                           EXTEND                                         
036297,000272: 30,3403           70740                           MP       SINCDUZ                               
036298,000273: 30,3404           20001                           DDOUBL                                         
036299,000274: 30,3405           54142                           TS       TEM2                                  #  YIELDS +DELATTX UNLIMITD, MAG < 180 DEG,
036300,000275: 30,3406           61671                           AD       -DELGMB                               #        BASED ON UNLIMITED DELGMBY.
036301,000276: 30,3407           54001                           TS       L                                     #        ONE BIT ERROR IF OPERANDS IN MSU
036302,000277: 30,3410           51645                           INDEX    NDXCDUW                               #        OF MIXED SIGNS.  WHO CARES?
036303,000278: 30,3411           33637                           CA       DAXMAX                                
036304,000279: 30,3412           03601                           TC       LIMITSUB                              
036305,000280: 30,3413           54143                           TS       TEM3                                  #  SAVE LIMITED +DELATTX
036306,000281: 30,3414           11646                           CCS      FLAGOODW                              
036307,000282: 30,3415           30143                           CA       TEM3                                  #  FETCH IT BACK CHGING SIGN IF WINDOW GOOD
036308,000283: 30,3416           00006                           EXTEND                                         
036309,000284: 30,3417           60142                           SU       TEM2                                  
036310,000285: 30,3420           55671                           TS       -DELGMB                               
036311,000286: 
036312,000287:                                                                                                  #  COMPUTE COMMANDED ATTITUDE RATES
036313,000288: 
036314,000289:                                                                                                  #  * OMEGAPD *   * -2  -4 SINCDUZ          +0         * * -DELGMBX *
036315,000290:                                                                                                  #  *         *   *                                    * *          *
036316,000291:                                                                                                  #  * OMEGAQD * = * +0  -8 COSCDUZ COSCDUX  -4 SINCDUX * * -DELGMBY *
036317,000292:                                                                                                  #  *         *   *                                    * *          *
036318,000293:                                                                                                  #  * OMEGARD *   * +0  +8 COSCDUZ SINCDUX  -4 COSCDUX * * -DELGMBZ *
036319,000294: 
036320,000295:                                                                                                  #  ATTITUDE ANGLE RATES IN UNITS OF PI/4 RAD/SEC = K TRIG FCNS IN UNITS OF 2 X GIMBAL ANGLE RATES IN UNITS OF
036321,000296:                                                                                                  #  PI/2 RAD/SEC.  THE CONSTANTS ARE BASED ON DELGMB BEING THE GIMBAL ANGLE CHANGES IN UNITS OF PI RADIANS,
036322,000297:                                                                                                  #  AND 2 SECONDS BEING THE COMPUTATION PERIOD (THE PERIOD BETWEEN SUCCESSIVE PASSES THRU FINDCDUW).
036323,000298: 
036324,000299: 30,3421           41671                           CS       -DELGMB                               
036325,000300: 30,3422           55640                           TS       OMEGAPD                               
036326,000301: 30,3423           41672                           CS       -DELGMB    +1                         
036327,000302: 30,3424           00006                           EXTEND                                         
036328,000303: 30,3425           70740                           MP       SINCDUZ                               
036329,000304: 30,3426           20001                           DDOUBL                                         
036330,000305: 30,3427           27640                           ADS      OMEGAPD                               
036331,000306: 30,3430           27640                           ADS      OMEGAPD                               
036332,000307: 
036333,000308: 30,3431           41672                           CS       -DELGMB    +1                         
036334,000309: 30,3432           00006                           EXTEND                                         
036335,000310: 30,3433           70750                           MP       COSCDUX                               
036336,000311: 30,3434           20001                           DDOUBL                                         
036337,000312: 30,3435           00006                           EXTEND                                         
036338,000313: 30,3436           70746                           MP       COSCDUZ                               
036339,000314: 30,3437           55641                           TS       OMEGAQD                               
036340,000315: 30,3440           41673                           CS       -DELGMB    +2                         
036341,000316: 30,3441           00006                           EXTEND                                         
036342,000317: 30,3442           70742                           MP       SINCDUX                               
036343,000318: 30,3443           27641                           ADS      OMEGAQD                               
036344,000319: 30,3444           27641                           ADS      OMEGAQD                               
036345,000320: 30,3445           27641                           ADS      OMEGAQD                               
036346,000321: 
036347,000322: 30,3446           31672                           CA       -DELGMB    +1                         
036348,000323: 30,3447           00006                           EXTEND                                         
036349,000324: 30,3450           70742                           MP       SINCDUX                               
036350,000325: 30,3451           20001                           DDOUBL                                         
036351,000326: 30,3452           00006                           EXTEND                                         
036352,000327: 30,3453           70746                           MP       COSCDUZ                               
036353,000328: 30,3454           55642                           TS       OMEGARD                               
036354,000329: 30,3455           41673                           CS       -DELGMB    +2                         
036355,000330: 30,3456           00006                           EXTEND                                         
036356,000331: 30,3457           70750                           MP       COSCDUX                               
036357,000332: 30,3460           27642                           ADS      OMEGARD                               
036358,000333: 30,3461           27642                           ADS      OMEGARD                               
036359,000334: 30,3462           27642                           ADS      OMEGARD                               
036360,000335: 
036361,000336:                                                                                                  #  FINAL TRANSFER
036362,000337: 
036363,000338: 30,3463           35025                           CA       TWO                                   
036364,000339: 30,3464           54142        CDUWXFR            TS       TEM2                                  
036365,000340: 30,3465           50142                           INDEX    TEM2                                  
036366,000341: 30,3466           31671                           CA       -DELGMB                               
036367,000342: 30,3467           00006                           EXTEND                                         
036368,000343: 30,3470           73644                           MP       DT/DELT                               #  RATIO OF DAP INTERVAL TO CDUW INTERVAL
036369,000344: 30,3471           03615                           TC       ONESTO2S                              
036370,000345: 30,3472           50142                           INDEX    TEM2                                  
036371,000346: 30,3473           55635                           TS       DELCDUX                               #  ANGLE INTERFACE
036372,000347: 
036373,000348: 30,3474           50142                           INDEX    TEM2                                  
036374,000349: 30,3475           11640                           CCS      OMEGAPD                               
036375,000350: 30,3476           65026                           AD       ONE                                   
036376,000351: 30,3477           13501                           TCF      +2                                    
036377,000352: 30,3500           65026                           AD       ONE                                   
036378,000353: 30,3501           00006                           EXTEND                                         #  WE NOW HAVE ABS(OMEGAPD,QD,RD)
036379,000354: 30,3502           50142                           INDEX    TEM2                                  
036380,000355: 30,3503           71640                           MP       OMEGAPD                               
036381,000356: 30,3504           00006                           EXTEND                                         
036382,000357: 30,3505           75014                           MP       BIT11                                 #  1/16
036383,000358: 30,3506           00006                           EXTEND                                         
036384,000359: 30,3507           50142                           INDEX    TEM2                                  #                   2
036385,000360: 30,3510           11522                           DV       1JACC                                 #  UNITS PI/4 RAD/SEC
036386,000361: 30,3511           54001                           TS       L                                     
036387,000362: 30,3512           33641                           CA       DELERLIM                              
036388,000363: 30,3513           03601                           TC       LIMITSUB                              
036389,000364: 30,3514           50142                           INDEX    TEM2                                  
036390,000365: 30,3515           55301                           TS       DELPEROR                              #  LAG ANGLE = OMEGA ABS(OMEGA)/2 ACCEL
036391,000366: 30,3516           10142                           CCS      TEM2                                  
036392,000367: 30,3517           13464                           TCF      CDUWXFR                               
036393,000368: 30,3520           00003                           RELINT                                         
036394,000369: 
036395,000370:                                                                                                  #  HAUSKEEPING AND RETURN
036396,000371: 
036397,000372: 30,3521           31643        TCQCDUW            CA       ECDUWUSR                              
036398,000373: 30,3522           54003                           TS       EBANK                                 #  RETURN USER'S EBANK
036399,000374: 
036400,000375: 30,3523           06014                           TC       INTPRET                               
036401,000376: 30,3524           52001                           SETPD    GOTO                                  
036402,000377: 30,3525           00001                                    0                                     
036403,000378: 30,3526           03244                                    QCDUWUSR                              #  NORMAL AND ABNORMAL RETURN TO USER
036404,000379: 
036405,000380:                                                                                                  #  THRUST VECTOR FILTER SUBROUTINE
036406,000381: 
036407,000382: 30,3527           00006        FLTRSUB            EXTEND                                         
036408,000383: 30,3530           22142                           QXCH     TEM2                                  
036409,000384: 30,3531           54143                           TS       TEM3                                  #  SAVE ORIGINAL OFFSET
036410,000385: 30,3532           40000                           COM                                            #  ONE MCT, NO WDS, CAN BE SAVED IF NEG OF
036411,000386: 30,3533           60001                           AD       L                                     #       ORIG OFFSET ARRIVES IN A, BUT IT'S
036412,000387: 30,3534           00006                           EXTEND                                         #       NOT WORTH THE INCREASED OBSCURITY.
036413,000388: 30,3535           73633                           MP       GAINFLTR                              
036414,000389: 30,3536           54001                           TS       L                                     #  INCR TO OFFSET, UNLIMITED
036415,000390: 30,3537           33634                           CA       DUNFVLIM                              #  SAME LIMIT FOR Y AND Z
036416,000391: 30,3540           03601                           TC       LIMITSUB                              #  YIELDS INCR TO OFFSET, LIMITED
036417,000392: 30,3541           60143                           AD       TEM3                                  #  ORIGINAL OFFSET
036418,000393: 30,3542           54001                           TS       L                                     #  TOTAL OFFSET, UNLIMITED
036419,000394: 30,3543           33635                           CA       UNFVLIM                               #  SAME LIMIT FOR Y AND Z
036420,000395: 30,3544           03601                           TC       LIMITSUB                              #  YIELDS TOTAL OFFSET, LIMITED
036421,000396: 30,3545           00142                           TC       TEM2                                  
036422,000397: 
036423,000398:                                                                                                  #  SUBR TO TEST THE ANGLE BETWEEN THE PROPOSED WINDOW AND THRUST CMD VCTS
036424,000399: 
036425,000400: 30,3546           63441        UNWCTEST           DOT      DSQ                                   
036426,000401: 30,3547           00001                                    UNX/2                                 
036427,000402: 30,3550           50025                           DSU      BMN                                   
036428,000403: 30,3551           21637                                    DOTSWFMX                              
036429,000404: 30,3552           61320                                    DCMCL                                 
036430,000405: 30,3553           43531                           SSP      RVQ                                   #  RVQ FOR ALT CHOICE IF DOT MAGN TOO LARGE
036431,000406: 30,3554           03247                                    FLAGOODW                              #       ZEROING WINDOW GOOD FLAG
036432,000407: 30,3555           00000                                    0                                     
036433,000408: 
036434,000409: 30,3556           74345        DCMCL2             DLOAD    VXSC                                  
036435,000410: 30,3557           03270                                    UNFVZ/2                               #  MUST BE SMALL
036436,000411: 30,3560           00015                                    UNZ/2                                 #  -UNZ/2 FIRST ITERATION
036437,000412: 30,3561           74325                           PDDL     VXSC                                  #  EXCHANGE -UNFVZ/2 UNZ/2 FOR UNFVY/2
036438,000413: 30,3562           03266                                    UNFVY/2                               #  MUST BE SMALL
036439,000414: 30,3563           00007                                    UNY/2                                 
036440,000415: 30,3564           76455                           VAD      VSL1                                  
036441,000416: 30,3565           53445                           BVSU     UNIT                                  #  YIELDS -UNFVY/2 UNY/2-UNFVZ/2 UNZ/2
036442,000417: 30,3566           00001                                    UNX/2                                 
036443,000418: 30,3567           00001                           STORE    UNX/2                                 
036444,000419: 
036445,000420: 30,3570           47276        DCMCL1             VCOMP    VXV                                   
036446,000421: 30,3571           00015                                    UNZ/2                                 
036447,000422: 30,3572           77656                           UNIT                                           
036448,000423: 30,3573           00007                           STORE    UNY/2                                 #  UNY/2 FIRST ITERATION
036449,000424: 30,3574           47276                           VCOMP    VXV                                   
036450,000425: 30,3575           00001                                    UNX/2                                 
036451,000426: 30,3576           77772                           VSL1                                           
036452,000427: 30,3577           00015                           STORE    UNZ/2                                 
036453,000428: 30,3600           77616                           RVQ                                            
036454,000429: 
036455,000430:                                                                                                  #  LIMITSUB LIMITS THE MAGNITUDE OF THE POSITIVE OR NEGATIVE VARIABLE
036456,000431:                                                                                                  #  ARRIVING IN L TO THE POSITIVE LIMIT ARRIVING IN A.
036457,000432:                                                                                                  #  THE SIGNED LIMITED VARIABLE IS RETURNED IN A.
036458,000433: 
036459,000434:                                                                                                  #  VERSION COURTESY HUGH BLAIR-SMITH
036460,000435: 
036461,000436: 30,3601           54141        LIMITSUB           TS       TEM1                                  
036462,000437: 30,3602           35030                           CA       ZERO                                  
036463,000438: 30,3603           00006                           EXTEND                                         
036464,000439: 30,3604           10141                           DV       TEM1                                  
036465,000440: 30,3605           10000                           CCS      A                                     
036466,000441: 30,3606           22141                           LXCH     TEM1                                  
036467,000442: 30,3607           13611                           TCF      +2                                    
036468,000443: 30,3610           13613                           TCF      +3                                    
036469,000444: 30,3611           30001                           CA       L                                     
036470,000445: 30,3612           00002                           TC       Q                                     
036471,000446: 30,3613           40141                           CS       TEM1                                  
036472,000447: 30,3614           00002                           TC       Q                                     
036473,000448: 
036474,000449:                                                                                                  #  SUBROUTINE TO CONVERT 1'S COMP SP TO 2'S COMP
036475,000450: 
036476,000451: 30,3615           10000        ONESTO2S           CCS      A                                     
036477,000452: 30,3616           65026                           AD       ONE                                   
036478,000453: 30,3617           00002                           TC       Q                                     
036479,000454: 30,3620           40000                           CS       A                                     
036480,000455: 30,3621           00002                           TC       Q                                     
036481,000456: 
036482,000457:                                                                                                  #  NO ATTITUDE CONTROL
036483,000458: 
036484,000459: 30,3622           05651        NOATTCNT           TC       ALARM                                 
036485,000460: 30,3623           00402                           OCT      00402                                 #  NO ATTITUDE CONTROL
036486,000461: 
036487,000462: 30,3624           04655                 +2        TC       BANKCALL                              
036488,000463: 30,3625           40244                           FCADR    STOPRATE                              
036489,000464: 30,3626           13521                           TCF      TCQCDUW                               #  RETURN TO USER SKIPPING AUTOPILOT CMDS
036490,000465: 
036491,000466:                                                                                                  #  MIDDLE GIMBAL ANGLE ALARM
036492,000467: 
036493,000468: 30,3627           05651        ALARMMGA           TC       ALARM                                 
036494,000469: 30,3630           00401                           OCT      00401                                 
036495,000470: 30,3631           13347                           TCF      MGARET                                
036496,000471: 
036497,000472:                                                                                                  # ************************************************************************
036498,000473:                                                                                                  #  CONSTANTS
036499,000474:                                                                                                  # ************************************************************************
036500,000475: 
036501,000476:                                                                                                  #  ADDRESS CONSTANTS
036502,000477: 
036503,000478: 30,3632           03243        ECDUWL             ECADR    ECDUW                                 
036504,000479: 
036505,000480:                                                                                                  #  THRUST DIRECTION FILTER CONSTANTS
036506,000481: 
036507,000482: 30,3633           06315        GAINFLTR           DEC      .2                                    #  GAIN FILTER
036508,000483: 
036509,000484: 30,3634           00071        DUNFVLIM           DEC      .007       B-1                        #  7 MR MAX CHG IN F DIR IN VEH IN 2 SECS.
036510,000485:                                                                                                  #  THIS DOES NOT ALLOW FOR S/C ROT RATE.
036511,000486: 
036512,000487: 30,3635           02041        UNFVLIM            DEC      .129       B-1                        #  129 MR MAX THRUST OFFSET.  105 MR TRAVEL
036513,000488:                                                                                                  #  +10MR DEFL+5MR MECH MOUNT+9MR ABLATION.
036514,000489: 
036515,000490:                                                                                                  #  CONSTANTS RELATED TO GIMBAL ANGLE COMPUTATIONS
036516,000491: 
036517,000492: 30,3636           01673        DOTSWFMX           DEC      .93302     B-4                        #  LIM COLNRTY OF UNWC/2 & UNFC/2 TO 85 DEG
036518,000493:                                                                                                  #  LOWER PART COMES FROM NEXT CONSTANT
036519,000494: 
036520,000495: 30,3637           03434        DAXMAX             DEC      .11111111111                            #  DELATTX LIM TO 20 DEG IN 2 SECS, 1'S, PI
036521,000496: 30,3640           00266                           DEC      .0111111111                            #  2 DEG WHEN CSM DOCKED
036522,000497: 
036523,000498: 30,3641           01616        DAY/2MAX           DEC      .05555555555                            #  LIKEWISE FOR DELATTY
036524,000499: 30,3642           00133                           DEC      .0055555555                            
036525,000500: 
036526,000501: 30,3643  30,3637               DAZMAX             =        DAXMAX                                #  LIKEWISE FOR DELATTZ
036527,000502: 
036528,000503: 30,3643           14344        CDUZDLIM           DEC      .3888888888                            #  70 DEG LIMIT FOR MGA, 1'S, PI
036529,000504: 
036530,000505:                                                                                                  #  CONSTANTS FOR DATA TRANSFER
036531,000506: 
036532,000507: 30,3644           01463        DT/DELT            DEC      .05                                   #  .1 SEC/2 SEC WHICH IS THE AUTOPILOT
036533,000508:                                                                                                  #  CONTROL SAMPLE PERIOD/COMPUTATION PERIOD
036534,000509: 
036535,000510: 30,3645  30,3641               DELERLIM           =        DAY/2MAX                              #  10 DEG LIMIT FOR LAG ANGLES, 1'S, PI
036536,000511: 
036537,000512: 

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