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.

012228,000002:                                                                                                  ## Copyright:   Public domain.
012229,000003:                                                                                                  ## Filename:    CSM_GEOMETRY.agc
012230,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus, build 249.
012231,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
012232,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 9.
012233,000007:                                                                                                  ## Assembler:   yaYUL
012234,000008:                                                                                                  ## Reference:   pp. 280-291.
012235,000009:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
012236,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo.
012237,000011:                                                                                                  ## Mod history: 08/08/04 RSB.   Began transcribing.
012238,000012:                                                                                                  ##              2017-01-05 RSB  Page numbers now agree with those on the
012239,000013:                                                                                                  ##                              original harcopy, as opposed to the PDF page
012240,000014:                                                                                                  ##                              numbers in 1701.pdf.
012241,000015:                                                                                                  ##              2017-01-07 RSB  Cross-diff'd comment text (not whitespace)
012242,000016:                                                                                                  ##                              vs the already-proofed corresponding Colossus
012243,000017:                                                                                                  ##                              237 and Comanche 55 source-code files
012244,000018:                                                                                                  ##                              and corrected errors found.
012245,000019:                                                                                                  ##              2017-01-28 RSB  WTIH -> WITH.
012246,000020:                                                                                                  ##
012247,000021:                                                                                                  ## The contents of the "Colossus249" files, in general, are transcribed 
012248,000022:                                                                                                  ## from a scanned copy of the program listing.  Notations on this
012249,000023:                                                                                                  ## document read, in part:
012250,000024:                                                                                                  ##
012251,000025:                                                                                                  ##      Assemble revision 249 of AGC program Colossus by NASA
012252,000026:                                                                                                  ##      2021111-041.  October 28, 1968.  
012253,000027:                                                                                                  ##
012254,000028:                                                                                                  ##      This AGC program shall also be referred to as
012255,000029:                                                                                                  ##                              Colossus 1A
012256,000030:                                                                                                  ##
012257,000031:                                                                                                  ##      Prepared by
012258,000032:                                                                                                  ##                      Massachusetts Institute of Technology
012259,000033:                                                                                                  ##                      75 Cambridge Parkway
012260,000034:                                                                                                  ##                      Cambridge, Massachusetts
012261,000035:                                                                                                  ##      under NASA contract NAS 9-4065.
012262,000036:                                                                                                  ##
012263,000037:                                                                                                  ## Refer directly to the online document mentioned above for further information.
012264,000038:                                                                                                  ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
012265,000039:                                                                                                  ##
012266,000040:                                                                                                  ## In some cases, where the source code for Luminary 131 overlaps that of 
012267,000041:                                                                                                  ## Colossus 249, this code is instead copied from the corresponding Luminary 131
012268,000042:                                                                                                  ## source file, and then is proofed to incorporate any changes.
012269,000043: 

Page 280

