Source Code

This is the source-code for the Apollo 9 Command Module's Guidance Computer. These files were derived originally from the scan from MIT's Dibner Institute's now-discontinued website titled "History of Recent Science and Technology", which in turn was originally created by Gary Neff, though his high-quality scans were unfortunately reduced in legibility when presented online. The markings on the front of the printout imply that it was the original AGC developer Norm Brodeur's copy. A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original AGC developer Fred Martin. The source code was transcribed from those images by Ron Burkey. 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:

	ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

016816,000002:                                                                                                  ## Copyright:   Public domain.
016817,000003:                                                                                                  ## Filename:    R60_62.agc
016818,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus, build 249.
016819,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
016820,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 9.
016821,000007:                                                                                                  ## Assembler:   yaYUL
016822,000008:                                                                                                  ## Reference:   pp. 383-391.
016823,000009:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
016824,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo.
016825,000011:                                                                                                  ## Mod history: 08/10/04 RSB.   Began adapting from corresponding Luminary131
016826,000012:                                                                                                  ##                              source file.
016827,000013:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
016828,000014:                                                                                                  ##                              original harcopy, as opposed to the PDF page
016829,000015:                                                                                                  ##                              numbers in 1701.pdf.
016830,000016:                                                                                                  ##              2017-01-18 RSB  Cross-diff'd comment text (not whitespace)
016831,000017:                                                                                                  ##                              vs the already-proofed corresponding Colossus
016832,000018:                                                                                                  ##                              237 and Comanche 55 source-code files
016833,000019:                                                                                                  ##                              and corrected errors found.
016834,000020:                                                                                                  ##              2021-05-30 ABS  Removed STORANG symbol not present in scans.
016835,000021:                                                                                                  ##
016836,000022:                                                                                                  ## The contents of the "Colossus249" files, in general, are transcribed 
016837,000023:                                                                                                  ## from a scanned copy of the program listing.  Notations on this
016838,000024:                                                                                                  ## document read, in part:
016839,000025:                                                                                                  ##
016840,000026:                                                                                                  ##      Assemble revision 249 of AGC program Colossus by NASA
016841,000027:                                                                                                  ##      2021111-041.  October 28, 1968.  
016842,000028:                                                                                                  ##
016843,000029:                                                                                                  ##      This AGC program shall also be referred to as
016844,000030:                                                                                                  ##                              Colossus 1A
016845,000031:                                                                                                  ##
016846,000032:                                                                                                  ##      Prepared by
016847,000033:                                                                                                  ##                      Massachusetts Institute of Technology
016848,000034:                                                                                                  ##                      75 Cambridge Parkway
016849,000035:                                                                                                  ##                      Cambridge, Massachusetts
016850,000036:                                                                                                  ##      under NASA contract NAS 9-4065.
016851,000037:                                                                                                  ##
016852,000038:                                                                                                  ## Refer directly to the online document mentioned above for further information.
016853,000039:                                                                                                  ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
016854,000040:                                                                                                  ##
016855,000041:                                                                                                  ## In some cases, where the source code for Luminary 131 overlaps that of 
016856,000042:                                                                                                  ## Colossus 249, this code is instead copied from the corresponding Luminary 131
016857,000043:                                                                                                  ## source file, and then is proofed to incorporate any changes.
016858,000044: 

Page 383

