Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are 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 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051
	10:28 APR.  1,1969
Note that the date is the date of the printout, not the date of the program revision.

017025,000002:                                                                                                  ## Copyright:   Public domain.
017026,000003:                                                                                                  ## Filename:    R60_62.agc
017027,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus 2A, AKA Comanche 055.
017028,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
017029,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
017030,000007:                                                                                                  ## Assembler:   yaYUL
017031,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
017032,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
017033,000010:                                                                                                  ## Pages:       390-398
017034,000011:                                                                                                  ## Mod history: 2009-05-09 RSB  Adapted from the Colossus249/ file 
017035,000012:                                                                                                  ##                              of the same name, using Comanche055 page 
017036,000013:                                                                                                  ##                              images. 
017037,000014:                                                                                                  ##              2016-12-10 RSB  Proofed comments with octopus/ProoferComments
017038,000015:                                                                                                  ##                              and fixed the errors found.
017039,000016:                                                                                                  ##              2016-12-10 RSB  All of the GOTOPOOH's should have been
017040,000017:                                                                                                  ##                              GOTOPOOH, and I've changed them back.
017041,000018:                                                                                                  ##              2017-01-18 RSB  Fixed comment-text errors noted while diff'ing
017042,000019:                                                                                                  ##                              vs Colossus 249.
017043,000020:                                                                                                  ##
017044,000021:                                                                                                  ## This source code has been transcribed or otherwise adapted from digitized
017045,000022:                                                                                                  ## images of a hardcopy from the MIT Museum.  The digitization was performed
017046,000023:                                                                                                  ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum.  Many
017047,000024:                                                                                                  ## thanks to both.  The images (with suitable reduction in storage size and
017048,000025:                                                                                                  ## consequent reduction in image quality as well) are available online at
017049,000026:                                                                                                  ## www.ibiblio.org/apollo.  If for some reason you find that the images are
017050,000027:                                                                                                  ## illegible, contact me at info@sandroid.org about getting access to the 
017051,000028:                                                                                                  ## (much) higher-quality images which Paul actually created.
017052,000029:                                                                                                  ##
017053,000030:                                                                                                  ## Notations on the hardcopy document read, in part:
017054,000031:                                                                                                  ##
017055,000032:                                                                                                  ##      Assemble revision 055 of AGC program Comanche by NASA
017056,000033:                                                                                                  ##      2021113-051.  10:28 APR. 1, 1969  
017057,000034:                                                                                                  ##
017058,000035:                                                                                                  ##      This AGC program shall also be referred to as
017059,000036:                                                                                                  ##                      Colossus 2A
017060,000037: 

Page 390

