Source Code

These source code files are a reconstruction of Sundance, 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
This means that source code does not represent a specific historical revision of Sundance, but rather a mixture of the three released versions. Nonetheless, it is capable of flying the whole Apollo 9 mission. This source code matches the binary dumps, as closely as feasible, but 100% match is not possible, due mostly to changes in memory addresses at which code and variables were allocated in different revisions of Sundance. Refer to this list of explanations for each binary mismatch.

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.

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

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