Source Code

These source-code files are part of a reconstructed copy of Artemis 071, the first release of the Apollo 15 through 17 Command Module (CM) Apollo Guidance Computer (AGC) software.

The reconstruction began with source code of Artemis 072 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes between the two versions. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021154-. Note that page numbers in the reconstructed code match those on the Artemis 072 printout, although the changed code would likely have changed page numbers for a real Artemis 071 listing.

Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

017423,000002:                                                                                                  ## Copyright:   Public domain.
017424,000003:                                                                                                  ## Filename:    R60,R62.agc
017425,000004:                                                                                                  ## Purpose:     A section of Artemis revision 071.
017426,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
017427,000006:                                                                                                  ##              release of the flight software for the Command Module's
017428,000007:                                                                                                  ##              (CM) Apollo Guidance Computer (AGC) for Apollo 15 through
017429,000008:                                                                                                  ##              17. The code has been recreated from a copy of Artemis 072.
017430,000009:                                                                                                  ##              It has been adapted such that the resulting bugger words
017431,000010:                                                                                                  ##              exactly match those specified for Artemis 071 in NASA
017432,000011:                                                                                                  ##              drawing 2021154-, which gives relatively high confidence
017433,000012:                                                                                                  ##              that the reconstruction is correct.
017434,000013:                                                                                                  ## Reference:   394
017435,000014:                                                                                                  ## Assembler:   yaYUL
017436,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
017437,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
017438,000017:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Artemis 072.
017439,000018: 

Page 394

017441,000020: 27,2000                                           SETLOC   MANUVER                               
017442,000021: 27,2000                                           BANK                                           
017443,000022: 
017444,000023: 27,2074     1004                                  EBANK=   TEMPR60                               
017445,000024: 
017446,000025: 27,2074                                           COUNT*   $$/R60                                
017447,000026: 
017448,000027:                                                                                                  #  R60CSM        
017449,000028:                                                                                                  #  REV 13   CONFORMS TO GSOP CHAPTER FOUR REVISION LOGIC  09  JAN 18,1968
017450,000029: 
017451,000030: 27,2074           04665        R60CSM             TC       MAKECADR                              
017452,000031: 27,2075           55004                           TS       TEMPR60                               
017453,000032: 
017454,000033: 27,2076           06006        REDOMANN           TC       INTPRET                               
017455,000034: 27,2077           45014                           BON      CALL                                  #  IS 3-AXIS FLAG SET
017456,000035: 27,2100           02711                                    3AXISFLG                              
017457,000036: 27,2101           56104                                    TOBALL1                               #  YES
017458,000037: 27,2102           56225                                    VECPOINT                              #  NO CALL VECPOINT
017459,000038: 27,2103           01310                           STORE    CPHI                                  
017460,000039: 27,2104           77776        TOBALL1            EXIT                                           
017461,000040: 
017462,000041: 27,2105           35031        TOBALL             CAF      V06N18                                
017463,000042: 27,2106           04636                           TC       BANKCALL                              
017464,000043: 27,2107           21154                           CADR     GOPERF2R                              #  DISPLAY PLEASE PERFORM AUTO MANEUVER
017465,000044: 27,2110           02215                           TC       R61TEST                               
017466,000045: 27,2111           02115                           TC       REDOMANC   -1                         
017467,000046: 27,2112           12150                           TCF      ENDMANU1                              #  ENTER I.E. FINISHED WITH R60
017468,000047: 
017469,000048: 27,2113           02152                           TC       CHKLINUS                              #  TO CHECK FOR PRIORITY DISPLAYS
017470,000049: 27,2114           05205                           TC       ENDOFJOB                              
017471,000050: 
017472,000051: 27,2115           06006                 -1        TC       INTPRET                               
017473,000052: 27,2116           45014        REDOMANC           BON      CALL                                  #  IS 3-AXIS FLAG SET
017474,000053: 27,2117           02711                                    3AXISFLG                              
017475,000054: 27,2120           56123                                    +3                                    #  YES
017476,000055: 27,2121           56225                                    VECPOINT                              #  NO CALL VECPOINT
017477,000056: 27,2122           01310                           STORE    CPHI                                  #  STORE ANGLES
017478,000057: 27,2123           77776                           EXIT                                           
017479,000058: 
017480,000059: 27,2124           37673        TOBALLC            CAF      FURST3                                #  BITS 15,14,13 OF CHAN31 = 011
017481,000060: 27,2125           05654                           TC       C31BTCHK                              #  FOR AUTO AND G&N CONTROL
017482,000061: 27,2126           12127                           TCF      +1                                    
017483,000062: 27,2127           67671                           AD       NEG30000                              
017484,000063: 27,2130           00006                           EXTEND                                         
017485,000064: 27,2131           12133                           BZF      +2                                    #  AUTO, NON-FLASH N18
017486,000065: 27,2132           12105                           TCF      TOBALL                                #  NOT AUTO