012271,000045: 22,2000                                           BANK     22                                    
012272,000046: 23,2000                                           SETLOC   COMGEOM1                              
012273,000047: 23,2000                                           BANK                                           
012274,000048: 
012275,000049:                                                                                                  #  THIS ROUTINE TAKES THE SHAFT AND TRUNNION ANGLES AS READ BY THE CM OPTICAL SYSTEM AND CONVERTS THEM INTO A UNIT
012276,000050:                                                                                                  #  VECTOR REFERENCED TO THE NAVIGATION BASE COORDINATE SYSTEM AND COINCIDENT WITH THE SEXTANT LINE OF SIGHT.
012277,000051: 
012278,000052:                                                                                                  #  THE INPUTS ARE  1) THE SEXTANT SHAFT AND TRUNNION ANGLES ARE STORED SP IN LOCATIONS 3 AND 5 RESPECTIVELY OF THE
012279,000053:                                                                                                  #  MARK VAC AREA.  2) THE COMPLEMENT OF THE BASE ADDRESS OF THE MARK VAC AREA IS STORED SP AT LOCATION X1 OF YOUR
012280,000054:                                                                                                  #  JOB VAC AREA.
012281,000055: 
012282,000056:                                                                                                  #  THE OUTPUT IS A HALF-UNIT VECTOR IN NAVIGATION BASE COORDINATES AND STORED AT LOCATION 32D OF THE VAC AREA. THE
012283,000057:                                                                                                  #  OUTPUT IS ALSO AVAILABLE AT MPAC.
012284,000058: 
012285,000059: 23,2000                                           COUNT    23/GEOM                               
012286,000060: 
012287,000061: 23,2000           47133        SXTNB              SLOAD*   RTB                                   #  PUSHDOWN 00,02,04,(17D-19D),32D-36D
012288,000062: 23,2001           00006                                    5,1                                   #  TRUNNION = TA
012289,000063: 23,2002           45510                                    CDULOGIC                              
012290,000064: 23,2003           41434                           RTB      PUSH                                  
012291,000065: 23,2004           46027                                    SXTLOGIC                              
012292,000066: 23,2005           72556                           SIN      SL1                                   
012293,000067: 23,2006           66606                           PUSH     SLOAD*                                #  PD2 = SIN(TA)
012294,000068: 23,2007           00004                                    3,1                                   #  SHAFT = SA
012295,000069: 23,2010           41434                           RTB      PUSH                                  #  PD4 = SA
012296,000070: 23,2011           45510                                    CDULOGIC                              
012297,000071: 
012298,000072: 23,2012           41346                           COS      DMP                                   
012299,000073: 23,2013           00003                                    2                                     
012300,000074: 23,2014           14041                           STODL    STARM                                 #  COS(SA)SIN(TA)
012301,000075: 
012302,000076: 23,2015           41356                           SIN      DMP                                   
012303,000077: 23,2016           77626                           STADR                                          
012304,000078: 23,2017           63734                           STODL    STARM      +2                         #  SIN(SA)SIN(TA)
012305,000079: 
012306,000080: 23,2020           77746                           COS                                            
012307,000081: 23,2021           24045                           STOVL    STARM      +4                         
012308,000082: 23,2022           00041                                    STARM                                 #  STARM = 32D
012309,000083: 23,2023           76521                           MXV      VSL1                                  
012310,000084: 23,2024           06302                                    NB1NB2                                
012311,000085: 23,2025           00041                           STORE    32D                                   
012312,000086: 23,2026           77616                           RVQ                                            
012313,000087: 23,2027           32323        SXTLOGIC           CAF      10DEGS-                               #  CORRECT FOR 19.775 DEGREE OFFSET
012314,000088: 23,2030           26154                           ADS      MPAC                                  
012315,000089: 23,2031           34676                           CAF      QUARTER                               
012316,000090: 23,2032           07256                           TC       SHORTMP                               
012317,000091: 23,2033           06030                           TC       DANZIG                                
012318,000092: 

Page 281

012320,000094:                                                                                                  #  CALCSXA COMPUTES THE SEXTANT SHAFT AND TRUNNION ANGLES REQUIRED TO POSITION THE OPTICS SUCH THAT A STAR LINE-
012321,000095:                                                                                                  #  OF-SIGHT LIES ALONG THE STAR VECTOR.  THE ROUTINE TAKES THE GIVEN STAR VECTOR AND EXPRESSES IT AS A VECTOR REF-
012322,000096:                                                                                                  #  ERENCED TO THE OPTICS COORDINATE SYSTEM.  IN ADDITION IT SETS UP THREE UNIT VECTORS DEFINING THE X, Y, AND Z AXES
012323,000097:                                                                                                  #  REFERENCED TO THE OPTICS COORDINATE SYSTEM.
012324,000098: 
012325,000099:                                                                                                  #  THE INPUTS ARE  1) THE STAR VECTOR REFERRED TO PRESENT STABLE MEMBER COORDINATES STORED AT STAR.  2) SAME ANGLE
012326,000100:                                                                                                  #  INPUT AS *SMNB*, I.E. SINES AND COSINES OF THE CDU ANGLES, IN THE ORDER Y Z X, AT SINCDU AND COSCDU.  A CALL
012327,000101:                                                                                                  #  TO CDUTRIG WILL PROVIDE THIS INPUT.
012328,000102: 
012329,000103:                                                                                                  #  THE OUTPUTS ARE THE SEXTANT SHAFT AND TRUNNION ANGLES STORED DP AT SAC AND PAC RESPECTIVELY.  (LOW ORDER PART
012330,000104:                                                                                                  #  EQUAL TO ZERO).
012331,000105: 
012332,000106: 23,2034           77220        CALCSXA            ITA      VLOAD                                 #  PUSHDOWN 00-26D, 28D, 30D, 32D-36D
012333,000107: 23,2035           00034                                    28D                                   
012334,000108: 23,2036           02766                                    STAR                                  
012335,000109: 23,2037           77624                           CALL                                           
012336,000110: 23,2040           47577                                    *SMNB*                                
012337,000111: 23,2041           76521                           MXV      VSL1                                  
012338,000112: 23,2042           06260                                    NB2NB1                                
012339,000113: 23,2043           26766                           STOVL    STAR                                  
012340,000114: 23,2044           15330                                    HIUNITX                               
012341,000115: 23,2045           26555                           STOVL    XNB1                                  
012342,000116: 23,2046           15326                                    HIUNITY                               
012343,000117: 23,2047           26563                           STOVL    YNB1                                  
012344,000118: 23,2050           15324                                    HIUNITZ                               
012345,000119: 23,2051           36571                           STCALL   ZNB1                                  
012346,000120: 23,2052           46076                                    SXTANG1                               
012347,000121: 