016860,000046: 34,2002                                           BANK     34                                    
016861,000047: 27,2000                                           SETLOC   MANUVER                               
016862,000048: 27,2000                                           BANK                                           
016863,000049: 
016864,000050: 27,2000     1146                                  EBANK=   TEMPR60                               
016865,000051: 
016866,000052: 27,2000                                           COUNT    27/R60                                
016867,000053: 
016868,000054:                                                                                                  #  R60CSM        
016869,000055:                                                                                                  #  REV 13 CONFORMS TO GSOP CHAPTER FOUR REVISION LOGIC 09        JAN 18, 1968
016870,000056: 
016871,000057: 27,2000           04604        R60CSM             TC       MAKECADR                              
016872,000058: 27,2001           55146                           TS       TEMPR60                               
016873,000059: 
016874,000060:                                                                                                  #  INSERT PRIODSP CHECK WITH R22 (V06N49) WITH JENNINGS BRODEUR          
016875,000061: 
016876,000062: 27,2002           34705        REDOMANN           CAF      BIT6                                  
016877,000063: 27,2003           70101                           MASK     FLAGWRD5                              #  IS 3-AXIS FLAG SET
016878,000064: 27,2004           10000                           CCS      A                                     
016879,000065: 27,2005           12013                           TCF      TOBALL                                #  YES
016880,000066: 27,2006           06006                           TC       INTPRET                               
016881,000067: 27,2007           77624                           CALL                                           
016882,000068: 27,2010           56126                                    VECPOINT                              #  TO COMPUTE FINAL ANGLES
016883,000069: 27,2011           01156                           STORE    CPHI                                  #  STORE FINAL ANGLES - CPHI, CTHETA, CPSI
016884,000070: 27,2012           77776                           EXIT                                           
016885,000071: 
016886,000072: 27,2013           32125        TOBALL             CAF      V06N18                                
016887,000073: 27,2014           04555                           TC       BANKCALL                              
016888,000074: 27,2015           21036                           CADR     GOPERF2R                              #  DISPLAY PLEASE PERFORM AUTO MANEUVER
016889,000075: 27,2016           02114                           TC       R61TEST                               
016890,000076: 27,2017           02023                           TC       REDOMANC                              #  PROCEED
016891,000077: 27,2020           12052                           TCF      ENDMANU1                              #  ENTER I.E. FINISHED WITH R60
016892,000078: 27,2021           02056                           TC       CHKLINUS                              #  TO CHECK FOR PRIORITY DISPLAYS
016893,000079: 27,2022           05112                           TC       ENDOFJOB                              
016894,000080: 
016895,000081: 27,2023           34705        REDOMANC           CAF      BIT6                                  
016896,000082: 27,2024           70101                           MASK     FLAGWRD5                              #  IS 3-AXIS FLAG SET
016897,000083: 27,2025           10000                           CCS      A                                     
016898,000084: 27,2026           12034                           TCF      TOBALLC                               #  YES
016899,000085: 27,2027           06006                           TC       INTPRET                               
016900,000086: 27,2030           77624                           CALL                                           
016901,000087: 27,2031           56126                                    VECPOINT                              #  TO COMPUTE FINAL ANGLES
016902,000088: 27,2032           01156                           STORE    CPHI                                  #  STORE ANGLES
016903,000089: 27,2033           77776                           EXIT                                           
016904,000090: 
016905,000091: 27,2034           34371        TOBALLC            CAF      PRIO30                                #  IS MODE AUTO AND CTL GNC

Page 384

