Source Code

These source-code files are part of a reconstructed copy of Comanche 44, the initial release (though not the final mission release) of the Apollo 10 Command Module (CM) Apollo Guidance Computer (AGC) software. Subsequent releases were Comanche 45 and Comanche 45/2 (the flown release on Apollo 10). The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 44, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 51 (separately previously reconstructed from an Apollo-era listing of Comanche 55, flown on Apollo 11). Comanche 51 source code was then modified by undoing changes known to have been made between revisions 44 and 51. The now-reconstructed Comanche 44 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code match those on the Comanche 55 printout, although the source code would likely have different page numbers in a contemporary Comanche 44 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 51. Here's a guide to the Apollo documentation referenced in those annotations:
In most cases, only the titles (rather than the full texts) of PCRs are known. In addition to the explanatory annotations, there is also a step-by-step commentary about the reconstruction process.

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

016836,000002:                                                                                                  ## Copyright:   Public domain.
016837,000003:                                                                                                  ## Filename:    R60,R62.agc
016838,000004:                                                                                                  ## Purpose:     A section of Comanche revision 044.
016839,000005:                                                                                                  ##              It is part of the reconstructed source code for the
016840,000006:                                                                                                  ##              original release of the flight software for the Command
016841,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
016842,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
016843,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
016844,000010:                                                                                                  ##              exactly match those specified for Comanche 44 in NASA drawing
016845,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
016846,000012:                                                                                                  ##              reconstruction is correct.
016847,000013:                                                                                                  ## Assembler:   yaYUL
016848,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
016849,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
016850,000016:                                                                                                  ## Mod history: 2020-12-03 MAS  Created from Comanche 51.
016851,000017: 

Page 390

016853,000019: 34,2002                                           BANK     34                                    
016854,000020: 27,2000                                           SETLOC   MANUVER                               
016855,000021: 27,2000                                           BANK                                           
016856,000022: 
016857,000023: 27,2000     1146                                  EBANK=   TEMPR60                               
016858,000024: 
016859,000025: 27,2000                                           COUNT    27/R60                                
016860,000026: 
016861,000027:                                                                                                  #  R60CSM
016862,000028:                                                                                                  #  REV 13        CONFORMS TO GSOP CHAPTER FOUR REVISION LOGIC 09 JAN 18, 1968
016863,000029: 
016864,000030: 27,2000           04711        R60CSM             TC       MAKECADR                              
016865,000031: 27,2001           55146                           TS       TEMPR60                               
016866,000032: 
016867,000033:                                                                                                  #  INSERT PRIODSP CHECK WITH R22 (V06N49) WITH JENNINGS BRODEUR          
016868,000034: 
016869,000035: 27,2002           35012        REDOMANN           CAF      BIT6                                  
016870,000036: 27,2003           70101                           MASK     FLAGWRD5                              #  IS 3-AXIS FLAG SET
016871,000037: 27,2004           10000                           CCS      A                                     
016872,000038: 27,2005           12013                           TCF      TOBALL                                #  YES
016873,000039: 27,2006           06006                           TC       INTPRET                               
016874,000040: 27,2007           77624                           CALL                                           
016875,000041: 27,2010           56126                                    VECPOINT                              #  TO COMPUTE FINAL ANGLES
016876,000042: 27,2011           01156                           STORE    CPHI                                  #  STORE FINAL ANGLES - CPHI, CTHETA, CPSI
016877,000043: 27,2012           77776                           EXIT                                           
016878,000044: 
016879,000045: 27,2013           32125        TOBALL             CAF      V06N18                                
016880,000046: 27,2014           04662                           TC       BANKCALL                              
016881,000047: 27,2015           21132                           CADR     GOPERF2R                              #  DISPLAY PLEASE PERFORM AUTO MANEUVER
016882,000048: 27,2016           02114                           TC       R61TEST                               
016883,000049: 27,2017           02023                           TC       REDOMANC                              #  PROCEED
016884,000050: 27,2020           12052                           TCF      ENDMANU1                              #  ENTER I.E. FINISHED WITH R60
016885,000051: 
016886,000052: 27,2021           02056                           TC       CHKLINUS                              #  TO CHECK FOR PRIORITY DISPLAYS
016887,000053: 27,2022           05217                           TC       ENDOFJOB                              
016888,000054: 
016889,000055: 27,2023           35012        REDOMANC           CAF      BIT6                                  
016890,000056: 27,2024           70101                           MASK     FLAGWRD5                              #  IS 3-AXIS FLAG SET
016891,000057: 27,2025           10000                           CCS      A                                     
016892,000058: 27,2026           12034                           TCF      TOBALLC                               #  YES
016893,000059: 27,2027           06006                           TC       INTPRET                               
016894,000060: 27,2030           77624                           CALL                                           
016895,000061: 27,2031           56126                                    VECPOINT                              #  TO COMPUTE FINAL ANGLES
016896,000062: 27,2032           01156                           STORE    CPHI                                  #  STORE ANGLES
016897,000063: 27,2033           77776                           EXIT                                           
016898,000064: 
016899,000065: 27,2034           34371        TOBALLC            CAF      PRIO30                                #  IS MODE AUTO AND CTL GNC