Page 282

012349,000123:                                                                                                  #  SXTANG COMPUTES THE SEXTANT SHAFT AND TRUNNION ANGLES REQUIRED TO POSITION THE OPTICS SUCH THAT A STAR LINE-OF-
012350,000124:                                                                                                  #  SIGHT LIES ALONG THE STAR VECTOR.
012351,000125: 
012352,000126:                                                                                                  #  THE INPUTS ARE  1) THE STAR VECTOR REFERRED TO ANY COORDINATE SYSTEM STORED AT STAR.  2) THE NAVIGATION BASE
012353,000127:                                                                                                  #  COORDINATES REFERRED TO THE SAME COORDINATE SYSTEM.  THESE THREE HALF-UNIT VECTORS ARE STORED AT XNB, YNB,AND
012354,000128:                                                                                                  #  ZNB.
012355,000129: 
012356,000130:                                                                                                  #  THE OUTPUTS ARE THE SEXTANT SHAFT AND TRUNNION ANGLES STORED DP AT SAC AND PAC RESPECTIVELY.  (LOW ORDER PART
012357,000131:                                                                                                  #  EQUAL TO ZERO).
012358,000132: 
012359,000133: 23,2053           47020        SXTANG             ITA      RTB                                   #  PUSHDOWN 16D,18D,22D-26D,28D
012360,000134: 23,2054           00034                                    28D                                   
012361,000135: 23,2055           45657                                    TRANSP1                               #  EREF WRT NB2
012362,000136: 23,2056           64375                           VLOAD    MXV                                   
012363,000137: 23,2057           02714                                    XNB                                   
012364,000138: 23,2060           06260                                    NB2NB1                                
012365,000139: 23,2061           77772                           VSL1                                           
012366,000140: 23,2062           26555                           STOVL    XNB1                                  
012367,000141: 23,2063           02722                                    YNB                                   
012368,000142: 23,2064           76521                           MXV      VSL1                                  
012369,000143: 23,2065           06260                                    NB2NB1                                
012370,000144: 23,2066           26563                           STOVL    YNB1                                  
012371,000145: 23,2067           02730                                    ZNB                                   
012372,000146: 23,2070           76521                           MXV      VSL1                                  
012373,000147: 23,2071           06260                                    NB2NB1                                
012374,000148: 23,2072           02571                           STORE    ZNB1                                  
012375,000149: 
012376,000150: 23,2073           47034                           RTB      RTB                                   
012377,000151: 23,2074           45657                                    TRANSP1                               
012378,000152: 23,2075           45673                                    TRANSP2                               
012379,000153: 
012380,000154: 23,2076           47375        SXTANG1            VLOAD    VXV                                   
012381,000155: 23,2077           02571                                    ZNB1                                  
012382,000156: 23,2100           02766                                    STAR                                  
012383,000157: 23,2101           77600                           BOV                                            
012384,000158: 23,2102           46103                                    +1                                    
012385,000159: 23,2103           40056                           UNIT     BOV                                   
012386,000160: 23,2104           46145                                    ZNB=S1                                
012387,000161: 23,2105           00027                           STORE    PDA                                   #  PDA = UNIT(ZNB X S)
012388,000162: 
012389,000163: 23,2106           57441                           DOT      DCOMP                                 
012390,000164: 23,2107           02555                                    XNB1                                  
012391,000165: 23,2110           24023                           STOVL    SINTH                                 #  SIN(SA) = PDA . -XNB
012392,000166: 23,2111           00027                                    PDA                                   
012393,000167: 
012394,000168: 23,2112           77641                           DOT                                            
012395,000169: 23,2113           02563                                    YNB1                                  
012396,000170: 23,2114           34021                           STCALL   COSTH                                 #  COS(SA) = PDA . YNB
012397,000171: 23,2115           47211                                    ARCTRIG                               