017062,000039: 34,2002                                           BANK     34                                    
017063,000040: 27,2000                                           SETLOC   MANUVER                               
017064,000041: 27,2000                                           BANK                                           
017065,000042: 
017066,000043: 27,2000     1146                                  EBANK=   TEMPR60                               
017067,000044: 
017068,000045: 27,2000                                           COUNT    27/R60                                
017069,000046: 
017070,000047:                                                                                                  #  R60CSM
017071,000048:                                                                                                  #  REV 13        CONFORMS TO GSOP CHAPTER FOUR REVISION LOGIC 09 JAN 18, 1968
017072,000049: 
017073,000050: 27,2000           04711        R60CSM             TC       MAKECADR                              
017074,000051: 27,2001           55146                           TS       TEMPR60                               
017075,000052: 
017076,000053:                                                                                                  #  INSERT PRIODSP CHECK WITH R22 (V06N49) WITH JENNINGS BRODEUR          
017077,000054: 
017078,000055: 27,2002           35012        REDOMANN           CAF      BIT6                                  
017079,000056: 27,2003           70101                           MASK     FLAGWRD5                              #  IS 3-AXIS FLAG SET
017080,000057: 27,2004           10000                           CCS      A                                     
017081,000058: 27,2005           12013                           TCF      TOBALL                                #  YES
017082,000059: 27,2006           06006                           TC       INTPRET                               
017083,000060: 27,2007           77624                           CALL                                           
017084,000061: 27,2010           56126                                    VECPOINT                              #  TO COMPUTE FINAL ANGLES
017085,000062: 27,2011           01156                           STORE    CPHI                                  #  STORE FINAL ANGLES - CPHI, CTHETA, CPSI
017086,000063: 27,2012           77776                           EXIT                                           
017087,000064: 
017088,000065: 27,2013           32125        TOBALL             CAF      V06N18                                
017089,000066: 27,2014           04662                           TC       BANKCALL                              
017090,000067: 27,2015           21132                           CADR     GOPERF2R                              #  DISPLAY PLEASE PERFORM AUTO MANEUVER
017091,000068: 27,2016           02114                           TC       R61TEST                               
017092,000069: 27,2017           02023                           TC       REDOMANC                              #  PROCEED
017093,000070: 27,2020           12052                           TCF      ENDMANU1                              #  ENTER I.E. FINISHED WITH R60
017094,000071: 
017095,000072: 27,2021           02056                           TC       CHKLINUS                              #  TO CHECK FOR PRIORITY DISPLAYS
017096,000073: 27,2022           05217                           TC       ENDOFJOB                              
017097,000074: 
017098,000075: 27,2023           35012        REDOMANC           CAF      BIT6                                  
017099,000076: 27,2024           70101                           MASK     FLAGWRD5                              #  IS 3-AXIS FLAG SET
017100,000077: 27,2025           10000                           CCS      A                                     
017101,000078: 27,2026           12034                           TCF      TOBALLC                               #  YES
017102,000079: 27,2027           06006                           TC       INTPRET                               
017103,000080: 27,2030           77624                           CALL                                           
017104,000081: 27,2031           56126                                    VECPOINT                              #  TO COMPUTE FINAL ANGLES
017105,000082: 27,2032           01156                           STORE    CPHI                                  #  STORE ANGLES
017106,000083: 27,2033           77776                           EXIT                                           
017107,000084: 
017108,000085: 27,2034           34371        TOBALLC            CAF      PRIO30                                #  IS MODE AUTO AND CTL GNC

Page 391

017110,000087: 27,2035           00006                           EXTEND                                         
017111,000088: 27,2036           06031                           RXOR     CHAN31                                
017112,000089: 27,2037           77707                           MASK     13,14,15                              
017113,000090: 27,2040           00006                           EXTEND                                         
017114,000091: 27,2041           12043                           BZF      +2                                    #  AUTO, NON-FLASH N18
017115,000092: 27,2042           12013                           TCF      TOBALL                                #  NOT AUTO
017116,000093: 
017117,000094: 27,2043           32125                           CAF      V06N18                                #  SET UP NON-FLASHING V06 N18
017118,000095: 27,2044           04662                           TC       BANKCALL                              
017119,000096: 27,2045           20676                           CADR     GODSPR                                
017120,000097: 27,2046           02056                           TC       CHKLINUS                              
017121,000098: 
017122,000099: 27,2047           04662        STARTMNV           TC       BANKCALL                              
017123,000100: 27,2050           17627                           CADR     GOMANUR                               
017124,000101: 27,2051           12013        ENDMANUV           TCF      TOBALL                                #  FINISHED MANEUVER
017125,000102: 
017126,000103: 27,2052           05560        ENDMANU1           TC       DOWNFLAG                              #  RESET 3-AXIS FLAG
017127,000104: 27,2053           00124                           ADRES    3AXISFLG                              #  BIT 6 FLAG 5
017128,000105: 27,2054           31146                           CAE      TEMPR60                               #                                        -
017129,000106: 27,2055           04704                           TC       BANKJUMP                              #                                        -
017130,000107: 
017131,000108: 27,2056           40100        CHKLINUS           CS       FLAGWRD4                              
017132,000109: 27,2057           75004                           MASK     BIT12                                 #  IS PRIORITY DISPLAY FLAG SET          -
017133,000110: 27,2060           10000                           CCS      A                                     #                                        -
017134,000111: 27,2061           00002                           TC       Q                                     #  NO - EXIT
017135,000112: 27,2062           30002                           CA       Q                                     
017136,000113: 27,2063           54156                           TS       MPAC       +2                         #  SAVE RETURN
017137,000114: 27,2064           46214                           CS       THREE                                 #  OBTAIN LOCATION FOR RESTART.
017138,000115: 27,2065           60133                           AD       BUF2                                  #  HOLDS Q OF LAST DISPALY
017139,000116: 27,2066           55053                           TS       TBASE1                                
017140,000117: 
017141,000118: 27,2067           05412                           TC       PHASCHNG                              
017142,000119: 27,2070           00071                           OCT      71                                    #  1.7SPOT FOR RELINUS
017143,000120: 
017144,000121: 27,2071           35011                           CAF      BIT7                                  
017145,000122: 27,2072           05526                           TC       LINUS                                 #  GO SET BITS FOR PRIORITY DISPLAY      -
017146,000123: 27,2073           00156                           TC       MPAC       +2                         
017147,000124: 
017148,000125: 27,2074           35013        RELINUS            CAF      BIT5                                  #  IS TRACK FLAG ON
017149,000126: 27,2075           70075                           MASK     FLAGWRD1                              
017150,000127: 27,2076           00006                           EXTEND                                         
017151,000128: 27,2077           12111                           BZF      GOREDO20                              #  NO
017152,000129: 
017153,000130: 27,2100           05546                           TC       UPFLAG                                
017154,000131: 27,2101           00077                           ADRES    PDSPFLAG                              #  R60 PRIODSP FLAG
017155,000132: 
017156,000133: 27,2102           05546                           TC       UPFLAG                                
017157,000134: 27,2103           00024                           ADRES    TARG1FLG                              #  FOR R52
017158,000135: 
017159,000136: 27,2104           35021                           CAF      ZERO                                  #  RESET TO ZERO, SINCE