Page 395

017488,000067: 27,2133           35031                           CAF      V06N18                                #  SET UP NON-FLASHING V06 N18
017489,000068: 27,2134           04636                           TC       BANKCALL                              
017490,000069: 27,2135           20710                           CADR     GODSPR                                
017491,000070: 27,2136           02152                           TC       CHKLINUS                              
017492,000071: 
017493,000072: 27,2137           04655        STARTMNV           TC       POSTJUMP                              
017494,000073: 27,2140           44000                           CADR     KALCMAN3                              
017495,000074: 
017496,000075: 27,2141           06006        ENDMANUV           TC       INTPRET                               
017497,000076: 27,2142           43014                           BOFF     BOFF                                  
017498,000077: 27,2143           05350                                    AUTOSEQ                               
017499,000078: 27,2144           56104                                    TOBALL1                               
017500,000079: 27,2145           00752                                    TRACKFLG                              
017501,000080: 27,2146           56104                                    TOBALL1                               
017502,000081: 27,2147           77776                           EXIT                                           
017503,000082: 
017504,000083: 27,2150           31004        ENDMANU1           CA       TEMPR60                               
017505,000084: 27,2151           04660                           TC       BANKJUMP                              #                                        -
017506,000085: 
017507,000086: 27,2152           40100        CHKLINUS           CS       FLAGWRD4                              
017508,000087: 27,2153           74755                           MASK     PDSPFBIT                              #  IS PRIORITY DISPLAY FLAG SET
017509,000088: 27,2154           10000                           CCS      A                                     #                                        -
017510,000089: 27,2155           00002                           TC       Q                                     #  NO - EXIT
017511,000090: 27,2156           30002                           CA       Q                                     
017512,000091: 27,2157           54156                           TS       MPAC       +2                         #  SAVE RETURN
017513,000092: 27,2160           46214                           CS       THREE                                 #  OBTAIN LOCATION FOR RESTART.
017514,000093: 27,2161           60133                           AD       BUF2                                  #  HOLDS Q OF LAST DISPALY
017515,000094: 27,2162           55257                           TS       TBASE1                                
017516,000095: 
017517,000096: 27,2163           05402                           TC       PHASCHNG                              
017518,000097: 27,2164           00071                           OCT      71                                    #  1.7SPOT FOR RELINUS
017519,000098: 
017520,000099: 27,2165  01,2022               1P7SPT1            =        1.7SPOT                               
017521,000100: 27,2165           34762                           CAF      BIT7                                  
017522,000101: 27,2166           05516                           TC       LINUS                                 #  GO SET BITS FOR PRIORITY DISPLAY      -
017523,000102: 27,2167           00156                           TC       MPAC       +2                         
017524,000103: 
017525,000104: 27,2170           34764        RELINUS            CAF      TRACKBIT                              #  IS TRACK FLAG ON
017526,000105: 27,2171           70075                           MASK     FLAGWRD1                              
017527,000106: 27,2172           00006                           EXTEND                                         
017528,000107: 27,2173           12213                           BZF      GOREDO20                              #  NO
017529,000108: 
017530,000109: 27,2174           05547                           TC       UPFLAG                                
017531,000110: 27,2175           00077                           ADRES    PDSPFLAG                              #  R60 PRIODSP FLAG
017532,000111: 
017533,000112: 27,2176           30104                           CA       FLAGWRD8                              
017534,000113: 27,2177           74760                           MASK     UTBIT                                 
017535,000114: 27,2200           10000                           CCS      A                                     
017536,000115: 27,2201           02210                           TC       RELINUSX                              #  UTFLAG SET,DO NOT SET TARG1FLG,OPTIND