Page 283

012399,000173: 23,2116           77634                           RTB                                            
012400,000174: 23,2117           45543                                    1STO2S                                
012401,000175: 23,2120           26774                           STOVL    SAC                                   
012402,000176: 23,2121           02766                                    STAR                                  
012403,000177: 23,2122           77600                           BOV                                            
012404,000178: 23,2123           46124                                    +1                                    
012405,000179: 23,2124           72441                           DOT      SL1                                   
012406,000180: 23,2125           02571                                    ZNB1                                  
012407,000181: 23,2126           77726                           ACOS                                           
012408,000182: 23,2127           62440                           BMN      SL2                                   
012409,000183: 23,2130           46142                                    SXTALARM                              #  TRUNNION ANGLE NEGATIVE
012410,000184: 23,2131           45200                           BOV      DSU                                   
012411,000185: 23,2132           46142                                    SXTALARM                              #  TRUNNION ANGLE GREATER THAN 90 DEGREES
012412,000186: 23,2133           06331                                    20DEG-                                
012413,000187: 23,2134           77634                           RTB                                            
012414,000188: 23,2135           45543                                    1STO2S                                
012415,000189: 23,2136           02776                           STORE    PAC                                   #  FOR FLIGHT USE, CULTFLAG IS ON IF
012416,000190: 23,2137           77614                           CLRGO                                          #  TRUNION IS GREATER THAN 90 DEG
012417,000191: 23,2140           01630                                    CULTFLAG                              
012418,000192: 23,2141           00034                                    28D                                   
012419,000193: 23,2142           77614        SXTALARM           SETGO                                          #  ALARM HAS BEEN REMOVED FROM THIS
012420,000194: 23,2143           01430                                    CULTFLAG                              
012421,000195: 23,2144           00034                                    28D                                   #  SUBROUTINE, ALARM WILL BE SET BY MPI
012422,000196: 23,2145           77745        ZNB=S1             DLOAD                                          
012423,000197: 23,2146           06325                                    270DEG                                
012424,000198: 23,2147           16774                           STODL    SAC                                   
012425,000199: 23,2150           06327                                    20DEGS-                               
012426,000200: 23,2151           02776                           STORE    PAC                                   
012427,000201: 23,2152           77614                           CLRGO                                          
012428,000202: 23,2153           01630                                    CULTFLAG                              
012429,000203: 23,2154           00034                                    28D                                   
012430,000204: 

Page 284

