Source Code

These source-code files were obtained by digitally photographing an Artemis 72 (Apollo 15-17 Command Module) program listing from a private collection and then modifying pre-existing Comanche 55 (Apollo 11) source files to incorporate changes. Photography was by Ron Burkey, and transcription was performed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional images may be available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 072 OF AGC PROGRAM ARTEMIS 
	BY NASA 2021114-011 11:40 FEB. 26, 1971
Note that the date is the date of the printout, not the date of the program revision.

017512,000002:                                                                                                  ## Copyright:   Public domain.
017513,000003:                                                                                                  ## Filename:    R60_62.agc
017514,000004:                                                                                                  ## Purpose:     Part of the source code for Artemis (i.e., Colossus 3),
017515,000005:                                                                                                  ##              build 072.  This is for the Command Module's (CM) 
017516,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for 
017517,000007:                                                                                                  ##              Apollo 15-17.
017518,000008:                                                                                                  ## Assembler:   yaYUL
017519,000009:                                                                                                  ## Contact:     Sergio Navarro <sergionavarrog@gmail.com>
017520,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
017521,000011:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Artemis072/
017522,000012:                                                                                                  ## Mod history: 2009-08-19 SN   Adapted from corresponding Comanche 055 file.
017523,000013:                                                                                                  ##              2009-09-03 JL   Fixed symbol names.
017524,000014:                                                                                                  ##              2009-09-04 JL   Fixed typo in COUNT* directive. Minor fixes.
017525,000015:                                                                                                  ##                              Removed a spurious SETPD in interpretive code.
017526,000016:                                                                                                  ##              2010-01-31 JL   Fixed build errors.
017527,000017:                                                                                                  ##              2010-02-01 JL   Fixed build errors.
017528,000018:                                                                                                  ##              2010-02-20 RSB  Un-##'d this header.
017529,000019:                                                                                                  ##              2017-01-27 RSB  Back-ported a comment-text fix identified in Luminary 69.
017530,000020:                                                                                                  ##              2017-02-08 RSB  Proofed comment text by diff'ing vs Comanche 55
017531,000021:                                                                                                  ##                              and/or octopus/ProoferComments as most-appropriate.
017532,000022: 

Page 394

017534,000024: 27,2000                                           SETLOC   MANUVER                               
017535,000025: 27,2000                                           BANK                                           
017536,000026: 
017537,000027: 27,2074     1004                                  EBANK=   TEMPR60                               
017538,000028: 
017539,000029: 27,2074                                           COUNT*   $$/R60                                
017540,000030: 
017541,000031:                                                                                                  #  R60CSM        
017542,000032:                                                                                                  #  REV 13   CONFORMS TO GSOP CHAPTER FOUR REVISION LOGIC  09  JAN 18,1968
017543,000033: 
017544,000034: 27,2074           04665        R60CSM             TC       MAKECADR                              
017545,000035: 27,2075           55004                           TS       TEMPR60                               
017546,000036: 
017547,000037: 27,2076           06006        REDOMANN           TC       INTPRET                               
017548,000038: 27,2077           45014                           BON      CALL                                  #  IS 3-AXIS FLAG SET
017549,000039: 27,2100           02711                                    3AXISFLG                              
017550,000040: 27,2101           56104                                    TOBALL1                               #  YES
017551,000041: 27,2102           56225                                    VECPOINT                              #  NO CALL VECPOINT
017552,000042: 27,2103           01310                           STORE    CPHI                                  
017553,000043: 27,2104           77776        TOBALL1            EXIT                                           
017554,000044: 
017555,000045: 27,2105           35031        TOBALL             CAF      V06N18                                
017556,000046: 27,2106           04636                           TC       BANKCALL                              
017557,000047: 27,2107           21154                           CADR     GOPERF2R                              #  DISPLAY PLEASE PERFORM AUTO MANEUVER
017558,000048: 27,2110           02215                           TC       R61TEST                               
017559,000049: 27,2111           02115                           TC       REDOMANC   -1                         
017560,000050: 27,2112           12150                           TCF      ENDMANU1                              #  ENTER I.E. FINISHED WITH R60
017561,000051: 
017562,000052: 27,2113           02152                           TC       CHKLINUS                              #  TO CHECK FOR PRIORITY DISPLAYS
017563,000053: 27,2114           05205                           TC       ENDOFJOB                              
017564,000054: 
017565,000055: 27,2115           06006                 -1        TC       INTPRET                               
017566,000056: 27,2116           45014        REDOMANC           BON      CALL                                  #  IS 3-AXIS FLAG SET
017567,000057: 27,2117           02711                                    3AXISFLG                              
017568,000058: 27,2120           56123                                    +3                                    #  YES
017569,000059: 27,2121           56225                                    VECPOINT                              #  NO CALL VECPOINT
017570,000060: 27,2122           01310                           STORE    CPHI                                  #  STORE ANGLES
017571,000061: 27,2123           77776                           EXIT                                           
017572,000062: 
017573,000063: 27,2124           37673        TOBALLC            CAF      FURST3                                #  BITS 15,14,13 OF CHAN31 = 011
017574,000064: 27,2125           05654                           TC       C31BTCHK                              #  FOR AUTO AND G&N CONTROL
017575,000065: 27,2126           12127                           TCF      +1                                    
017576,000066: 27,2127           67671                           AD       NEG30000                              
017577,000067: 27,2130           00006                           EXTEND                                         
017578,000068: 27,2131           12133                           BZF      +2                                    #  AUTO, NON-FLASH N18
017579,000069: 27,2132           12105                           TCF      TOBALL                                #  NOT AUTO