Page 391

016901,000067: 27,2035           00006                           EXTEND                                         
016902,000068: 27,2036           06031                           RXOR     CHAN31                                
016903,000069: 27,2037           77707                           MASK     13,14,15                              
016904,000070: 27,2040           00006                           EXTEND                                         
016905,000071: 27,2041           12043                           BZF      +2                                    #  AUTO, NON-FLASH N18
016906,000072: 27,2042           12013                           TCF      TOBALL                                #  NOT AUTO
016907,000073: 
016908,000074: 27,2043           32125                           CAF      V06N18                                #  SET UP NON-FLASHING V06 N18
016909,000075: 27,2044           04662                           TC       BANKCALL                              
016910,000076: 27,2045           20676                           CADR     GODSPR                                
016911,000077: 27,2046           02056                           TC       CHKLINUS                              
016912,000078: 
016913,000079: 27,2047           04662        STARTMNV           TC       BANKCALL                              
016914,000080: 27,2050           17627                           CADR     GOMANUR                               
016915,000081: 27,2051           12013        ENDMANUV           TCF      TOBALL                                #  FINISHED MANEUVER
016916,000082: 
016917,000083: 27,2052           05560        ENDMANU1           TC       DOWNFLAG                              #  RESET 3-AXIS FLAG
016918,000084: 27,2053           00124                           ADRES    3AXISFLG                              #  BIT 6 FLAG 5
016919,000085: 27,2054           31146                           CAE      TEMPR60                               #                                        -
016920,000086: 27,2055           04704                           TC       BANKJUMP                              #                                        -
016921,000087: 
016922,000088: 27,2056           40100        CHKLINUS           CS       FLAGWRD4                              
016923,000089: 27,2057           75004                           MASK     BIT12                                 #  IS PRIORITY DISPLAY FLAG SET          -
016924,000090: 27,2060           10000                           CCS      A                                     #                                        -
016925,000091: 27,2061           00002                           TC       Q                                     #  NO - EXIT
016926,000092: 27,2062           30002                           CA       Q                                     
016927,000093: 27,2063           54156                           TS       MPAC       +2                         #  SAVE RETURN
016928,000094: 27,2064           46214                           CS       THREE                                 #  OBTAIN LOCATION FOR RESTART.
016929,000095: 27,2065           60133                           AD       BUF2                                  #  HOLDS Q OF LAST DISPALY
016930,000096: 27,2066           55053                           TS       TBASE1                                
016931,000097: 
016932,000098: 27,2067           05412                           TC       PHASCHNG                              
016933,000099: 27,2070           00071                           OCT      71                                    #  1.7SPOT FOR RELINUS
016934,000100: 
016935,000101: 27,2071           35011                           CAF      BIT7                                  
016936,000102: 27,2072           05526                           TC       LINUS                                 #  GO SET BITS FOR PRIORITY DISPLAY      -
016937,000103: 27,2073           00156                           TC       MPAC       +2                         
016938,000104: 
016939,000105: 27,2074           35013        RELINUS            CAF      BIT5                                  #  IS TRACK FLAG ON
016940,000106: 27,2075           70075                           MASK     FLAGWRD1                              
016941,000107: 27,2076           00006                           EXTEND                                         
016942,000108: 27,2077           12111                           BZF      GOREDO20                              #  NO
016943,000109: 
016944,000110: 27,2100           05546                           TC       UPFLAG                                
016945,000111: 27,2101           00077                           ADRES    PDSPFLAG                              #  R60 PRIODSP FLAG
016946,000112: 
016947,000113: 27,2102           05546                           TC       UPFLAG                                
016948,000114: 27,2103           00024                           ADRES    TARG1FLG                              #  FOR R52
016949,000115: 
016950,000116: 27,2104           35021                           CAF      ZERO                                  #  RESET TO ZERO, SINCE

