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.

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

Page 394

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

Page 395

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

Page 396

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

Page 397

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

Page 398

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

Page 399

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

Page 400

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

Page 401

017851,000346: 27,2000                                           BANK                                           
017852,000347: 

Page 402

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

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