Page 395

017581,000071: 27,2133           35031                           CAF      V06N18                                #  SET UP NON-FLASHING V06 N18
017582,000072: 27,2134           04636                           TC       BANKCALL                              
017583,000073: 27,2135           20710                           CADR     GODSPR                                
017584,000074: 27,2136           02152                           TC       CHKLINUS                              
017585,000075: 
017586,000076: 27,2137           04655        STARTMNV           TC       POSTJUMP                              
017587,000077: 27,2140           44000                           CADR     KALCMAN3                              
017588,000078: 
017589,000079: 27,2141           06006        ENDMANUV           TC       INTPRET                               
017590,000080: 27,2142           43014                           BOFF     BOFF                                  
017591,000081: 27,2143           05350                                    AUTOSEQ                               
017592,000082: 27,2144           56104                                    TOBALL1                               
017593,000083: 27,2145           00752                                    TRACKFLG                              
017594,000084: 27,2146           56104                                    TOBALL1                               
017595,000085: 27,2147           77776                           EXIT                                           
017596,000086: 
017597,000087: 27,2150           31004        ENDMANU1           CA       TEMPR60                               
017598,000088: 27,2151           04660                           TC       BANKJUMP                              #                                        -
017599,000089: 
017600,000090: 27,2152           40100        CHKLINUS           CS       FLAGWRD4                              
017601,000091: 27,2153           74755                           MASK     PDSPFBIT                              #  IS PRIORITY DISPLAY FLAG SET
017602,000092: 27,2154           10000                           CCS      A                                     #                                        -
017603,000093: 27,2155           00002                           TC       Q                                     #  NO - EXIT
017604,000094: 27,2156           30002                           CA       Q                                     
017605,000095: 27,2157           54156                           TS       MPAC       +2                         #  SAVE RETURN
017606,000096: 27,2160           46214                           CS       THREE                                 #  OBTAIN LOCATION FOR RESTART.
017607,000097: 27,2161           60133                           AD       BUF2                                  #  HOLDS Q OF LAST DISPALY
017608,000098: 27,2162           55257                           TS       TBASE1                                
017609,000099: 
017610,000100: 27,2163           05402                           TC       PHASCHNG                              
017611,000101: 27,2164           00071                           OCT      71                                    #  1.7SPOT FOR RELINUS
017612,000102: 
017613,000103: 27,2165  01,2022               1P7SPT1            =        1.7SPOT                               
017614,000104: 27,2165           34762                           CAF      BIT7                                  
017615,000105: 27,2166           05516                           TC       LINUS                                 #  GO SET BITS FOR PRIORITY DISPLAY      -
017616,000106: 27,2167           00156                           TC       MPAC       +2                         
017617,000107: 
017618,000108: 27,2170           34764        RELINUS            CAF      TRACKBIT                              #  IS TRACK FLAG ON
017619,000109: 27,2171           70075                           MASK     FLAGWRD1                              
017620,000110: 27,2172           00006                           EXTEND                                         
017621,000111: 27,2173           12213                           BZF      GOREDO20                              #  NO
017622,000112: 
017623,000113: 27,2174           05547                           TC       UPFLAG                                
017624,000114: 27,2175           00077                           ADRES    PDSPFLAG                              #  R60 PRIODSP FLAG
017625,000115: 
017626,000116: 27,2176           30104                           CA       FLAGWRD8                              
017627,000117: 27,2177           74760                           MASK     UTBIT                                 
017628,000118: 27,2200           10000                           CCS      A                                     
017629,000119: 27,2201           02210                           TC       RELINUSX                              #  UTFLAG SET,DO NOT SET TARG1FLG,OPTIND