Page 396

017538,000117: 27,2202           05547                           TC       UPFLAG                                
017539,000118: 27,2203           00024                           ADRES    TARG1FLG                              #  FOR R52
017540,000119: 
017541,000120: 27,2204           34772                           CAF      ZERO                                  #  RESET TO ZERO, SINCE
017542,000121: 27,2205           55323                           TS       OPTIND                                #  OPTIND WAS SET TO -1 BY V379
017543,000122: 
017544,000123: 27,2206           05547                           TC       UPFLAG                                
017545,000124: 27,2207           00037                           ADRES    R21MARK                               #  ALLOW OPTICS MARKING DURING P2
017546,000125: 
017547,000126: 27,2210           35053        RELINUSX           CAF      PRIO14                                #  RESTORE ORIGINAL PRIORITY
017548,000127: 27,2211           05176                           TC       PRIOCHNG                              
017549,000128: 
017550,000129: 27,2212           01257                           TC       TBASE1                                
017551,000130: 
017552,000131: 27,2213           04655        GOREDO20           TC       POSTJUMP                              #  RESTORE R03 DEADBAND, DO STOPRATE,
017553,000132: 27,2214           74416                           CADR     FIXDB                                 #   SET UP 1.11 RESTART, EOJ.
017554,000133: 27,2215           31214        R61TEST            CA       MODREG                                #  ARE WE IN P00.  IF YES THIS MUST BE
017555,000134: 27,2216           00006                           EXTEND                                         #      VERB49 OR VERB89 SO DO ENDEXT.
017556,000135: 27,2217           12150                           BZF      ENDMANU1                              #  RESET 3-AXIS & RUTURN.  USER DOES ENDEXT
017557,000136: 27,2220           30100                           CA       FLAGWRD4                              #  ARE WE IN R61 (P20)
017558,000137: 27,2221           74755                           MASK     PDSPFBIT                              
017559,000138: 27,2222           00006                           EXTEND                                         
017560,000139: 27,2223           14103                           BZF      GOTOPOOH                              #  NO
017561,000140: 27,2224           04546                           TC       GOTOV56                               #  YES
017562,000141: 

Page 397