012432,000206:                                                                                                  #  THESE TWO ROUTINES COMPUTE THE ACTUAL STATE VECTOR FOR LM, CSM BY ADDING
012433,000207:                                                                                                  #  THE CONIC R,V AND THE DEVIATIONS R,V.  THE STATE VECTORS ARE CONVERTED TO
012434,000208:                                                                                                  #  METERS B-29 AND METERS/CSEC B-7 AND STORED APPROPRIATELY IN RN,VN OR
012435,000209:                                                                                                  #  R-OTHER, V-OTHER FOR DOWNLINK.  THE ROUTINES NAMES ARE SWITCHED IN THE
012436,000210:                                                                                                  #  OTHER VEHICLES COMPUTER.
012437,000211: 
012438,000212:                                                                                                  #  INPUT
012439,000213:                                                                                                  #        STATE VECTOR IN TEMPORARY STORAGE AREA
012440,000214:                                                                                                  #        IF STATE VECTOR IS SCALED POS B27 AND VEL B5
012441,000215:                                                                                                  #                SET X2 TO +2
012442,000216:                                                                                                  #        IF STATE VECTOR IS SCALED POS B29 AND VEL B7
012443,000217:                                                                                                  #                SET X2 TO 0
012444,000218: 
012445,000219:                                                                                                  #  OUTPUT
012446,000220:                                                                                                  #        R(T) IN RN, V(T) IN VN, T IN PIPTIME
012447,000221:                                                                                                  #                OR
012448,000222:                                                                                                  #        R(T) IN R-OTHER, V(T) IN V-OTHER        (T IS DEFINED BY T-OTHER)
012449,000223: 
012450,000224: 23,2155                                           BANK     23                                    
012451,000225: 10,2000                                           SETLOC   COMGEOM2                              
012452,000226: 10,2000                                           BANK                                           
012453,000227: 10,2237                                           COUNT    10/GEOM                               
012454,000228: 10,2237           43414        SVDWN1             BOF      RVQ                                   #  SW=1=AVETOMID DOING W-MATRIX INTEG
012455,000229: 10,2240           04756                                    AVEMIDSW                              
012456,000230: 10,2241           20242                                    +1                                    
012457,000231: 10,2242           53775                           VLOAD    VSL*                                  
012458,000232: 10,2243           01521                                    TDELTAV                               
012459,000233: 10,2244           57605                                    0          -7,2                       
012460,000234: 10,2245           53655                           VAD      VSL*                                  
012461,000235: 10,2246           01535                                    RCV                                   
012462,000236: 10,2247           57576                                    0,2                                   
012463,000237: 10,2250           25171                           STOVL    RN                                    
012464,000238: 10,2251           01527                                    TNUV                                  
012465,000239: 10,2252           53257                           VSL*     VAD                                   
012466,000240: 10,2253           57602                                    0          -4,2                       
012467,000241: 10,2254           01543                                    VCV                                   
012468,000242: 10,2255           77657                           VSL*                                           
012469,000243: 10,2256           57576                                    0,2                                   
012470,000244: 10,2257           15177                           STODL    VN                                    
012471,000245: 10,2260           01517                                    TET                                   
012472,000246: 10,2261           01205                           STORE    PIPTIME                               
012473,000247: 10,2262           77616                           RVQ                                            
012474,000248: 10,2263           53775        SVDWN2             VLOAD    VSL*                                  
012475,000249: 10,2264           01521                                    TDELTAV                               
012476,000250: 10,2265           57605                                    0          -7,2                       
012477,000251: 10,2266           53655                           VAD      VSL*                                  
012478,000252: 10,2267           01535                                    RCV                                   

Page 285

012480,000254: 10,2270           57576                                    0,2                                   
012481,000255: 10,2271           25722                           STOVL    R-OTHER                               
012482,000256: 10,2272           01527                                    TNUV                                  
012483,000257: 10,2273           53257                           VSL*     VAD                                   
012484,000258: 10,2274           57602                                    0          -4,2                       
012485,000259: 10,2275           01543                                    VCV                                   
012486,000260: 10,2276           77657                           VSL*                                           
012487,000261: 10,2277           57576                                    0,2                                   
012488,000262: 10,2300           01730                           STORE    V-OTHER                               
012489,000263: 10,2301           77616                           RVQ                                            
012490,000264: 

Page 286