Page 396

017631,000121: 27,2202           05547                           TC       UPFLAG                                
017632,000122: 27,2203           00024                           ADRES    TARG1FLG                              #  FOR R52
017633,000123: 
017634,000124: 27,2204           34772                           CAF      ZERO                                  #  RESET TO ZERO, SINCE
017635,000125: 27,2205           55323                           TS       OPTIND                                #  OPTIND WAS SET TO -1 BY V379
017636,000126: 
017637,000127: 27,2206           05547                           TC       UPFLAG                                
017638,000128: 27,2207           00037                           ADRES    R21MARK                               #  ALLOW OPTICS MARKING DURING P2
017639,000129: 
017640,000130: 27,2210           35053        RELINUSX           CAF      PRIO14                                #  RESTORE ORIGINAL PRIORITY
017641,000131: 27,2211           05176                           TC       PRIOCHNG                              
017642,000132: 
017643,000133: 27,2212           01257                           TC       TBASE1                                
017644,000134: 
017645,000135: 27,2213           04655        GOREDO20           TC       POSTJUMP                              #  RESTORE R03 DEADBAND, DO STOPRATE,
017646,000136: 27,2214           74416                           CADR     FIXDB                                 #   SET UP 1.11 RESTART, EOJ.
017647,000137: 27,2215           31214        R61TEST            CA       MODREG                                #  ARE WE IN P00.  IF YES THIS MUST BE
017648,000138: 27,2216           00006                           EXTEND                                         #      VERB49 OR VERB89 SO DO ENDEXT.
017649,000139: 27,2217           12150                           BZF      ENDMANU1                              #  RESET 3-AXIS & RUTURN.  USER DOES ENDEXT
017650,000140: 27,2220           30100                           CA       FLAGWRD4                              #  ARE WE IN R61 (P20)
017651,000141: 27,2221           74755                           MASK     PDSPFBIT                              
017652,000142: 27,2222           00006                           EXTEND                                         
017653,000143: 27,2223           14103                           BZF      GOTOPOOH                              #  NO
017654,000144: 27,2224           04546                           TC       GOTOV56                               #  YES
017655,000145: 

Page 397