017564,000143:                                                                                                  #  PROGRAM DESCRIPTION - VECPOINT
017565,000144: 
017566,000145: 
017567,000146:                                                                                                  #           THIS INTERPRETIVE SUBROUTINE MAY BE USED TO POINT A SPACECRAFT AXIS IN A DESIRED DIRECTION.  THE AXIS
017568,000147:                                                                                                  #  TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN SUCCESSIVE LOCATIONS OF ERASABLE MEMORY
017569,000148:                                                                                                  #  BEGINNING WITH THE LOCATION CALLED SCAXIS.  THE COMPONENTS OF THIS VECTOR ARE GIVEN IN SPACECRAFT COORDINATES.
017570,000149:                                                                                                  #  THE DIRECTION IN WHICH THIS AXIS IS TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN
017571,000150:                                                                                                  #  SUCCESSIVE LOCATIONS OF ERASABLE MEMORY BEGINNING WITH THE ADDRESS CALLED POINTVSM.  THE COMPONENTS OF THIS
017572,000151:                                                                                                  #  VECTOR ARE GIVEN IN STABLE MEMBER COORDINATES.  WITH THIS INFORMATION VECPOINT COMPUTES A SET OF THREE GIMBAL
017573,000152:                                                                                                  #  ANGLES (2S COMPLEMENT) CORRESPONDING TO THE CROSS-PRODUCT ROTATION BETWEEN SCAXIS AND POINTVSM AND STORES THEM
017574,000153:                                                                                                  #  IN T(MPAC) BEFORE RETURNING TO THE CALLER.
017575,000154:                                                                                                  #          THIS ROTATION, HOWEVER, MAY BRING THE S/C INTO GIMBAL LOCK.  WHEN POINTING A VECTOR IN THE Y-Z PLANE,
017576,000155:                                                                                                  #  THE TRANSPONDER AXIS, OR THE AOT FOR THE LEM, THE PROGRAM WILL CORRECT THIS PROBLEM BY ROTATING THE CROSS-
017577,000156:                                                                                                  #  PRODUCT ATTITUDE ABOUT POINTVSM BY A FIXED AMOUNT SUFFICIENT TO ROTATE THE DESIRED S/C ATTITUDE OUT OF GIMBAL
017578,000157:                                                                                                  #  LOCK.  IF THE AXIS TO BE POINTED IS MORE THAN 40.6 DEGREES BUT LESS THAN 60.5 DEG FROM THE +X (OR -X) AXIS,
017579,000158:                                                                                                  #  THE ADDITIONAL ROTATION TO AVOID GIMAL LOCK IS 35 DEGREES.  IF THE AXIS IS MORE THAN 60.5 DEGEES FROM +X (OR -X)
017580,000159:                                                                                                  #  THE ADDITIONAL ROTATION IS 35 DEGREES.  THE GIMBAL ANGLES CORRESPONDING TO THIS ATTITUDE ARE THEN COMPUTED AND
017581,000160:                                                                                                  #  STORED AS 2S COMPLIMENT ANGLES IN T(MPAC) BEFORE RETURNING TO THE CALLER.
017582,000161:                                                                                                  #           WHEN POINTING THE X-AXIS, OR THE THRUST VECTOR, OR ANY VECTOR WITHIN 40.6 DEG OF THE X-AXIS, VECPOINT
017583,000162:                                                                                                  #  CANNOT CORRECT FOR A CROSS-PRODUCT ROTATION INTO GIMBAL LOCK.  IN THIS CASE A PLATFORM REALIGNMENT WOULD BE
017584,000163:                                                                                                  #  REQUIRED TO POINT THE VECTOR IN THE DESIRED DIRECTION.  AT PRESENT NO INDICATION IS GIVEN FOR THIS SITUATION
017585,000164:                                                                                                  #  EXCEPT THAT THE FINAL MIDDLE GIMBAL ANGLE IN MPAC +2 IS GREATER THAN 59 DEGREES.
017586,000165: 
017587,000166:                                                                                                  #  CALLING SEQUENCE -
017588,000167: 
017589,000168:                                                                                                  #        1) LOAD SCAXIS, POINTVSM
017590,000169:                                                                                                  #        2) CALL
017591,000170:                                                                                                  #                VECPOINT
017592,000171: 
017593,000172:                                                                                                  #  RETURNS WITH
017594,000173: 
017595,000174:                                                                                                  #        1) DESIRED OUTER  GIMBAL ANGLE IN MPAC
017596,000175:                                                                                                  #        2) DESIRED INNER  GIMBAL ANGLE IN MPAC +1
017597,000176:                                                                                                  #        3) DESIRED MIDDLE GIMBAL ANGLE IN MPAC +2
017598,000177: 
017599,000178:                                                                                                  #  ERASABLES USED -
017600,000179: 
017601,000180:                                                                                                  #        1) SCAXIS                6
017602,000181:                                                                                                  #        2) POINTVSM              6
017603,000182:                                                                                                  #        3) MIS                  18
017604,000183:                                                                                                  #        4) DEL                  18
017605,000184:                                                                                                  #        5) COF                   6
017606,000185:                                                                                                  #        6) VECQTEMP              1
017607,000186:                                                                                                  #        7) ALL OF VAC AREA      43
017608,000187: 
017609,000188:                                                                                                  #                        TOTAL   99
017610,000189: 
017611,000190: 27,2000                                           SETLOC   VECPT                                 
017612,000191: 27,2000                                           BANK                                           