Page 392

016952,000118: 27,2105           55303                           TS       OPTIND                                #  OPTIND WAS SET TO -1 BY V379
016953,000119: 
016954,000120: 27,2106           35066                           CAF      PRIO14                                #  RESTORE ORIGINAL PRIORITY
016955,000121: 27,2107           05210                           TC       PRIOCHNG                              
016956,000122: 
016957,000123: 27,2110           01053                           TC       TBASE1                                
016958,000124: 
016959,000125: 27,2111           05412        GOREDO20           TC       PHASCHNG                              
016960,000126: 27,2112           00111                           OCT      111                                   #  1.11 FOR PIKUP20
016961,000127: 
016962,000128: 27,2113           05217                           TC       ENDOFJOB                              
016963,000129: 
016964,000130: 27,2114           31011        R61TEST            CA       MODREG                                #  ARE WE IN P00.  IF YES THIS MUST BE
016965,000131: 27,2115           00006                           EXTEND                                         #        VERB49 OR VERB89 SO DO ENDEXT.
016966,000132: 27,2116           12052                           BZF      ENDMANU1                              #  RESET 3-AXIS & RUTURN.  USER DOES ENDEXT
016967,000133: 27,2117           30100                           CA       FLAGWRD4                              #  ARE WE IN R61 (P20)
016968,000134: 27,2120           75004                           MASK     BIT12                                 
016969,000135: 27,2121           00006                           EXTEND                                         
016970,000136: 27,2122           14106                           BZF      GOTOPOOH                              #  NO
016971,000137: 27,2123           04622                           TC       GOTOV56                               #  YES
016972,000138: 
016973,000139: 27,2124           20100        BIT14+7            OCT      20100                                 #                                        -
016974,000140: 27,2125           01422        V06N18             VN       0618                                  
016975,000141: 

Page 393