017657,000147:                                                                                                  #  PROGRAM DESCRIPTION - VECPOINT
017658,000148: 
017659,000149: 
017660,000150:                                                                                                  #           THIS INTERPRETIVE SUBROUTINE MAY BE USED TO POINT A SPACECRAFT AXIS IN A DESIRED DIRECTION.  THE AXIS
017661,000151:                                                                                                  #  TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN SUCCESSIVE LOCATIONS OF ERASABLE MEMORY
017662,000152:                                                                                                  #  BEGINNING WITH THE LOCATION CALLED SCAXIS.  THE COMPONENTS OF THIS VECTOR ARE GIVEN IN SPACECRAFT COORDINATES.
017663,000153:                                                                                                  #  THE DIRECTION IN WHICH THIS AXIS IS TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN
017664,000154:                                                                                                  #  SUCCESSIVE LOCATIONS OF ERASABLE MEMORY BEGINNING WITH THE ADDRESS CALLED POINTVSM.  THE COMPONENTS OF THIS
017665,000155:                                                                                                  #  VECTOR ARE GIVEN IN STABLE MEMBER COORDINATES.  WITH THIS INFORMATION VECPOINT COMPUTES A SET OF THREE GIMBAL
017666,000156:                                                                                                  #  ANGLES (2S COMPLEMENT) CORRESPONDING TO THE CROSS-PRODUCT ROTATION BETWEEN SCAXIS AND POINTVSM AND STORES THEM
017667,000157:                                                                                                  #  IN T(MPAC) BEFORE RETURNING TO THE CALLER.
017668,000158:                                                                                                  #          THIS ROTATION, HOWEVER, MAY BRING THE S/C INTO GIMBAL LOCK.  WHEN POINTING A VECTOR IN THE Y-Z PLANE,
017669,000159:                                                                                                  #  THE TRANSPONDER AXIS, OR THE AOT FOR THE LEM, THE PROGRAM WILL CORRECT THIS PROBLEM BY ROTATING THE CROSS-
017670,000160:                                                                                                  #  PRODUCT ATTITUDE ABOUT POINTVSM BY A FIXED AMOUNT SUFFICIENT TO ROTATE THE DESIRED S/C ATTITUDE OUT OF GIMBAL
017671,000161:                                                                                                  #  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,
017672,000162:                                                                                                  #  THE ADDITIONAL ROTATION TO AVOID GIMAL LOCK IS 35 DEGREES.  IF THE AXIS IS MORE THAN 60.5 DEGEES FROM +X (OR -X)
017673,000163:                                                                                                  #  THE ADDITIONAL ROTATION IS 35 DEGREES.  THE GIMBAL ANGLES CORRESPONDING TO THIS ATTITUDE ARE THEN COMPUTED AND
017674,000164:                                                                                                  #  STORED AS 2S COMPLIMENT ANGLES IN T(MPAC) BEFORE RETURNING TO THE CALLER.
017675,000165:                                                                                                  #           WHEN POINTING THE X-AXIS, OR THE THRUST VECTOR, OR ANY VECTOR WITHIN 40.6 DEG OF THE X-AXIS, VECPOINT
017676,000166:                                                                                                  #  CANNOT CORRECT FOR A CROSS-PRODUCT ROTATION INTO GIMBAL LOCK.  IN THIS CASE A PLATFORM REALIGNMENT WOULD BE
017677,000167:                                                                                                  #  REQUIRED TO POINT THE VECTOR IN THE DESIRED DIRECTION.  AT PRESENT NO INDICATION IS GIVEN FOR THIS SITUATION
017678,000168:                                                                                                  #  EXCEPT THAT THE FINAL MIDDLE GIMBAL ANGLE IN MPAC +2 IS GREATER THAN 59 DEGREES.
017679,000169: 
017680,000170:                                                                                                  #  CALLING SEQUENCE -
017681,000171: 
017682,000172:                                                                                                  #        1) LOAD SCAXIS, POINTVSM
017683,000173:                                                                                                  #        2) CALL
017684,000174:                                                                                                  #                VECPOINT
017685,000175: 
017686,000176:                                                                                                  #  RETURNS WITH
017687,000177: 
017688,000178:                                                                                                  #        1) DESIRED OUTER  GIMBAL ANGLE IN MPAC
017689,000179:                                                                                                  #        2) DESIRED INNER  GIMBAL ANGLE IN MPAC +1
017690,000180:                                                                                                  #        3) DESIRED MIDDLE GIMBAL ANGLE IN MPAC +2
017691,000181: 
017692,000182:                                                                                                  #  ERASABLES USED -
017693,000183: 
017694,000184:                                                                                                  #        1) SCAXIS                6
017695,000185:                                                                                                  #        2) POINTVSM              6
017696,000186:                                                                                                  #        3) MIS                  18
017697,000187:                                                                                                  #        4) DEL                  18
017698,000188:                                                                                                  #        5) COF                   6
017699,000189:                                                                                                  #        6) VECQTEMP              1
017700,000190:                                                                                                  #        7) ALL OF VAC AREA      43
017701,000191: 
017702,000192:                                                                                                  #                        TOTAL   99
017703,000193: 
017704,000194: 27,2000                                           SETLOC   VECPT                                 
017705,000195: 27,2000                                           BANK                                           