Page 392

017161,000138: 27,2105           55303                           TS       OPTIND                                #  OPTIND WAS SET TO -1 BY V379
017162,000139: 
017163,000140: 27,2106           35066                           CAF      PRIO14                                #  RESTORE ORIGINAL PRIORITY
017164,000141: 27,2107           05210                           TC       PRIOCHNG                              
017165,000142: 
017166,000143: 27,2110           01053                           TC       TBASE1                                
017167,000144: 
017168,000145: 27,2111           05412        GOREDO20           TC       PHASCHNG                              
017169,000146: 27,2112           00111                           OCT      111                                   #  1.11 FOR PIKUP20
017170,000147: 
017171,000148: 27,2113           05217                           TC       ENDOFJOB                              
017172,000149: 
017173,000150: 27,2114           31011        R61TEST            CA       MODREG                                #  ARE WE IN P00.  IF YES THIS MUST BE
017174,000151: 27,2115           00006                           EXTEND                                         #        VERB49 OR VERB89 SO DO ENDEXT.
017175,000152: 27,2116           12052                           BZF      ENDMANU1                              #  RESET 3-AXIS & RUTURN.  USER DOES ENDEXT
017176,000153: 27,2117           30100                           CA       FLAGWRD4                              #  ARE WE IN R61 (P20)
017177,000154: 27,2120           75004                           MASK     BIT12                                 
017178,000155: 27,2121           00006                           EXTEND                                         
017179,000156: 27,2122           14106                           BZF      GOTOPOOH                              #  NO
017180,000157: 27,2123           04622                           TC       GOTOV56                               #  YES
017181,000158: 
017182,000159: 27,2124           20100        BIT14+7            OCT      20100                                 #                                        -
017183,000160: 27,2125           01422        V06N18             VN       0618                                  
017184,000161: 

Page 393