Page 398

017614,000193: 27,2225  E6,1661                                  EBANK=   BCDU                                  
017615,000194: 
017616,000195: 27,2225                                           COUNT*   $$/VECPT                              
017617,000196: 27,2225           40020        VECPOINT           STQ      BOV                                   #  SAVE RETURN ADDRESS
017618,000197: 27,2226           03310                                    VECQTEMP                              
017619,000198: 27,2227           56230                                    VECLEAR                               #  AND CLEAR OVFIND
017620,000199: 27,2230           47164        VECLEAR            AXC,2    RTB                                   
017621,000200: 27,2231           03320                                    MIS                                   #  READ THE PRESENT CDU ANGLES AND
017622,000201: 27,2232           44370                                    READCDUK                              #  STORE THEM IN PD25, 26, 27
017623,000202: 27,2233           34032                           STCALL   25D                                   
017624,000203: 27,2234           44377                                    CDUTODCM                              #  S/C AXES TO STABLE MEMBER AXES (MIS)
017625,000204: 27,2235           61375                           VLOAD    VXM                                   
017626,000205: 27,2236           03357                                    POINTVSM                              #  RESOLVE THE POINTING DIRECTION VF INTO
017627,000206: 27,2237           03321                                    MIS                                   #  INITIAL S/C AXES (VF = POINTVSM)
017628,000207: 27,2240           77656                           UNIT                                           
017629,000208: 27,2241           00035                           STORE    28D                                   
017630,000209:                                                                                                  #  PD 28 29 30 31 32 33
017631,000210: 27,2242           53435                           VXV      UNIT                                  #  TAKE THE CROSS PRODUCT VF X VI
017632,000211: 27,2243           03351                                    SCAXIS                                #  WHERE VI = SCAXIS
017633,000212: 27,2244           57400                           BOV      VCOMP                                 
017634,000213: 27,2245           56355                                    PICKAXIS                              
017635,000214: 27,2246           17343                           STODL    COF                                   #  CHECK MAGNITUDE
017636,000215: 27,2247           00045                                    36D                                   #  OF CROSS PRODUCT
017637,000216: 27,2250           50025                           DSU      BMN                                   #  VECTOR, IF LESS
017638,000217: 27,2251           16426                                    DPB-14                                #  THAN B-14 ASSUME
017639,000218: 27,2252           56355                                    PICKAXIS                              #  UNIT OPERATION
017640,000219: 27,2253           50375                           VLOAD    DOT                                   #           INVALID.
017641,000220: 27,2254           03351                                    SCAXIS                                
017642,000221: 27,2255           00035                                    28D                                   
017643,000222: 27,2256           65552                           SL1      ARCCOS                                
017644,000223: 27,2257           77624        COMPMATX           CALL                                           #  NOW COMPUTE THE TRANSFORMATION FROM
017645,000224: 27,2260           44522                                    DELCOMP                               #  FINAL S/C AXES TO INITIAL S/C AXES    MFI
017646,000225: 27,2261           75160                           AXC,1    AXC,2                                 
017647,000226: 27,2262           03320                                    MIS                                   #  COMPUTE THE TRANSFORMATION FROM FINAL
017648,000227: 27,2263           03425                                    DEL                                   #  S/C AXES TO STABLE MEMBER AXES
017649,000228: 27,2264           77624                           CALL                                           #  MFS = MIS MFI
017650,000229: 27,2265           44304                                    MXM3                                  #  (IN PD LIST)
017651,000230: 
017652,000231: 27,2266           51545                           DLOAD    ABS                                   
017653,000232: 27,2267           00007                                    6                                     #  MFS6 = SIN(CPSI)                      $2
017654,000233: 27,2270           50025                           DSU      BMN                                   
017655,000234: 27,2271           16413                                    SINGIMLC                              #  = SIN(59 DEGS)                        $2
017656,000235: 27,2272           56345                                    FINDGIMB                              #  /CPSI/ LESS THAN 59 DEGS
017657,000236:                                                                                                  #  I.E. DESIRED ATTITUDE NOT IN GIMBAL LOCK
017658,000237: 
017659,000238: 27,2273           51545                           DLOAD    ABS                                   #  CHECK TO SEE IF WE ARE POINTING
017660,000239: 27,2274           03351                                    SCAXIS                                #  THE THRUST AXIS
017661,000240: 27,2275           51025                           DSU      BPL                                   
017662,000241: 27,2276           16415                                    SINVEC1                               #  SIN 49.4 DEGS                         $2
017663,000242: 27,2277           56345                                    FINDGIMB                              #  IF SO, WE ARE TRYING TO POINT IT INTO