Page 398

017707,000197: 27,2225  E6,1661                                  EBANK=   BCDU                                  
017708,000198: 
017709,000199: 27,2225                                           COUNT*   $$/VECPT                              
017710,000200: 27,2225           40020        VECPOINT           STQ      BOV                                   #  SAVE RETURN ADDRESS
017711,000201: 27,2226           03310                                    VECQTEMP                              
017712,000202: 27,2227           56230                                    VECLEAR                               #  AND CLEAR OVFIND
017713,000203: 27,2230           47164        VECLEAR            AXC,2    RTB                                   
017714,000204: 27,2231           03320                                    MIS                                   #  READ THE PRESENT CDU ANGLES AND
017715,000205: 27,2232           44370                                    READCDUK                              #  STORE THEM IN PD25, 26, 27
017716,000206: 27,2233           34032                           STCALL   25D                                   
017717,000207: 27,2234           44377                                    CDUTODCM                              #  S/C AXES TO STABLE MEMBER AXES (MIS)
017718,000208: 27,2235           61375                           VLOAD    VXM                                   
017719,000209: 27,2236           03357                                    POINTVSM                              #  RESOLVE THE POINTING DIRECTION VF INTO
017720,000210: 27,2237           03321                                    MIS                                   #  INITIAL S/C AXES (VF = POINTVSM)
017721,000211: 27,2240           77656                           UNIT                                           
017722,000212: 27,2241           00035                           STORE    28D                                   
017723,000213:                                                                                                  #  PD 28 29 30 31 32 33
017724,000214: 27,2242           53435                           VXV      UNIT                                  #  TAKE THE CROSS PRODUCT VF X VI
017725,000215: 27,2243           03351                                    SCAXIS                                #  WHERE VI = SCAXIS
017726,000216: 27,2244           57400                           BOV      VCOMP                                 
017727,000217: 27,2245           56355                                    PICKAXIS                              
017728,000218: 27,2246           17343                           STODL    COF                                   #  CHECK MAGNITUDE
017729,000219: 27,2247           00045                                    36D                                   #  OF CROSS PRODUCT
017730,000220: 27,2250           50025                           DSU      BMN                                   #  VECTOR, IF LESS
017731,000221: 27,2251           16426                                    DPB-14                                #  THAN B-14 ASSUME
017732,000222: 27,2252           56355                                    PICKAXIS                              #  UNIT OPERATION
017733,000223: 27,2253           50375                           VLOAD    DOT                                   #           INVALID.
017734,000224: 27,2254           03351                                    SCAXIS                                
017735,000225: 27,2255           00035                                    28D                                   
017736,000226: 27,2256           65552                           SL1      ARCCOS                                
017737,000227: 27,2257           77624        COMPMATX           CALL                                           #  NOW COMPUTE THE TRANSFORMATION FROM
017738,000228: 27,2260           44522                                    DELCOMP                               #  FINAL S/C AXES TO INITIAL S/C AXES    MFI
017739,000229: 27,2261           75160                           AXC,1    AXC,2                                 
017740,000230: 27,2262           03320                                    MIS                                   #  COMPUTE THE TRANSFORMATION FROM FINAL
017741,000231: 27,2263           03425                                    DEL                                   #  S/C AXES TO STABLE MEMBER AXES
017742,000232: 27,2264           77624                           CALL                                           #  MFS = MIS MFI
017743,000233: 27,2265           44304                                    MXM3                                  #  (IN PD LIST)
017744,000234: 
017745,000235: 27,2266           51545                           DLOAD    ABS                                   
017746,000236: 27,2267           00007                                    6                                     #  MFS6 = SIN(CPSI)                      $2
017747,000237: 27,2270           50025                           DSU      BMN                                   
017748,000238: 27,2271           16413                                    SINGIMLC                              #  = SIN(59 DEGS)                        $2
017749,000239: 27,2272           56345                                    FINDGIMB                              #  /CPSI/ LESS THAN 59 DEGS
017750,000240:                                                                                                  #  I.E. DESIRED ATTITUDE NOT IN GIMBAL LOCK
017751,000241: 
017752,000242: 27,2273           51545                           DLOAD    ABS                                   #  CHECK TO SEE IF WE ARE POINTING
017753,000243: 27,2274           03351                                    SCAXIS                                #  THE THRUST AXIS
017754,000244: 27,2275           51025                           DSU      BPL                                   
017755,000245: 27,2276           16415                                    SINVEC1                               #  SIN 49.4 DEGS                         $2
017756,000246: 27,2277           56345                                    FINDGIMB                              #  IF SO, WE ARE TRYING TO POINT IT INTO