017186,000163:                                                                                                  #  PROGRAM DESCRIPTION - VECPOINT
017187,000164: 
017188,000165:                                                                                                  #  THIS INTERPRETIVE SUBROUTINE MAY BE USED TO POINT A SPACECRAFT AXIS IN A DESIRED DIRECTION.  THE AXIS
017189,000166:                                                                                                  #  TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN SUCCESSIVE LOCATIONS OF ERASABLE MEMORY
017190,000167:                                                                                                  #  BEGINNING WITH THE LOCATION CALLED SCAXIS.  THE COMPONENTS OF THIS VECTOR ARE GIVEN IN SPACECRAFT COORDINATES.
017191,000168:                                                                                                  #  THE DIRECTION IN WHICH THIS AXIS IS TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN
017192,000169:                                                                                                  #  SUCCESSIVE LOCATIONS OF ERASABLE MEMORY BEGINNING WITH THE ADDRESS CALLED POINTVSM.  THE COMPONENTS OF THIS
017193,000170:                                                                                                  #  VECTOR ARE GIVEN IN STABLE MEMBER COORDINATES.  WITH THIS INFORMATION VECPOINT COMPUTES A SET OF THREE GIMBAL
017194,000171:                                                                                                  #  ANGLES (2S COMPLEMENT) CORRESPONDING TO THE CROSS-PRODUCT ROTATION BETWEEN SCAXIS AND POINTVSM AND STORES THEM
017195,000172:                                                                                                  #  IN T(MPAC) BEFORE RETURNING TO THE CALLER.
017196,000173: 
017197,000174:                                                                                                  #  THIS ROTATION, HOWEVER, MAY BRING THE S/C INTO GIMBAL LOCK.  WHEN POINTING A VECTOR IN THE Y-Z PLANE,
017198,000175:                                                                                                  #  THE TRANSPONDER AXIS, OR THE AOT FOR THE LEM, THE PROGRAM WILL CORRECT THIS PROBLEM BY ROTATING THE CROSS-
017199,000176:                                                                                                  #  PRODUCT ATTITUDE ABOUT POINTVSM BY A FIXED AMOUNT SUFFICIENT TO ROTATE THE DESIRED S/C ATTITUDE OUT OF GIMBAL
017200,000177:                                                                                                  #  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,
017201,000178:                                                                                                  #  THE ADDITIONAL ROTATION TO AVOID GIMAL LOCK IS 35 DEGREES.  IF THE AXIS IS MORE THAN 60.5 DEGEES FROM +X (OR -X)
017202,000179:                                                                                                  #  THE ADDITIONAL ROTATION IS 35 DEGREES.  THE GIMBAL ANGLES CORRESPONDING TO THIS ATTITUDE ARE THEN COMPUTED AND
017203,000180:                                                                                                  #  STORED AS 2S COMPLIMENT ANGLES IN T(MPAC) BEFORE RETURNING TO THE CALLER.
017204,000181: 
017205,000182:                                                                                                  #  WHEN POINTING THE X-AXIS, OR THE THRUST VECTOR, OR ANY VECTOR WITHIN 40.6 DEG OF THE X-AXIS, VECPOINT
017206,000183:                                                                                                  #  CANNOT CORRECT FOR A CROSS-PRODUCT ROTATION INTO GIMBAL LOCK.  IN THIS CASE A PLATFORM REALIGNMENT WOULD BE
017207,000184:                                                                                                  #  REQUIRED TO POINT THE VECTOR IN THE DESIRED DIRECTION.  AT PRESENT NO INDICATION IS GIVEN FOR THIS SITUATION
017208,000185:                                                                                                  #  EXCEPT THAT THE FINAL MIDDLE GIMBAL ANGLE IN MPAC +2 IS GREATER THAN 59 DEGREES.
017209,000186: 
017210,000187:                                                                                                  #  CALLING SEQUENCE -
017211,000188: 
017212,000189:                                                                                                  #        1)      LOAD SCAXIS, POINTVSM
017213,000190:                                                                                                  #        2)      CALL
017214,000191:                                                                                                  #                        VECPOINT
017215,000192: 
017216,000193:                                                                                                  #  RETURNS WITH
017217,000194: 
017218,000195:                                                                                                  #        1)      DESIRED OUTER GIMBAL ANGLE IN MPAC
017219,000196:                                                                                                  #        2)      DESIRED INNER GIMBAL ANGLE IN MPAC +1
017220,000197:                                                                                                  #        3)      DESIRED MIDDLE GIMBAL ANGLE IN MPAC +2
017221,000198: 
017222,000199:                                                                                                  #  ERASABLES USED -
017223,000200: 
017224,000201:                                                                                                  #        1)      SCAXIS          6
017225,000202:                                                                                                  #        2)      POINTVSM        6
017226,000203:                                                                                                  #        3)      MIS             18
017227,000204:                                                                                                  #        4)      DEL             18
017228,000205:                                                                                                  #        5)      COF             6
017229,000206:                                                                                                  #        6)      VECQTEMP        1
017230,000207:                                                                                                  #        7)      ALL OF VAC AREA 43
017231,000208: 
017232,000209:                                                                                                  #                        TOTAL   99
017233,000210: 
017234,000211: 27,2000                                           SETLOC   VECPT                                 
017235,000212: 27,2000                                           BANK                                           