012492,000266:                                                                                                  #  SUBROUTINE TO COMPUTE THE NATURAL LOG OF C(MPAC, MPAC +1).
012493,000267: 
012494,000268:                                                                                                  #        ENTRY:  CALL
012495,000269:                                                                                                  #                        LOG
012496,000270: 
012497,000271:                                                                                                  #  SUBROUTINE RETURNS WITH -LOG IN DP MPAC.
012498,000272: 
012499,000273:                                                                                                  #  EBANK IS ARBITRARY..
012500,000274: 
012501,000275: 14,2000                                           BANK     14                                    
012502,000276: 23,2000                                           SETLOC   POWFLIT2                              
012503,000277: 23,2000                                           BANK                                           
012504,000278: 23,2155                                           COUNT    23/GEOM                               
012505,000279: 
012506,000280: 23,2155           44301        LOG                NORM     BDSU                                  #  GENERATES LOG BY SHIFTING ARG
012507,000281: 23,2156           00160                                    MPAC       +3                         #  UNTIL IT LIES BETWEEN .5 AND 1.
012508,000282: 23,2157           06212                                    NEARLY1                               #  THE LOG OF THIS PART IS FOUND AND THE
012509,000283: 23,2160           77776                           EXIT                                           #  LOG OF THE SHIFTED PART IS COMPUTED
012510,000284: 23,2161           07171                           TC       POLY                                  #  AND ADDED IN.  SHIFT COUNT STORED
012511,000285: 23,2162           00002                           DEC      2          B-14                       #  (N-1, SUPPLIED BY SMERZH)
012512,000286: 23,2163           00000 00000                     2DEC     0          B-28                       #  IN MPAC +3.
012513,000287: 23,2165           01001 14636                     2DEC     .031335467                            
012514,000288: 23,2167           00325 07310                     2DEC     .0130145859                            
012515,000289: 23,2171           00541 16735                     2DEC     .0215738898                            
012516,000290: 
012517,000291: 23,2173           34714                           CAF      ZERO                                  
012518,000292: 23,2174           54156                           TS       MPAC       +2                         
012519,000293: 23,2175           00006                           EXTEND                                         
012520,000294: 23,2176           32214                           DCA      CLOG2/32                              
012521,000295: 23,2177           52155                           DXCH     MPAC                                  
012522,000296: 23,2200           52160                           DXCH     MPAC       +3                         
012523,000297: 23,2201           40000                           COM                                            #  LOAD POSITIVE SHIFT COUNT IN A.
012524,000298: 23,2202           07256                           TC       SHORTMP                               #  MULTIPLY BY SHIFT COUNT.
012525,000299: 
012526,000300: 23,2203           52156                           DXCH     MPAC       +1                         
012527,000301: 23,2204           52155                           DXCH     MPAC                                  
012528,000302: 23,2205           52160                           DXCH     MPAC       +3                         
012529,000303: 23,2206           20155                           DAS      MPAC                                  
012530,000304: 23,2207           06006                           TC       INTPRET                               #  RESULT IN MPAC, MPAC +1
012531,000305: 
012532,000306: 23,2210           77616                           RVQ                                            
012533,000307: 
012534,000308: 23,2211           37777 37777  NEARLY1            2DEC     .999999999                            
012535,000309: 

Page 287

012537,000311: 23,2213           00542 34414  CLOG2/32           2DEC     .0216608494                            
012538,000312: 

Page 288