Page 399

017665,000244: 27,2300           77775                           VLOAD                                          #  GIMBAL LOCK, ABORT COULD GO HERE
017666,000245: 27,2301           77626                           STADR                                          
017667,000246: 27,2302           50442                           STOVL    MIS        +12D                       
017668,000247: 27,2303           77626                           STADR                                          #  STORE MFS (IN PD LIST) IN MIS
017669,000248: 27,2304           50450                           STOVL    MIS        +6                         
017670,000249: 27,2305           77626                           STADR                                          
017671,000250: 27,2306           50456                           STOVL    MIS                                   
017672,000251: 27,2307           03327                                    MIS        +6                         #  INNER GIMBAL AXIS IN FINAL S/C AXES
017673,000252: 27,2310           57444                           BPL      VCOMP                                 #  LOCATE THE IG AXIS DIRECTION CLOSEST TO
017674,000253: 27,2311           56312                                    IGSAMEX                               #  FINAL X S/C AXIS
017675,000254: 
017676,000255: 27,2312           50035        IGSAMEX            VXV      BMN                                   #  FIND THE SHORTEST WAY OF ROTATING THE 
017677,000256: 27,2313           03351                                    SCAXIS                                #  S/C OUT OF GIMBAL LOCK BY A ROTATION 
017678,000257: 27,2314           56321                                    U=SCAXIS                              #  ABOUT +- SCAXIS, I.E. IF  (IG (SGN MFS3)
017679,000258:                                                                                                  #  X SCAXIS . XF) LESS THAN 0, U = SCAXIS
017680,000259:                                                                                                  #  OTHERWISE U = -SCAXIS
017681,000260: 
017682,000261: 27,2315           57575                           VLOAD    VCOMP                                 
017683,000262: 27,2316           03351                                    SCAXIS                                
017684,000263: 27,2317           37343                           STCALL   COF                                   #  ROTATE ABOUT -SCAXIS
017685,000264: 27,2320           56324                                    CHEKAXIS                              
017686,000265: 27,2321           77775        U=SCAXIS           VLOAD                                          
017687,000266: 27,2322           03351                                    SCAXIS                                
017688,000267: 27,2323           03343                           STORE    COF                                   #  ROTATE ABOUT + SCAXIS
017689,000268: 27,2324           51545        CHEKAXIS           DLOAD    ABS                                   
017690,000269: 27,2325           03351                                    SCAXIS                                #  SEE IF WE ARE POINTING THE AOT
017691,000270: 27,2326           51025                           DSU      BPL                                   
017692,000271: 27,2327           16417                                    SINVEC2                               #  SIN 29.5 DEGS                         $2
017693,000272: 27,2330           56334                                    PICKANG1                              #  IF SO, ROTATE 50 DEGS ABOUT +- SCAXIS
017694,000273: 27,2331           52145                           DLOAD    GOTO                                  #  IF NOT, MUST BE POINTING THE TRANSPONDER
017695,000274: 27,2332           16423                                    VECANG2                               #  OR SOME VECTOR IN THE Y, OR Z PLANE
017696,000275: 27,2333           56336                                    COMPMFSN                              #  IN THIS CASE ROTATE 35 DEGS TO GET OUT
017697,000276:                                                                                                  #  OF GIMBAL LOCK (VECANG2  $360)
017698,000277: 27,2334           77745        PICKANG1           DLOAD                                          
017699,000278: 27,2335           16421                                    VECANG1                               #  = 50 DEGS                           $ 360
017700,000279: 27,2336           77624        COMPMFSN           CALL                                           
017701,000280: 27,2337           44522                                    DELCOMP                               #  COMPUTE THE ROTATION ABOUT SCAXIS TO
017702,000281: 27,2340           75160                           AXC,1    AXC,2                                 #  BRING MFS OUT OF GIMBAL LOCK
017703,000282: 27,2341           03320                                    MIS                                   
017704,000283: 27,2342           03425                                    DEL                                   
017705,000284: 27,2343           77624                           CALL                                           #  COMPUTE THE NEW TRANSFORMATION FROM
017706,000285: 27,2344           44304                                    MXM3                                  #  DESIRED S/C AXES TO STABLE MEMBER AXES
017707,000286:                                                                                                  #  WHICH WILL ALIGN VI WITH VF AND AVOID
017708,000287:                                                                                                  #  GIMBAL LOCK
017709,000288: 27,2345           45160        FINDGIMB           AXC,1    CALL                                  
017710,000289: 27,2346           00000                                    0                                     #  EXTRACT THE COMMANDED CDU ANGLES FROM
017711,000290: 27,2347           44647                                    DCMTOCDU                              #  THIS MATRIX
017712,000291: 27,2350           77634                           RTB                                            
017713,000292: 27,2351           45644                                    V1STO2S                               #  CONVERT TO 2:S COMPLEMENT
017714,000293: 27,2352           52001        VECPTRET           SETPD    GOTO                                  