Page 394

017237,000214: 27,2126  E6,1661                                  EBANK=   BCDU                                  
017238,000215: 
017239,000216: 27,2126                                           COUNT    27/VECPT                              
017240,000217: 
017241,000218: 27,2126           40020        VECPOINT           STQ      BOV                                   #  SAVE RETURN ADDRESS
017242,000219: 27,2127           03310                                    VECQTEMP                              
017243,000220: 27,2130           56131                                    VECLEAR                               #  AND CLEAR OVFIND
017244,000221: 27,2131           47164        VECLEAR            AXC,2    RTB                                   
017245,000222: 27,2132           03320                                    MIS                                   #  READ THE PRESENT CDU ANGLES AND
017246,000223: 27,2133           44376                                    READCDUK                              #  STORE THEM IN PD25, 26, 27
017247,000224: 27,2134           34032                           STCALL   25D                                   
017248,000225: 27,2135           44405                                    CDUTODCM                              #  S/C AXES TO STABLE MEMBER AXES (MIS)
017249,000226: 27,2136           61375                           VLOAD    VXM                                   
017250,000227: 27,2137           03357                                    POINTVSM                              #  RESOLVE THE POINTING DIRECTION VF INTO
017251,000228: 27,2140           03321                                    MIS                                   #  INITIAL S/C AXES (VF = POINTVSM)
017252,000229: 27,2141           77656                           UNIT                                           
017253,000230: 27,2142           00035                           STORE    28D                                   
017254,000231:                                                                                                  #  PD 28 29 30 31 32 33
017255,000232: 27,2143           53435                           VXV      UNIT                                  #  TAKE THE CROSS PRODUCT VF X VI
017256,000233: 27,2144           03351                                    SCAXIS                                #  WHERE VI = SCAXIS
017257,000234: 27,2145           57400                           BOV      VCOMP                                 
017258,000235: 27,2146           56256                                    PICKAXIS                              
017259,000236: 27,2147           17343                           STODL    COF                                   #  CHECK MAGNITUDE
017260,000237: 27,2150           00045                                    36D                                   #  OF CROSS PRODUCT
017261,000238: 27,2151           50025                           DSU      BMN                                   #  VECTOR, IF LESS
017262,000239: 27,2152           16327                                    DPB-14                                #  THAN B-14 ASSUME
017263,000240: 27,2153           56256                                    PICKAXIS                              #  UNIT OPERATION
017264,000241: 27,2154           50375                           VLOAD    DOT                                   #  INVALID.
017265,000242: 27,2155           03351                                    SCAXIS                                
017266,000243: 27,2156           00035                                    28D                                   
017267,000244: 27,2157           65552                           SL1      ARCCOS                                
017268,000245: 27,2160           77624        COMPMATX           CALL                                           #  NOW COMPUTE THE TRANSFORMATION FROM
017269,000246: 27,2161           44530                                    DELCOMP                               #  FINAL S/C AXES TO INITIAL S/C AXES MFI
017270,000247: 27,2162           75160                           AXC,1    AXC,2                                 
017271,000248: 27,2163           03320                                    MIS                                   #  COMPUTE THE TRANSFORMATION FROM FINAL
017272,000249: 27,2164           03425                                    DEL                                   #  S/C AXES TO STABLE MEMBER AXES
017273,000250: 27,2165           77624                           CALL                                           #  MFS = MIS MFI
017274,000251: 27,2166           44304                                    MXM3                                  #  (IN PD LIST)
017275,000252: 
017276,000253: 27,2167           51545                           DLOAD    ABS                                   
017277,000254: 27,2170           00007                                    6                                     #  MFS6 = SIN(CPSI)                      $2
017278,000255: 27,2171           50025                           DSU      BMN                                   
017279,000256: 27,2172           16314                                    SINGIMLC                              #  = SIN(59 DEGS)                        $2
017280,000257: 27,2173           56246                                    FINDGIMB                              #  /CPSI/ LESS THAN 59 DEGS
017281,000258:                                                                                                  #  I.E. DESIRED ATTITUDE NOT IN GIMBAL LOCK
017282,000259: 
017283,000260: 27,2174           51545                           DLOAD    ABS                                   #  CHECK TO SEE IF WE ARE POINTING
017284,000261: 27,2175           03351                                    SCAXIS                                #  THE THRUST AXIS
017285,000262: 27,2176           51025                           DSU      BPL                                   
017286,000263: 27,2177           16316                                    SINVEC1                               #  SIN 49.4 DEGS                         $2