016907,000093: 27,2035           00006                           EXTEND                                         
016908,000094: 27,2036           06031                           RXOR     CHAN31                                
016909,000095: 27,2037           77707                           MASK     13,14,15                              
016910,000096: 27,2040           00006                           EXTEND                                         
016911,000097: 27,2041           12043                           BZF      +2                                    #  AUTO, NON-FLASH N18
016912,000098: 27,2042           12013                           TCF      TOBALL                                #  NOT AUTO
016913,000099: 
016914,000100: 27,2043           32125                           CAF      V06N18                                #  SET UP NON-FLASHING V06 N18
016915,000101: 27,2044           04555                           TC       BANKCALL                              
016916,000102: 27,2045           20602                           CADR     GODSPR                                
016917,000103: 27,2046           02056                           TC       CHKLINUS                              
016918,000104: 
016919,000105: 27,2047           04555        STARTMNV           TC       BANKCALL                              
016920,000106: 27,2050           17547                           CADR     GOMANUR                               
016921,000107: 27,2051           12013        ENDMANUV           TCF      TOBALL                                #  FINISHED MANEUVER
016922,000108: 
016923,000109: 27,2052           05447        ENDMANU1           TC       DOWNFLAG                              #  RESET 3-AXIS FLAG
016924,000110: 27,2053           00124                           ADRES    3AXISFLG                              #  BIT 6 FLAG 5
016925,000111: 27,2054           31146                           CAE      TEMPR60                               #                                        -
016926,000112: 27,2055           04577                           TC       BANKJUMP                              #                                        -
016927,000113: 
016928,000114: 27,2056           40100        CHKLINUS           CS       FLAGWRD4                              
016929,000115: 27,2057           74677                           MASK     BIT12                                 #  IS PRIORITY DISPLAY FLAG SET          -
016930,000116: 27,2060           10000                           CCS      A                                     #                                        -
016931,000117: 27,2061           00002                           TC       Q                                     #  NO - EXIT
016932,000118: 27,2062           30002                           CA       Q                                     
016933,000119: 27,2063           54156                           TS       MPAC       +2                         #  SAVE RETURN
016934,000120: 27,2064           46214                           CS       THREE                                 #  OBTAIN LOCATION FOR RESTART.
016935,000121: 27,2065           60133                           AD       BUF2                                  #  HOLDS Q OF LAST DISPALY
016936,000122: 27,2066           55053                           TS       TBASE1                                
016937,000123: 
016938,000124: 27,2067           05301                           TC       PHASCHNG                              
016939,000125: 27,2070           00071                           OCT      71                                    #  1.7SPOT FOR RELINUS
016940,000126: 27,2071           34704                           CAF      BIT7                                  
016941,000127: 27,2072           05415                           TC       LINUS                                 #  GO SET BITS FOR PRIORITY DISPLAY      -
016942,000128: 27,2073           00156                           TC       MPAC       +2                         
016943,000129: 
016944,000130: 27,2074           34706        RELINUS            CAF      BIT5                                  #  IS TRACK FLAG ON
016945,000131: 27,2075           70075                           MASK     FLAGWRD1                              
016946,000132: 27,2076           00006                           EXTEND                                         
016947,000133: 27,2077           12111                           BZF      GOREDO20                              #  NO
016948,000134: 
016949,000135: 27,2100           05435                           TC       UPFLAG                                
016950,000136: 27,2101           00077                           ADRES    PDSPFLAG                              #  R60 PRIODSP FLAG
016951,000137: 
016952,000138: 27,2102           05435                           TC       UPFLAG                                
016953,000139: 27,2103           00024                           ADRES    TARG1FLG                              #  FOR R52
016954,000140: 
016955,000141: 27,2104           34714                           CAF      ZERO                                  #  RESET TO ZERO, SINCE

Page 385

016957,000143: 27,2105           55303                           TS       OPTIND                                #  OPTIND WAS SET TO -1 BY V379
016958,000144: 
016959,000145: 27,2106           34761                           CAF      PRIO14                                #  RESTORE ORIGINAL PRIORITY
016960,000146: 27,2107           05103                           TC       PRIOCHNG                              
016961,000147: 
016962,000148: 27,2110           01053                           TC       TBASE1                                
016963,000149: 
016964,000150: 27,2111           05301        GOREDO20           TC       PHASCHNG                              
016965,000151: 27,2112           00111                           OCT      111                                   #  1.11 FOR PIKUP20
016966,000152: 
016967,000153: 27,2113           05112                           TC       ENDOFJOB                              
016968,000154: 
016969,000155: 27,2114           31011        R61TEST            CA       MODREG                                #  ARE WE IN P00.  IF YES THIS MUST BE
016970,000156: 27,2115           00006                           EXTEND                                         #        VERB49 OR VERB89 SO DO ENDEXT.
016971,000157: 27,2116           12052                           BZF      ENDMANU1                              #  RESET 3-AXIS & RUTURN.  USER DOES ENDEXT
016972,000158: 27,2117           30100                           CA       FLAGWRD4                              #  ARE WE IN R61 (P20)
016973,000159: 27,2120           74677                           MASK     BIT12                                 
016974,000160: 27,2121           00006                           EXTEND                                         
016975,000161: 27,2122           14106                           BZF      GOTOPOOH                              #  NO
016976,000162: 27,2123           04550                           TC       GOTOV56                               #  YES
016977,000163: 
016978,000164: 27,2124           20100        BIT14+7            OCT      20100                                 #                                                -
016979,000165: 27,2125           01422        V06N18             VN       0618                                  
016980,000166: 