Page 400

017716,000295: 27,2353           00001                                    0                                     
017717,000296: 27,2354           03310                                    VECQTEMP                              #  RETURN TO CALLER
017718,000297: 
017719,000298: 27,2355           50375        PICKAXIS           VLOAD    DOT                                   #  IF VF X VI = 0, FIND VF . VI
017720,000299: 27,2356           00035                                    28D                                   
017721,000300: 27,2357           03351                                    SCAXIS                                
017722,000301: 27,2360           72240                           BMN      TLOAD                                 
017723,000302: 27,2361           56365                                    ROT180                                
017724,000303: 27,2362           00032                                    25D                                   
017725,000304: 27,2363           77650                           GOTO                                           #  IF VF = VI, CDU DESIRED = PRESENT CDU
017726,000305: 27,2364           56352                                    VECPTRET                              #  PRESENT CDU ANGLES
017727,000306: 27,2365           47375        ROT180             VLOAD    VXV                                   #  IF VF, VI ANTIPARALLEL, 180 DEG ROTATION
017728,000307: 27,2366           03327                                    MIS        +6                         #  IS REQUIRED. Y STABLE MEMBER AXIS IN
017729,000308: 27,2367           15334                                    HIUNITX                               #  INITIAL S/C AXIS.
017730,000309: 27,2370           47256                           UNIT     VXV                                   #  FIND Y(SM) X X(I)
017731,000310: 27,2371           03351                                    SCAXIS                                #  FIND UNIT(VI X UNIT(Y(SM) X X(I)))
017732,000311: 27,2372           40056                           UNIT     BOV                                   #  I.E. PICK A VECTOR IN THE PLANE OF X(I),
017733,000312: 27,2373           56407                                    PICKX                                 #  Y(SM) PERPENDICULAR TO VI
017734,000313: 27,2374           17343                           STODL    COF                                   
017735,000314: 27,2375           00045                                    36D                                   #  CHECK MAGNITUDE
017736,000315: 27,2376           50025                           DSU      BMN                                   #  OF THIS VECTOR.
017737,000316: 27,2377           16426                                    DPB-14                                #  IF LESS THAN B-14,
017738,000317: 27,2400           56407                                    PICKX                                 #  PICK X-AXIS.
017739,000318: 27,2401           77775                           VLOAD                                          
017740,000319: 27,2402           03343                                    COF                                   
017741,000320: 27,2403           17343        XROT               STODL    COF                                   
017742,000321: 27,2404           15334                                    HIDPHALF                              
017743,000322: 27,2405           77650                           GOTO                                           
017744,000323: 27,2406           56257                                    COMPMATX                              
017745,000324: 27,2407           52175        PICKX              VLOAD    GOTO                                  #  PICK THE XAXIS IN THIS CASE
017746,000325: 27,2410           15334                                    HIUNITX                               
017747,000326: 27,2411           56403                                    XROT                                  
017748,000327: 27,2000                                           SETLOC   MANUVER1                              
017749,000328: 27,2000                                           BANK                                           
017750,000329: 
017751,000330: 27,2412                                           COUNT*   $$/VECPT                              
017752,000331: 27,2412           15555 35172  SINGIMLC           2DEC     .4285836003                            #  = SIN(59)             $2
017753,000332: 27,2414           14113 36326  SINVEC1            2DEC     .3796356537                            #  = SIN(49.4)           $2
017754,000333: 27,2416           07701 35703  SINVEC2            2DEC     .2462117800                            #  = SIN(29.5)           $2
017755,000334: 27,2420           04343 21616  VECANG1            2DEC     .1388888889                            #  = 50 DEGREES                        $360
017756,000335: 27,2422           03070 34344  VECANG2            2DEC     .09722222222                            #  = 35 DEGREES                        $360
017757,000336: 
017758,000337: 27,2424           00000        1BITDP             OCT      0                                     #  KEEP THIS BEFORE DPB(-14)      *********
017759,000338: 27,2425           00001        DPB-14             OCT      00001                                 
017760,000339: 27,2426           00000                           OCT      00000                                 
017761,000340: 27,2000                                           SETLOC   MANUVER                               