016977,000143:                                                                                                  #  PROGRAM DESCRIPTION - VECPOINT
016978,000144: 
016979,000145:                                                                                                  #  THIS INTERPRETIVE SUBROUTINE MAY BE USED TO POINT A SPACECRAFT AXIS IN A DESIRED DIRECTION.  THE AXIS
016980,000146:                                                                                                  #  TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN SUCCESSIVE LOCATIONS OF ERASABLE MEMORY
016981,000147:                                                                                                  #  BEGINNING WITH THE LOCATION CALLED SCAXIS.  THE COMPONENTS OF THIS VECTOR ARE GIVEN IN SPACECRAFT COORDINATES.
016982,000148:                                                                                                  #  THE DIRECTION IN WHICH THIS AXIS IS TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN
016983,000149:                                                                                                  #  SUCCESSIVE LOCATIONS OF ERASABLE MEMORY BEGINNING WITH THE ADDRESS CALLED POINTVSM.  THE COMPONENTS OF THIS
016984,000150:                                                                                                  #  VECTOR ARE GIVEN IN STABLE MEMBER COORDINATES.  WITH THIS INFORMATION VECPOINT COMPUTES A SET OF THREE GIMBAL
016985,000151:                                                                                                  #  ANGLES (2S COMPLEMENT) CORRESPONDING TO THE CROSS-PRODUCT ROTATION BETWEEN SCAXIS AND POINTVSM AND STORES THEM
016986,000152:                                                                                                  #  IN T(MPAC) BEFORE RETURNING TO THE CALLER.
016987,000153: 
016988,000154:                                                                                                  #  THIS ROTATION, HOWEVER, MAY BRING THE S/C INTO GIMBAL LOCK.  WHEN POINTING A VECTOR IN THE Y-Z PLANE,
016989,000155:                                                                                                  #  THE TRANSPONDER AXIS, OR THE AOT FOR THE LEM, THE PROGRAM WILL CORRECT THIS PROBLEM BY ROTATING THE CROSS-
016990,000156:                                                                                                  #  PRODUCT ATTITUDE ABOUT POINTVSM BY A FIXED AMOUNT SUFFICIENT TO ROTATE THE DESIRED S/C ATTITUDE OUT OF GIMBAL
016991,000157:                                                                                                  #  LOCK.  IF THE AXIS TO BE POINTED IS MORE THAN 40.6 DEGREES BUT LESS THAN 60.5 DEG FROM THE +X (OR -X) AXIS,
016992,000158:                                                                                                  #  THE ADDITIONAL ROTATION TO AVOID GIMAL LOCK IS 35 DEGREES.  IF THE AXIS IS MORE THAN 60.5 DEGEES FROM +X (OR -X)
016993,000159:                                                                                                  #  THE ADDITIONAL ROTATION IS 35 DEGREES.  THE GIMBAL ANGLES CORRESPONDING TO THIS ATTITUDE ARE THEN COMPUTED AND
016994,000160:                                                                                                  #  STORED AS 2S COMPLIMENT ANGLES IN T(MPAC) BEFORE RETURNING TO THE CALLER.
016995,000161: 
016996,000162:                                                                                                  #  WHEN POINTING THE X-AXIS, OR THE THRUST VECTOR, OR ANY VECTOR WITHIN 40.6 DEG OF THE X-AXIS, VECPOINT
016997,000163:                                                                                                  #  CANNOT CORRECT FOR A CROSS-PRODUCT ROTATION INTO GIMBAL LOCK.  IN THIS CASE A PLATFORM REALIGNMENT WOULD BE
016998,000164:                                                                                                  #  REQUIRED TO POINT THE VECTOR IN THE DESIRED DIRECTION.  AT PRESENT NO INDICATION IS GIVEN FOR THIS SITUATION
016999,000165:                                                                                                  #  EXCEPT THAT THE FINAL MIDDLE GIMBAL ANGLE IN MPAC +2 IS GREATER THAN 59 DEGREES.
017000,000166: 
017001,000167:                                                                                                  #  CALLING SEQUENCE -
017002,000168: 
017003,000169:                                                                                                  #        1)      LOAD SCAXIS, POINTVSM
017004,000170:                                                                                                  #        2)      CALL
017005,000171:                                                                                                  #                        VECPOINT
017006,000172: 
017007,000173:                                                                                                  #  RETURNS WITH
017008,000174: 
017009,000175:                                                                                                  #        1)      DESIRED OUTER GIMBAL ANGLE IN MPAC
017010,000176:                                                                                                  #        2)      DESIRED INNER GIMBAL ANGLE IN MPAC +1
017011,000177:                                                                                                  #        3)      DESIRED MIDDLE GIMBAL ANGLE IN MPAC +2
017012,000178: 
017013,000179:                                                                                                  #  ERASABLES USED -
017014,000180: 
017015,000181:                                                                                                  #        1)      SCAXIS          6
017016,000182:                                                                                                  #        2)      POINTVSM        6
017017,000183:                                                                                                  #        3)      MIS             18
017018,000184:                                                                                                  #        4)      DEL             18
017019,000185:                                                                                                  #        5)      COF             6
017020,000186:                                                                                                  #        6)      VECQTEMP        1
017021,000187:                                                                                                  #        7)      ALL OF VAC AREA 43
017022,000188: 
017023,000189:                                                                                                  #                        TOTAL   99
017024,000190: 
017025,000191: 27,2000                                           SETLOC   VECPT                                 
017026,000192: 27,2000                                           BANK                                           