Page 386

016982,000168:                                                                                                  #  PROGRAM DESCRIPTION - VECPOINT
016983,000169: 
016984,000170:                                                                                                  #  THIS INTERPRETIVE SUBROUTINE MAY BE USED TO POINT A SPACECRAFT AXIS IN A DESIRED DIRECTION.  THE AXIS
016985,000171:                                                                                                  #  TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN SUCCESSIVE LOCATIONS OF ERASABLE MEMORY
016986,000172:                                                                                                  #  BEGINNING WITH THE LOCATION CALLED SCAXIS.  THE COMPONENTS OF THIS VECTOR ARE GIVEN IN SPACECRAFT COORDINATES.
016987,000173:                                                                                                  #  THE DIRECTION IN WHICH THIS AXIS IS TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN
016988,000174:                                                                                                  #  SUCCESSIVE LOCATIONS OF ERASABLE MEMORY BEGINNING WITH THE ADDRESS CALLED POINTVSM.  THE COMPONENTS OF THIS
016989,000175:                                                                                                  #  VECTOR ARE GIVEN IN STABLE MEMBER COORDINATES.  WITH THIS INFORMATION VECPOINT COMPUTES A SET OF THREE GIMBAL
016990,000176:                                                                                                  #  ANGLES (2S COMPLEMENT) CORRESPONDING TO THE CROSS-PRODUCT ROTATION BETWEEN SCAXIS AND POINTVSM AND STORES THEM
016991,000177:                                                                                                  #  IN T(MPAC) BEFORE RETURNING TO THE CALLER.
016992,000178: 
016993,000179:                                                                                                  #  THIS ROTATION, HOWEVER, MAY BRING THE S/C INTO GIMBAL LOCK.  WHEN POINTING A VECTOR IN THE Y-Z PLANE,
016994,000180:                                                                                                  #  THE TRANSPONDER AXIS, OR THE AOT FOR THE LEM, THE PROGRAM WILL CORRECT THIS PROBLEM BY ROTATING THE CROSS-
016995,000181:                                                                                                  #  PRODUCT ATTITUDE ABOUT POINTVSM BY A FIXED AMOUNT SUFFICIENT TO ROTATE THE DESIRED S/C ATTITUDE OUT OF GIMBAL
016996,000182:                                                                                                  #  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,
016997,000183:                                                                                                  #  THE ADDITIONAL ROTATION TO AVOID GIMAL LOCK IS 35 DEGREES.  IF THE AXIS IS MORE THAN 60.5 DEGEES FROM +X (OR -X)
016998,000184:                                                                                                  #  THE ADDITIONAL ROTATION IS 35 DEGREES.  THE GIMBAL ANGLES CORRESPONDING TO THIS ATTITUDE ARE THEN COMPUTED AND
016999,000185:                                                                                                  #  STORED AS 2S COMPLIMENT ANGLES IN T(MPAC) BEFORE RETURNING TO THE CALLER.
017000,000186: 
017001,000187:                                                                                                  #  WHEN POINTING THE X-AXIS, OR THE THRUST VECTOR, OR ANY VECTOR WITHIN 40.6 DEG OF THE X-AXIS, VECPOINT
017002,000188:                                                                                                  #  CANNOT CORRECT FOR A CROSS-PRODUCT ROTATION INTO GIMBAL LOCK.  IN THIS CASE A PLATFORM REALIGNMENT WOULD BE
017003,000189:                                                                                                  #  REQUIRED TO POINT THE VECTOR IN THE DESIRED DIRECTION.  AT PRESENT NO INDICATION IS GIVEN FOR THIS SITUATION
017004,000190:                                                                                                  #  EXCEPT THAT THE FINAL MIDDLE GIMBAL ANGLE IN MPAC +2 IS GREATER THAN 59 DEGREES.
017005,000191: 
017006,000192:                                                                                                  #  CALLING SEQUENCE -
017007,000193: 
017008,000194:                                                                                                  #        1)      LOAD SCAXIS, POINTVSM
017009,000195:                                                                                                  #        2)      CALL
017010,000196:                                                                                                  #                        VECPOINT
017011,000197: 
017012,000198:                                                                                                  #  RETURNS WITH
017013,000199: 
017014,000200:                                                                                                  #        1)      DESIRED OUTER GIMBAL ANGLE IN MPAC
017015,000201:                                                                                                  #        2)      DESIRED INNER GIMBAL ANGLE IN MPAC +1
017016,000202:                                                                                                  #        3)      DESIRED MIDDLE GIMBAL ANGLE IN MPAC +2
017017,000203: 
017018,000204:                                                                                                  #  ERASABLES USED -
017019,000205: 
017020,000206:                                                                                                  #        1)      SCAXIS          6
017021,000207:                                                                                                  #        2)      POINTVSM        6
017022,000208:                                                                                                  #        3)      MIS             18
017023,000209:                                                                                                  #        4)      DEL             18
017024,000210:                                                                                                  #        5)      COF             6
017025,000211:                                                                                                  #        6)      VECQTEMP        1
017026,000212:                                                                                                  #        7)      ALL OF VAC AREA 43
017027,000213: 
017028,000214:                                                                                                  #                        TOTAL   99
017029,000215: 
017030,000216: 27,2000                                           SETLOC   VECPT                                 
017031,000217: 27,2000                                           BANK                                           