Page 395

017288,000265: 27,2200           56246                                    FINDGIMB                              #  IF SO, WE ARE TRYING TO POINT IT INTO
017289,000266: 27,2201           77775                           VLOAD                                          #  GIMBAL LOCK, ABORT COULD GO HERE
017290,000267: 27,2202           77626                           STADR                                          
017291,000268: 27,2203           50442                           STOVL    MIS        +12D                       
017292,000269: 27,2204           77626                           STADR                                          #  STORE MFS (IN PD LIST) IN MIS
017293,000270: 27,2205           50450                           STOVL    MIS        +6                         
017294,000271: 27,2206           77626                           STADR                                          
017295,000272: 27,2207           50456                           STOVL    MIS                                   
017296,000273: 27,2210           03327                                    MIS        +6                         #  INNER GIMBAL AXIS IN FINAL S/C AXES
017297,000274: 27,2211           57444                           BPL      VCOMP                                 #  LOCATE THE IG AXIS DIRECTION CLOSEST TO
017298,000275: 27,2212           56213                                    IGSAMEX                               #  FINAL X S/C AXIS
017299,000276: 
017300,000277: 27,2213           50035        IGSAMEX            VXV      BMN                                   #  FIND THE SHORTEST WAY OF ROTATING THE 
017301,000278: 27,2214           03351                                    SCAXIS                                #  S/C OUT OF GIMBAL LOCK BY A ROTATION 
017302,000279: 27,2215           56222                                    U=SCAXIS                              #  ABOUT +- SCAXIS, I.E. IF  (IG (SGN MFS3)
017303,000280:                                                                                                  #  X SCAXIS . XF) LESS THAN 0, U = SCAXIS
017304,000281:                                                                                                  #  OTHERWISE U = -SCAXIS
017305,000282: 
017306,000283: 27,2216           57575                           VLOAD    VCOMP                                 
017307,000284: 27,2217           03351                                    SCAXIS                                
017308,000285: 27,2220           37343                           STCALL   COF                                   #  ROTATE ABOUT -SCAXIS
017309,000286: 27,2221           56225                                    CHEKAXIS                              
017310,000287: 27,2222           77775        U=SCAXIS           VLOAD                                          
017311,000288: 27,2223           03351                                    SCAXIS                                
017312,000289: 27,2224           03343                           STORE    COF                                   #  ROTATE ABOUT + SCAXIS
017313,000290: 27,2225           51545        CHEKAXIS           DLOAD    ABS                                   
017314,000291: 27,2226           03351                                    SCAXIS                                #  SEE IF WE ARE POINTING THE AOT
017315,000292: 27,2227           51025                           DSU      BPL                                   
017316,000293: 27,2230           16320                                    SINVEC2                               #  SIN 29.5 DEGS                         $2
017317,000294: 27,2231           56235                                    PICKANG1                              #  IF SO, ROTATE 50 DEGS ABOUT +- SCAXIS
017318,000295: 27,2232           52145                           DLOAD    GOTO                                  #  IF NOT, MUST BE POINTING THE TRANSPONDER
017319,000296: 27,2233           16324                                    VECANG2                               #  OR SOME VECTOR IN THE Y, OR Z PLANE
017320,000297: 27,2234           56237                                    COMPMFSN                              #  IN THIS CASE ROTATE 35 DEGS TO GET OUT
017321,000298:                                                                                                  #  OF GIMBAL LOCK (VECANG2 $360)
017322,000299: 27,2235           77745        PICKANG1           DLOAD                                          
017323,000300: 27,2236           16322                                    VECANG1                               #  = 50 DEGS                          $ 360
017324,000301: 27,2237           77624        COMPMFSN           CALL                                           
017325,000302: 27,2240           44530                                    DELCOMP                               #  COMPUTE THE ROTATION ABOUT SCAXIS TO
017326,000303: 27,2241           75160                           AXC,1    AXC,2                                 #  BRING MFS OUT OF GIMBAL LOCK
017327,000304: 27,2242           03320                                    MIS                                   
017328,000305: 27,2243           03425                                    DEL                                   
017329,000306: 27,2244           77624                           CALL                                           #  COMPUTE THE NEW TRANSFORMATION FROM
017330,000307: 27,2245           44304                                    MXM3                                  #  DESIRED S/C AXES TO STABLE MEMBER AXES
017331,000308:                                                                                                  #  WHICH WILL ALIGN VI WITH VF AND AVOID
017332,000309:                                                                                                  #  GIMBAL LOCK
017333,000310: 27,2246           45160        FINDGIMB           AXC,1    CALL                                  
017334,000311: 27,2247           00000                                    0                                     #  EXTRACT THE COMMANDED CDU ANGLES FROM
017335,000312: 27,2250           44655                                    DCMTOCDU                              #  THIS MATRIX
017336,000313: 27,2251           40234                           RTB      SETPD                                 
017337,000314: 27,2252           45552                                    V1STO2S                               #  CONVERT TO 2:S COMPLEMENT