Page 394

017028,000194: 27,2126  E6,1661                                  EBANK=   BCDU                                  
017029,000195: 
017030,000196: 27,2126                                           COUNT    27/VECPT                              
017031,000197: 
017032,000198: 27,2126           40020        VECPOINT           STQ      BOV                                   #  SAVE RETURN ADDRESS
017033,000199: 27,2127           03310                                    VECQTEMP                              
017034,000200: 27,2130           56131                                    VECLEAR                               #  AND CLEAR OVFIND
017035,000201: 27,2131           47164        VECLEAR            AXC,2    RTB                                   
017036,000202: 27,2132           03320                                    MIS                                   #  READ THE PRESENT CDU ANGLES AND
017037,000203: 27,2133           44376                                    READCDUK                              #  STORE THEM IN PD25, 26, 27
017038,000204: 27,2134           34032                           STCALL   25D                                   
017039,000205: 27,2135           44405                                    CDUTODCM                              #  S/C AXES TO STABLE MEMBER AXES (MIS)
017040,000206: 27,2136           61375                           VLOAD    VXM                                   
017041,000207: 27,2137           03357                                    POINTVSM                              #  RESOLVE THE POINTING DIRECTION VF INTO
017042,000208: 27,2140           03321                                    MIS                                   #  INITIAL S/C AXES (VF = POINTVSM)
017043,000209: 27,2141           77656                           UNIT                                           
017044,000210: 27,2142           00035                           STORE    28D                                   
017045,000211:                                                                                                  #  PD 28 29 30 31 32 33
017046,000212: 27,2143           53435                           VXV      UNIT                                  #  TAKE THE CROSS PRODUCT VF X VI
017047,000213: 27,2144           03351                                    SCAXIS                                #  WHERE VI = SCAXIS
017048,000214: 27,2145           57400                           BOV      VCOMP                                 
017049,000215: 27,2146           56256                                    PICKAXIS                              
017050,000216: 27,2147           17343                           STODL    COF                                   #  CHECK MAGNITUDE
017051,000217: 27,2150           00045                                    36D                                   #  OF CROSS PRODUCT
017052,000218: 27,2151           50025                           DSU      BMN                                   #  VECTOR, IF LESS
017053,000219: 27,2152           16327                                    DPB-14                                #  THAN B-14 ASSUME
017054,000220: 27,2153           56256                                    PICKAXIS                              #  UNIT OPERATION
017055,000221: 27,2154           50375                           VLOAD    DOT                                   #  INVALID.
017056,000222: 27,2155           03351                                    SCAXIS                                
017057,000223: 27,2156           00035                                    28D                                   
017058,000224: 27,2157           65552                           SL1      ARCCOS                                
017059,000225: 27,2160           77624        COMPMATX           CALL                                           #  NOW COMPUTE THE TRANSFORMATION FROM
017060,000226: 27,2161           44530                                    DELCOMP                               #  FINAL S/C AXES TO INITIAL S/C AXES MFI
017061,000227: 27,2162           75160                           AXC,1    AXC,2                                 
017062,000228: 27,2163           03320                                    MIS                                   #  COMPUTE THE TRANSFORMATION FROM FINAL
017063,000229: 27,2164           03425                                    DEL                                   #  S/C AXES TO STABLE MEMBER AXES
017064,000230: 27,2165           77624                           CALL                                           #  MFS = MIS MFI
017065,000231: 27,2166           44304                                    MXM3                                  #  (IN PD LIST)
017066,000232: 
017067,000233: 27,2167           51545                           DLOAD    ABS                                   
017068,000234: 27,2170           00007                                    6                                     #  MFS6 = SIN(CPSI)                      $2
017069,000235: 27,2171           50025                           DSU      BMN                                   
017070,000236: 27,2172           16314                                    SINGIMLC                              #  = SIN(59 DEGS)                        $2
017071,000237: 27,2173           56246                                    FINDGIMB                              #  /CPSI/ LESS THAN 59 DEGS
017072,000238:                                                                                                  #  I.E. DESIRED ATTITUDE NOT IN GIMBAL LOCK
017073,000239: 
017074,000240: 27,2174           51545                           DLOAD    ABS                                   #  CHECK TO SEE IF WE ARE POINTING
017075,000241: 27,2175           03351                                    SCAXIS                                #  THE THRUST AXIS
017076,000242: 27,2176           51025                           DSU      BPL                                   
017077,000243: 27,2177           16316                                    SINVEC1                               #  SIN 49.4 DEGS                         $2