Page 399

017758,000248: 27,2300           77775                           VLOAD                                          #  GIMBAL LOCK, ABORT COULD GO HERE
017759,000249: 27,2301           77626                           STADR                                          
017760,000250: 27,2302           50442                           STOVL    MIS        +12D                       
017761,000251: 27,2303           77626                           STADR                                          #  STORE MFS (IN PD LIST) IN MIS
017762,000252: 27,2304           50450                           STOVL    MIS        +6                         
017763,000253: 27,2305           77626                           STADR                                          
017764,000254: 27,2306           50456                           STOVL    MIS                                   
017765,000255: 27,2307           03327                                    MIS        +6                         #  INNER GIMBAL AXIS IN FINAL S/C AXES
017766,000256: 27,2310           57444                           BPL      VCOMP                                 #  LOCATE THE IG AXIS DIRECTION CLOSEST TO
017767,000257: 27,2311           56312                                    IGSAMEX                               #  FINAL X S/C AXIS
017768,000258: 
017769,000259: 27,2312           50035        IGSAMEX            VXV      BMN                                   #  FIND THE SHORTEST WAY OF ROTATING THE 
017770,000260: 27,2313           03351                                    SCAXIS                                #  S/C OUT OF GIMBAL LOCK BY A ROTATION 
017771,000261: 27,2314           56321                                    U=SCAXIS                              #  ABOUT +- SCAXIS, I.E. IF  (IG (SGN MFS3)
017772,000262:                                                                                                  #  X SCAXIS . XF) LESS THAN 0, U = SCAXIS
017773,000263:                                                                                                  #  OTHERWISE U = -SCAXIS
017774,000264: 
017775,000265: 27,2315           57575                           VLOAD    VCOMP                                 
017776,000266: 27,2316           03351                                    SCAXIS                                
017777,000267: 27,2317           37343                           STCALL   COF                                   #  ROTATE ABOUT -SCAXIS
017778,000268: 27,2320           56324                                    CHEKAXIS                              
017779,000269: 27,2321           77775        U=SCAXIS           VLOAD                                          
017780,000270: 27,2322           03351                                    SCAXIS                                
017781,000271: 27,2323           03343                           STORE    COF                                   #  ROTATE ABOUT + SCAXIS
017782,000272: 27,2324           51545        CHEKAXIS           DLOAD    ABS                                   
017783,000273: 27,2325           03351                                    SCAXIS                                #  SEE IF WE ARE POINTING THE AOT
017784,000274: 27,2326           51025                           DSU      BPL                                   
017785,000275: 27,2327           16417                                    SINVEC2                               #  SIN 29.5 DEGS                         $2
017786,000276: 27,2330           56334                                    PICKANG1                              #  IF SO, ROTATE 50 DEGS ABOUT +- SCAXIS
017787,000277: 27,2331           52145                           DLOAD    GOTO                                  #  IF NOT, MUST BE POINTING THE TRANSPONDER
017788,000278: 27,2332           16423                                    VECANG2                               #  OR SOME VECTOR IN THE Y, OR Z PLANE
017789,000279: 27,2333           56336                                    COMPMFSN                              #  IN THIS CASE ROTATE 35 DEGS TO GET OUT
017790,000280:                                                                                                  #  OF GIMBAL LOCK (VECANG2  $360)
017791,000281: 27,2334           77745        PICKANG1           DLOAD                                          
017792,000282: 27,2335           16421                                    VECANG1                               #  = 50 DEGS                           $ 360
017793,000283: 27,2336           77624        COMPMFSN           CALL                                           
017794,000284: 27,2337           44522                                    DELCOMP                               #  COMPUTE THE ROTATION ABOUT SCAXIS TO
017795,000285: 27,2340           75160                           AXC,1    AXC,2                                 #  BRING MFS OUT OF GIMBAL LOCK
017796,000286: 27,2341           03320                                    MIS                                   
017797,000287: 27,2342           03425                                    DEL                                   
017798,000288: 27,2343           77624                           CALL                                           #  COMPUTE THE NEW TRANSFORMATION FROM
017799,000289: 27,2344           44304                                    MXM3                                  #  DESIRED S/C AXES TO STABLE MEMBER AXES
017800,000290:                                                                                                  #  WHICH WILL ALIGN VI WITH VF AND AVOID
017801,000291:                                                                                                  #  GIMBAL LOCK
017802,000292: 27,2345           45160        FINDGIMB           AXC,1    CALL                                  
017803,000293: 27,2346           00000                                    0                                     #  EXTRACT THE COMMANDED CDU ANGLES FROM
017804,000294: 27,2347           44647                                    DCMTOCDU                              #  THIS MATRIX
017805,000295: 27,2350           77634                           RTB                                            
017806,000296: 27,2351           45644                                    V1STO2S                               #  CONVERT TO 2:S COMPLEMENT
017807,000297: 27,2352           52001        VECPTRET           SETPD    GOTO                                  