Page 396

017339,000316: 27,2253           00001                                    0                                     
017340,000317: 27,2254           77650                           GOTO                                           
017341,000318: 27,2255           03310                                    VECQTEMP                              #  RETURN TO CALLER
017342,000319: 
017343,000320: 27,2256           50375        PICKAXIS           VLOAD    DOT                                   #  IF VF X VI = 0, FIND VF . VI
017344,000321: 27,2257           00035                                    28D                                   
017345,000322: 27,2260           03351                                    SCAXIS                                
017346,000323: 27,2261           72240                           BMN      TLOAD                                 
017347,000324: 27,2262           56266                                    ROT180                                
017348,000325: 27,2263           00032                                    25D                                   
017349,000326: 27,2264           77650                           GOTO                                           #  IF VF = VI, CDU DESIRED = PRESENT CDU
017350,000327: 27,2265           03310                                    VECQTEMP                              #  PRESENT CDU ANGLES
017351,000328: 
017352,000329: 27,2266           47375        ROT180             VLOAD    VXV                                   #  IF VF, VI ANTIPARALLEL, 180 DEG ROTATION
017353,000330: 27,2267           03327                                    MIS        +6                         #  IS REQUIRED.  Y STABLE MEMBER AXIS IN
017354,000331: 27,2270           15333                                    HIUNITX                               #  INITIAL S/C AXIS.
017355,000332: 27,2271           47256                           UNIT     VXV                                   #  FIND Y(SM) X X(I)
017356,000333: 27,2272           03351                                    SCAXIS                                #  FIND UNIT(VI X UNIT(Y(SM) X X(I)))
017357,000334: 27,2273           40056                           UNIT     BOV                                   #  I.E. PICK A VECTOR IN THE PLANE OF X(I),
017358,000335: 27,2274           56310                                    PICKX                                 #  Y(SM) PERPENDICULAR TO VI
017359,000336: 27,2275           17343                           STODL    COF                                   
017360,000337: 27,2276           00045                                    36D                                   #  CHECK MAGNITUDE
017361,000338: 27,2277           50025                           DSU      BMN                                   #  OF THIS VECTOR.
017362,000339: 27,2300           16327                                    DPB-14                                #  IF LESS THAN B-14,
017363,000340: 27,2301           56310                                    PICKX                                 #  PICK X-AXIS.
017364,000341: 27,2302           77775                           VLOAD                                          
017365,000342: 27,2303           03343                                    COF                                   
017366,000343: 27,2304           17343        XROT               STODL    COF                                   
017367,000344: 27,2305           15333                                    HIDPHALF                              
017368,000345: 27,2306           77650                           GOTO                                           
017369,000346: 27,2307           56160                                    COMPMATX                              
017370,000347: 27,2310           52175        PICKX              VLOAD    GOTO                                  #  PICK THE XAXIS IN THIS CASE
017371,000348: 27,2311           15333                                    HIUNITX                               
017372,000349: 27,2312           56304                                    XROT                                  
017373,000350: 35,2000                                           BANK     35                                    
017374,000351: 27,2000                                           SETLOC   MANUVER1                              
017375,000352: 27,2000                                           BANK                                           
017376,000353: 
017377,000354: 27,2313           15555 35172  SINGIMLC           2DEC     .4285836003                            #  = SIN(59)                             $2
017378,000355: 
017379,000356: 27,2315           14113 36326  SINVEC1            2DEC     .3796356537                            #  = SIN(49.4)                           $2
017380,000357: 
017381,000358: 27,2317           07701 35703  SINVEC2            2DEC     .2462117800                            #  = SIN(29.5)                           $2
017382,000359: 
017383,000360: 27,2321           04343 21616  VECANG1            2DEC     .1388888889                            #  = 50 DEGREES                        $360
017384,000361: 
017385,000362: 27,2323           03070 34344  VECANG2            2DEC     .09722222222                            #  = 35 DEGREES                        $360
017386,000363: 
017387,000364: 
017388,000365: 27,2325           00000        1BITDP             OCT      0                                     #  KEEP THIS BEFORE DPB(-14)      *********
017389,000366: 27,2326           00001        DPB-14             OCT      00001                                 