012540,000314:                                                                                                  #  SUBROUTINE NAME:  EARTH ROTATOR       (EARROT1 OR EARROT2)            DATE:  15 FEB 67
012541,000315:                                                                                                  #  MOD NO:  N +1                                                         LOG SECTION:  POWERED FLIGHT SUBROS
012542,000316:                                                                                                  #  MOD BY:  ENTRY GROUP (BAIRNSFATHER)
012543,000317: 
012544,000318:                                                                                                  #  FUNCTIONAL DESCRIPTION:  THIS ROUTINE PROJECTS THE INITIAL EARTH TARGET VECTOR RTINIT AHEAD THROUGH
012545,000319:                                                                                                  #        THE ESTIMATED TIME OF FLIGHT.  INITIAL CALL RESOLVES THE INITIAL TARGET VECTOR RTINIT INTO EASTERLY
012546,000320:                                                                                                  #        AND NORMAL COMPONENTS RTEAST AND RTNORM.  INITIAL AND SUBSEQUENT CALLS ROTATE THIS VECTOR
012547,000321:                                                                                                  #        ABOUT THE (FULL) UNIT POLAR AXIS UNITW THROUGH THE ANGLE  WIE DTEAROT  TO OBTAIN THE ROTATED
012548,000322:                                                                                                  #        TARGET VECTOR RT.  ALL VECTORS EXCEPT UNITW ARE HALF UNIT.
012549,000323:                                                                                                  #        THE EQUATIONS ARE
012550,000324:                                                                                                  #                -    -        -                      -
012551,000325:                                                                                                  #                RT = RTINIT + RTNORM (COS(WT) - 1) + RTEAST SIN(WT)
012552,000326: 
012553,000327:                                                                                                  #        WHERE   WT = WIE DTEAROT
012554,000328: 
012555,000329:                                                                                                  #                RTINIT = INITIAL TARGET VECTOR
012556,000330:                                                                                                  #                -        -       -
012557,000331:                                                                                                  #                RTEAST = UNITW * RTINIT
012558,000332:                                                                                                  #                -        -        -
012559,000333:                                                                                                  #                RTNORM = RTEAST * UNITW
012560,000334: 
012561,000335:                                                                                                  #        FOR CONTINUOUS UPDATING, ONLY ONE ENTRY TO EARROT1 IS REQUIRED, WITH SUBSEQUENT ENTRIES AT EARROT2.
012562,000336:                                                                                                  #        
012563,000337:                                                                                                  #  CALLING SEQUENCE:     FIRST CALL                      SUBSEQUENT CALL
012564,000338:                                                                                                  #                        STCALL  DTEAROT                 STCALL  DTEAROT
012565,000339:                                                                                                  #                                EARROT1                         EARROT2
012566,000340:                                                                                                  #                        C(MPAC) UNSPECIFIED             C(MPAC) = DTEAROT
012567,000341:                                                                                                  #        PUSHLOC = PDL+0, ARBITRARY.  6 LOCATIONS USED.
012568,000342: 
012569,000343:                                                                                                  #  SUBROUTINES USED:  NONE
012570,000344: 
012571,000345:                                                                                                  #  NORMAL EXIT MODES:  RVQ
012572,000346: 
012573,000347:                                                                                                  #  ALARMS:  NONE
012574,000348: 
012575,000349:                                                                                                  #  OUTPUT:       RTEAST  (-1)            .5 UNIT VECTOR EAST, COMPNT OF RTINIT   LEFT BY FIRST CALL
012576,000350:                                                                                                  #                RTNORM  (-1)            .5 UNIT VECTOR NORML, COMPNT OF RTINIT  LEFT BY FIRST CALL
012577,000351:                                                                                                  #                RT      (-1)            .5 UNIT TARGET VECTOR, ROTATED          LEFT BY ALL CALLS
012578,000352:                                                                                                  #                DTEAROT (-28) CS        MAY BE CHANGED BY EARROT2, IF OVER 1 DAY
012579,000353: 
012580,000354:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
012581,000355:                                                                                                  #                UNITW   (0)             UNIT POLAR VECTOR                       PAD LOADED
012582,000356:                                                                                                  #                RTINIT  (-1)            .5 UNIT INITIAL TARGET VECTOR           LEFT BY ENTRY
012583,000357:                                                                                                  #                DTEAROT (-28) CS        TIME OF FLIGHT                          LEFT BY CALLER
012584,000358: 
012585,000359:                                                                                                  #  DEBRIS:  QPRET, PDL+0 ... PDL+5

Page 289