Page 395

017079,000245: 27,2200           56246                                    FINDGIMB                              #  IF SO, WE ARE TRYING TO POINT IT INTO
017080,000246: 27,2201           77775                           VLOAD                                          #  GIMBAL LOCK, ABORT COULD GO HERE
017081,000247: 27,2202           77626                           STADR                                          
017082,000248: 27,2203           50442                           STOVL    MIS        +12D                       
017083,000249: 27,2204           77626                           STADR                                          #  STORE MFS (IN PD LIST) IN MIS
017084,000250: 27,2205           50450                           STOVL    MIS        +6                         
017085,000251: 27,2206           77626                           STADR                                          
017086,000252: 27,2207           50456                           STOVL    MIS                                   
017087,000253: 27,2210           03327                                    MIS        +6                         #  INNER GIMBAL AXIS IN FINAL S/C AXES
017088,000254: 27,2211           57444                           BPL      VCOMP                                 #  LOCATE THE IG AXIS DIRECTION CLOSEST TO
017089,000255: 27,2212           56213                                    IGSAMEX                               #  FINAL X S/C AXIS
017090,000256: 
017091,000257: 27,2213           50035        IGSAMEX            VXV      BMN                                   #  FIND THE SHORTEST WAY OF ROTATING THE 
017092,000258: 27,2214           03351                                    SCAXIS                                #  S/C OUT OF GIMBAL LOCK BY A ROTATION 
017093,000259: 27,2215           56222                                    U=SCAXIS                              #  ABOUT +- SCAXIS, I.E. IF  (IG (SGN MFS3)
017094,000260:                                                                                                  #  X SCAXIS . XF) LESS THAN 0, U = SCAXIS
017095,000261:                                                                                                  #  OTHERWISE U = -SCAXIS
017096,000262: 
017097,000263: 27,2216           57575                           VLOAD    VCOMP                                 
017098,000264: 27,2217           03351                                    SCAXIS                                
017099,000265: 27,2220           37343                           STCALL   COF                                   #  ROTATE ABOUT -SCAXIS
017100,000266: 27,2221           56225                                    CHEKAXIS                              
017101,000267: 27,2222           77775        U=SCAXIS           VLOAD                                          
017102,000268: 27,2223           03351                                    SCAXIS                                
017103,000269: 27,2224           03343                           STORE    COF                                   #  ROTATE ABOUT + SCAXIS
017104,000270: 27,2225           51545        CHEKAXIS           DLOAD    ABS                                   
017105,000271: 27,2226           03351                                    SCAXIS                                #  SEE IF WE ARE POINTING THE AOT
017106,000272: 27,2227           51025                           DSU      BPL                                   
017107,000273: 27,2230           16320                                    SINVEC2                               #  SIN 29.5 DEGS                         $2
017108,000274: 27,2231           56235                                    PICKANG1                              #  IF SO, ROTATE 50 DEGS ABOUT +- SCAXIS
017109,000275: 27,2232           52145                           DLOAD    GOTO                                  #  IF NOT, MUST BE POINTING THE TRANSPONDER
017110,000276: 27,2233           16324                                    VECANG2                               #  OR SOME VECTOR IN THE Y, OR Z PLANE
017111,000277: 27,2234           56237                                    COMPMFSN                              #  IN THIS CASE ROTATE 35 DEGS TO GET OUT
017112,000278:                                                                                                  #  OF GIMBAL LOCK (VECANG2 $360)
017113,000279: 27,2235           77745        PICKANG1           DLOAD                                          
017114,000280: 27,2236           16322                                    VECANG1                               #  = 50 DEGS                          $ 360
017115,000281: 27,2237           77624        COMPMFSN           CALL                                           
017116,000282: 27,2240           44530                                    DELCOMP                               #  COMPUTE THE ROTATION ABOUT SCAXIS TO
017117,000283: 27,2241           75160                           AXC,1    AXC,2                                 #  BRING MFS OUT OF GIMBAL LOCK
017118,000284: 27,2242           03320                                    MIS                                   
017119,000285: 27,2243           03425                                    DEL                                   
017120,000286: 27,2244           77624                           CALL                                           #  COMPUTE THE NEW TRANSFORMATION FROM
017121,000287: 27,2245           44304                                    MXM3                                  #  DESIRED S/C AXES TO STABLE MEMBER AXES
017122,000288:                                                                                                  #  WHICH WILL ALIGN VI WITH VF AND AVOID
017123,000289:                                                                                                  #  GIMBAL LOCK
017124,000290: 27,2246           45160        FINDGIMB           AXC,1    CALL                                  
017125,000291: 27,2247           00000                                    0                                     #  EXTRACT THE COMMANDED CDU ANGLES FROM
017126,000292: 27,2250           44655                                    DCMTOCDU                              #  THIS MATRIX
017127,000293: 27,2251           40234                           RTB      SETPD                                 
017128,000294: 27,2252           45552                                    V1STO2S                               #  CONVERT TO 2:S COMPLEMENT