Page 387

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

Page 388

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

Page 389

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

Page 390

017181,000367: 27,2327           00000                           OCT      00000                                 
017182,000368: 34,2002                                           BANK     34                                    
017183,000369: 27,2000                                           SETLOC   MANUVER                               
017184,000370: 27,2000                                           BANK                                           
017185,000371: 

Page 391

017187,000373:                                                                                                  #  ROUTINE FOR INITIATING AUTOMATIC MANEUVER VIA KEYBOARD (V49)
017188,000374: 
017189,000375: 27,2330     1155                                  EBANK=   CPHI                                  
017190,000376: 
017191,000377: 27,2330                                           COUNT    27/R62                                
017192,000378: 
017193,000379: 27,2330           34745        R62DISP            CAF      V06N22                                #  DISPLAY COMMAND ICDUS CPHI, CTHETA, CPHI
017194,000380: 27,2331           04555                           TC       BANKCALL                              
017195,000381: 27,2332           20624                           CADR     GOFLASH                               
017196,000382: 27,2333           15423                           TCF      ENDEXT                                
017197,000383: 27,2334           12336                           TCF      GOMOVE                                #  PROCEED
017198,000384: 27,2335           12330                           TCF      R62DISP                               #  ENTER
017199,000385: 
017200,000386:                                                                                                  #  ASTRONAUT MAY LOAD NEW ICDUS AT THIS
017201,000387:                                                                                                  #  POINT
017202,000388: 27,2336           05435        GOMOVE             TC       UPFLAG                                #  SET 3-AXIS FLAG
017203,000389: 27,2337           00124                           ADRES    3AXISFLG                              #  BIT 6 FLAG 5
017204,000390: 
017205,000391: 27,2340           04555                           TC       BANKCALL                              
017206,000392: 27,2341           56000                           CADR     R60CSM                                
017207,000393: 27,2342           15423                           TCF      ENDEXT                                
017208,000394: 

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