Page 400

017809,000299: 27,2353           00001                                    0                                     
017810,000300: 27,2354           03310                                    VECQTEMP                              #  RETURN TO CALLER
017811,000301: 
017812,000302: 27,2355           50375        PICKAXIS           VLOAD    DOT                                   #  IF VF X VI = 0, FIND VF . VI
017813,000303: 27,2356           00035                                    28D                                   
017814,000304: 27,2357           03351                                    SCAXIS                                
017815,000305: 27,2360           72240                           BMN      TLOAD                                 
017816,000306: 27,2361           56365                                    ROT180                                
017817,000307: 27,2362           00032                                    25D                                   
017818,000308: 27,2363           77650                           GOTO                                           #  IF VF = VI, CDU DESIRED = PRESENT CDU
017819,000309: 27,2364           56352                                    VECPTRET                              #  PRESENT CDU ANGLES
017820,000310: 27,2365           47375        ROT180             VLOAD    VXV                                   #  IF VF, VI ANTIPARALLEL, 180 DEG ROTATION
017821,000311: 27,2366           03327                                    MIS        +6                         #  IS REQUIRED. Y STABLE MEMBER AXIS IN
017822,000312: 27,2367           15334                                    HIUNITX                               #  INITIAL S/C AXIS.
017823,000313: 27,2370           47256                           UNIT     VXV                                   #  FIND Y(SM) X X(I)
017824,000314: 27,2371           03351                                    SCAXIS                                #  FIND UNIT(VI X UNIT(Y(SM) X X(I)))
017825,000315: 27,2372           40056                           UNIT     BOV                                   #  I.E. PICK A VECTOR IN THE PLANE OF X(I),
017826,000316: 27,2373           56407                                    PICKX                                 #  Y(SM) PERPENDICULAR TO VI
017827,000317: 27,2374           17343                           STODL    COF                                   
017828,000318: 27,2375           00045                                    36D                                   #  CHECK MAGNITUDE
017829,000319: 27,2376           50025                           DSU      BMN                                   #  OF THIS VECTOR.
017830,000320: 27,2377           16426                                    DPB-14                                #  IF LESS THAN B-14,
017831,000321: 27,2400           56407                                    PICKX                                 #  PICK X-AXIS.
017832,000322: 27,2401           77775                           VLOAD                                          
017833,000323: 27,2402           03343                                    COF                                   
017834,000324: 27,2403           17343        XROT               STODL    COF                                   
017835,000325: 27,2404           15334                                    HIDPHALF                              
017836,000326: 27,2405           77650                           GOTO                                           
017837,000327: 27,2406           56257                                    COMPMATX                              
017838,000328: 27,2407           52175        PICKX              VLOAD    GOTO                                  #  PICK THE XAXIS IN THIS CASE
017839,000329: 27,2410           15334                                    HIUNITX                               
017840,000330: 27,2411           56403                                    XROT                                  
017841,000331: 27,2000                                           SETLOC   MANUVER1                              
017842,000332: 27,2000                                           BANK                                           
017843,000333: 
017844,000334: 27,2412                                           COUNT*   $$/VECPT                              
017845,000335: 27,2412           15555 35172  SINGIMLC           2DEC     .4285836003                            #  = SIN(59)             $2
017846,000336: 27,2414           14113 36326  SINVEC1            2DEC     .3796356537                            #  = SIN(49.4)           $2
017847,000337: 27,2416           07701 35703  SINVEC2            2DEC     .2462117800                            #  = SIN(29.5)           $2
017848,000338: 27,2420           04343 21616  VECANG1            2DEC     .1388888889                            #  = 50 DEGREES                        $360
017849,000339: 27,2422           03070 34344  VECANG2            2DEC     .09722222222                            #  = 35 DEGREES                        $360
017850,000340: 
017851,000341: 27,2424           00000        1BITDP             OCT      0                                     #  KEEP THIS BEFORE DPB(-14)      *********
017852,000342: 27,2425           00001        DPB-14             OCT      00001                                 
017853,000343: 27,2426           00000                           OCT      00000                                 
017854,000344: 27,2000                                           SETLOC   MANUVER                               