012587,000361: 23,2215  E7,1451                                  EBANK=   RTINIT                                
012588,000362: 
012589,000363: 23,2215           47375        EARROT1            VLOAD    VXV                                   
012590,000364: 23,2216           01714                                    UNITW                                 #  FULL UNIT VECTOR
012591,000365: 23,2217           03452                                    RTINIT                                #  .5 UNIT
012592,000366: 23,2220           03460                           STORE    RTEAST                                #  .5 UNIT
012593,000367: 
012594,000368: 23,2221           77635                           VXV                                            
012595,000369: 23,2222           01714                                    UNITW                                 #  FULL UNIT
012596,000370: 23,2223           17466                           STODL    RTNORM                                #  .5 UNIT
012597,000371: 23,2224           03606                                    DTEAROT                               #  (-28) CS
012598,000372: 
012599,000373: 23,2225           56204        EARROT2            BOVB     DDV                                   
012600,000374: 23,2226           57343                                    TCDANZIG                              #  RESET OVFIND, IF ON
012601,000375: 23,2227           06256                                    1/WIE                                 
012602,000376: 23,2230           41400                           BOV      PUSH                                  
012603,000377: 23,2231           46245                                    OVERADAY                              
012604,000378: 23,2232           45346                           COS      DSU                                   
012605,000379: 23,2233           15330                                    HIDPHALF                              
012606,000380: 23,2234           65361                           VXSC     PDDL                                  #  XCH W PUSH LIST
012607,000381: 23,2235           03466                                    RTNORM                                #  .5 UNIT
012608,000382: 23,2236           74356                           SIN      VXSC                                  
012609,000383: 23,2237           03460                                    RTEAST                                #  .5 UNIT
012610,000384: 23,2240           76455                           VAD      VSL1                                  
012611,000385: 23,2241           53455                           VAD      UNIT                                  #  INSURE THAT RT IS 'UNIT'.
012612,000386: 23,2242           03452                                    RTINIT                                #  .5 UNIT
012613,000387: 23,2243           03474                           STORE    RT                                    #  .5 UNIT TARGET VECTOR
012614,000388: 
012615,000389: 23,2244           77616                           RVQ                                            
012616,000390: 
012617,000391: 23,2245           75345        OVERADAY           DLOAD    SIGN                                  
012618,000392: 23,2246           06256                                    1/WIE                                 
012619,000393: 23,2247           03606                                    DTEAROT                               
012620,000394: 23,2250           77621                           BDSU                                           
012621,000395: 23,2251           03606                                    DTEAROT                               
012622,000396: 23,2252           03606                           STORE    DTEAROT                               
012623,000397: 
012624,000398: 23,2253           77650                           GOTO                                           
012625,000399: 23,2254           46225                                    EARROT2                               
012626,000400: 
012627,000401:                                                                                                  # WIE            2DEC    .1901487997
012628,000402: 23,2255           01015 34732  1/WIE              2DEC     8616410    B-28                       
012629,000403: 23,2257           15373 11346  NB2NB1             2DEC     +.8431756920 B-1                        
012630,000404: 23,2261           00000 00000                     2DEC     0          B-28                       
012631,000405: 23,2263           67313 65307                     2DEC     -.5376381241 B-1                        

Page 290

012633,000407: 23,2265           00000 00000  ZERINFLT           2DEC     0          B-28                       
012634,000408: 23,2267           20000 00000  HALFNFLT           2DEC     .5                                    
012635,000409: 23,2271           00000 00000                     2DEC     0          B-28                       
012636,000410: 23,2273           10464 12470                     2DEC     +.5376381241 B-1                        
012637,000411: 23,2275           00000 00000                     2DEC     0          B-28                       
012638,000412: 23,2277           15373 11346                     2DEC     +.8431756920 B-1                        
012639,000413: 23,2301           15373 11346  NB1NB2             2DEC     +.8431756920 B-1                        
012640,000414: 23,2303           00000 00000                     2DEC     0          B-28                       
012641,000415: 23,2305           10464 12470                     2DEC     +.5376381241 B-1                        
012642,000416: 23,2307           00000 00000                     2DEC     0          B-28                       
012643,000417: 23,2311           20000 00000                     2DEC     .5                                    
012644,000418: 23,2313           00000 00000                     2DEC     0          B-28                       
012645,000419: 23,2315           67313 65307                     2DEC     -.5376381241 B-1                        
012646,000420: 23,2317           00000 00000                     2DEC     0          B-28                       
012647,000421: 23,2321           15373 11346                     2DEC     +.8431756920 B-1                        

Page 291

012649,000423: 23,2323           07020        10DEGS-            DEC      3600       B-14                       
012650,000424: 23,2324           60000        270DEG             OCT      60000                                 #  SHAFT 270 DEGREES     2S COMP.
012651,000425: 23,2325           00000                           OCT      00000                                 
012652,000426: 23,2326           61740        20DEGS-            DEC      -07199     B-14                       
012653,000427: 23,2327           77777                           DEC      -00000     B-14                       
012654,000428: 23,2330           07020        20DEG-             DEC      03600      B-14                       
012655,000429: 23,2331           00000                           DEC      00000      B-14                       
012656,000430: 

End of include-file CSM_GEOMETRY.agc.  Parent file is MAIN.agc