Page 396

017130,000296: 27,2253           00001                                    0                                     
017131,000297: 27,2254           77650                           GOTO                                           
017132,000298: 27,2255           03310                                    VECQTEMP                              #  RETURN TO CALLER
017133,000299: 
017134,000300: 27,2256           50375        PICKAXIS           VLOAD    DOT                                   #  IF VF X VI = 0, FIND VF . VI
017135,000301: 27,2257           00035                                    28D                                   
017136,000302: 27,2260           03351                                    SCAXIS                                
017137,000303: 27,2261           72240                           BMN      TLOAD                                 
017138,000304: 27,2262           56266                                    ROT180                                
017139,000305: 27,2263           00032                                    25D                                   
017140,000306: 27,2264           77650                           GOTO                                           #  IF VF = VI, CDU DESIRED = PRESENT CDU
017141,000307: 27,2265           03310                                    VECQTEMP                              #  PRESENT CDU ANGLES
017142,000308: 
017143,000309: 27,2266           47375        ROT180             VLOAD    VXV                                   #  IF VF, VI ANTIPARALLEL, 180 DEG ROTATION
017144,000310: 27,2267           03327                                    MIS        +6                         #  IS REQUIRED.  Y STABLE MEMBER AXIS IN
017145,000311: 27,2270           15333                                    HIUNITX                               #  INITIAL S/C AXIS.
017146,000312: 27,2271           47256                           UNIT     VXV                                   #  FIND Y(SM) X X(I)
017147,000313: 27,2272           03351                                    SCAXIS                                #  FIND UNIT(VI X UNIT(Y(SM) X X(I)))
017148,000314: 27,2273           40056                           UNIT     BOV                                   #  I.E. PICK A VECTOR IN THE PLANE OF X(I),
017149,000315: 27,2274           56310                                    PICKX                                 #  Y(SM) PERPENDICULAR TO VI
017150,000316: 27,2275           17343                           STODL    COF                                   
017151,000317: 27,2276           00045                                    36D                                   #  CHECK MAGNITUDE
017152,000318: 27,2277           50025                           DSU      BMN                                   #  OF THIS VECTOR.
017153,000319: 27,2300           16327                                    DPB-14                                #  IF LESS THAN B-14,
017154,000320: 27,2301           56310                                    PICKX                                 #  PICK X-AXIS.
017155,000321: 27,2302           77775                           VLOAD                                          
017156,000322: 27,2303           03343                                    COF                                   
017157,000323: 27,2304           17343        XROT               STODL    COF                                   
017158,000324: 27,2305           15333                                    HIDPHALF                              
017159,000325: 27,2306           77650                           GOTO                                           
017160,000326: 27,2307           56160                                    COMPMATX                              
017161,000327: 27,2310           52175        PICKX              VLOAD    GOTO                                  #  PICK THE XAXIS IN THIS CASE
017162,000328: 27,2311           15333                                    HIUNITX                               
017163,000329: 27,2312           56304                                    XROT                                  
017164,000330: 35,2000                                           BANK     35                                    
017165,000331: 27,2000                                           SETLOC   MANUVER1                              
017166,000332: 27,2000                                           BANK                                           
017167,000333: 
017168,000334: 27,2313           15555 35172  SINGIMLC           2DEC     .4285836003                            #  = SIN(59)                             $2
017169,000335: 
017170,000336: 27,2315           14113 36326  SINVEC1            2DEC     .3796356537                            #  = SIN(49.4)                           $2
017171,000337: 
017172,000338: 27,2317           07701 35703  SINVEC2            2DEC     .2462117800                            #  = SIN(29.5)                           $2
017173,000339: 
017174,000340: 27,2321           04343 21616  VECANG1            2DEC     .1388888889                            #  = 50 DEGREES                        $360
017175,000341: 
017176,000342: 27,2323           03070 34344  VECANG2            2DEC     .09722222222                            #  = 35 DEGREES                        $360
017177,000343: 
017178,000344: 
017179,000345: 27,2325           00000        1BITDP             OCT      0                                     #  KEEP THIS BEFORE DPB(-14)      *********
017180,000346: 27,2326           00001        DPB-14             OCT      00001                                 