Page 401

017856,000346: 27,2000                                           BANK                                           
017857,000347: 

Page 402

017859,000349:                                                                                                  #  ROUTINE FOR INITIATING AUTOMATIC MANEUVER VIA KEYBOARD (V49)
017860,000350: 
017861,000351: 27,2427     1307                                  EBANK=   CPHI                                  
017862,000352: 
017863,000353: 27,2427                                           COUNT*   $$/R62                                
017864,000354: 27,2427           35025        R62DISP            CAF      V06N22                                #  DISPLAY COMMAND ICDUS CPHI, CTHETA, CPHI
017865,000355: 27,2430           04636                           TC       BANKCALL                              
017866,000356: 27,2431           20743                           CADR     GOFLASH                               
017867,000357: 27,2432           15524                           TCF      ENDEXT                                
017868,000358: 27,2433           12435                           TCF      GOMOVE                                #  PROCEED
017869,000359: 27,2434           12427                           TCF      R62DISP                               #  ENTER
017870,000360: 
017871,000361:                                                                                                  #  ASTRONAUT MAY LOAD NEW ICDUS AT THIS
017872,000362:                                                                                                  #  POINT
017873,000363: 27,2435           05547        GOMOVE             TC       UPFLAG                                #  SET 3-AXIS FLAG
017874,000364: 27,2436           00124                           ADRES    3AXISFLG                              #  BIT 6  FLAG 5
017875,000365: 27,2437           04636                           TC       BANKCALL                              
017876,000366: 27,2440           56074                           CADR     R60CSM                                
017877,000367: 
017878,000368: 27,2441           15524                           TCF      ENDEXT                                

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