Page 397

017391,000368: 27,2327           00000                           OCT      00000                                 
017392,000369: 34,2002                                           BANK     34                                    
017393,000370: 27,2000                                           SETLOC   MANUVER                               
017394,000371: 27,2000                                           BANK                                           
017395,000372: 

Page 398

017397,000374:                                                                                                  #  ROUTINE FOR INITIATING AUTOMATIC MANEUVER VIA KEYBOARD (V49)
017398,000375: 
017399,000376: 27,2330     1155                                  EBANK=   CPHI                                  
017400,000377: 
017401,000378: 27,2330                                           COUNT    27/R62                                
017402,000379: 
017403,000380: 27,2330           35052        R62DISP            CAF      V06N22                                #  DISPLAY COMMAND ICDUS CPHI, CTHETA, CPHI
017404,000381: 27,2331           04662                           TC       BANKCALL                              
017405,000382: 27,2332           20720                           CADR     GOFLASH                               
017406,000383: 27,2333           15534                           TCF      ENDEXT                                
017407,000384: 27,2334           12336                           TCF      GOMOVE                                #  PROCEED
017408,000385: 27,2335           12330                           TCF      R62DISP                               #  ENTER
017409,000386: 
017410,000387:                                                                                                  #  ASTRONAUT MAY LOAD NEW ICDUS AT THIS
017411,000388:                                                                                                  #  POINT
017412,000389: 27,2336           05546        GOMOVE             TC       UPFLAG                                #  SET 3-AXIS FLAG
017413,000390: 27,2337           00124                           ADRES    3AXISFLG                              #  BIT 6  FLAG 5
017414,000391: 
017415,000392: 27,2340           04662                           TC       BANKCALL                              
017416,000393: 27,2341           56000                           CADR     R60CSM                                
017417,000394: 27,2342           15534                           TCF      ENDEXT                                
017418,000395: 

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