Page 397

017182,000348: 27,2327           00000                           OCT      00000                                 
017183,000349: 34,2002                                           BANK     34                                    
017184,000350: 27,2000                                           SETLOC   MANUVER                               
017185,000351: 27,2000                                           BANK                                           
017186,000352: 

Page 398

017188,000354:                                                                                                  #  ROUTINE FOR INITIATING AUTOMATIC MANEUVER VIA KEYBOARD (V49)
017189,000355: 
017190,000356: 27,2330     1155                                  EBANK=   CPHI                                  
017191,000357: 
017192,000358: 27,2330                                           COUNT    27/R62                                
017193,000359: 
017194,000360: 27,2330           35052        R62DISP            CAF      V06N22                                #  DISPLAY COMMAND ICDUS CPHI, CTHETA, CPHI
017195,000361: 27,2331           04662                           TC       BANKCALL                              
017196,000362: 27,2332           20720                           CADR     GOFLASH                               
017197,000363: 27,2333           15534                           TCF      ENDEXT                                
017198,000364: 27,2334           12336                           TCF      GOMOVE                                #  PROCEED
017199,000365: 27,2335           12330                           TCF      R62DISP                               #  ENTER
017200,000366: 
017201,000367:                                                                                                  #  ASTRONAUT MAY LOAD NEW ICDUS AT THIS
017202,000368:                                                                                                  #  POINT
017203,000369: 27,2336           05546        GOMOVE             TC       UPFLAG                                #  SET 3-AXIS FLAG
017204,000370: 27,2337           00124                           ADRES    3AXISFLG                              #  BIT 6  FLAG 5
017205,000371: 
017206,000372: 27,2340           04662                           TC       BANKCALL                              
017207,000373: 27,2341           56000                           CADR     R60CSM                                
017208,000374: 27,2342           15534                           TCF      ENDEXT                                
017209,000375: 

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