Page 401

017763,000342: 27,2000                                           BANK                                           
017764,000343: 

Page 402

017766,000345:                                                                                                  #  ROUTINE FOR INITIATING AUTOMATIC MANEUVER VIA KEYBOARD (V49)
017767,000346: 
017768,000347: 27,2427     1307                                  EBANK=   CPHI                                  
017769,000348: 
017770,000349: 27,2427                                           COUNT*   $$/R62                                
017771,000350: 27,2427           35025        R62DISP            CAF      V06N22                                #  DISPLAY COMMAND ICDUS CPHI, CTHETA, CPHI
017772,000351: 27,2430           04636                           TC       BANKCALL                              
017773,000352: 27,2431           20743                           CADR     GOFLASH                               
017774,000353: 27,2432           15524                           TCF      ENDEXT                                
017775,000354: 27,2433           12435                           TCF      GOMOVE                                #  PROCEED
017776,000355: 27,2434           12427                           TCF      R62DISP                               #  ENTER
017777,000356: 
017778,000357:                                                                                                  #  ASTRONAUT MAY LOAD NEW ICDUS AT THIS
017779,000358:                                                                                                  #  POINT
017780,000359: 27,2435           05547        GOMOVE             TC       UPFLAG                                #  SET 3-AXIS FLAG
017781,000360: 27,2436           00124                           ADRES    3AXISFLG                              #  BIT 6  FLAG 5
017782,000361: 27,2437           04636                           TC       BANKCALL                              
017783,000362: 27,2440           56074                           CADR     R60CSM                                
017784,000363: 
017785,000364: 27,2441           15524                           TCF      ENDEXT                                

End of include-file R60,R62.agc.  Parent file is MAIN.agc