Source Code

These source-code files are part of a reconstructed copy of Luminary 97, the second release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software. It was created to fix two incorrect ephemeris constants in Luminary 96, as described by anomaly report LNY-59.

The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memos 83 and 85, using asterisks indicating changed lines in the listing as a guide. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 97 listing.

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

039840,000002:                                                                                                  ## Copyright:   Public domain.
039841,000003:                                                                                                  ## Filename:    P51-P53.agc
039842,000004:                                                                                                  ## Purpose:     A section of Luminary revision 97.
039843,000005:                                                                                                  ##              It is part of the reconstructed source code for the
039844,000006:                                                                                                  ##              second release of the flight software for the Lunar 
039845,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
039846,000008:                                                                                                  ##              It was created to fix two incorrect ephemeris constants in
039847,000009:                                                                                                  ##              Luminary 96, as described by anomaly report LNY-59.
039848,000010:                                                                                                  ##              The code has been recreated from a copy of Luminary 99
039849,000011:                                                                                                  ##              revision 001, using asterisks indicating changed lines in
039850,000012:                                                                                                  ##              the listing and Luminary Memos #83 and #85, which list 
039851,000013:                                                                                                  ##              changes between Luminary 97 and 98, and 98 and 99. The
039852,000014:                                                                                                  ##              code has been adapted such that the resulting bugger words
039853,000015:                                                                                                  ##              exactly match those specified for Luminary 97 in NASA drawing
039854,000016:                                                                                                  ##              2021152D, which gives relatively high confidence that the
039855,000017:                                                                                                  ##              reconstruction is correct.
039856,000018:                                                                                                  ## Reference:   pp. 926-983
039857,000019:                                                                                                  ## Assembler:   yaYUL
039858,000020:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
039859,000021:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
039860,000022:                                                                                                  ## Mod history: 2019-07-28 MAS  Created from Luminary 99.
039861,000023: 

Page 926

039863,000025:                                                                                                  #  PROGRAM NAME - PROG52                 DATE - JAN 9, 1967
039864,000026:                                                                                                  #  MOD NO - 0                                    LOG SECTION - P51-P53
039865,000027:                                                                                                  #  MODIFICATION BY - LONSKE                      ASSEMBLY - SUNDANCE REV 46
039866,000028: 
039867,000029:                                                                                                  #  FUNCTIONAL DESCRIPTION -
039868,000030: 
039869,000031:                                                                                                  #        ALIGNS THE IMU TO ONE OF THREE ORIENTATIONS SELECTED BY THE ASTRONAUT.  THE PRESENT IMU ORIENTATION IS KNOWN
039870,000032:                                                                                                  #        AND IS STORED IN REFSMMAT.  THE THREE POSSIBLE ORIENTATIONS MAY BE_
039871,000033: 
039872,000034:                                                                                                  #        (A)     PREFERRED ORIENTATION
039873,000035: 
039874,000036:                                                                                                  #                AN OPTIMUM ORIENTATION FOR A PREVIOUSLY CALCULATED MANUEVER.  THIS ORIENTATION MUST BE CALCULATED AND
039875,000037:                                                                                                  #                STORED BY A PREVIOUSLY SELECTED PROGRAM.
039876,000038: 
039877,000039:                                                                                                  #        (B)     NOMINAL ORIENTATION
039878,000040: 
039879,000041:                                                                                                  #                X   = UNIT ( R )
039880,000042:                                                                                                  #                -SM
039881,000043: 
039882,000044:                                                                                                  #                Y   = UNIT (V X R)
039883,000045:                                                                                                  #                 SM
039884,000046: 
039885,000047:                                                                                                  #                Z   = UNIT (X   X Y  )
039886,000048:                                                                                                  #                 SM          SM    SM
039887,000049: 
039888,000050:                                                                                                  #                WHERE_
039889,000051: 
039890,000052:                                                                                                  #                R = THE GEOCENTRIC RADIUS VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
039891,000053:                                                                                                  #                -
039892,000054: 
039893,000055:                                                                                                  #                V = THE INERTIAL VELOCITY VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
039894,000056:                                                                                                  #                -
039895,000057: 
039896,000058:                                                                                                  #        (C)     REFSMMAT ORIENTATION
039897,000059: 
039898,000060:                                                                                                  #        (D)     LANDING SITE - THIS IS NOT AVAILIBLE IN SUNDANCE
039899,000061: 
039900,000062:                                                                                                  #        THIS SELECTION CORRECTS THE PRESENT IMU ORIENTATION.  THE PRESENT ORIENTATION DIFFERS FROM THAT TO WHICH IT
039901,000063:                                                                                                  #        WAS LAST ALIGNED ONLY DUE TO GYRO DRIFT (I.E. NEITHER GIMBAL LOCK NOR IMU POWER INTERRUPTION HAS OCCURED
039902,000064:                                                                                                  #        SINCE THE LAST ALIGNMENT).
039903,000065: 
039904,000066:                                                                                                  #        AFTER A IMU ORIENTATION HAS BEEN SELECTED ROUTINE S52.2 IS OPERATED TO COMPUTE THE GIMBAL ANGLES USING THE
039905,000067:                                                                                                  #        NEW ORIENTATION AND THE PRESENT VEHICLE ATTITUDE.  CAL52A THEN USES THESE ANGLES, STORED IN THETAD,+1,+2, TO
039906,000068:                                                                                                  #        COARSE ALIGN THE IMU.  THE STAR SELECTION ROUTINE, R56, IS THEN OPERATED.  IF 2 STARS ARE NOT AVAILABLE AN ALARM
039907,000069:                                                                                                  #        IS FLASHED TO NOTIFY THE ASTRONAUT.  AT THIS POINT THE ASTRONAUT WILL MANUEVER THE VEHICLE AND SELECT 2 STARS
039908,000070:                                                                                                  #        EITHER MANUALLY OR AUTOMATICALLY.  AFTER 2 STARS HAVE BEEN SELECTED THE IMU IS FINE ALIGNED USING ROUTINE R51.  IF
039909,000071:                                                                                                  #        THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING (INDICATED BY RNDVZFLG) P20 IS DISPLAYED.  OTHERWISE P00 IS
039910,000072:                                                                                                  #        REQUESTED.
039911,000073: 
039912,000074:                                                                                                  #  CALLING SEQUENCE -
039913,000075: 

Page 927

039915,000077:                                                                                                  #        THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
039916,000078: 
039917,000079:                                                                                                  #  SUBROUTINES CALLED -
039918,000080: 
039919,000081:                                                                                                  #        1. FLAGDOWN              7. S52.2               13. NEWMODEX
039920,000082:                                                                                                  #        2. R02BOTH               8. CAL53A              14. PRIOLARM
039921,000083:                                                                                                  #        3. GOPERF4               9. FLAGUP
039922,000084:                                                                                                  #        4. MATMOVE              10. R56
039923,000085:                                                                                                  #        5. GOFLASH              11. R51
039924,000086:                                                                                                  #        6. S52.3                12. GOPERF3
039925,000087: 
039926,000088:                                                                                                  #  NORMAL EXIT MODES -
039927,000089: 
039928,000090:                                                                                                  #        EXITS TO ENDOFJOB
039929,000091: 
039930,000092:                                                                                                  #  ALARM OR ABORT EXIT MODES -
039931,000093: 
039932,000094:                                                                                                  #        NONE
039933,000095: 
039934,000096:                                                                                                  #  OUTPUT -
039935,000097: 
039936,000098:                                                                                                  #        THE FOLLOWING MAY BE FLASHED ON THE DSKY
039937,000099:                                                                                                  #                1. IMU ORIENTATION CODE
039938,000100:                                                                                                  #                2. ALARM CODE 215 - PREFERRED IMU ORIENTATION NOT SPECIFIED
039939,000101:                                                                                                  #                3. TIME OF NEXT IGNITION
039940,000102:                                                                                                  #                4. GIMBAL ANGLES
039941,000103:                                                                                                  #                5. ALARM CODE 405 - TWO STARS NOT AVAILABLE
039942,000104:                                                                                                  #                6. PLEASE PERFORM P00
039943,000105:                                                                                                  #        THE MODE DISPLAY MAY BE CHANGED TO 20
039944,000106: 
039945,000107:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
039946,000108: 
039947,000109:                                                                                                  #        PFRATFLG SHOULD BE SET IF A PREFERRED ORIENTATION HAS BEEN COMPUTED.  IF IT HAS BEEN COMPUTED IT IS STORED IN
039948,000110:                                                                                                  #        XSMD, YSMD, ZSMD.
039949,000111: 
039950,000112:                                                                                                  #        RNDVZFLG INDICATES WHETHER THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING.
039951,000113: 
039952,000114:                                                                                                  #  DEBRIS -
039953,000115: 
039954,000116:                                                                                                  #        WORK AREA
039955,000117: 
039956,000118: 33,3757                                           BANK     33                                    
039957,000119: 15,2000                                           SETLOC   P50S                                  
039958,000120: 15,2000                                           BANK                                           
039959,000121: 
039960,000122: 15,2050  E5,1755                                  EBANK=   BESTI                                 
039961,000123: 15,2050                                           COUNT*   $$/P52                                
039962,000124: 15,2050           04616        PROG52             TC       BANKCALL                              
039963,000125: 15,2051           11254                           CADR     R02BOTH                               #  IMU STATUS CHECK
039964,000126: 15,2052           34750                           CAF      PFRATBIT                              
039965,000127: 15,2053           70076                           MASK     FLAGWRD2                              #  IS PFRATFLG SET?
039966,000128: 15,2054           10000                           CCS      A                                     

Page 928

039968,000130: 15,2055           02060                           TC       P52A                                  #  YES
039969,000131: 15,2056           34752                           CAF      BIT2                                  #  NO
039970,000132: 15,2057           02061                           TC       P52A       +1                         
039971,000133: 15,2060           34753        P52A               CAF      BIT1                                  
039972,000134: 15,2061           55145                           TS       OPTION2                               
039973,000135: 15,2062           34753        P52B               CAF      BIT1                                  
039974,000136: 15,2063           04616                           TC       BANKCALL                              #  FLASH OPTION CODE AND ORIENTATION CODE
039975,000137: 15,2064           20713                           CADR     GOPERF4R                              #  FLASH V04N06
039976,000138: 15,2065           06001                           TC       GOTOPOOH                              
039977,000139: 15,2066           12073                           TCF      +5                                    #  V33 - PROCEED
039978,000140: 15,2067           02062                           TC       P52B                                  #  NEW CODE - NEW ORIENTATION CODE INPUT
039979,000141: 15,2070           05353                           TC       PHASCHNG                              #  DISPLAY RETURN
039980,000142: 15,2071           00014                           OCT      00014                                 
039981,000143: 15,2072           05155                           TC       ENDOFJOB                              
039982,000144: 
039983,000145: 15,2073           31145                           CA       OPTION2                               
039984,000146: 15,2074           76245                           MASK     THREE                                 
039985,000147: 15,2075           50000                           INDEX    A                                     
039986,000148: 15,2076           02077                           TC       +1                                    
039987,000149: 15,2077           12105                           TCF      OPT4                                  #  OPTION 4 LANDING SITE
039988,000150: 15,2100           12153                           TCF      P52H                                  #  OPTION 1 PREFERRED
039989,000151: 15,2101           12110                           TCF      P52T                                  #  OPTION 2 NOMINAL
039990,000152: 15,2102           06037        P52E               TC       INTPRET                               #  OPTION 3 REFSMMAT
039991,000153: 15,2103           77650                           GOTO                                           
039992,000154: 15,2104           32164                                    P52F                                  #  GO DO R51
039993,000155: 
039994,000156: 15,2105           00006        OPT4               EXTEND                                         
039995,000157: 15,2106           31401                           DCA      TLAND                                 #  IF OPTION 4 DISPLAY TLAND
039996,000158: 15,2107           12112                           TCF      P52T       +2                         
039997,000159: 
039998,000160: 15,2110           00006        P52T               EXTEND                                         
039999,000161: 15,2111           34755                           DCA      NEG0                                  
040000,000162: 15,2112           53046                           DXCH     DSPTEM1                               
040001,000163: 15,2113           32170                           CAF      V06N34*                               
040002,000164: 15,2114           04616                           TC       BANKCALL                              
040003,000165: 15,2115           20476                           CADR     GOFLASH                               
040004,000166: 15,2116           06001                           TC       GOTOPOOH                              
040005,000167: 15,2117           02121                           TC       +2                                    
040006,000168: 15,2120           02113                           TC       -5                                    
040007,000169: 15,2121           53046                           DXCH     DSPTEM1                               
040008,000170: 15,2122           00006                           EXTEND                                         
040009,000171: 15,2123           62125                           BZMF     +2                                    #  IF TIME ZERO OR NEG USE TIME2
040010,000172: 15,2124           12127                           TCF      +3                                    
040011,000173: 15,2125           00006                           EXTEND                                         
040012,000174: 15,2126           30025                           DCA      TIME2                                 
040013,000175: 15,2127           53775                           DXCH     TALIGN                                
040014,000176: 15,2130           31145        P52V               CA       OPTION2                               
040015,000177: 15,2131           74752                           MASK     BIT2                                  
040016,000178: 15,2132           10000                           CCS      A                                     
040017,000179: 15,2133           02137                           TC       P52W                                  

Page 929

040019,000181: 15,2134           06037                           TC       INTPRET                               #  OPTION 4 - GET LS ORIENTATION
040020,000182: 15,2135           77650                           GOTO                                           
040021,000183: 15,2136           32220                                    P52LS                                 
040022,000184: 

Page 930

040024,000186:                                                                                                  #  START ALIGNMENT
040025,000187: 
040026,000188: 15,2137           06037        P52W               TC       INTPRET                               
040027,000189: 15,2140           45145                           DLOAD    CALL                                  #  PICK UP ALIGN TIME
040028,000190: 15,2141           02775                                    TALIGN                                #  COMPUTE NOMINAL IMU
040029,000191: 15,2142           31650                                    S52.3                                 #        ORIENTATION
040030,000192: 15,2143           77624        P52D               CALL                                           #  READ VEHICLE ATTITUDE AND
040031,000193: 15,2144           31617                                    S52.2                                 #        COMPUTE GIMBAL ANGLES
040032,000194: 15,2145           77776                           EXIT                                           
040033,000195: 15,2146           35010                           CAF      V06N22                                
040034,000196: 15,2147           04616                           TC       BANKCALL                              #  DISPLAY GIMBAL ANGLES
040035,000197: 15,2150           20476                           CADR     GOFLASH                               
040036,000198: 15,2151           06001                           TC       GOTOPOOH                              
040037,000199: 15,2152           12171                           TCF      COARSTYP                              #  V33 - PROCEED, SEE IF GYRO TORQUE COARSE
040038,000200: 15,2153           06037        P52H               TC       INTPRET                               
040039,000201: 15,2154           77650                           GOTO                                           
040040,000202: 15,2155           32143                                    P52D                                  
040041,000203: 15,2156           06037        REGCOARS           TC       INTPRET                               
040042,000204: 15,2157           77624                           CALL                                           #  DO COARSE ALIGN
040043,000205: 15,2160           31327                                    CAL53A                                #        ROUTINE
040044,000206: 15,2161           43014        COARSRET           SET      CLEAR                                 
040045,000207: 15,2162           01462                                    REFSMFLG                              
040046,000208: 15,2163           01273                                    PFRATFLG                              
040047,000209: 15,2164           77624        P52F               CALL                                           
040048,000210: 15,2165           31015                                    R51                                   
040049,000211: 15,2166           77776        P52OUT             EXIT                                           
040050,000212: 15,2167           06001                           TC       GOTOPOOH                              
040051,000213: 15,2170     5006               VB05N09            =        V05N09                                
040052,000214: 15,2170           01442        V06N34*            VN       634                                   
040053,000215: 

Page 931

040055,000217:                                                                                                  #  CHECK FOR GRRO TORQUE COARSE ALIGNMENT
040056,000218: 
040057,000219: 15,2171           32217        COARSTYP           CAF      OCT13                                 
040058,000220: 15,2172           04616                           TC       BANKCALL                              #  DISPLAY V 50N25 WITH COARSE ALIGN OPTION
040059,000221: 15,2173           20623                           CADR     GOPERF1                               
040060,000222: 15,2174           16001                           TCF      GOTOPOOH                              #  V34 - TERMIN&OE
040061,000223: 15,2175           12156                           TCF      REGCOARS                              #  V33 - NORMAL COARSE
040062,000224: 15,2176           06037                           TC       INTPRET                               #  V32 - GYRO TORQUE COARSE
040063,000225: 15,2177           64375                           VLOAD    MXV                                   
040064,000226: 15,2200           03607                                    XSMD                                  #  GET SM(DESIRED) WRT SM(PRESENT)
040065,000227: 15,2201           01734                                    REFSMMAT                              
040066,000228: 15,2202           77656                           UNIT                                           
040067,000229: 15,2203           26665                           STOVL    XDC                                   
040068,000230: 15,2204           03615                                    YSMD                                  
040069,000231: 15,2205           53521                           MXV      UNIT                                  
040070,000232: 15,2206           01734                                    REFSMMAT                              
040071,000233: 15,2207           26673                           STOVL    YDC                                   
040072,000234: 15,2210           03623                                    ZSMD                                  
040073,000235: 15,2211           53521                           MXV      UNIT                                  
040074,000236: 15,2212           01734                                    REFSMMAT                              
040075,000237: 15,2213           36701                           STCALL   ZDC                                   
040076,000238: 15,2214           31164                                    GYCOARS                               
040077,000239: 15,2215           77650                           GOTO                                           
040078,000240: 15,2216           32166                                    P52OUT                                
040079,000241: 15,2217           00013        OCT13              OCT      13                                    
040080,000242: 

Page 932

040082,000244:                                                                                                  #  COMPUTE LANDING ORIENTATION FOR OPTION 4
040083,000245: 
040084,000246: 15,2220           43014        P52LS              SET      CLEAR                                 #  GET LANDING SITE ORIENTATION
040085,000247: 15,2221           01463                                    LUNAFLAG                              
040086,000248: 15,2222           00662                                    ERADFLAG                              #  TO PICK UP RLS
040087,000249: 15,2223           77201                           SETPD    VLOAD                                 
040088,000250: 15,2224           00001                                    0                                     
040089,000251: 15,2225           02023                                    RLS                                   #  PICK UP LANDING SITE VEC IN MF
040090,000252: 15,2226           41525                           PDDL     PUSH                                  #  RLS PD 0-5
040091,000253: 15,2227           02775                                    TALIGN                                
040092,000254: 15,2230           36401                           STCALL   TLAND                                 #  JAM ALIGN TIME IN TLAND FOR OPTION 4
040093,000255: 15,2231           55716                                    RP-TO-R                               #  TRANS RLS TO REF
040094,000256: 15,2232           77742                           VSR2                                           
040095,000257: 15,2233           16032                           STODL    ALPHAV                                #  INPUT TO LAT-LONG
040096,000258: 15,2234           02775                                    TALIGN                                
040097,000259: 15,2235           77624                           CALL                                           
040098,000260: 15,2236           30446                                    N89DISP                               
040099,000261: 15,2237           53575                           VLOAD    UNIT                                  #  COMPUTE LANDING SITE ORIENT (XSMD)
040100,000262: 15,2240           02032                                    ALPHAV                                
040101,000263: 15,2241           37607                           STCALL   XSMD                                  
040102,000264: 15,2242           11013                                    LSORIENT                              
040103,000265: 15,2243           77650                           GOTO                                           
040104,000266: 15,2244           32143                                    P52D                                  #  NOW GO COMPUTE GIMBAL ANGLES
040105,000267: 

Page 933

040107,000269:                                                                                                  #  SUBROUTINE TO CALCULATE AND DISPLAY THE LUNAR LANDING SITE
040108,000270: 
040109,000271: 14,2000                                           SETLOC   P50S1                                 
040110,000272: 14,2000                                           BANK                                           
040111,000273: 14,2446  E5,1642                                  EBANK=   XSM                                   
040112,000274: 
040113,000275: 14,2446           77620        N89DISP            STQ                                            
040114,000276: 14,2447           02746                                    QMAJ                                  
040115,000277: 14,2450           35243                           STCALL   GDT/2      +4                         #  TEMP STORE TIME
040116,000278: 14,2451           26351                                    LAT-LONG                              
040117,000279: 14,2452           70545                           DLOAD    SR1                                   
040118,000280: 14,2453           01123                                    LONG                                  
040119,000281: 14,2454           16711                           STODL    LANDLONG                              
040120,000282: 14,2455           01125                                    ALT                                   
040121,000283: 14,2456           16713                           STODL    LANDALT                               
040122,000284: 14,2457           01121                                    LAT                                   
040123,000285: 14,2460           16707                           STODL    LANDLAT                               
040124,000286: 14,2461           77776                           EXIT                                           
040125,000287: 
040126,000288: 14,2462           32505        LSDISP             CAF      V06N89*                               #  DISPLAY LAT,LONG/2,ALT
040127,000289: 14,2463           04616                           TC       BANKCALL                              
040128,000290: 14,2464           20476                           CADR     GOFLASH                               
040129,000291: 14,2465           16001                           TCF      GOTOPOOH                              #  V34 - TERMINATE - EXIT P57
040130,000292: 14,2466           12470                           TCF      +2                                    #  V33 - PROCEED - ACCEPT LS DATA
040131,000293: 14,2467           12462                           TCF      LSDISP                                #  V32 OR E - LOOK AGAIN AND/OR LOAD NEW LS
040132,000294: 
040133,000295: 14,2470           06037                           TC       INTPRET                               
040134,000296: 14,2471           72545                           DLOAD    SL1                                   
040135,000297: 14,2472           02711                                    LANDLONG                              
040136,000298: 14,2473           15123                           STODL    LONG                                  
040137,000299: 14,2474           02713                                    LANDALT                               
040138,000300: 14,2475           15125                           STODL    ALT                                   
040139,000301: 14,2476           02707                                    LANDLAT                               
040140,000302: 14,2477           15121                           STODL    LAT                                   
040141,000303: 14,2500           01243                                    GDT/2      +4                         #  PICK UP TIME
040142,000304: 14,2501           77624                           CALL                                           #  GET RLS BACK FROM LAT,LONG,ALT
040143,000305: 14,2502           26422                                    LALOTORV                              #  RLS B-29 IN MPAC AND ALPHAV
040144,000306: 14,2503           77650                           GOTO                                           
040145,000307: 14,2504           02746                                    QMAJ                                  
040146,000308: 14,2505           01531        V06N89*            VN       689                                   
040147,000309: 

Page 934

040149,000311:                                                                                                  #  NAME - S50 ALIAS LOCSAM
040150,000312:                                                                                                  #  BY
040151,000313:                                                                                                  #  VINCENT
040152,000314: 
040153,000315:                                                                                                  #  FUNCTION - COMPUTE INPUTS FOR PICAPAR AND PLANET
040154,000316: 
040155,000317:                                                                                                  #        DEFINE
040156,000318: 
040157,000319:                                                                                                  #        U   = UNIT( SUN WRT EARTH )
040158,000320:                                                                                                  #         ES
040159,000321: 
040160,000322:                                                                                                  #        U   = UNIT( MOON WRT EARTH )
040161,000323:                                                                                                  #         EM
040162,000324: 
040163,000325:                                                                                                  #        R   = POSITION VECTOR OF LEM
040164,000326:                                                                                                  #         L
040165,000327: 
040166,000328:                                                                                                  #        R   = MEAN DISTANCE (384402KM) BETWEEN EARTH AND MOON
040167,000329:                                                                                                  #         EM
040168,000330: 
040169,000331:                                                                                                  #        P   = RATIO R  /(DISTANCE SUN TO EARTH) > .00257125
040170,000332:                                                                                                  #                     EM
040171,000333: 
040172,000334:                                                                                                  #        R   = EQUATORIAL RADIUSS (6378.166KM) OF EARTH
040173,000335:                                                                                                  #         E
040174,000336: 
040175,000337:                                                                                                  #        LOCSAM COMPUTES IN EARTH INFLUENCE
040176,000338: 
040177,000339:                                                                                                  #        VSUN = U
040178,000340:                                                                                                  #                ES
040179,000341: 
040180,000342:                                                                                                  #        VEARTH = -UNIT( R  )
040181,000343:                                                                                                  #                         L
040182,000344: 
040183,000345:                                                                                                  #        VMOON = UNIT(R  .U   - R  )
040184,000346:                                                                                                  #                      EM  EM    L
040185,000347: 
040186,000348:                                                                                                  #        CSUN = COS 90
040187,000349: 
040188,000350:                                                                                                  #        CEARTH = COS(5 + ARCSIN(R /MAG(R )))
040189,000351:                                                                                                  #                                 E      L
040190,000352: 
040191,000353:                                                                                                  #        CMOON   = COS 5
040192,000354: 
040193,000355:                                                                                                  #  INPUT - TIME IN MPAC
040194,000356: 
040195,000357:                                                                                                  #  OUTPUT - LISTED ABOVE
040196,000358: 
040197,000359:                                                                                                  #  SUBROUTINES - LSPOS, LEMPREC
040198,000360: 
040199,000361:                                                                                                  #  DEBRIS - VAC AREA, TSIGHT
040200,000362: 

Page 935

040202,000364: 14,2506                                           COUNT*   $$/LOSAM                              
040203,000365: 
040204,000366: 14,2506  14,2506               S50                =        LOCSAM                                
040205,000367: 14,2506           77620        LOCSAM             STQ                                            
040206,000368: 14,2507           02745                                    QMIN                                  
040207,000369: 14,2510           37562                           STCALL   TSIGHT                                
040208,000370: 14,2511           33664                                    LSPOS                                 
040209,000371: 14,2512           77745                           DLOAD                                          
040210,000372: 14,2513           03562                                    TSIGHT                                
040211,000373: 14,2514           34041                           STCALL   TDEC1                                 
040212,000374: 14,2515           27057                                    LEMPREC                               
040213,000375: 14,2516           61131                           SSP      TIX,2                                 
040214,000376: 14,2517           00052                                    S2                                    
040215,000377: 14,2520           00000                                    0                                     
040216,000378: 14,2521           30543                                    MOONCNTR                              
040217,000379: 14,2522           74375        EARTCNTR           VLOAD    VXSC                                  
040218,000380: 14,2523           02723                                    VMOON                                 
040219,000381: 14,2524           30001                                    RSUBEM                                
040220,000382: 14,2525           52372                           VSL1     VSU                                   
040221,000383: 14,2526           00001                                    RATT                                  
040222,000384: 14,2527           77656                           UNIT                                           
040223,000385: 14,2530           26723                           STOVL    VMOON                                 
040224,000386: 14,2531           00001                                    RATT                                  
040225,000387: 14,2532           57456                           UNIT     VCOMP                                 
040226,000388: 14,2533           16707                           STODL    VEARTH                                
040227,000389: 14,2534           30005                                    RSUBE                                 
040228,000390: 14,2535           77624                           CALL                                           
040229,000391: 14,2536           30575                                    OCCOS                                 
040230,000392: 14,2537           14017                           STODL    CEARTH                                
040231,000393: 14,2540           30604                                    CSS5                                  
040232,000394: 14,2541           34023                           STCALL   CMOON                                 
040233,000395: 14,2542           30570                                    ENDSAM                                
040234,000396: 14,2543           74375        MOONCNTR           VLOAD    VXSC                                  
040235,000397: 14,2544           02723                                    VMOON                                 
040236,000398: 14,2545           30007                                    ROE                                   
040237,000399: 14,2546           53445                           BVSU     UNIT                                  
040238,000400: 14,2547           02715                                    VSUN                                  
040239,000401: 14,2550           26715                           STOVL    VSUN                                  
040240,000402: 14,2551           02723                                    VMOON                                 
040241,000403: 14,2552           53361                           VXSC     VAD                                   
040242,000404: 14,2553           30001                                    RSUBEM                                
040243,000405: 14,2554           00001                                    RATT                                  
040244,000406: 14,2555           57456                           UNIT     VCOMP                                 
040245,000407: 14,2556           26707                           STOVL    VEARTH                                
040246,000408: 14,2557           00001                                    RATT                                  
040247,000409: 14,2560           57456                           UNIT     VCOMP                                 
040248,000410: 14,2561           16723                           STODL    VMOON                                 
040249,000411: 14,2562           30003                                    RSUBM                                 
040250,000412: 14,2563           77624                           CALL                                           
040251,000413: 14,2564           30575                                    OCCOS                                 

Page 936

040253,000415: 14,2565           14023                           STODL    CMOON                                 
040254,000416: 14,2566           30604                                    CSS5                                  
040255,000417: 14,2567           00017                           STORE    CEARTH                                
040256,000418: 14,2570           77745        ENDSAM             DLOAD                                          
040257,000419: 14,2571           30606                                    CSSUN                                 
040258,000420: 14,2572           00021                           STORE    CSUN                                  
040259,000421: 14,2573           77650                           GOTO                                           
040260,000422: 14,2574           02745                                    QMIN                                  
040261,000423: 14,2575           70471        OCCOS              DDV      SR1                                   
040262,000424: 14,2576           00045                                    36D                                   
040263,000425: 14,2577           43336                           ASIN     DAD                                   
040264,000426: 14,2600           30610                                    5DEGREES                              
040265,000427: 14,2601           70546                           COS      SR1                                   
040266,000428: 14,2602           77616                           RVQ                                            
040267,000429: 14,2603                        CEARTH             =        14D                                   
040268,000430: 14,2603                        CSUN               =        16D                                   
040269,000431: 14,2603                        CMOON              =        18D                                   
040270,000432: 14,2603           07760 14473  CSS5               2DEC     .2490475                              #  (COS 5)/4
040271,000433: 14,2605           04000 00000  CSSUN              2DEC     .125                                  #  (COS 60)/4
040272,000434: 14,2607           00343 21616  5DEGREES           2DEC     .013888889                            #  SCALED IN REVS
040273,000435: 

Page 937

040275,000437:                                                                                                  #  PROGRAM NAME - R56            DATE  DEC 20 66
040276,000438:                                                                                                  #  MOD 1                         LOG SECTION P51-P53
040277,000439:                                                                                                  #                                ASSEMBLY   SUNDISK REV40
040278,000440:                                                                                                  #  BY KEN VINCENT
040279,000441: 
040280,000442:                                                                                                  #  FUNCTION
040281,000443:                                                                                                  #        THIS PROGRAM READ THE IMU-CDUS AND COMPUTES THE VEHICLE ORIENTATION
040282,000444:                                                                                                  #        WITH RESPECT TO INERTIAL SPACE.  IT THEN COMPUTES THE SHAFT AXIS (SAX)
040283,000445:                                                                                                  #        WITH RESPECT TO REFERENCE INERTIAL.  EACH STAR IN THE CATALOG IS TESTED
040284,000446:                                                                                                  #        TO DETERMINE IF IT IS OCCULTED BY EITHER THE EARTH, SUN OR MOON.  IF A
040285,000447:                                                                                                  #        STAR IS NOT OCCULTED THEN IT IS PAIRED WITH ALL STAR OF LOWER INDEX.
040286,000448:                                                                                                  #        THE PAIRED STAR IS TESTED FOR OCCULTATION.  PAIRS OF STARS THAT PASS
040287,000449:                                                                                                  #        THE OCCULTATION TESTS ARE TESTED FOR GOOD SEPARATION.  A PAIR OF STARS
040288,000450:                                                                                                  #        HAVE GOOD SEPERATION IF THE ANGLE BETWEEN THEM IS LESS THAN 100 DEGREES
040289,000451:                                                                                                  #        AND MORE THAN 50 DEGREES.  THOSE PAIRS WITH GOOD SEPARATION
040290,000452:                                                                                                  #        ARE THEN TESTED TO SEE IF THEY LIE IN CURRENT FIELD OF VIEW.  (WITHIN
040291,000453:                                                                                                  #        50 DEGREES OF SAX).  THE PAIR WITH MAX SEPARATION IS CHOSEN FROM
040292,000454:                                                                                                  #        THOSE WITH GOOD SEPARATION, AND IN FIELD OF VIEW.
040293,000455: 
040294,000456:                                                                                                  #  CALLING SEQUENCE
040295,000457:                                                                                                  #        L       TC      BANKCALL
040296,000458:                                                                                                  #        L+1     CADR    R56
040297,000459:                                                                                                  #        L+2     ERROR RETURN - NO STARS IN FIELD OF VIEW
040298,000460:                                                                                                  #        L+3     NORMAL RETURN
040299,000461: 
040300,000462:                                                                                                  #  OUTPUT
040301,000463:                                                                                                  #        BESTI, BESTJ - SINGLE PREC, INTEGERS, STAR NUMBERS TIMES 6
040302,000464:                                                                                                  #        VFLAG - FLAG BIT SET IMPLIES NO STARS IN FIELD OF VIEW
040303,000465: 
040304,000466:                                                                                                  #  INITIALIZATION
040305,000467:                                                                                                  #        1)      A CALL TO LOCSAM MUST BE MADE
040306,000468: 
040307,000469:                                                                                                  #  DEBRIS
040308,000470:                                                                                                  #        WORKAREA
040309,000471:                                                                                                  #        X,Y,ZNB
040310,000472:                                                                                                  #        SINCDU, COSCDU
040311,000473:                                                                                                  #        STARAD - STAR +5
040312,000474: 
040313,000475: 14,2611  14,2611               R56                =        PICAPAR                               
040314,000476: 14,2611                                           COUNT*   $$/R56                                
040315,000477: 14,2611           04645        PICAPAR            TC       MAKECADR                              
040316,000478: 14,2612           55745                           TS       QMIN                                  
040317,000479: 14,2613           06037                           TC       INTPRET                               
040318,000480: 14,2614           77624                           CALL                                           
040319,000481: 14,2615           47537                                    CDUTRIG                               
040320,000482: 14,2616           77624                           CALL                                           
040321,000483: 14,2617           20030                                    CALCSMSC                              
040322,000484: 14,2620           77601                           SETPD                                          
040323,000485: 14,2621           00001                                    0                                     
040324,000486: 14,2622           71214                           SET      DLOAD                                 #  VFLAG = 1
040325,000487: 14,2623           01465                                    VFLAG                                 

Page 938

040327,000489: 14,2624           24007                                    DPZERO                                
040328,000490: 14,2625           26756                           STOVL    BESTI                                 
040329,000491: 14,2626           02665                                    XNB                                   
040330,000492: 14,2627           63361                           VXSC     PDVL                                  
040331,000493: 14,2630           24005                                    HALFDP                                
040332,000494: 14,2631           02701                                    ZNB                                   
040333,000495: 14,2632           74370                           AXT,1    VXSC                                  
040334,000496: 14,2633           00344                                    228D                                  #  X1 = 37 X 6 + 6
040335,000497: 14,2634           24005                                    HALFDP                                
040336,000498: 14,2635           77655                           VAD                                            
040337,000499: 14,2636           53505                           VXM      UNIT                                  
040338,000500: 14,2637           01734                                    REFSMMAT                              
040339,000501: 14,2640           02731                           STORE    SAX                                   #  SAX = SHAFT AXIS
040340,000502: 14,2641           66331                           SSP      SSP                                   #  S1 = S2 = 6
040341,000503: 14,2642           00051                                    S1                                    
040342,000504: 14,2643           00006                                    6                                     
040343,000505: 14,2644           00052                                    S2                                    
040344,000506: 14,2645           00006                                    6                                     
040345,000507: 14,2646           52100        PIC1               TIX,1    GOTO                                  #  MAJOR STAR
040346,000508: 14,2647           30651                                    PIC2                                  
040347,000509: 14,2650           30766                                    PICEND                                
040348,000510: 14,2651           50373        PIC2               VLOAD*   DOT                                   
040349,000511: 14,2652           30347                                    CATLOG,1                              
040350,000512: 14,2653           02731                                    SAX                                   
040351,000513: 14,2654           50025                           DSU      BMN                                   
040352,000514: 14,2655           30765                                    CSS33                                 
040353,000515: 14,2656           30646                                    PIC1                                  
040354,000516: 14,2657           77754                           LXA,2                                          
040355,000517: 14,2660           00046                                    X1                                    
040356,000518: 14,2661           52104        PIC3               TIX,2    GOTO                                  
040357,000519: 14,2662           30664                                    PIC4                                  
040358,000520: 14,2663           30646                                    PIC1                                  
040359,000521: 14,2664           50373        PIC4               VLOAD*   DOT                                   
040360,000522: 14,2665           47430                                    CATLOG,2                              
040361,000523: 14,2666           02731                                    SAX                                   
040362,000524: 14,2667           50025                           DSU      BMN                                   
040363,000525: 14,2670           30765                                    CSS33                                 
040364,000526: 14,2671           30661                                    PIC3                                  
040365,000527: 14,2672           47773                           VLOAD*   DOT*                                  
040366,000528: 14,2673           30347                                    CATLOG,1                              
040367,000529: 14,2674           47430                                    CATLOG,2                              
040368,000530: 14,2675           51025                           DSU      BPL                                   
040369,000531: 14,2676           30763                                    CSS40                                 
040370,000532: 14,2677           30661                                    PIC3                                  
040371,000533: 14,2700           45173                           VLOAD*   CALL                                  
040372,000534: 14,2701           30347                                    CATLOG,1                              
040373,000535: 14,2702           30740                                    OCCULT                                
040374,000536: 14,2703           77614                           BON                                            
040375,000537: 14,2704           01710                                    CULTFLAG                              
040376,000538: 14,2705           30646                                    PIC1                                  

Page 939

040378,000540: 14,2706           45173                           VLOAD*   CALL                                  
040379,000541: 14,2707           47430                                    CATLOG,2                              
040380,000542: 14,2710           30740                                    OCCULT                                
040381,000543: 14,2711           77614                           BON                                            
040382,000544: 14,2712           01710                                    CULTFLAG                              
040383,000545: 14,2713           30661                                    PIC3                                  
040384,000546: 14,2714           77614        STRATGY            BONCLR                                         
040385,000547: 14,2715           01605                                    VFLAG                                 
040386,000548: 14,2716           30733                                    NEWPAR                                
040387,000549: 14,2717           65120                           XCHX,1   XCHX,2                                
040388,000550: 14,2720           02755                                    BESTI                                 
040389,000551: 14,2721           02756                                    BESTJ                                 
040390,000552: 14,2722           47773        STRAT              VLOAD*   DOT*                                  
040391,000553: 14,2723           30347                                    CATLOG,1                              
040392,000554: 14,2724           47430                                    CATLOG,2                              
040393,000555: 14,2725           43006                           PUSH     BOFINV                                
040394,000556: 14,2726           01545                                    VFLAG                                 
040395,000557: 14,2727           30717                                    STRAT      -3                         
040396,000558: 14,2730           45345                           DLOAD    DSU                                   
040397,000559: 14,2731           77644                           BPL                                            
040398,000560: 14,2732           30661                                    PIC3                                  
040399,000561: 14,2733           67130        NEWPAR             SXA,1    SXA,2                                 
040400,000562: 14,2734           02755                                    BESTI                                 
040401,000563: 14,2735           02756                                    BESTJ                                 
040402,000564: 14,2736           77650                           GOTO                                           
040403,000565: 14,2737           30661                                    PIC3                                  
040404,000566: 14,2740           51321        OCCULT             MXV      BVSU                                  
040405,000567: 14,2741           02707                                    CULTRIX                               
040406,000568: 14,2742           00017                                    CSS                                   
040407,000569: 14,2743           77654                           BZE                                            
040408,000570: 14,2744           30757                                    CULTED                                
040409,000571: 14,2745           75240                           BMN      SIGN                                  
040410,000572: 14,2746           30757                                    CULTED                                
040411,000573: 14,2747           00160                                    MPAC       +3                         
040412,000574: 14,2750           75240                           BMN      SIGN                                  
040413,000575: 14,2751           30757                                    CULTED                                
040414,000576: 14,2752           00162                                    MPAC       +5                         
040415,000577: 14,2753           43040                           BMN      CLRGO                                 
040416,000578: 14,2754           30757                                    CULTED                                
040417,000579: 14,2755           01630                                    CULTFLAG                              
040418,000580: 14,2756           00052                                    QPRET                                 
040419,000581: 14,2757           77614        CULTED             SETGO                                          
040420,000582: 14,2760           01430                                    CULTFLAG                              
040421,000583: 14,2761           00052                                    QPRET                                 
040422,000584: 14,2762  0000016               CSS                =        CEARTH                                
040423,000585: 14,2762           05110 35052  CSS40              2DEC     .16070                                #  COS 50 / 4
040424,000586: 14,2764           05110 35052  CSS33              2DEC     .16070                                #  COS 50 / 4
040425,000587: 14,2766           77414        PICEND             BOFF     EXIT                                  
040426,000588: 

Page 940

040428,000590: 14,2767           01745                                    VFLAG                                 
040429,000591: 14,2770           30772                                    PICGXT                                
040430,000592: 14,2771           03013                           TC       PICBXT                                
040431,000593: 14,2772           73150        PICGXT             LXA,1    LXA,2                                 
040432,000594: 14,2773           02755                                    BESTI                                 
040433,000595: 14,2774           02756                                    BESTJ                                 
040434,000596: 14,2775           47775                           VLOAD    DOT*                                  
040435,000597: 14,2776           02731                                    SAX                                   
040436,000598: 14,2777           30347                                    CATLOG,1                              
040437,000599: 14,3000           47715                           PDVL     DOT*                                  
040438,000600: 14,3001           02731                                    SAX                                   
040439,000601: 14,3002           47430                                    CATLOG,2                              
040440,000602: 14,3003           77625                           DSU                                            
040441,000603: 14,3004           66044                           BPL      SXA,1                                 
040442,000604: 14,3005           31011                                    PICNSWP                               
040443,000605: 14,3006           02756                                    BESTJ                                 
040444,000606: 14,3007           77734                           SXA,2                                          
040445,000607: 14,3010           02755                                    BESTI                                 
040446,000608: 14,3011           77776        PICNSWP            EXIT                                           
040447,000609: 14,3012           25745                           INCR     QMIN                                  
040448,000610: 14,3013           31745        PICBXT             CA       QMIN                                  
040449,000611: 14,3014           04622                           TC       SWCALL                                
040450,000612: 14,3015                        VPD                =        0D                                    
040451,000613: 14,3015                        V0                 =        6D                                    
040452,000614: 14,3015                        V1                 =        12D                                   
040453,000615: 14,3015                        V2                 =        18D                                   
040454,000616: 14,3015                        V3                 =        24D                                   
040455,000617: 14,3015                        DP0                =        30D                                   
040456,000618: 14,3015                        DP1                =        32D                                   
040457,000619: 

Page 941

040459,000621:                                                                                                  #  NAME - R51    FINE ALIGN
040460,000622:                                                                                                  #  FUNCTION - TO ALIGN THE STABLE MEMBER TO REFSMMAT
040461,000623:                                                                                                  #  CALLING SEQ - CALL R51
040462,000624:                                                                                                  #  INPUT - REFSMMAT
040463,000625:                                                                                                  #  OUTPUT - GYRO TORQUE PULSES
040464,000626:                                                                                                  #  SUBROUTINES - LOCSAM, PICAPAR, R52, R53, R54, R55
040465,000627: 
040466,000628: 14,3015                                           COUNT*   $$/R51                                
040467,000629: 14,3015           77620        R51                STQ                                            
040468,000630: 14,3016           02746                                    QMAJ                                  
040469,000631: 14,3017           77776        R51.1              EXIT                                           
040470,000632: 14,3020           05353                           TC       PHASCHNG                              
040471,000633: 14,3021           04024                           OCT      04024                                 
040472,000634: 
040473,000635: 14,3022           34761        R51C               CAF      OCT15                                 
040474,000636: 14,3023           04616                           TC       BANKCALL                              
040475,000637: 14,3024           20623                           CADR     GOPERF1                               
040476,000638: 14,3025           06001                           TC       GOTOPOOH                              
040477,000639: 14,3026           03030                           TC       +2                                    #  V33E
040478,000640: 14,3027           03053                           TC       R51E                                  #  ENTER
040479,000641: 14,3030           06037                           TC       INTPRET                               
040480,000642: 14,3031           43234                           RTB      DAD                                   
040481,000643: 14,3032           21573                                    LOADTIME                              
040482,000644: 14,3033           31163                                    TSIGHT1                               
040483,000645: 14,3034           77624                           CALL                                           
040484,000646: 14,3035           30506                                    LOCSAM                                
040485,000647: 14,3036           77776                           EXIT                                           
040486,000648: 14,3037           04616                           TC       BANKCALL                              
040487,000649: 14,3040           30611                           CADR     R56                                   
040488,000650: 14,3041           03043                           TC       R51I                                  
040489,000651: 14,3042           03053        R51F               TC       R51E                                  
040490,000652: 14,3043           05567        R51I               TC       ALARM                                 
040491,000653: 14,3044           00405                           OCT      405                                   
040492,000654: 14,3045           35006                           CAF      VB05N09                               
040493,000655: 14,3046           04616                           TC       BANKCALL                              
040494,000656: 14,3047           20476                           CADR     GOFLASH                               
040495,000657: 14,3050           06001                           TC       GOTOPOOH                              
040496,000658: 14,3051           03053                           TC       R51E                                  
040497,000659: 14,3052           03022                           TC       R51C                                  
040498,000660: 14,3053           34755        R51E               CAF      ZERO                                  
040499,000661: 14,3054           55757                           TS       STARIND                               
040500,000662: 14,3055           06037        R51.2              TC       INTPRET                               
040501,000663: 14,3056           77776        R51.3              EXIT                                           
040502,000664: 14,3057           05353                           TC       PHASCHNG                              
040503,000665: 14,3060           04024                           OCT      04024                                 
040504,000666: 
040505,000667: 14,3061           06037                           TC       INTPRET                               
040506,000668: 14,3062           77624                           CALL                                           
040507,000669: 14,3063           31670                                    R52                                   #  AOP WILL MAKE CALLS TO SIGHTING
040508,000670: 14,3064           77776                           EXIT                                           
040509,000671: 14,3065           04616                           TC       BANKCALL                              

Page 942

040511,000673: 14,3066           16000                           CADR     AOTMARK                               
040512,000674: 14,3067           04616                           TC       BANKCALL                              
040513,000675: 14,3070           17712                           CADR     OPTSTALL                              
040514,000676: 14,3071           05711                           TC       CURTAINS                              
040515,000677: 14,3072           11757                           CCS      STARIND                               
040516,000678: 14,3073           13075                           TCF      +2                                    
040517,000679: 14,3074           03145                           TC       R51.4                                 
040518,000680: 14,3075           06037                           TC       INTPRET                               
040519,000681: 14,3076           77775                           VLOAD                                          
040520,000682: 14,3077           02715                                    STARAD     +6                         
040521,000683: 14,3100           02767                           STORE    STARSAV2                              
040522,000684: 14,3101           77776                           EXIT                                           
040523,000685: 14,3102           05353                           TC       PHASCHNG                              
040524,000686: 14,3103           04024                           OCT      04024                                 
040525,000687: 
040526,000688: 14,3104           06037                           TC       INTPRET                               
040527,000689: 14,3105           45145                           DLOAD    CALL                                  
040528,000690: 14,3106           03562                                    TSIGHT                                
040529,000691: 14,3107           32472                                    PLANET                                
040530,000692: 14,3110           53521                           MXV      UNIT                                  
040531,000693: 14,3111           01734                                    REFSMMAT                              
040532,000694: 14,3112           26715                           STOVL    STARAD     +6                         
040533,000695: 14,3113           03554                                    PLANVEC                               
040534,000696: 14,3114           53521                           MXV      UNIT                                  
040535,000697: 14,3115           01734                                    REFSMMAT                              
040536,000698: 14,3116           26707                           STOVL    STARAD                                
040537,000699: 14,3117           02761                                    STARSAV1                              
040538,000700: 14,3120           24007                           STOVL    6D                                    
040539,000701: 14,3121           02767                                    STARSAV2                              
040540,000702: 14,3122           34015                           STCALL   12D                                   
040541,000703: 14,3123           31256                                    R54                                   #  STAR DATA TEST
040542,000704: 14,3124           45014                           BOFF     CALL                                  
040543,000705: 14,3125           00354                                    FREEFLAG                              
040544,000706: 14,3126           31134                                    R51K                                  
040545,000707: 14,3127           47441                                    AXISGEN                               
040546,000708: 14,3130           77624                           CALL                                           
040547,000709: 14,3131           31224                                    R55                                   #  GYRO TORQUE
040548,000710: 14,3132           77614                           CLEAR                                          
040549,000711: 14,3133           01273                                    PFRATFLG                              
040550,000712: 14,3134           77776        R51K               EXIT                                           
040551,000713: 14,3135           35751        R51P63             CAF      OCT14                                 
040552,000714: 14,3136           04616                           TC       BANKCALL                              
040553,000715: 14,3137           20623                           CADR     GOPERF1                               
040554,000716: 14,3140           06001                           TC       GOTOPOOH                              
040555,000717: 14,3141           03022                           TC       R51C                                  
040556,000718: 14,3142           06037                           TC       INTPRET                               
040557,000719: 14,3143           77650                           GOTO                                           
040558,000720: 14,3144           02746                                    QMAJ                                  
040559,000721: 14,3145           06037        R51.4              TC       INTPRET                               
040560,000722: 14,3146           77775                           VLOAD                                          

Page 943

040562,000724: 14,3147           02715                                    STARAD     +6                         
040563,000725: 14,3150           02761                           STORE    STARSAV1                              
040564,000726: 14,3151           45145                           DLOAD    CALL                                  
040565,000727: 14,3152           03562                                    TSIGHT                                
040566,000728: 14,3153           32472                                    PLANET                                
040567,000729: 14,3154           03554                           STORE    PLANVEC                               
040568,000730: 14,3155           77731                           SSP                                            
040569,000731: 14,3156           02760                                    STARIND                               
040570,000732: 14,3157           00001                                    1                                     
040571,000733: 14,3160           77650                           GOTO                                           
040572,000734: 14,3161           31056                                    R51.3                                 
040573,000735: 14,3162           00002 06240  TSIGHT1            2DEC     36000      B-28                       #  6 MIN TO MARKING
040574,000736: 

Page 944

040576,000738:                                                                                                  #  GYRO TORQUE COARSE ALIGNMENT
040577,000739: 
040578,000740: 14,3164           45020        GYCOARS            STQ      CALL                                  
040579,000741: 14,3165           02746                                    QMAJ                                  
040580,000742: 14,3166           47247                                    CALCGTA                               
040581,000743: 14,3167           43014                           CLEAR    CLEAR                                 
040582,000744: 14,3170           01260                                    DRIFTFLG                              
040583,000745: 14,3171           01662                                    REFSMFLG                              
040584,000746: 14,3172           77776                           EXIT                                           
040585,000747: 14,3173           33223                           CAF      V16N20                                #  MONITOR GIMBALS
040586,000748: 14,3174           04616                           TC       BANKCALL                              
040587,000749: 14,3175           20451                           CADR     GODSPR                                
040588,000750: 14,3176           33255                           CA       R55CDR                                
040589,000751: 14,3177           04616                           TC       BANKCALL                              
040590,000752: 14,3200           17323                           CADR     IMUPULSE                              
040591,000753: 14,3201           04616                           TC       BANKCALL                              
040592,000754: 14,3202           17716                           CADR     IMUSTALL                              
040593,000755: 14,3203           05711                           TC       CURTAINS                              
040594,000756: 14,3204           05353                           TC       PHASCHNG                              
040595,000757: 14,3205           04024                           OCT      04024                                 
040596,000758: 
040597,000759: 14,3206           06037                           TC       INTPRET                               
040598,000760: 14,3207           75160                           AXC,1    AXC,2                                 
040599,000761: 14,3210           03606                                    XSMD                                  
040600,000762: 14,3211           01733                                    REFSMMAT                              
040601,000763: 14,3212           77624                           CALL                                           #  STORE DESIRED REFSMMAT
040602,000764: 14,3213           31377                                    MATMOVE                               
040603,000765: 14,3214           43014                           CLEAR    SET                                   
040604,000766: 14,3215           01273                                    PFRATFLG                              
040605,000767: 14,3216           01462                                    REFSMFLG                              
040606,000768: 14,3217           77624                           CALL                                           
040607,000769: 14,3220           31602                                    NCOARSE                               #  SET DRIFT AND INITIALIZE 1/PIPADT
040608,000770: 14,3221           77650                           GOTO                                           
040609,000771: 14,3222           31134                                    R51K                                  
040610,000772: 14,3223           04024        V16N20             VN       1620                                  
040611,000773: 

Page 945

040613,000775:                                                                                                  #  R55   GYRO TORQUE
040614,000776:                                                                                                  #  FUNCTION - COMPUTE AND SEND GYRO PULSES
040615,000777:                                                                                                  #  CALLING SEQ - CALL R55
040616,000778:                                                                                                  #  INPUT - X,Y,ZDC - REFSMMAT WRT PRESENT STABLE MEMBER
040617,000779:                                                                                                  #  OUTPUT - GYRO PULSES
040618,000780:                                                                                                  #  SUBROUTINES - CALCGTA, GOFLASH, GODSPR, IMUFINE, IMUPULSE, GOPERF1
040619,000781: 
040620,000782: 14,3224                                           COUNT*   $$/R55                                
040621,000783: 14,3224           77620        R55                STQ                                            
040622,000784: 14,3225           02745                                    QMIN                                  
040623,000785: 14,3226           77624                           CALL                                           
040624,000786: 14,3227           47247                                    CALCGTA                               
040625,000787: 14,3230           77776        PULSEM             EXIT                                           
040626,000788: 14,3231           33254        R55.1              CAF      V06N93                                
040627,000789: 14,3232           04616                           TC       BANKCALL                              
040628,000790: 14,3233           20476                           CADR     GOFLASH                               
040629,000791: 14,3234           06001                           TC       GOTOPOOH                              
040630,000792: 14,3235           03237                           TC       R55.2                                 
040631,000793: 14,3236           03251                           TC       R55RET                                
040632,000794: 14,3237           05353        R55.2              TC       PHASCHNG                              
040633,000795: 14,3240           00214                           OCT      00214                                 
040634,000796: 14,3241           33255                           CA       R55CDR                                
040635,000797: 14,3242           04616                           TC       BANKCALL                              
040636,000798: 14,3243           17323                           CADR     IMUPULSE                              
040637,000799: 14,3244           04616                           TC       BANKCALL                              
040638,000800: 14,3245           17716                           CADR     IMUSTALL                              
040639,000801: 14,3246           05711                           TC       CURTAINS                              
040640,000802: 14,3247           05353                           TC       PHASCHNG                              
040641,000803: 14,3250           04024                           OCT      04024                                 
040642,000804: 
040643,000805: 14,3251           06037        R55RET             TC       INTPRET                               
040644,000806: 14,3252           77650                           GOTO                                           
040645,000807: 14,3253           02745                                    QMIN                                  
040646,000808: 14,3254           01535        V06N93             VN       0693                                  
040647,000809: 14,3255           02737        R55CDR             ECADR    OGC                                   
040648,000810: 14,3256  14,3256               R54                =        CHKSDATA                              
040649,000811: 
040650,000812:                                                                                                  #  ROUTINE NAME - CHKSDATA               DATE - JAN 9, 1967
040651,000813:                                                                                                  #  MOD NO - 0                            LOG SECTION - P51-P53
040652,000814:                                                                                                  #  MODIFICATION BY - LONSKE              ASSEMBLY -
040653,000815: 
040654,000816:                                                                                                  #  FUNCTIONAL DESCRIPTION - CHECKS THE VALIDITY OF A PAIR OF STAR SIGHTINGS.  WHEN A PAIR OF STAR SIGHTINGS ARE MADE
040655,000817:                                                                                                  #  BY THE ASTRONAUT THIS ROUTINE OPERATES AND CHECKS THE OBSERVED SIGHTINGS AGAINST STORED STAR VECTORS IN THE
040656,000818:                                                                                                  #  COMPUTER TO INSURE A PROPER SIGHTING WAS MADE.  THE FOLLOWING COMPUTATIONS ARE PERFORMED_
040657,000819:                                                                                                  #        OS1     =       OBSERVED STAR 1 VECTOR
040658,000820:                                                                                                  #        OS2     =       OBSERVED STAR 2 VECTOR
040659,000821:                                                                                                  #        SS1     =       STORED STAR 1 VECTOR
040660,000822:                                                                                                  #        SS2     =       STORED STAR 2 VECTOR
040661,000823:                                                                                                  #         A1     =       ARCCOS(OS1 - OS2)
040662,000824:                                                                                                  #         A2     =       ARCCOS(SS1 - SS2)
040663,000825:                                                                                                  #          A     =       ABS(2(A1 - A2))

Page 946

040665,000827:                                                                                                  #  THE ANGULAR DIFFERENCE IS DISPLAYED FOR ASTRONAUT ACCEPTENCE
040666,000828: 
040667,000829:                                                                                                  #  EXIT MODE     1. FREEFLAG SET IMPLIES ASTRONAUT WANTS TO PROCEED
040668,000830:                                                                                                  #                2. FREEFLAG RESET IMPLIES ASTRONAUT WANTS TO RECYCLE            ERANCE)
040669,000831: 
040670,000832:                                                                                                  #  OUTPUT -      1. VERB 6,NOUN 3 - DISPLAYS ANGULAR DIFFERENCE BETWEEN 2 SETS OF STARS.
040671,000833:                                                                                                  #                2. STAR VECTORS FROM STAR CATALOG ARE LEFT IN 6D AND 12D.
040672,000834: 
040673,000835:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
040674,000836:                                                                                                  #                1. MARK VECTORS ARE STORED IN STARAD AND STARAD +6.
040675,000837:                                                                                                  #                2. CATALOG VECTORS ARE STORED IN 6D AND 12D.
040676,000838: 
040677,000839:                                                                                                  #  DEBRIS -
040678,000840: 
040679,000841: 14,3256                                           COUNT*   $$/R54                                
040680,000842: 14,3256           43020        CHKSDATA           STQ      SET                                   
040681,000843: 14,3257           02745                                    QMIN                                  
040682,000844: 14,3260           00074                                    FREEFLAG                              
040683,000845: 14,3261           77760        CHKSAB             AXC,1                                          #  SET X1 TO STORE EPHEMERIS DATA
040684,000846: 14,3262           02706                                    STARAD                                
040685,000847: 
040686,000848: 14,3263           47773        CHKSB              VLOAD*   DOT*                                  #  CAL. ANGLE THETA
040687,000849: 14,3264           00001                                    0,1                                   
040688,000850: 14,3265           00007                                    6,1                                   
040689,000851: 14,3266           65552                           SL1      ACOS                                  
040690,000852: 14,3267           00025                           STORE    THETA                                 
040691,000853: 14,3270           43014                           BOFF     INVERT                                #  BRANCH TO CHKSD IF THIS IS 2ND PASS
040692,000854: 14,3271           00354                                    FREEFLAG                              
040693,000855: 14,3272           31302                                    CHKSD                                 
040694,000856: 14,3273           00174                                    FREEFLAG                              #  CLEAR FREEFLAG
040695,000857: 14,3274           71360                           AXC,1    DLOAD                                 #  SET X1 TO MARK ANGLES
040696,000858: 14,3275           00006                                    6D                                    
040697,000859: 14,3276           00025                                    THETA                                 
040698,000860: 14,3277           00023                           STORE    18D                                   
040699,000861: 14,3300           77650                           GOTO                                           
040700,000862: 14,3301           31263                                    CHKSB                                 #  RETURN TO CAL. 2ND ANGLE
040701,000863: 14,3302           45345        CHKSD              DLOAD    DSU                                   
040702,000864: 14,3303           00025                                    THETA                                 
040703,000865: 14,3304           00023                                    18D                                   
040704,000866: 14,3305           47046                           ABS      RTB                                   #  COMPUTE POS DIFF
040705,000867: 14,3306           21612                                    SGNAGREE                              
040706,000868: 14,3307           01046                           STORE    NORMTEM1                              
040707,000869: 14,3310           77414                           SET      EXIT                                  
040708,000870: 14,3311           00074                                    FREEFLAG                              
040709,000871: 14,3312           33326                           CAF      VB6N5                                 
040710,000872: 14,3313           04616                           TC       BANKCALL                              
040711,000873: 14,3314           20476                           CADR     GOFLASH                               
040712,000874: 14,3315           16001                           TCF      GOTOPOOH                              
040713,000875: 14,3316           03323                           TC       CHKSDA                                #  PROCEED
040714,000876: 14,3317           06037                           TC       INTPRET                               
040715,000877: 14,3320           52014                           CLEAR    GOTO                                  
040716,000878: 14,3321           00274                                    FREEFLAG                              
040717,000879: 14,3322           02745                                    QMIN                                  
040718,000880: 14,3323           06037        CHKSDA             TC       INTPRET                               

Page 947

040720,000882: 14,3324           77650                           GOTO                                           
040721,000883: 14,3325           02745                                    QMIN                                  
040722,000884: 14,3326           01405        VB6N5              VN       605                                   
040723,000885: 
040724,000886:                                                                                                  #  NAME - CAL53A
040725,000887:                                                                                                  #  FUNCTION - COMPUTE DESIRED GIMBAL ANGLES AND COARSE ALIGN IF NECESSARY
040726,000888:                                                                                                  #  CALLING SEQUENCE - CALL CAL53A
040727,000889:                                                                                                  #  INPUT - X,Y,ZSMD, CDUX,Y,Z
040728,000890:                                                                                                  #           DESIRED GIMBAL ANGLES - THETAD,+1,+2
040729,000891:                                                                                                  #  OUTPUT - THE IMU COORDINATES ARE STORED IN REFSMMAT
040730,000892:                                                                                                  #  SUBROUTINES - S52.2, IMUCOARSE, IMUFINE
040731,000893: 
040732,000894: 14,3327                                           COUNT*   $$/R50                                
040733,000895: 14,3327           77624        CAL53A             CALL                                           
040734,000896: 14,3330           31617                                    S52.2                                 #  MAKE ONE FINAL COMP OF GIMBALE ANGLES
040735,000897: 14,3331           66234                           RTB      SSP                                   
040736,000898: 14,3332           31413                                    RDCDUS                                #  READ CDUS
040737,000899: 14,3333           00051                                    S1                                    
040738,000900: 14,3334           00001                                    1                                     
040739,000901: 14,3335           40370                           AXT,1    SETPD                                 
040740,000902: 14,3336           00003                                    3                                     
040741,000903: 14,3337           00005                                    4                                     
040742,000904: 14,3340           70543        CALOOP             DLOAD*   SR1                                   
040743,000905: 14,3341           00325                                    THETAD     +3D,1                      
040744,000906: 14,3342           70523                           PDDL*    SR1                                   
040745,000907: 14,3343           00005                                    4,1                                   
040746,000908: 14,3344           51425                           DSU      ABS                                   
040747,000909: 14,3345           45206                           PUSH     DSU                                   
040748,000910: 14,3346           31412                                    DEGREE1                               
040749,000911: 14,3347           71240                           BMN      DLOAD                                 
040750,000912: 14,3350           31366                                    CALOOP1                               
040751,000913: 14,3351           51025                           DSU      BPL                                   
040752,000914: 14,3352           31413                                    DEG359                                
040753,000915: 14,3353           31366                                    CALOOP1                               
040754,000916: 14,3354           77776                           EXIT                                           
040755,000917: 14,3355           05353                           TC       PHASCHNG                              
040756,000918: 14,3356           04024                           OCT      04024                                 
040757,000919: 
040758,000920: 14,3357           06037                           TC       INTPRET                               
040759,000921: 14,3360           77624        COARFINE           CALL                                           
040760,000922: 14,3361           31565                                    COARSE                                
040761,000923: 14,3362           77624                           CALL                                           
040762,000924: 14,3363           31602                                    NCOARSE                               
040763,000925: 14,3364           77650                           GOTO                                           
040764,000926: 14,3365           31370                                    FINEONLY                              
040765,000927: 14,3366           77700        CALOOP1            TIX,1                                          
040766,000928: 14,3367           31340                                    CALOOP                                
040767,000929: 14,3370           75160        FINEONLY           AXC,1    AXC,2                                 
040768,000930: 14,3371           02642                                    XSM                                   
040769,000931: 14,3372           01733                                    REFSMMAT                              
040770,000932: 14,3373           77624                           CALL                                           
040771,000933: 14,3374           31377                                    MATMOVE                               

Page 948

040773,000935: 14,3375           77650                           GOTO                                           
040774,000936: 14,3376           32161                                    COARSRET                              
040775,000937: 14,3377           77773        MATMOVE            VLOAD*                                         #  TRANSFER MATRIX
040776,000938: 14,3400           00001                                    0,1                                   
040777,000939: 14,3401           10001                           STORE    0,2                                   
040778,000940: 14,3402           77773                           VLOAD*                                         
040779,000941: 14,3403           00007                                    6D,1                                  
040780,000942: 14,3404           10007                           STORE    6D,2                                  
040781,000943: 14,3405           77773                           VLOAD*                                         
040782,000944: 14,3406           00015                                    12D,1                                 
040783,000945: 14,3407           10015                           STORE    12D,2                                 
040784,000946: 14,3410           77616                           RVQ                                            
040785,000947: 14,3411           00056        DEGREE1            DEC      46         B-14                       #  1 DEG SCALED CDU/2
040786,000948: 14,3412           37722        DEG359             DEC      16338      B-14                       #  359 DEG SCALED CDU/2
040787,000949: 14,3413           00004        RDCDUS             INHINT                                         #  READ CDUS
040788,000950: 14,3414           30032                           CA       CDUX                                  
040789,000951: 14,3415           50120                           INDEX    FIXLOC                                
040790,000952: 14,3416           54001                           TS       1                                     
040791,000953: 14,3417           30033                           CA       CDUY                                  
040792,000954: 14,3420           50120                           INDEX    FIXLOC                                
040793,000955: 14,3421           54002                           TS       2                                     
040794,000956: 14,3422           30034                           CA       CDUZ                                  
040795,000957: 14,3423           50120                           INDEX    FIXLOC                                
040796,000958: 14,3424           54003                           TS       3                                     
040797,000959: 14,3425           00003                           RELINT                                         
040798,000960: 14,3426           06061                           TC       DANZIG                                #                                        +
040799,000961: 14,3427                                           COUNT*   $$/INFLT                              
040800,000962: 

Page 949

040802,000964:                                                                                                  #  NAME - P51 - IMU ORIENTATION DETERMINATION
040803,000965:                                                                                                  #  MOD. NO. 1    23 JAN 67                               LOG SECTION - P51-P53
040804,000966:                                                                                                  #  MOD BY STURLAUGSON                                    ASSEMBLY SUNDANCE REV56
040805,000967: 
040806,000968:                                                                                                  #  FUNCTIONAL DESCRIPTION
040807,000969:                                                                                                  #        DETERMINES THE INERTIAL ORIENTATION OF THE IMU.  THE PROGRAM IS SELECTED BY DSKY ENTRY.  THE SIGHTING
040808,000970:                                                                                                  #        (AOTMARK) ROUTINE IS CALLED TO COLLECT AND PROCESS MARKED-STAR DATA.  AOTMARK (R53) RETURNS THE STAR NUMBER AND THE
040809,000971:                                                                                                  #        STAR LOS VECTOR IN STARAD +6.  TWO STARS ARE THUS SIGHTED.  THE ANGLE BETWEEN THE TWO STARS IS THEN CHECKED AT
040810,000972:                                                                                                  #        CHKSDATA (R54).  REFSMMAT IS THEN COMPUTED AT AXISGEN.
040811,000973: 
040812,000974:                                                                                                  #  CALLING SEQUENCE
040813,000975:                                                                                                  #        THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
040814,000976: 
040815,000977:                                                                                                  #  SUBROUTINES CALLED.
040816,000978:                                                                                                  #        GOPERF3
040817,000979:                                                                                                  #        GOPERF1
040818,000980:                                                                                                  #        GODSPR
040819,000981:                                                                                                  #        IMUCOARS
040820,000982:                                                                                                  #        IMUFIN20
040821,000983:                                                                                                  #        AOTMARK (R53)
040822,000984:                                                                                                  #        CHKSDATA (R54)
040823,000985:                                                                                                  #        MKRELEAS
040824,000986:                                                                                                  #        AXISGEN
040825,000987:                                                                                                  #        MATMOVE
040826,000988: 
040827,000989:                                                                                                  #  ALARMS
040828,000990:                                                                                                  #        NONE.
040829,000991: 
040830,000992:                                                                                                  #  ERASABLE INITIALIZATION
040831,000993:                                                                                                  #        IMU ZERO FLAG SHOULD BE SET.
040832,000994: 
040833,000995:                                                                                                  #  OUTPUT
040834,000996:                                                                                                  #        REFSMMAT
040835,000997:                                                                                                  #        REFSMFLG
040836,000998: 
040837,000999:                                                                                                  #  DEBRIS
040838,001000:                                                                                                  #        WORK AREA
040839,001001:                                                                                                  #        STARAD
040840,001002:                                                                                                  #        STARIND
040841,001003:                                                                                                  #        BESTI
040842,001004:                                                                                                  #        BESTJ
040843,001005: 
040844,001006: 14,3427                                           COUNT*   $$/P51                                

Page 950

040846,001008: 14,3427           04616        P51                TC       BANKCALL                              #  IS ISS ON - IF NOT, IMUCHK WILL SEND
040847,001009: 14,3430           33652                           CADR     IMUCHK                                #  ALARM CODE 210 AND EXIT VIA GOTOPOOH.
040848,001010: 
040849,001011: 14,3431           34761                           CAF      OCT15                                 
040850,001012: 14,3432           04616                           TC       BANKCALL                              
040851,001013: 14,3433           20623                           CADR     GOPERF1                               
040852,001014: 14,3434           06001                           TC       GOTOPOOH                              #  TERM.
040853,001015: 14,3435           13461                           TCF      P51B                                  #  V33
040854,001016: 14,3436           05353                           TC       PHASCHNG                              
040855,001017: 14,3437           04024                           OCT      04024                                 
040856,001018: 
040857,001019: 14,3440           34755                           CAF      ZERO                                  
040858,001020: 14,3441           54321                           TS       THETAD                                #  ZERO THE GIMBALS
040859,001021: 14,3442           54322                           TS       THETAD     +1                         
040860,001022: 14,3443           54323                           TS       THETAD     +2                         
040861,001023: 14,3444           35010                           CAF      V06N22                                
040862,001024: 14,3445           04616                           TC       BANKCALL                              
040863,001025: 14,3446           20446                           CADR     GODSPRET                              
040864,001026: 14,3447           33564                           CAF      V41K                                  #  NOW DISPLAY COARSE ALIGN VERB 41
040865,001027: 14,3450           04616                           TC       BANKCALL                              
040866,001028: 14,3451           20446                           CADR     GODSPRET                              
040867,001029: 14,3452           06037                           TC       INTPRET                               
040868,001030: 14,3453           77624                           CALL                                           
040869,001031: 14,3454           31565                                    COARSE                                
040870,001032: 14,3455           77776                           EXIT                                           
040871,001033: 14,3456           05353                           TC       PHASCHNG                              
040872,001034: 14,3457           04024                           OCT      04024                                 
040873,001035: 14,3460           13431                           TCF      P51        +2                         
040874,001036: 
040875,001037: 14,3461           05353        P51B               TC       PHASCHNG                              
040876,001038: 14,3462           00014                           OCT      00014                                 
040877,001039: 14,3463           06037                           TC       INTPRET                               
040878,001040: 14,3464           77624                           CALL                                           
040879,001041: 14,3465           31602                                    NCOARSE                               
040880,001042: 14,3466           40331                           SSP      SETPD                                 
040881,001043: 14,3467           02760                                    STARIND                               #  INDEX - STAR 1 OR 2
040882,001044: 14,3470           00000                                    0                                     
040883,001045: 14,3471           00001                                    0                                     
040884,001046: 14,3472           77776        P51C               EXIT                                           
040885,001047: 14,3473           05353                           TC       PHASCHNG                              
040886,001048: 14,3474           04024                           OCT      04024                                 
040887,001049: 
040888,001050: 14,3475           04616                           TC       BANKCALL                              
040889,001051: 14,3476           16000                           CADR     AOTMARK                               #  R53
040890,001052: 14,3477           04616                           TC       BANKCALL                              
040891,001053: 14,3500           17712                           CADR     AOTSTALL                              
040892,001054: 14,3501           05711                           TC       CURTAINS                              
040893,001055: 14,3502           11757                           CCS      STARIND                               
040894,001056: 14,3503           13511                           TCF      P51D       +1                         
040895,001057: 14,3504           06037                           TC       INTPRET                               

Page 951

040897,001059: 14,3505           77775                           VLOAD                                          
040898,001060: 14,3506           02715                                    STARAD     +6                         
040899,001061: 14,3507           02761                           STORE    STARSAV1                              
040900,001062: 14,3510           77776        P51D               EXIT                                           
040901,001063: 14,3511           05353                           TC       PHASCHNG                              
040902,001064: 14,3512           04024                           OCT      04024                                 
040903,001065: 
040904,001066: 14,3513           11757                           CCS      STARIND                               
040905,001067: 14,3514           13530                           TCF      P51E                                  
040906,001068: 14,3515           05353                           TC       PHASCHNG                              
040907,001069: 14,3516           04024                           OCT      04024                                 
040908,001070: 
040909,001071: 14,3517           06037                           TC       INTPRET                               
040910,001072: 14,3520           45145                           DLOAD    CALL                                  
040911,001073: 14,3521           03562                                    TSIGHT                                
040912,001074: 14,3522           32472                                    PLANET                                
040913,001075: 14,3523           03554                           STORE    PLANVEC                               
040914,001076: 14,3524           77776                           EXIT                                           
040915,001077: 14,3525           34753                           CAF      BIT1                                  
040916,001078: 14,3526           55757                           TS       STARIND                               
040917,001079: 14,3527           13473                           TCF      P51C       +1                         #  DO SECOND STAR
040918,001080: 14,3530           05353        P51E               TC       PHASCHNG                              
040919,001081: 14,3531           04024                           OCT      04024                                 
040920,001082: 
040921,001083: 14,3532           06037                           TC       INTPRET                               
040922,001084: 14,3533           45145                           DLOAD    CALL                                  
040923,001085: 14,3534           03562                                    TSIGHT                                
040924,001086: 14,3535           32472                                    PLANET                                
040925,001087: 14,3536           24015                           STOVL    12D                                   
040926,001088: 14,3537           03554                                    PLANVEC                               
040927,001089: 14,3540           24007                           STOVL    6D                                    
040928,001090: 14,3541           02761                                    STARSAV1                              
040929,001091: 14,3542           26707                           STOVL    STARAD                                
040930,001092: 14,3543           02767                                    STARSAV2                              
040931,001093: 14,3544           36715                           STCALL   STARAD     +6                         
040932,001094: 14,3545           31256                                    CHKSDATA                              #  CHECK STAR ANGLES IN STARAD AND
040933,001095: 14,3546           77414                           BON      EXIT                                  
040934,001096: 14,3547           00314                                    FREEFLAG                              
040935,001097: 14,3550           31552                                    P51G                                  
040936,001098: 14,3551           03431                           TC       P51        +2                         
040937,001099: 14,3552           77624        P51G               CALL                                           
040938,001100: 14,3553           47441                                    AXISGEN                               #  COME BACK WITH REFSMMAT IN XDC
040939,001101: 14,3554           75160                           AXC,1    AXC,2                                 
040940,001102: 14,3555           02664                                    XDC                                   
040941,001103: 14,3556           01733                                    REFSMMAT                              
040942,001104: 14,3557           77624                           CALL                                           
040943,001105: 14,3560           31377                                    MATMOVE                               
040944,001106: 14,3561           77414                           SET      EXIT                                  
040945,001107: 14,3562           01462                                    REFSMFLG                              
040946,001108: 14,3563           06001                           TC       GOTOPOOH                              #  FINIS

Page 952

040948,001110: 14,3564           12200        V41K               VN       4100                                  
040949,001111: 14,3565           77776        COARSE             EXIT                                           
040950,001112: 14,3566           04616                           TC       BANKCALL                              
040951,001113: 14,3567           17000                           CADR     IMUCOARS                              
040952,001114: 14,3570           04616                           TC       BANKCALL                              
040953,001115: 14,3571           17716                           CADR     IMUSTALL                              
040954,001116: 14,3572           05711                           TC       CURTAINS                              
040955,001117: 14,3573           04616                           TC       BANKCALL                              
040956,001118: 14,3574           17210                           CADR     IMUFINE                               
040957,001119: 14,3575           04616                           TC       BANKCALL                              
040958,001120: 14,3576           17716                           CADR     IMUSTALL                              
040959,001121: 14,3577           05711                           TC       CURTAINS                              
040960,001122: 14,3600           06037                           TC       INTPRET                               
040961,001123: 14,3601           77616                           RVQ                                            
040962,001124: 14,3602           77776        NCOARSE            EXIT                                           
040963,001125: 14,3603           30025                           CA       TIME1                                 
040964,001126: 14,3604           55075                           TS       1/PIPADT                              
040965,001127: 14,3605           44755                           CS       ZERO                                  
040966,001128: 14,3606           54037                           TS       PIPAX                                 
040967,001129: 14,3607           54040                           TS       PIPAY                                 
040968,001130: 14,3610           54041                           TS       PIPAZ                                 
040969,001131: 14,3611           06037                           TC       INTPRET                               
040970,001132: 14,3612           77775                           VLOAD                                          
040971,001133: 14,3613           24007                                    ZEROVEC                               
040972,001134: 14,3614           01472                           STORE    GCOMP                                 
040973,001135: 14,3615           43414                           SET      RVQ                                   
040974,001136: 14,3616           01060                                    DRIFTFLG                              
040975,001137: 

Page 953

040977,001139:                                                                                                  #  NAME - S52.2
040978,001140:                                                                                                  #  FUNCTION - COMPUTE GIMBAL ANGLES FOR DESIRED SM AND PRESENT VEHICLE
040979,001141:                                                                                                  #  CALL - CALL S52.2
040980,001142:                                                                                                  #  INPUT - X,Y,ZSMD
040981,001143:                                                                                                  #  OUTPUT - OGC,IGC,MGC,THETAD,+1,+2
040982,001144:                                                                                                  #  SUBROUTINES - CDUTRIG, CALCSMSC, MATMOVE, CALCGA
040983,001145: 
040984,001146: 14,3617                                           COUNT*   $$/S52.1                              
040985,001147: 14,3617           45020        S52.2              STQ      CALL                                  
040986,001148: 14,3620           02746                                    QMAJ                                  
040987,001149: 14,3621           47537                                    CDUTRIG                               
040988,001150: 14,3622           77624                           CALL                                           
040989,001151: 14,3623           20030                                    CALCSMSC                              
040990,001152: 14,3624           66370                           AXT,1    SSP                                   
040991,001153: 14,3625           00022                                    18D                                   
040992,001154: 14,3626           00051                                    S1                                    
040993,001155: 14,3627           00006                                    6D                                    
040994,001156: 14,3630           61373        S52.2A             VLOAD*   VXM                                   
040995,001157: 14,3631           02707                                    XNB        +18D,1                     
040996,001158: 14,3632           01734                                    REFSMMAT                              
040997,001159: 14,3633           77656                           UNIT                                           
040998,001160: 14,3634           06707                           STORE    XNB        +18D,1                     
040999,001161: 14,3635           77700                           TIX,1                                          
041000,001162: 14,3636           31630                                    S52.2A                                
041001,001163: 14,3637           75160        S52.2.1            AXC,1    AXC,2                                 
041002,001164: 14,3640           03606                                    XSMD                                  
041003,001165: 14,3641           02642                                    XSM                                   
041004,001166: 14,3642           77624                           CALL                                           
041005,001167: 14,3643           31377                                    MATMOVE                               
041006,001168: 14,3644           77624                           CALL                                           
041007,001169: 14,3645           47353                                    CALCGA                                
041008,001170: 14,3646           77650                           GOTO                                           
041009,001171: 14,3647           02746                                    QMAJ                                  
041010,001172: 

Page 954

041012,001174:                                                                                                  #  NAME - S52.3
041013,001175:                                                                                                  #  FUNCTION      XSMD= UNIT R
041014,001176:                                                                                                  #                YSMD= UNIT(V X R)
041015,001177:                                                                                                  #                ZSMD= UNIT(XSMD X YSMD)
041016,001178:                                                                                                  #  CALL          DLOAD   CALL
041017,001179:                                                                                                  #                        TALIGN
041018,001180:                                                                                                  #                        S52.3
041019,001181:                                                                                                  #  INPUT -       TIME OF ALIGNMENT IN MPAC
041020,001182:                                                                                                  #  OUTPUT -      X,Y,ZSMD
041021,001183:                                                                                                  #  SUBROUTINES - CSMCONIC
041022,001184: 
041023,001185: 14,3650                                           COUNT*   $$/S52.3                              
041024,001186: 14,3650           77620        S52.3              STQ                                            
041025,001187: 14,3651           02746                                    QMAJ                                  
041026,001188: 14,3652           34041                           STCALL   TDEC1                                 
041027,001189: 14,3653           27100                                    LEMCONIC                              
041028,001190: 14,3654           53575                           VLOAD    UNIT                                  
041029,001191: 14,3655           00001                                    RATT                                  
041030,001192: 14,3656           27607                           STOVL    XSMD                                  
041031,001193: 14,3657           00007                                    VATT                                  
041032,001194: 14,3660           53435                           VXV      UNIT                                  
041033,001195: 14,3661           00001                                    RATT                                  
041034,001196: 14,3662           27615                           STOVL    YSMD                                  
041035,001197: 14,3663           03607                                    XSMD                                  
041036,001198: 14,3664           53435                           VXV      UNIT                                  
041037,001199: 14,3665           03615                                    YSMD                                  
041038,001200: 14,3666           37623                           STCALL   ZSMD                                  
041039,001201: 14,3667           02746                                    QMAJ                                  
041040,001202: 

Page 955

041042,001204:                                                                                                  #  NAME - R52 (AUTOMATIC OPTICS POSITIONING ROUTINE)
041043,001205: 
041044,001206:                                                                                                  #  FUNCTION - POINT THE AOT OPTIC AXIS BY MANEUVERING THE LEM TO A NAVIGATION
041045,001207:                                                                                                  #  STAR SELECTED BY ALIGNMENT PROGRAMS OR DSKY INPUT
041046,001208: 
041047,001209:                                                                                                  #  CALLING - CALL R52
041048,001210: 
041049,001211:                                                                                                  #  INPUT - BESTI AND BESTJ (STAR CODES TIMES 6)
041050,001212: 
041051,001213:                                                                                                  #  OUTPUT - STAR CODE IN BITS 1-6, DETENT CODE IN BITS 7-9
041052,001214:                                                                                                  #  (NO CHECK IS MADE TO INSURE THE DETENT CODE TO BE VALID)
041053,001215:                                                                                                  #  POINTVSM-1/2 UNIT NAV STAR VEC IN SM
041054,001216:                                                                                                  #  SCAXIS-AOT OPTIC AXIS VEC IN NB X-Z PLANE
041055,001217: 
041056,001218:                                                                                                  #  SUBROUT - R60LEM
041057,001219: 
041058,001220: 14,3670                                           COUNT*   $$/R52                                
041059,001221: 14,3670           77420        R52                STQ      EXIT                                  
041060,001222: 14,3671           03665                                    SAVQR52                               
041061,001223: 14,3672           51757                           INDEX    STARIND                               
041062,001224: 14,3673           31755                           CA       BESTI                                 #  PICK UP STARCODE DETERMINED BY R56
041063,001225: 14,3674           00006                           EXTEND                                         
041064,001226: 14,3675           73771                           MP       1/6TH                                 
041065,001227: 14,3676           64744                           AD       BIT8                                  #  SET DETENT POSITION 2
041066,001228: 14,3677           54735                           TS       STARCODE                              #  SCALE AND STORE IN STARCODE
041067,001229: 
041068,001230: 14,3700           33772        R52A               CAF      V01N70                                
041069,001231: 14,3701           04616                           TC       BANKCALL                              
041070,001232: 14,3702           20476                           CADR     GOFLASH                               #  DISPLAY STARCODE AND WAIT FOR RESPONSE
041071,001233: 14,3703           06001                           TC       GOTOPOOH                              #  V34 - TERMINATE
041072,001234: 14,3704           13706                           TCF      R52B                                  #  V33 - PROCEED TO ORIENT LEM
041073,001235: 14,3705           13700                           TCF      R52A                                  #  ENTER - SELECT NEW STARCODE - RECYCLE
041074,001236: 
041075,001237: 14,3706           05516        R52B               TC       DOWNFLAG                              
041076,001238: 14,3707           00124                           ADRES    3AXISFLG                              #  BIT6 OF FLAGWRD5 ZERO TO ALLOW VECPOINT
041077,001239: 14,3710           30735                           CA       STARCODE                              #  GRAB DETENT CODE
041078,001240: 14,3711           77744                           MASK     HIGH9                                 
041079,001241: 14,3712           00006                           EXTEND                                         
041080,001242: 14,3713           74743                           MP       BIT9                                  
041081,001243: 14,3714           54001                           TS       L                                     #  TEMP STORE DETENT
041082,001244: 
041083,001245: 14,3715           00006                           EXTEND                                         
041084,001246: 14,3716           63734                           BZMF     GETAZEL                               #  CODE 0, COAS CALIBRATION
041085,001247: 
041086,001248: 14,3717           65660                           AD       NEG7                                  
041087,001249: 14,3720           00006                           EXTEND                                         
041088,001250: 14,3721           13734                           BZF      GETAZEL                               #  CODE 7, COAS SIGHTING
041089,001251: 
041090,001252: 14,3722  E7,1551                                  EBANK=   XYMARK                                
041091,001253: 14,3722           35016                           CA       EBANK7                                
041092,001254: 14,3723           54003                           TS       EBANK                                 

Page 956

041094,001256: 14,3724           50001                           INDEX    L                                     
041095,001257: 14,3725           31403                           CA       AOTAZ      -1                         #  PICK UP AZ CORRESPONDING TO DETENT
041096,001258: 14,3726           54001                           TS       L                                     
041097,001259: 14,3727  E5,1642                                  EBANK=   XSM                                   
041098,001260: 14,3727           35014                           CA       EBANK5                                #  CHANGE TO EBANK5 BUT DONT DISTURB L
041099,001261: 14,3730           54003                           TS       EBANK                                 
041100,001262: 14,3731           34737                           CA       BIT13                                 #  SET ELV TO 45 DEG
041101,001263: 14,3732           56001                           XCH      L                                     #  SET C(A)=AZ, C(L)=45 DEG
041102,001264: 14,3733           13744                           TCF      AZEL                                  #  GO COMP OPTIC AXIS
041103,001265: 
041104,001266: 14,3734           33773        GETAZEL            CAF      V06N87                                #  CODE 0 OR 7, GET AZ AND EL KEY IN
041105,001267: 14,3735           04616                           TC       BANKCALL                              
041106,001268: 14,3736           20476                           CADR     GOFLASH                               
041107,001269: 14,3737           06001                           TC       GOTOPOOH                              #  V34 - TERMINATE
041108,001270: 14,3740           13742                           TCF      +2                                    #  PROCEED - CALC OPTIC AXIS
041109,001271: 14,3741           13734                           TCF      GETAZEL                               #  ENTER - RECYCLE
041110,001272: 
041111,001273: 14,3742           00006                           EXTEND                                         
041112,001274: 14,3743           31350                           DCA      AZ                                    #  PICK UP AZ AND EL IN SP 2S COMP
041113,001275: 14,3744           50120        AZEL               INDEX    FIXLOC                                #  JAM AZ AND EL IN 8 AND 9 OF VAC
041114,001276: 14,3745           52011                           DXCH     8D                                    
041115,001277: 14,3746           06037                           TC       INTPRET                               
041116,001278: 14,3747           77624                           CALL                                           #  GO COMPUTE OPTIC AXIS AND STORE IN
041117,001279: 14,3750           10536                                    OANB                                  #  SCAXIS IN NB COORDS
041118,001280: 14,3751           45034                           RTB      CALL                                  
041119,001281: 14,3752           21573                                    LOADTIME                              
041120,001282: 14,3753           32472                                    PLANET                                
041121,001283: 14,3754           53521                           MXV      UNIT                                  
041122,001284: 14,3755           01734                                    REFSMMAT                              
041123,001285: 14,3756           03773                           STORE    POINTVSM                              #  STORE FOR VECPOINT
041124,001286: 
041125,001287: 14,3757           77776                           EXIT                                           
041126,001288: 14,3760           04616                           TC       BANKCALL                              
041127,001289: 14,3761           54123                           CADR     R60LEM                                #  GO TORQUE LEM OPTIC AXIS TO STAR LOS
041128,001290: 
041129,001291: 14,3762           37744                           CAF      HIGH9                                 #  IF COAS CALIBRATION CODE 0, RECYCLE
041130,001292: 14,3763           70735                           MASK     STARCODE                              
041131,001293: 14,3764           00006                           EXTEND                                         
041132,001294: 14,3765           13700                           BZF      R52A                                  
041133,001295: 
041134,001296: 14,3766           06037                           TC       INTPRET                               #  RETURN FROM KALCMANU
041135,001297: 14,3767           77650                           GOTO                                           
041136,001298: 14,3770           03665                                    SAVQR52                               #  RETURN TO CALLER
041137,001299: 
041138,001300: 14,3771           05253        1/6TH              DEC      .1666667                              
041139,001301: 14,3772           00306        V01N70             VN       0170                                  
041140,001302: 14,3773           01527        V06N87             VN       687                                   
041141,001303: 

Page 957

041143,001305:                                                                                                  #  LUNAR SURFACE STAR AQUISITION
041144,001306: 
041145,001307: 15,2245                                           BANK     15                                    
041146,001308: 15,2000                                           SETLOC   P50S                                  
041147,001309: 15,2000                                           BANK                                           
041148,001310: 15,2245                                           COUNT*   $$/R59                                
041149,001311: 
041150,001312: 15,2245           40077        R59                CS       FLAGWRD3                              
041151,001313: 15,2246           74737                           MASK     REFSMBIT                              #  IF REFSMMAT FLAG CLEAR BYPASS STAR AQUIR
041152,001314: 15,2247           10000                           CCS      A                                     
041153,001315: 15,2250           12455                           TCF      R59OUT                                #  NO REFSMMAT GO TO AOTMARK
041154,001316: 
041155,001317: 15,2251           32463                           CAF      V01N70*                               #  SELECT STAR CODE FOR ACQUISITION
041156,001318: 15,2252           04616                           TC       BANKCALL                              
041157,001319: 15,2253           20476                           CADR     GOFLASH                               
041158,001320: 15,2254           06001                           TC       GOTOPOOH                              #  V34 - TERMINATE
041159,001321: 15,2255           12257                           TCF      R59A                                  #  V33 - PROCEED
041160,001322: 15,2256           12245                           TCF      R59                                   #  V32 - RECYCLE
041161,001323: 
041162,001324: 15,2257           47744        R59A               CS       HIGH9                                 #  GRAB STARCODE FOR INDEX
041163,001325: 15,2260           70735                           MASK     AOTCODE                               
041164,001326: 15,2261           00006                           EXTEND                                         
041165,001327: 15,2262           76242                           MP       REVCNT                                #  JUST 6
041166,001328: 15,2263           56001                           XCH      L                                     
041167,001329: 15,2264           51757                           INDEX    STARIND                               
041168,001330: 15,2265           55755                           TS       BESTI                                 
041169,001331: 15,2266           50120                           INDEX    FIXLOC                                
041170,001332: 15,2267           54046                           TS       X1                                    #  CODE X 6 FOR CATLOG STAR INDEX
041171,001333: 15,2270           00006                           EXTEND                                         
041172,001334: 15,2271           12455                           BZF      R59OUT                                #  BYPASS AQUISITION IF NOT CATLOG STAR
041173,001335: 15,2272           40000                           COM                                            
041174,001336: 15,2273           62561                           AD       DEC227                                
041175,001337: 15,2274           00006                           EXTEND                                         
041176,001338: 15,2275           62455                           BZMF     R59OUT                                
041177,001339: 
041178,001340: 15,2276           06037                           TC       INTPRET                               
041179,001341: 15,2277           64373                           VLOAD*   MXV                                   
041180,001342: 15,2300           30347                                    CATLOG,1                              #  GRAB STAR VECTOR
041181,001343: 15,2301           01734                                    REFSMMAT                              #  TRANSFORM TO SM
041182,001344: 15,2302           45056                           UNIT     CALL                                  
041183,001345: 15,2303           47646                                    CDU*SMNB                              
041184,001346: 15,2304           02731                           STORE    STAR                                  #  TEMP STORE STAR VEC(NB)
041185,001347: 15,2305           77776                           EXIT                                           
041186,001348: 
041187,001349: 15,2306           34753                           CAF      BIT1                                  #  INITIALIZE AZ POSITION CODE TO 1 (-60)
041188,001350: 15,2307           55242                           TS       POSCODE                               
041189,001351: 
041190,001352: 15,2310  E7,1551                                  EBANK=   XYMARK                                
041191,001353: 15,2310           35016        INCAZ              CA       EBANK7                                
041192,001354: 15,2311           54003                           TS       EBANK                                 
041193,001355: 

Page 958

041195,001357: 15,2312           51242                           INDEX    POSCODE                               
041196,001358: 15,2313           31403                           CA       AOTAZ      -1                         #  PICK UP AZ CORRESPONDING TO POSCODE
041197,001359: 15,2314           54001                           TS       L                                     
041198,001360: 
041199,001361: 15,2315  E5,1642                                  EBANK=   XSM                                   
041200,001362: 15,2315           35014                           CA       EBANK5                                
041201,001363: 15,2316           54003                           TS       EBANK                                 
041202,001364: 
041203,001365: 15,2317           34737                           CA       BIT13                                 #  SET ELV TO 45 DEG
041204,001366: 15,2320           56001                           XCH      L                                     #  SET C(A)=AZ, C(L)=45 DEG
041205,001367: 15,2321           55745                           TS       QMIN                                  #  STORE QMIN=AZ FOR LATER
041206,001368: 15,2322           50120                           INDEX    FIXLOC                                
041207,001369: 15,2323           52011                           DXCH     8D                                    #  JAM AZ IN 8D, 45 DEG IN 9D FOR OANB
041208,001370: 
041209,001371: 15,2324           06037                           TC       INTPRET                               
041210,001372: 15,2325           77624                           CALL                                           
041211,001373: 15,2326           10536                                    OANB                                  #  GO CALC OPTIC AXIS WRT NB
041212,001374: 15,2327           50375                           VLOAD    DOT                                   
041213,001375: 15,2330           02731                                    STAR                                  #  DOT STAR WITH OA
041214,001376: 15,2331           03765                                    SCAXIS                                
041215,001377: 15,2332           65552                           SL1      ARCCOS                                
041216,001378: 15,2333           00031                           STORE    24D                                   #  TEMP STORE ARCCOS(STAR.OPTAXIS)
041217,001379: 
041218,001380: 15,2334           51025                           DSU      BPL                                   
041219,001381: 15,2335           32466                                    DEG30                                 #  SEE IF STAR IN AOT FIELD-OF-VIEW
041220,001382: 15,2336           32420                                    NXAX                                  #  NOT IN FIELD - TRY NEXT POSITION
041221,001383: 15,2337           45345                           DLOAD    DSU                                   #  SEE IF STAR AT FIELD CENTER
041222,001384: 15,2340           00031                                    24D                                   
041223,001385: 15,2341           32470                                    DEG.5                                 
041224,001386: 15,2342           71240                           BMN      DLOAD                                 #  CALC SPIRAL AND CURSOR
041225,001387: 15,2343           32413                                    ZSPCR                                 #  GO ZERO CURSOR AND SPIRAL
041226,001388: 15,2344           00031                                    24D                                   #  GET SPIRAL
041227,001389: 15,2345           42405                           DMP      SL4                                   
041228,001390: 15,2346           25764                                    3/4                                   #  12 SCALED AT 16
041229,001391: 15,2347           24031                           STOVL    24D                                   #  12(ARCCOS(AO.STAR)) SCALED IN REVS
041230,001392: 
041231,001393: 15,2350           03765                                    SCAXIS                                #  OA
041232,001394: 15,2351           53435                           VXV      UNIT                                  
041233,001395: 15,2352           24005                                    XUNIT                                 
041234,001396: 15,2353           47206                           PUSH     VXV                                   #  OA X UNITX    PD 0-5
041235,001397: 15,2354           03765                                    SCAXIS                                
041236,001398: 15,2355           77676                           VCOMP                                          
041237,001399: 15,2356           63256                           UNIT     PDVL                                  #  UNIT(OA X (OA X UNITX))       PD 6-11
041238,001400: 15,2357           03765                                    SCAXIS                                
041239,001401: 15,2360           53435                           VXV      UNIT                                  
041240,001402: 15,2361           02731                                    STAR                                  
041241,001403: 15,2362           50206                           PUSH     DOT                                   #  1/2(OA X STAR)        PD 12-17
041242,001404: 15,2363           00001                                    0                                     #  DOT WITH 1/2(OA X UNITX) FOR YROT
041243,001405: 15,2364           65552                           SL1      ARCCOS                                
041244,001406: 15,2365           24033                           STOVL    26D                                   #  STORE THET SCALED IN REVS

Page 959

041246,001408: 15,2366           77641                           DOT                                            #  UP 12-17, UP 6-11 FOR C2
041247,001409: 15,2367           71244                           BPL      DLOAD                                 #  IF THET NEG - GET 360-THET
041248,001410: 15,2370           32375                                    R59D                                  
041249,001411: 15,2371           32047                                    ABOUTONE                              
041250,001412: 15,2372           77625                           DSU                                            
041251,001413: 15,2373           00033                                    26D                                   
041252,001414: 15,2374           00033                           STORE    26D                                   #  360-THET SCALED IN REVS
041253,001415: 
041254,001416: 15,2375           70535        R59D               SLOAD    SR1                                   
041255,001417: 15,2376           02746                                    QMIN                                  #  RESCALE AZ(N) TO REVS
041256,001418: 15,2377           41415                           DAD      PUSH                                  #  PUSH YROT + AZ(N) REVS
041257,001419: 15,2400           00033                                    26D                                   
041258,001420: 15,2401           77634                           RTB                                            
041259,001421: 15,2402           21614                                    1STO2S                                
041260,001422: 15,2403           15237                           STODL    CURSOR                                #  YROT IN 1/2 REVS
041261,001423: 15,2404           00031                                    24D                                   #  LOAD SROT IN REVS
041262,001424: 15,2405           77615                           DAD                                            #  12(SEP) + YROT
041263,001425: 15,2406           77634                           RTB                                            
041264,001426: 15,2407           21614                                    1STO2S                                
041265,001427: 15,2410           01241                           STORE    SPIRAL                                #  SROT IN 1/2 REVS
041266,001428: 15,2411           77776                           EXIT                                           
041267,001429: 15,2412           12437                           TCF      79DISP                                #  GO DISPLAY CURSOR-SPIRAL-POS CODE
041268,001430: 
041269,001431: 15,2413           77776        ZSPCR              EXIT                                           
041270,001432: 15,2414           34755                           CAF      ZERO                                  #  STAR ALMOST OPTIC AXIS, ZERO CURSOR
041271,001433: 15,2415           55236                           TS       CURSOR                                #  AND SPIRAL ANGLES
041272,001434: 15,2416           55240                           TS       SPIRAL                                
041273,001435: 15,2417           12437                           TCF      79DISP                                
041274,001436: 
041275,001437: 15,2420           77776        NXAX               EXIT                                           
041276,001438: 15,2421           25242                           INCR     POSCODE                               
041277,001439: 15,2422           41242                           CS       POSCODE                               
041278,001440: 15,2423           64757                           AD       SEVEN                                 
041279,001441: 15,2424           00006                           EXTEND                                         
041280,001442: 15,2425           62427                           BZMF     R59ALM                                #  THIS STAR NOT AT ANY POSITION
041281,001443: 15,2426           12310                           TCF      INCAZ                                 
041282,001444: 
041283,001445: 15,2427           05567        R59ALM             TC       ALARM                                 #  THIS STAR CANT BE LOCATED IN AOT FIELD
041284,001446: 15,2430           00404                           OCT      404                                   
041285,001447: 15,2431           35006                           CAF      VB05N09                               #  DISPLAY ALARM
041286,001448: 15,2432           04616                           TC       BANKCALL                              
041287,001449: 15,2433           20476                           CADR     GOFLASH                               
041288,001450: 15,2434           16001                           TCF      GOTOPOOH                              #  VB34 - TERMINATE
041289,001451: 15,2435           12455                           TCF      R59OUT                                #  VB33 - PROCEED, GO WITHOUT AQUIRE
041290,001452: 15,2436           12245                           TCF      R59                                   #  VB32 - RECYCLE AND TRY ANOTHER STAR
041291,001453: 
041292,001454: 15,2437           32464        79DISP             CAF      V06N79                                #  DISPLAY CURSOR, SPIRAL AND POS CODE
041293,001455: 15,2440           04616                           TC       BANKCALL                              
041294,001456: 15,2441           20476                           CADR     GOFLASH                               
041295,001457: 15,2442           16001                           TCF      GOTOPOOH                              #  V34 - TERMINATE

Page 960

041297,001459: 15,2443           12445                           TCF      R59E                                  #  V33 - PROCEED TO MARK ROUTINE
041298,001460: 15,2444           12245                           TCF      R59                                   #  V32 - RECYCLE TO TOP OF R59 AGAIN
041299,001461: 
041300,001462: 15,2445           34757        R59E               CAF      SEVEN                                 #  GET DETENT CODE CORRESPONDING TO POSCODE
041301,001463: 15,2446           71242                           MASK     POSCODE                               
041302,001464: 15,2447           00006                           EXTEND                                         
041303,001465: 15,2450           74745                           MP       BIT7                                  #  DETENT CODE NOW IN L
041304,001466: 15,2451           47744                           CS       HIGH9                                 
041305,001467: 15,2452           70735                           MASK     AOTCODE                               #  ISOLATE STAR NO IN BIT 1-6
041306,001468: 15,2453           60001                           AD       L                                     
041307,001469: 15,2454           54735                           TS       AOTCODE                               #  STORE DETENT 7-9
041308,001470: 
041309,001471: 15,2455           04616        R59OUT             TC       BANKCALL                              #  GO TO AOTMARK FOR SIGHTING
041310,001472: 15,2456           16000                           CADR     AOTMARK                               
041311,001473: 15,2457           04616                           TC       BANKCALL                              
041312,001474: 15,2460           17712                           CADR     AOTSTALL                              #  SLEEP TILL SIGHTING DONE
041313,001475: 15,2461           05711                           TC       CURTAINS                              #  BADEND RETURN FROM AOTMARK
041314,001476: 15,2462           13054                           TCF      R59RET                                #  RETURN TO 1 STAR OR 2STAR
041315,001477: 
041316,001478: 15,2463           00306        V01N70*            VN       170                                   
041317,001479: 15,2464           01517        V06N79             VN       679                                   
041318,001480: 15,2465           02525 12525  DEG30              2DEC     .083333333                            #  30 DEGRESS
041319,001481: 15,2467           00026 30131  DEG.5              2DEC     .00138888                             #  .5 DEGRESS SCALED IN REVS
041320,001482: 15,2471           12525        DEG60              OCT      12525                                 #  60 DEG CDU SCALING
041321,001483: 15,2472     1236               CURSOR             EQUALS   GDT/2                                 
041322,001484: 15,2472     1240               SPIRAL             EQUALS   GDT/2      +2                         
041323,001485: 15,2472     1242               POSCODE            EQUALS   GDT/2      +4                         
041324,001486: 

Page 961

041326,001488:                                                                                                  #  NAME -        PLANET
041327,001489:                                                                                                  #  FUNCTION -    TO PROVIDE THE REFERENCE VECTOR FOR THE SIGHTED CELESTIAL
041328,001490:                                                                                                  #                BODY.  STARS ARE FETCHED FROM THE CATALOG, SUN, EARTH AND
041329,001491:                                                                                                  #                MOON ARE COMPUTED BY LOCSAM, PLANET VECTORS ARE ENTERED
041330,001492:                                                                                                  #                BY DSDY INPUT
041331,001493:                                                                                                  #  CALL -        CALL
041332,001494:                                                                                                  #                        PLANET
041333,001495:                                                                                                  #  INPUT -       TIME IN MPAC
041334,001496:                                                                                                  #  OUTPUT -      VECTOR IN MPAC
041335,001497:                                                                                                  #  SUBROUTINES - LOCSAM
041336,001498:                                                                                                  #  DEBRIS -      VAC, STARAD - STARAD +17
041337,001499: 
041338,001500: 15,2000                                           SETLOC   P50S                                  
041339,001501: 15,2000                                           BANK                                           
041340,001502: 15,2472                                           COUNT*   $$/P51                                
041341,001503: 
041342,001504: 15,2472           27562        PLANET             STOVL    TSIGHT                                
041343,001505: 15,2473           24007                                    ZEROVEC                               #  ZERO N88 DISPLAY VEC
041344,001506: 15,2474           02707                           STORE    STARAD                                
041345,001507: 15,2475           77420                           STQ      EXIT                                  
041346,001508: 15,2476           02736                                    GCTR                                  
041347,001509: 15,2477           47744                           CS       HIGH9                                 
041348,001510: 15,2500           70735                           MASK     AOTCODE                               
041349,001511: 15,2501           00006                           EXTEND                                         
041350,001512: 15,2502           76242                           MP       REVCNT                                
041351,001513: 15,2503           56001                           XCH      L                                     
041352,001514: 15,2504           51757                           INDEX    STARIND                               
041353,001515: 15,2505           55755                           TS       BESTI                                 
041354,001516: 15,2506           10000                           CCS      A                                     
041355,001517: 15,2507           12523                           TCF      NOTPLAN                               
041356,001518: 15,2510           32562                           CAF      VNPLANV                               
041357,001519: 15,2511           04616                           TC       BANKCALL                              
041358,001520: 15,2512           20476                           CADR     GOFLASH                               
041359,001521: 15,2513           02510                           TC       -3                                    
041360,001522: 15,2514           02516                           TC       +2                                    
041361,001523: 15,2515           02510                           TC       -5                                    
041362,001524: 15,2516           06037                           TC       INTPRET                               
041363,001525: 15,2517           53575                           VLOAD    UNIT                                  
041364,001526: 15,2520           02707                                    STARAD                                
041365,001527: 15,2521           77650                           GOTO                                           
041366,001528: 15,2522           02736                                    GCTR                                  
041367,001529: 15,2523           40000        NOTPLAN            CS       A                                     
041368,001530: 15,2524           62561                           AD       DEC227                                
041369,001531: 15,2525           00006                           EXTEND                                         
041370,001532: 15,2526           62537                           BZMF     CALSAM1                               
041371,001533: 15,2527           51757                           INDEX    STARIND                               
041372,001534: 15,2530           31755                           CA       BESTI                                 
041373,001535: 15,2531           50120                           INDEX    FIXLOC                                
041374,001536: 15,2532           54046                           TS       X1                                    
041375,001537: 15,2533           06037                           TC       INTPRET                               

Page 962

041377,001539: 15,2534           52173                           VLOAD*   GOTO                                  
041378,001540: 15,2535           30347                                    CATLOG,1                              
041379,001541: 15,2536           02736                                    GCTR                                  
041380,001542: 15,2537           06037        CALSAM1            TC       INTPRET                               
041381,001543: 15,2540           45145        CALSAM             DLOAD    CALL                                  
041382,001544: 15,2541           03562                                    TSIGHT                                
041383,001545: 15,2542           30506                                    LOCSAM                                
041384,001546: 15,2543           77340                           LXC,1    VLOAD                                 
041385,001547: 15,2544           02757                                    STARIND                               
041386,001548: 15,2545           02707                                    VEARTH                                
041387,001549: 15,2546           24001                           STOVL    0D                                    
041388,001550: 15,2547           02715                                    VSUN                                  
041389,001551: 15,2550           26707                           STOVL    VEARTH                                
041390,001552: 15,2551           00001                                    0D                                    
041391,001553: 15,2552           02715                           STORE    VSUN                                  
041392,001554: 15,2553           70143                           DLOAD*   LXC,1                                 
041393,001555: 15,2554           02756                                    BESTI,1                               
041394,001556: 15,2555           00154                                    MPAC                                  
041395,001557: 15,2556           52173                           VLOAD*   GOTO                                  
041396,001558: 15,2557           02343                                    STARAD     -228D,1                    
041397,001559: 15,2560           02736                                    GCTR                                  
041398,001560: 15,2561           00343        DEC227             DEC      227        B-14                       
041399,001561: 15,2562           01530        VNPLANV            VN       0688                                  
041400,001562: 15,2563  37,3544               PIPSRINE           =        PIPASR     +3                         #  EBANK NOT 4 SO DONT LOAD PIPTIME1
041401,001563: 

Page 963

041403,001565:                                                                                                  #  GRAVITY VECTOR DETERMINATION ROUTINE
041404,001566:                                                                                                  #  BY KEN VINCENT
041405,001567: 
041406,001568:                                                                                                  #  FOR DETAILED DESCRIPTION SEE 504GSOP 5.6.3.2.5
041407,001569: 
041408,001570:                                                                                                  #  THIS PROGRAM FINDS THE DIRECTION OF THE MOONS GRAVITY
041409,001571:                                                                                                  #  WHILE THE LM IS ON THE MOONS SURFACE.  IT WILL BE USED
041410,001572:                                                                                                  #  FOR LUNAR SURFACE ALIGNMENT.  THE GRAVITY VECTOR IS
041411,001573:                                                                                                  #  DETERMINED BY READING THE PIPAS WITH THE IMU AT TWO
041412,001574:                                                                                                  #  PARTICULAR ORIONTATIONS.  THE TWO READINGS ARE AVERAGED
041413,001575:                                                                                                  #  AND UNITIZED AND TRANSFORMED TO NB COORDINATES.  THE TWO
041414,001576:                                                                                                  #  ORIENTATION WERE CHOSEN TO REDUCE BIAS ERRORS IN THE
041415,001577:                                                                                                  #  READINGS.
041416,001578: 
041417,001579:                                                                                                  #  CALL -
041418,001580:                                                                                                  #        TC      BANKCALL
041419,001581:                                                                                                  #        CADR    GVDETER
041420,001582: 
041421,001583:                                                                                                  #  INPUTS -
041422,001584:                                                                                                  #        PIPAS, CDUS
041423,001585: 
041424,001586:                                                                                                  #  OUTPUTS -
041425,001587:                                                                                                  #        STARSAV1 = UNIT GRAVITY
041426,001588:                                                                                                  #        GSAV     = DITTO
041427,001589:                                                                                                  #        GRAVBIT  = 1
041428,001590: 
041429,001591:                                                                                                  #  SUBROUTINES -
041430,001592:                                                                                                  #        PIPASR, IMUCOARS, IMUFINE, IMUSTALL, 1/PIPA, DELAYJOB, CDUTRIG,
041431,001593:                                                                                                  #        *NBSM*, *SNMB*, CALCGA, FOFLASH
041432,001594: 
041433,001595:                                                                                                  #  DEBRIS -
041434,001596:                                                                                                  #        VAC, SAC, STARAD, XSM, XNB, THETAD, DELV, COSCDU, SINCDU
041435,001597: 
041436,001598: 15,2563           32772        GVDETER            CAF      42DEG                                 
041437,001599: 15,2564           54321                           TS       THETAD                                
041438,001600: 15,2565           40000                           COM                                            
041439,001601: 15,2566           54322                           TS       THETAD     +1                         
041440,001602: 15,2567           32773                           CAF      35DEG                                 
041441,001603: 15,2570           54323                           TS       THETAD     +2                         
041442,001604: 15,2571           06037                           TC       INTPRET                               
041443,001605: 15,2572           45014                           CLEAR    CALL                                  
041444,001606: 15,2573           01662                                    REFSMFLG                              
041445,001607: 15,2574           32670                                    LUNG                                  
041446,001608: 
041447,001609:                                                                                                  #  FIND GIMBAL ANGLES WHICH ROTATE SM 180 DEG ABOUT G VEC
041448,001610: 
041449,001611:                                                                                                  #        DEFINE G COOR SYS
041450,001612:                                                                                                  #                      -
041451,001613:                                                                                                  #                      X          UNIT G     
041452,001614:                                                                                                  #                *     -                  - 
041453,001615:                                                                                                  #                M =   Y   =   UNITEZSM * X )
041454,001616:                                                                                                  #                      -            -     -   
041455,001617:                                                                                                  #                      Z       UNIT(X   * Y )
041456,001618: 
041457,001619:                                                                                                  #        THEN ROTATED SM WRT PRESENT IS
041458,001620: 
041459,001621:                                                                                                  #                             1,  0,  0  
041460,001622:                                                                                                  #                 *      *T               *             *      *

Page 964

041462,001624:                                                                                                  #                XSM =   M    0, -1,  0   M  =  2 (X X ) - 1/2 I  *
041463,001625:                                                                                                  #                                                   I J
041464,001626:                                                                                                  #                             0,  0, -1 
041465,001627: 
041466,001628:                                                                                                  #        ALSO NB WRT PRES SM IS
041467,001629: 
041468,001630:                                                                                                  #                 *      *  *
041469,001631:                                                                                                  #                XNB = NBSM I
041470,001632:                                                                                                  #                                 *    *
041471,001633:                                                                                                  #        GIMBAL ANGLES = CALCGA( XSM, XNB )
041472,001634: 
041473,001635: 15,2000                                           SETLOC   P50S                                  
041474,001636: 15,2000                                           BANK                                           
041475,001637: 15,2575                                           COUNT*   $$/P57                                
041476,001638: 15,2575           66370                           AXT,1    SSP                                   #  X1=18
041477,001639: 15,2576           00022                                    18D                                   #  S1=6
041478,001640: 15,2577           00051                                    S1                                    #  X2, -2
041479,001641: 15,2600           00006                                    6D                                    
041480,001642: 15,2601           77744                           LXC,2                                          
041481,001643: 15,2602           00050                                    S1                                    
041482,001644: 15,2603           45173        GRAVEL             VLOAD*   CALL                                  
041483,001645: 15,2604           54000                                    XUNIT      -6,2                       
041484,001646: 15,2605           47673                                    *NBSM*                                #  SIN AND COS COMPUTED IN LUNG
041485,001647: 15,2606           06707                           STORE    XNB        +18D,1                     
041486,001648: 15,2607           77775                           VLOAD                                          
041487,001649: 15,2610           02731                                    STAR                                  
041488,001650: 15,2611           73744                           LXC,2    VXSC*                                 #  COMPLEMENT - UNITX ARE BACKWARD -
041489,001651: 15,2612           00047                                    X2                                    
041490,001652: 15,2613           75040                                    STAR       +6,2                       #  OUTER PRODUCT
041491,001653: 15,2614           71152                           VSL2     LXC,2                                 
041492,001654: 15,2615           00047                                    X2                                    
041493,001655: 15,2616           63047                           VSU*     INCR,2                                
041494,001656: 15,2617           54000                                    XUNIT      -6,2                       
041495,001657: 15,2620           00002                                    2D                                    
041496,001658: 15,2621           06665                           STORE    XSM        +18D,1                     
041497,001659: 15,2622           45100                           TIX,1    CALL                                  
041498,001660: 15,2623           32603                                    GRAVEL                                
041499,001661: 15,2624           47353                                    CALCGA                                
041500,001662: 15,2625           74575                           VLOAD    VSR1                                  
041501,001663: 15,2626           02715                                    GOUT                                  
041502,001664: 15,2627           36723                           STCALL   STARAD     +12D                       
041503,001665: 15,2630           32670                                    LUNG                                  
041504,001666: 15,2631           74575                           VLOAD    VSR1                                  
041505,001667: 15,2632           02715                                    GOUT                                  
041506,001668: 15,2633           53455                           VAD      UNIT                                  
041507,001669: 15,2634           02723                                    STARAD     +12D                       
041508,001670: 15,2635           02761                           STORE    STARSAV1                              
041509,001671: 15,2636           77641                           DOT                                            
041510,001672: 15,2637           02231                                    GSAV                                  
041511,001673: 15,2640           65552                           SL1      ACOS                                  

Page 965

041513,001675: 15,2641           01046                           STORE    DSPTEM1                               
041514,001676: 15,2642           77776                           EXIT                                           
041515,001677: 15,2643           05516                           TC       DOWNFLAG                              #  CLEAR FREEFLAG IN CASE OF RECYCLE
041516,001678: 15,2644           00014                           ADRES    FREEFLAG                              
041517,001679: 
041518,001680: 15,2645           32771                           CA       DISGRVER                              
041519,001681: 15,2646           04616                           TC       BANKCALL                              
041520,001682: 15,2647           20476                           CADR     GOFLASH                               
041521,001683: 15,2650           06001                           TC       GOTOPOOH                              
041522,001684: 15,2651           12654                           TCF      PROGRAV                               #  VB33 - PROCEED
041523,001685: 15,2652           05504                           TC       UPFLAG                                #  VB32 - RECYCLE - STORE GRAV AND DO IT AGAIN
041524,001686: 15,2653           00014                           ADRES    FREEFLAG                              #  AND SET FREEFLAG TO SHOW RECYCLE
041525,001687: 
041526,001688: 15,2654           05353        PROGRAV            TC       PHASCHNG                              
041527,001689: 15,2655           04024                           OCT      04024                                 
041528,001690: 
041529,001691: 15,2656           06037                           TC       INTPRET                               
041530,001692: 15,2657           77775                           VLOAD                                          
041531,001693: 15,2660           02761                                    STARSAV1                              
041532,001694: 15,2661           02231                           STORE    GSAV                                  
041533,001695: 15,2662           77776                           EXIT                                           
041534,001696: 15,2663           34751                           CAF      FREEFBIT                              #  IF FREEFLAG SET, RE-COMPUTE GRAVITY.
041535,001697: 15,2664           70074                           MASK     FLAGWRD0                              
041536,001698: 15,2665           10000                           CCS      A                                     
041537,001699: 15,2666           12563                           TCF      GVDETER                               #  SET
041538,001700: 15,2667           13553                           TCF      ATTCHK                                #  EXIT FROM GVDETER
041539,001701: 
041540,001702: 15,2670           77220        LUNG               STQ      VLOAD                                 
041541,001703: 15,2671           02745                                    QMIN                                  
041542,001704: 15,2672           24007                                    ZEROVEC                               
041543,001705: 15,2673           02707                           STORE    GACC                                  
041544,001706: 15,2674           77776                           EXIT                                           
041545,001707: 15,2675           05353                           TC       PHASCHNG                              
041546,001708: 15,2676           04024                           OCT      04024                                 
041547,001709: 
041548,001710: 15,2677           04616                           TC       BANKCALL                              
041549,001711: 15,2700           17000                           CADR     IMUCOARS                              
041550,001712: 15,2701           04616                           TC       BANKCALL                              
041551,001713: 15,2702           17716                           CADR     IMUSTALL                              
041552,001714: 15,2703           05711                           TC       CURTAINS                              
041553,001715: 15,2704           04616                           TC       BANKCALL                              
041554,001716: 15,2705           17210                           CADR     IMUFINE                               
041555,001717: 15,2706           04616                           TC       BANKCALL                              
041556,001718: 15,2707           17716                           CADR     IMUSTALL                              
041557,001719: 15,2710           05711                           TC       CURTAINS                              
041558,001720: 15,2711           32770                           CA       T/2SEC                                
041559,001721: 15,2712           55736                           TS       GCTR                                  
041560,001722: 15,2713           37716                           CA       PRIO31                                
041561,001723: 15,2714           55075                           TS       1/PIPADT                              
041562,001724: 15,2715           04616                           TC       BANKCALL                              

Page 966

041564,001726: 15,2716           15701                           CADR     GCOMPZER                              #  INITIALIZE COMPENSATION
041565,001727: 15,2717           05353                           TC       PHASCHNG                              
041566,001728: 15,2720           04024                           OCT      04024                                 
041567,001729: 
041568,001730: 15,2721           04616                           TC       BANKCALL                              #  DONT NEED TO INHINY   THIS USED TO
041569,001731: 15,2722           77544                           CADR     PIPSRINE                              #  INITIALIZE PIPAS  DONT USE DATA
041570,001732: 15,2723           06037                           TC       INTPRET                               
041571,001733: 15,2724           77776        GREED              EXIT                                           #  = MASK 7776 IN BASIC SO DONT CARE
041572,001734: 15,2725           35000                           CAF      2SECS                                 
041573,001735: 15,2726           05173                           TC       TWIDDLE                               #  SET UP 2 SEC TASK TO READ PIPAS
041574,001736: 15,2727           02731                           ADRES    GRABGRAV                              
041575,001737: 
041576,001738: 15,2730           05155                           TC       ENDOFJOB                              
041577,001739: 
041578,001740: 15,2731           04674        GRABGRAV           TC       IBNKCALL                              
041579,001741: 15,2732           77544                           CADR     PIPSRINE                              
041580,001742: 15,2733           35023                           CAF      PRIO13                                #  RE-ESTABLISH MAINLINE JOB
041581,001743: 15,2734           05105                           TC       FINDVAC                               
041582,001744: 15,2735  E5,1706                                  EBANK=   STARAD                                
041583,001745: 15,2735           02740 32065                     2CADR    ADDGRAV                               
041584,001746: 
041585,001747: 15,2737           05261                           TC       TASKOVER                              
041586,001748: 
041587,001749: 15,2740           04616        ADDGRAV            TC       BANKCALL                              
041588,001750: 15,2741           15263                           CADR     1/PIPA                                
041589,001751: 15,2742           25736                           INCR     GCTR                                  
041590,001752: 15,2743           06037                           TC       INTPRET                               
041591,001753: 15,2744           53375                           VLOAD    VAD                                   
041592,001754: 15,2745           00325                                    DELV                                  
041593,001755: 15,2746           02707                                    GACC                                  
041594,001756: 15,2747           02707                           STORE    GACC                                  #  ACCUMULATE G VECTOR
041595,001757: 15,2750           50135                           SLOAD    BMN                                   
041596,001758: 15,2751           02737                                    GCTR                                  
041597,001759: 15,2752           32724                                    GREED                                 
041598,001760: 15,2753           53575                           VLOAD    UNIT                                  
041599,001761: 15,2754           02707                                    GACC                                  
041600,001762: 15,2755           36731                           STCALL   STAR                                  
041601,001763: 15,2756           47537                                    CDUTRIG                               #  TRANSFORM IN NB COOR AND STORE
041602,001764: 15,2757           77624                           CALL                                           #        IN OUTPUT
041603,001765: 15,2760           47671                                    *SMNB*                                
041604,001766: 15,2761           02715                           STORE    GOUT                                  
041605,001767: 15,2762           77776                           EXIT                                           
041606,001768: 15,2763           05353                           TC       PHASCHNG                              
041607,001769: 15,2764           04024                           OCT      04024                                 
041608,001770: 
041609,001771: 15,2765           06037        QMINEXIT           TC       INTPRET                               
041610,001772: 15,2766           77650                           GOTO                                           
041611,001773: 15,2767           02745                                    QMIN                                  
041612,001774: 15,2770           77753        T/2SEC             DEC      -20        B-14                       

Page 967

041614,001776: 15,2771           01404        DISGRVER           VN       0604                                  
041615,001777: 15,2772           07357        42DEG              OCT      07357                                 
041616,001778: 15,2773           06211        35DEG              OCT      06211                                 
041617,001779: 

Page 968

041619,001781:                                                                                                  #  NAME  GYROTRIM
041620,001782: 
041621,001783:                                                                                                  #  THIS PROGRAM COMPUTES AND SENDS GYRO COMMANDS WHICH CAUSE THE CDUS
041622,001784:                                                                                                  #  TO ATTAIN A PRESCRIBED SET OF ANGLES.  THIS ROUTINE ASSUMES THE
041623,001785:                                                                                                  #  VEHICLES ATTITUDE REMAINS STATIONARY DURING ITS OPERATION.
041624,001786: 
041625,001787:                                                                                                  #  CALL          CALL
041626,001788:                                                                                                  #                        GYROTRIM
041627,001789: 
041628,001790:                                                                                                  #  INPUT         THETAD,+1,+2 = DESIRED CDU ANGLES
041629,001791:                                                                                                  #                CDUX,CDUY,CDUZ
041630,001792: 
041631,001793:                                                                                                  #  OUTPUT -      GYRO TORQUE PULSES
041632,001794: 
041633,001795:                                                                                                  #  SUBROUTINES - TRG*NBSM, *NBSM*, CDUTRIG, AXISGEN, CALCGTA, IMUFINE
041634,001796:                                                                                                  #                IMPULSE, IMUSTALL
041635,001797:                                                                                                  #                -        -       -          *          *   -
041636,001798:                                                                                                  #  DEBRIS -      CDUSPOT, SINCDU, COSCDU, STARAD, VAC, XDC, OGC
041637,001799: 
041638,001800: 15,2774                                           COUNT*   $$/P57                                
041639,001801: 15,2774           71220        GYROTRIM           STQ      DLOAD                                 
041640,001802: 15,2775           02745                                    QMIN                                  
041641,001803: 15,2776           00322                                    THETAD                                
041642,001804: 15,2777           65325                           PDDL     PDDL                                  
041643,001805: 15,3000           00324                                    THETAD     +2                         
041644,001806: 15,3001           00323                                    THETAD     +1                         
041645,001807: 15,3002           77666                           VDEF                                           
041646,001808: 15,3003           24767                           STOVL    CDUSPOT                               
041647,001809: 15,3004           24005                                    XUNIT                                 
041648,001810: 15,3005           77624                           CALL                                           
041649,001811: 15,3006           47664                                    TRG*NBSM                              
041650,001812: 15,3007           26707                           STOVL    STARAD                                
041651,001813: 15,3010           24003                                    YUNIT                                 
041652,001814: 15,3011           77624                           CALL                                           
041653,001815: 15,3012           47673                                    *NBSM*                                
041654,001816: 15,3013           36715                           STCALL   STARAD     +6                         
041655,001817: 15,3014           47537                                    CDUTRIG                               
041656,001818: 15,3015           77624                           CALL                                           
041657,001819: 15,3016           20030                                    CALCSMSC                              
041658,001820: 15,3017           77775                           VLOAD                                          
041659,001821: 15,3020           02665                                    XNB                                   
041660,001822: 15,3021           24007                           STOVL    6D                                    
041661,001823: 15,3022           02673                                    YNB                                   
041662,001824: 15,3023           34015                           STCALL   12D                                   
041663,001825: 15,3024           47441                                    AXISGEN                               
041664,001826: 15,3025           77624                           CALL                                           
041665,001827: 15,3026           47247                                    CALCGTA                               
041666,001828: 15,3027           77776        JUSTTRIM           EXIT                                           
041667,001829: 15,3030           04616                           TC       BANKCALL                              
041668,001830: 15,3031           17210                           CADR     IMUFINE                               
041669,001831: 15,3032           04616                           TC       BANKCALL                              

Page 969

041671,001833: 15,3033           17716                           CADR     IMUSTALL                              
041672,001834: 15,3034           05711                           TC       CURTAINS                              
041673,001835: 15,3035           33044                           CA       GYRCDR                                
041674,001836: 15,3036           04616                           TC       BANKCALL                              
041675,001837: 15,3037           17323                           CADR     IMUPULSE                              
041676,001838: 15,3040           04616                           TC       BANKCALL                              
041677,001839: 15,3041           17716                           CADR     IMUSTALL                              
041678,001840: 15,3042           05711                           TC       CURTAINS                              
041679,001841: 15,3043           12765                           TCF      QMINEXIT                              
041680,001842: 
041681,001843: 15,3044           02737        GYRCDR             ECADR    OGC                                   
041682,001844: 

Page 970

041684,001846:                                                                                                  #  PERFORM STAR AQUISITION AND STAR SIGHTINGS
041685,001847: 
041686,001848: 15,3045           34755        2STARS             CAF      ZERO                                  #  INITALIZE STARIND
041687,001849: 15,3046           13050                           TCF      +2                                    #  ZERO FOR 1ST STAR, ONE FOR 2ND STAR
041688,001850: 15,3047           34753        1STAR              CAF      BIT1                                  
041689,001851: 15,3050           55757                           TS       STARIND                               
041690,001852: 
041691,001853: 15,3051           05353                           TC       PHASCHNG                              
041692,001854: 15,3052           04024                           OCT      04024                                 
041693,001855: 
041694,001856: 15,3053           12245                           TCF      R59                                   #  GO DO STAR AQUIRE AND AOTMARK
041695,001857: 
041696,001858: 15,3054           31757        R59RET             CA       STARIND                               #  BACK FROM SURFACE MARKING
041697,001859: 15,3055           00006                           EXTEND                                         
041698,001860: 15,3056           13067                           BZF      ASTAR                                 #  1ST STAR MARKED
041699,001861: 
041700,001862: 15,3057           05353                           TC       PHASCHNG                              
041701,001863: 15,3060           04024                           OCT      04024                                 
041702,001864: 
041703,001865: 15,3061           06037                           TC       INTPRET                               
041704,001866: 15,3062           45145                           DLOAD    CALL                                  
041705,001867: 15,3063           03562                                    TSIGHT                                #  TIME OF 2ND MARK
041706,001868: 15,3064           32472                                    PLANET                                
041707,001869: 15,3065           36731                           STCALL   VEC2                                  #  STORE 2ND CATALOG VEC (REF)
041708,001870: 15,3066           33101                                    SURFLINE                              
041709,001871: 
041710,001872: 15,3067           06037        ASTAR              TC       INTPRET                               
041711,001873: 15,3070           77775                           VLOAD                                          
041712,001874: 15,3071           02715                                    STARAD     +6                         
041713,001875: 15,3072           02761                           STORE    STARSAV1                              #  1ST OBSERVED STAR (SM)
041714,001876: 15,3073           45145                           DLOAD    CALL                                  
041715,001877: 15,3074           03562                                    TSIGHT                                #  TIME OF 1ST MARK
041716,001878: 15,3075           32472                                    PLANET                                
041717,001879: 15,3076           02723                           STORE    VEC1                                  #  STORE 1ST CATALOG VEC (REF)
041718,001880: 15,3077           77776                           EXIT                                           
041719,001881: 15,3100           13047                           TCF      1STAR                                 #  GO GET 2ND STAR SIGHTING
041720,001882: 

Page 971

041722,001884:                                                                                                  #  DO FINE OR COARSE ALIGNMENT OF IMU
041723,001885: 
041724,001886: 15,3101           77131        SURFLINE           SSP      AXT,2                                 
041725,001887: 15,3102           00052                                    S2                                    
041726,001888: 15,3103           00006                                    6                                     
041727,001889: 15,3104           00014                                    12D                                   
041728,001890: 15,3105           64373        WRTDESIR           VLOAD*   MXV                                   
041729,001891: 15,3106           75040                                    VEC1       +12D,2                     #  PICK UP VEC IN REF, TRANS TO DESIRED SH
041730,001892: 15,3107           03607                                    XSMD                                  
041731,001893: 15,3110           77656                           UNIT                                           
041732,001894: 15,3111           12723                           STORE    STARAD     +12D,2                     #  VEC IN SM
041733,001895: 15,3112           77773                           VLOAD*                                         
041734,001896: 15,3113           75002                                    STARSAV1   +12D,2                     #  PICK UP VEC IN PRESENT SM
041735,001897: 15,3114           10023                           STORE    18D,2                                 
041736,001898: 15,3115           43104                           TIX,2    BON                                   
041737,001899: 15,3116           33105                                    WRTDESIR                              
041738,001900: 15,3117           04315                                    INITALGN                              #  IF INITIAL PASS (OPTION 0) BYPASS R54
041739,001901: 15,3120           33126                                    INITBY                                
041740,001902: 15,3121           77624        DOALIGN            CALL                                           
041741,001903: 15,3122           31256                                    R54                                   #  DO CHKSDATA
041742,001904: 15,3123           77614                           BOFF                                           
041743,001905: 15,3124           00354                                    FREEFLAG                              
041744,001906: 15,3125           33206                                    P57POST                               #  ASTRO DOES NOT LIKE DATA TEST RESULTS
041745,001907: 15,3126           77624        INITBY             CALL                                           
041746,001908: 15,3127           47441                                    AXISGEN                               #  GET DESIRED ORIENT WRT PRES. XDC,YDC,ZDC
041747,001909: 15,3130           77624                           CALL                                           
041748,001910: 15,3131           47247                                    CALCGTA                               #  GET GYRO TORQ ANGLES, OGC,IGC,MGC
041749,001911: 15,3132           77776                           EXIT                                           
041750,001912: 15,3133           34752                           CAF      INITABIT                              #  IF INITIAL PASS BYPASS NOUN 93 DISPLAY
041751,001913: 15,3134           70104                           MASK     FLAGWRD8                              
041752,001914: 15,3135           10000                           CCS      A                                     
041753,001915: 15,3136           13145                           TCF      5DEGTEST                              
041754,001916: 15,3137           33313                           CAF      DISPGYRO                              #  DISPLAY GYRO TORQ ANGLES V 06N93
041755,001917: 15,3140           04616                           TC       BANKCALL                              
041756,001918: 15,3141           20476                           CADR     GOFLASH                               
041757,001919: 15,3142           06001                           TC       GOTOPOOH                              #  V34 - TERMINATE
041758,001920: 15,3143           13145                           TCF      5DEGTEST                              #  VB33 - PROCEED TO COARSE OR FINE
041759,001921: 15,3144           13207                           TCF      P57POST    +1                         #  VB32 - RECYCLE, MAYBE RE-ALIGN
041760,001922: 
041761,001923: 15,3145           06037        5DEGTEST           TC       INTPRET                               #  IF ANGLES GREATER THAN 5 DEGS, DO COARSE
041762,001924: 15,3146           40175                           VLOAD    BOV                                   
041763,001925: 15,3147           02740                                    OGC                                   
041764,001926: 15,3150           33151                                    SURFSUP                               
041765,001927: 15,3151           02750        SURFSUP            STORE    OGCT                                  
041766,001928: 15,3152           40141                           V/SC     BOV                                   
041767,001929: 15,3153           30610                                    5DEGREES                              
041768,001930: 15,3154           33254                                    COATRIM                               
041769,001931: 15,3155           52131                           SSP      GOTO                                  
041770,001932: 15,3156           02746                                    QMIN                                  
041771,001933: 15,3157           33161                                    SURFDISP                              

Page 972

041773,001935: 15,3160           33027                                    JUSTTRIM                              #  ANGLES LESS THAN 5 DEG, DO GYRO TORQ
041774,001936: 
041775,001937: 15,3161           77776        SURFDISP           EXIT                                           
041776,001938: 15,3162           05353                           TC       PHASCHNG                              
041777,001939: 15,3163           04024                           OCT      04024                                 
041778,001940: 
041779,001941: 15,3164           06037                           TC       INTPRET                               
041780,001942: 15,3165           75160                           AXC,1    AXC,2                                 
041781,001943: 15,3166           03606                                    XSMD                                  
041782,001944: 15,3167           01733                                    REFSMMAT                              
041783,001945: 15,3170           45014                           SET      CALL                                  
041784,001946: 15,3171           01462                                    REFSMFLG                              
041785,001947: 15,3172           31377                                    MATMOVE                               
041786,001948: 15,3173           77776                           EXIT                                           
041787,001949: 15,3174           11145                           CCS      OPTION2                               #  IF OPTION ZERO DO FINISH
041788,001950: 15,3175           13177                           TCF      B2F8                                  
041789,001951: 15,3176           13207                           TCF      P57POST    +1                         
041790,001952: 
041791,001953: 15,3177           34752        B2F8               CAF      INITABIT                              #  IF INITIAL FLAG SET, RE-CYCLE.
041792,001954: 15,3200           70104                           MASK     FLAGWRD8                              
041793,001955: 15,3201           10000                           CCS      A                                     
041794,001956: 15,3202           13561                           TCF      P57JUMP                               #  ITS SET
041795,001957: 15,3203           06037                           TC       INTPRET                               
041796,001958: 15,3204           77624                           CALL                                           
041797,001959: 15,3205           33506                                    REFMF                                 #  GO GET ATTITUDE VEC IN MF(YNBSAV,XNBSAV)
041798,001960: 15,3206           77776        P57POST            EXIT                                           
041799,001961: 15,3207           35751                           CAF      OCT14                                 #  DISPLAY V50N25 CHK CODE 14
041800,001962: 15,3210           04616                           TC       BANKCALL                              
041801,001963: 15,3211           20623                           CADR     GOPERF1                               
041802,001964: 15,3212           16001                           TCF      GOTOPOOH                              #  VB34 - TERMINATE
041803,001965: 15,3213           13561                           TCF      P57JUMP                               #  VB33 - PROCEED TO RE-ALIGN
041804,001966: 15,3214           44752                           CS       BIT2                                  #  TEST TO SE IF ALIGNED BY OPTION 2
041805,001967: 15,3215           61145                           AD       OPTION2                               
041806,001968: 15,3216           00006                           EXTEND                                         
041807,001969: 15,3217           13221                           BZF      +2                                    #  YES - GO CALCULATE LANDING SITE
041808,001970: 15,3220           16001                           TCF      GOTOPOOH                              #  NO - EXIT P57
041809,001971: 15,3221           05353                           TC       PHASCHNG                              #  RESTART PLACE
041810,001972: 15,3222           04024                           OCT      04024                                 
041811,001973: 15,3223           06037                           TC       INTPRET                               
041812,001974: 15,3224           45175                           VLOAD    CALL                                  #  USE GNB
041813,001975: 15,3225           02231                                    GSAV                                  
041814,001976: 15,3226           47661                                    CDU*NBSM                              #  GO TO SM COORDS
041815,001977: 15,3227           43105                           VXM      SET                                   #        ON MOON SO SET LUNAFLAG
041816,001978: 15,3230           01734                                    REFSMMAT                              #        G(REF) = (REFSMMAT)T (NBSM)GNB
041817,001979: 15,3231           01463                                    LUNAFLAG                              
041818,001980: 15,3232           51515                           PDVL     ABVAL                                 
041819,001981: 15,3233           02023                                    RLS                                   
041820,001982: 15,3234           45561                           VXSC     STADR                                 
041821,001983: 15,3235           75745                           STORE    ALPHAV                                #  ALPHAV = RLSMAG * G(REF)
041822,001984: 15,3236           47014                           CLEAR    RTB                                   

Page 973

041824,001986: 15,3237           00662                                    ERADFLAG                              
041825,001987: 15,3240           21573                                    LOADTIME                              
041826,001988: 15,3241           77624                           CALL                                           
041827,001989: 15,3242           30446                                    N89DISP                               #  SUBROUTINE TO CALC LS AND GIVE RLS BACK
041828,001990: 15,3243           01221                           STORE    RN                                    #  RN=RLS B-29 = LM POSITION
041829,001991: 15,3244           65352                           VSL2     PDDL                                  #  R-TO-RP GETS RLS B-27 AT 0-5D IN PDLIST
041830,001992: 15,3245           01243                                    GDT/2      +4                         #  TIME TEMP STORED IN N89DISP
041831,001993: 15,3246           77606                           PUSH                                           #  TIME AT 6-7 IN PDLIST
041832,001994: 15,3247           35235                           STCALL   PIPTIME                               #  PIPTIME = LM STATE TIME
041833,001995: 15,3250           51670                                    R-TO-RP                               
041834,001996: 15,3251           02023                           STORE    RLS                                   #  RLS IN MOON-FIXED COORDS
041835,001997: 15,3252           77776                           EXIT                                           
041836,001998: 15,3253           16001                           TCF      GOTOPOOH                              #  EXIT P57
041837,001999: 

Page 974

041839,002001:                                                                                                  #  COARSE AND FINE ALIGN IMU
041840,002002: 
041841,002003: 15,3254           75160        COATRIM            AXC,1    AXC,2                                 
041842,002004: 15,3255           02664                                    XDC                                   
041843,002005: 15,3256           02642                                    XSM                                   
041844,002006: 15,3257           77624                           CALL                                           
041845,002007: 15,3260           31377                                    MATMOVE                               
041846,002008: 15,3261           77624                           CALL                                           
041847,002009: 15,3262           47537                                    CDUTRIG                               
041848,002010: 15,3263           77624                           CALL                                           
041849,002011: 15,3264           20030                                    CALCSMSC                              
041850,002012: 15,3265           77624                           CALL                                           
041851,002013: 15,3266           47353                                    CALCGA                                
041852,002014: 15,3267           77414                           BOFF     EXIT                                  
041853,002015: 15,3270           04355                                    INITALGN                              #  IF INITIAL ALGNMENT DISPLAY FINAL
041854,002016: 15,3271           33303                                    CORSIT                                #  GIMBAL ANGLES IF COARSE ANGLES GREATER
041855,002017: 15,3272           35010                           CAF      V06N22                                #  THAN 5 DEGREES
041856,002018: 15,3273           04616                           TC       BANKCALL                              
041857,002019: 15,3274           20476                           CADR     GOFLASH                               
041858,002020: 15,3275           06001                           TC       GOTOPOOH                              
041859,002021: 15,3276           13300                           TCF      +2                                    
041860,002022: 15,3277           13272                           TCF      -5                                    
041861,002023: 15,3300           05353                           TC       PHASCHNG                              
041862,002024: 15,3301           04024                           OCT      04024                                 
041863,002025: 
041864,002026: 15,3302           06037                           TC       INTPRET                               
041865,002027: 15,3303           77624        CORSIT             CALL                                           
041866,002028: 15,3304           31565                                    COARSE                                
041867,002029: 15,3305           77624                           CALL                                           
041868,002030: 15,3306           31602                                    NCOARSE                               
041869,002031: 15,3307           77624                           CALL                                           
041870,002032: 15,3310           32774                                    GYROTRIM                              
041871,002033: 15,3311           77650                           GOTO                                           
041872,002034: 15,3312           33161                                    SURFDISP                              
041873,002035: 15,3313           01535        DISPGYRO           VN       0693                                  
041874,002036: 

Page 975

041876,002038:                                                                                                  #  LUNAR SURFACE IMU ALIGNMENT PROGRAM
041877,002039: 
041878,002040: 15,3314           04616        P57                TC       BANKCALL                              #  IS ISS ON - IF NOT, IMUCHK WILL SEND
041879,002041: 15,3315           33652                           CADR     IMUCHK                                #  ALARM CODE 210 AND EXIT VIA GOTOPOOH
041880,002042: 
041881,002043: 15,3316           36245                           CAF      THREE                                 #  JAM REFSMMAT OPTION 3 FOR INITIAL DISP.
041882,002044: 15,3317           55145                           TS       OPTION2                               
041883,002045: 15,3320           34753        P57OPT             CAF      BIT1                                  
041884,002046: 15,3321           04616                           TC       BANKCALL                              
041885,002047: 15,3322           20713                           CADR     GOPERF4R                              #  FLASH V04N06 FOR ALIGNMENT CODE
041886,002048: 15,3323           06001                           TC       GOTOPOOH                              #  V34 TERMINATE
041887,002049: 15,3324           13331                           TCF      ALIGNOPT                              #  V33 PROCEED
041888,002050: 15,3325           13320                           TCF      P57OPT                                #  V32 RECYCLE
041889,002051: 
041890,002052: 15,3326           05353                           TC       PHASCHNG                              
041891,002053: 15,3327           00014                           OCT      00014                                 
041892,002054: 15,3330           05155                           TC       ENDOFJOB                              
041893,002055: 
041894,002056: 15,3331           31145        ALIGNOPT           CA       OPTION2                               
041895,002057: 15,3332           76245                           MASK     THREE                                 
041896,002058: 15,3333           50000                           INDEX    A                                     
041897,002059: 15,3334           13335                           TCF      +1                                    
041898,002060: 15,3335           13350                           TCF      TDISP                                 #  OPTION 4 LS ORIENTATION
041899,002061: 15,3336           13411                           TCF      PACKOPTN                              #  OPTION 1 PREFERRED
041900,002062: 15,3337           13320                           TCF      P57OPT                                #  OPTION 2 INVALID IN P57, RECYCLE
041901,002063: 15,3340           06037                           TC       INTPRET                               #  OPTION 3 REFSMMAT
041902,002064: 15,3341           75160                           AXC,1    AXC,2                                 #  JAM REFSMMAT IN XSMD LOC
041903,002065: 15,3342           01733                                    REFSMMAT                              
041904,002066: 15,3343           03606                                    XSMD                                  
041905,002067: 15,3344           77624                           CALL                                           
041906,002068: 15,3345           31377                                    MATMOVE                               
041907,002069: 15,3346           77650                           GOTO                                           
041908,002070: 15,3347           33410                                    PACKOPTN   -1                         
041909,002071: 
041910,002072: 15,3350           06037        TDISP              TC       INTPRET                               
041911,002073: 15,3351           77745                           DLOAD                                          
041912,002074: 15,3352           03442                                    TIG                                   #  LOAD ASCENT TIME FOR DISPLAY
041913,002075: 15,3353           01046        P57A               STORE    DSPTEM1                               
041914,002076: 15,3354           77776                           EXIT                                           
041915,002077: 15,3355           32170        P57AA              CAF      V06N34*                               #  DISPLAY TALIGN, TALIGN : DSPTEM1
041916,002078: 15,3356           04616                           TC       BANKCALL                              
041917,002079: 15,3357           20476                           CADR     GOFLASH                               
041918,002080: 15,3360           16001                           TCF      GOTOPOOH                              #  V34 - TERMINATE
041919,002081: 15,3361           13363                           TCF      +2                                    
041920,002082: 15,3362           13355                           TCF      P57AA                                 #  VB32 - RECYCLE
041921,002083: 
041922,002084: 15,3363           06037                           TC       INTPRET                               
041923,002085: 15,3364           65234                           RTB      PDDL                                  
041924,002086: 15,3365           21573                                    LOADTIME                              #  PUSH CURRENT TIME AND PICK UP KEY IN
041925,002087: 15,3366           01046                                    DSPTEM1                               

Page 976

041927,002089: 15,3367           65254                           BZE      PDDL                                  
041928,002090: 15,3370           33400                                    P57C                                  #  IF KEY IN TIME ZERO - TALIGN=CURRENT TIME
041929,002091: 15,3371           51025                           DSU      BPL                                   #  NOT ZERO SO EXCHANGE PD WITH DSPTEM1
041930,002092: 15,3372           01046                                    DSPTEM1                               
041931,002093: 15,3373           33400                                    P57C                                  
041932,002094: 15,3374           45545                           DLOAD    STADR                                 #  IF KEYIN TIME GREATER THAN CURRENT TIME
041933,002095: 15,3375           74335                           STORE    TIG                                   #  STORE IT IN TIG
041934,002096: 15,3376           36775                           STCALL   TALIGN                                
041935,002097: 15,3377           33402                                    P57D                                  
041936,002098: 15,3400           45545        P57C               DLOAD    STADR                                 
041937,002099: 15,3401           75002                           STORE    TALIGN                                
041938,002100: 15,3402           34041        P57D               STCALL   TDEC1                                 
041939,002101: 15,3403           27057                                    LEMPREC                               #  COMPUTE DESIRED IMU ORIENTATION STORE
041940,002102: 15,3404           53575                           VLOAD    UNIT                                  #  IN X,Y,ZSMD
041941,002103: 15,3405           00001                                    RATT                                  
041942,002104: 15,3406           37607                           STCALL   XSMD                                  
041943,002105: 15,3407           11013                                    LSORIENT                              
041944,002106: 15,3410           77776                           EXIT                                           
041945,002107: 15,3411           34755        PACKOPTN           CAF      ZERO                                  #  PACK FLAG BITS FOR OPTION DISPLAY
041946,002108: 15,3412           55145                           TS       OPTION1    +1                         #  JAM ZERO IN ALIGNMENT OPTION
041947,002109: 15,3413           55146                           TS       OPTION1    +2                         #  INITIALIZE FLAG BIT CONFIGURATION
041948,002110: 15,3414           34737                           CAF      REFSMBIT                              
041949,002111: 15,3415           70077                           MASK     FLAGWRD3                              #  REFSMFLG
041950,002112: 15,3416           10000                           CCS      A                                     
041951,002113: 15,3417           34745                           CAF      BIT7                                  #  SET
041952,002114: 15,3420           27146                           ADS      OPTION1    +2                         #  CLEAR - JUST ZERO
041953,002115: 15,3421           34753                           CAF      ATTFLBIT                              
041954,002116: 15,3422           70102                           MASK     FLAGWRD6                              #  ATTFLG
041955,002117: 15,3423           10000                           CCS      A                                     
041956,002118: 15,3424           34750                           CAF      BIT4                                  #  SET
041957,002119: 15,3425           27146                           ADS      OPTION1    +2                         #  CLEAR - ZERO IN A
041958,002120: 15,3426           34750                           CAF      BIT4                                  
041959,002121: 15,3427           55144                           TS       OPTION1                               #  JAM 00010 IN OPTION1 FOR CHECK LIST
041960,002122: 
041961,002123: 15,3430           33651        DSPOPTN            CAF      VB05N06                               #  DISPLAY OPTION CODE AND FLAG BITS
041962,002124: 15,3431           04616                           TC       BANKCALL                              
041963,002125: 15,3432           20476                           CADR     GOFLASH                               
041964,002126: 15,3433           16001                           TCF      GOTOPOOH                              #  VB34 - TERMINATE
041965,002127: 15,3434           13436                           TCF      +2                                    #  V33 - PROCEED
041966,002128: 15,3435           13430                           TCF      DSPOPTN                               #  V32 - RECYCLE
041967,002129: 
041968,002130: 15,3436           34737                           CAF      REFSMBIT                              
041969,002131: 15,3437           70077                           MASK     FLAGWRD3                              
041970,002132: 15,3440           10000                           CCS      A                                     
041971,002133: 15,3441           13541                           TCF      GETLMATT                              #  SET, GO COMPUTE LM ATTITUDE
041972,002134: 15,3442           34753                           CAF      ATTFLBIT                              #  CLEAR - CHECK ATTFLAG FOR STORED ATTITUDE.
041973,002135: 15,3443           70102                           MASK     FLAGWRD6                              
041974,002136: 15,3444           10000                           CCS      A                                     
041975,002137: 15,3445           13545                           TCF      BYLMATT                               #  ALLFLG SET, CHK OPTION FOR GRAVITY COMP
041976,002138: 15,3446           34752                           CAF      BIT2                                  #  SEE IF OPTION 2 OR 3

Page 977

041978,002140: 15,3447           71145                           MASK     OPTION2                               
041979,002141: 15,3450           10000                           CCS      A                                     
041980,002142: 15,3451           13545                           TCF      BYLMATT                               #  OPTION 2 OR 3 BUT DONT HAVE ATTITUDE
041981,002143: 15,3452           05567                           TC       ALARM                                 #  OPTION INCONSISTANT WITH FLAGS - ALARM 701
041982,002144: 15,3453           00701                           OCT      701                                   
041983,002145: 15,3454           35006                           CAF      VB05N09                               #  DISPLAY ALARM FOR ACTION
041984,002146: 15,3455           04616                           TC       BANKCALL                              
041985,002147: 15,3456           20476                           CADR     GOFLASH                               
041986,002148: 15,3457           16001                           TCF      GOTOPOOH                              #  VB34 - TERMINATE
041987,002149: 15,3460           13430                           TCF      DSPOPTN                               #  V33 - PROCEED ********TEMPORARY
041988,002150: 15,3461           13430                           TCF      DSPOPTN                               #  VB32 - RECYCLE TO OPTION DISPLAY V 05N06
041989,002151: 

Page 978

041991,002153:                                                                                                  #  TRANSFORM VEC1,2 FROM MOON FIXED TO REF AND JAM BACK IN VEC1,2
041992,002154: 
041993,002155: 15,3462           40220        MFREF              STQ      SETPD                                 
041994,002156: 15,3463           02746                                    QMAJ                                  
041995,002157: 15,3464           00001                                    0                                     
041996,002158: 15,3465           77634                           RTB                                            
041997,002159: 15,3466           21573                                    LOADTIME                              
041998,002160: 15,3467           27562                           STOVL    TSIGHT                                
041999,002161: 15,3470           02723                                    VEC1                                  
042000,002162: 15,3471           41525                           PDDL     PUSH                                  
042001,002163: 15,3472           03562                                    TSIGHT                                
042002,002164: 15,3473           77624                           CALL                                           
042003,002165: 15,3474           55716                                    RP-TO-R                               
042004,002166: 15,3475           26723                           STOVL    VEC1                                  
042005,002167: 15,3476           02731                                    VEC2                                  
042006,002168: 15,3477           65201                           SETPD    PDDL                                  
042007,002169: 15,3500           00001                                    0                                     
042008,002170: 15,3501           03562                                    TSIGHT                                
042009,002171: 15,3502           45006                           PUSH     CALL                                  
042010,002172: 15,3503           55716                                    RP-TO-R                               
042011,002173: 15,3504           36731                           STCALL   VEC2                                  
042012,002174: 15,3505           02746                                    QMAJ                                  
042013,002175: 

Page 979

042015,002177:                                                                                                  #  COMPUTE LM ATTITUDE IN MOON FIXED COORDINATES USING REFSMMAT AND
042016,002178:                                                                                                  #  STORE IN YNBSAV AND ZNBSAV
042017,002179: 
042018,002180: 15,3506           45020        REFMF              STQ      CALL                                  
042019,002181: 15,3507           02746                                    QMAJ                                  
042020,002182: 15,3510           47537                                    CDUTRIG                               #  GET SIN AND COS OF CDUS
042021,002183: 15,3511           40234                           RTB      SETPD                                 
042022,002184: 15,3512           21573                                    LOADTIME                              
042023,002185: 15,3513           00001                                    0                                     
042024,002186: 15,3514           37562                           STCALL   TSIGHT                                
042025,002187: 15,3515           20030                                    CALCSMSC                              #  GET YNB IN SM
042026,002188: 15,3516           61375                           VLOAD    VXM                                   
042027,002189: 15,3517           02673                                    YNB                                   
042028,002190: 15,3520           01734                                    REFSMMAT                              #  YNB TO REF
042029,002191: 15,3521           65256                           UNIT     PDDL                                  
042030,002192: 15,3522           03562                                    TSIGHT                                
042031,002193: 15,3523           45006                           PUSH     CALL                                  
042032,002194: 15,3524           51670                                    R-TO-RP                               
042033,002195: 15,3525           26237                           STOVL    YNBSAV                                #  YNB TO MF
042034,002196: 15,3526           02701                                    ZNB                                   
042035,002197: 15,3527           53505                           VXM      UNIT                                  
042036,002198: 15,3530           01734                                    REFSMMAT                              #  ZNB TO REF
042037,002199: 15,3531           41525                           PDDL     PUSH                                  
042038,002200: 15,3532           03562                                    TSIGHT                                
042039,002201: 15,3533           77624                           CALL                                           
042040,002202: 15,3534           51670                                    R-TO-RP                               #  ZNB TO MF
042041,002203: 15,3535           02245                           STORE    ZNBSAV                                
042042,002204: 15,3536           77614                           SETGO                                          
042043,002205: 15,3537           03036                                    ATTFLAG                               
042044,002206: 15,3540           02746                                    QMAJ                                  
042045,002207: 

Page 980

042047,002209:                                                                                                  #  BRANCH TO ALIGNMENT OPTION
042048,002210: 
042049,002211: 15,3541           06037        GETLMATT           TC       INTPRET                               
042050,002212: 15,3542           77624                           CALL                                           
042051,002213: 15,3543           33506                                    REFMF                                 #  GO TRANSFORM TO MF IN YNBSAV, ZNBSAV
042052,002214: 15,3544           77776                           EXIT                                           
042053,002215: 
042054,002216: 15,3545           05504        BYLMATT            TC       UPFLAG                                #  SET INITIAL ALIGN FLAG
042055,002217: 15,3546           00205                           ADRES    INITALGN                              
042056,002218: 15,3547           34753                           CAF      BIT1                                  
042057,002219: 15,3550           71145                           MASK     OPTION2                               #  SEE IF OPTION 1 OR 3
042058,002220: 15,3551           10000                           CCS      A                                     
042059,002221: 15,3552           12563                           TCF      GVDETER                               #  OPTION 1 OR 2, GET GRAVITY
042060,002222: 
042061,002223: 15,3553           05353        ATTCHK             TC       PHASCHNG                              
042062,002224: 15,3554           04024                           OCT      04024                                 
042063,002225: 
042064,002226: 15,3555           34753                           CAF      ATTFLBIT                              #  NOT 1 OR 3, CHECK ATTFLAG
042065,002227: 15,3556           70102                           MASK     FLAGWRD6                              
042066,002228: 15,3557           10000                           CCS      A                                     
042067,002229: 15,3560           13575                           TCF      P57OPT0                               #  GET ALIGNMENT VECS FOR OPTION 0
042068,002230: 15,3561           05353        P57JUMP            TC       PHASCHNG                              
042069,002231: 15,3562           04024                           OCT      04024                                 
042070,002232: 
042071,002233: 15,3563           05516                           TC       DOWNFLAG                              #  ATTFLG CLEAR - RESET INTALIGN FLAG
042072,002234: 15,3564           00205                           ADRES    INITALGN                              
042073,002235: 15,3565           36245                           CAF      THREE                                 
042074,002236: 15,3566           71145                           MASK     OPTION2                               #  BRANCH ON OPTION CODE
042075,002237: 15,3567           50000                           INDEX    A                                     
042076,002238: 15,3570           13571                           TCF      +1                                    
042077,002239: 15,3571           13575                           TCF      P57OPT0                               #  OPTION IS 0
042078,002240: 15,3572           13616                           TCF      P57OPT1                               #  OPTION IS 1
042079,002241: 15,3573           13634                           TCF      P57OPT2                               #  OPTION IS 2
042080,002242: 15,3574           13635                           TCF      P57OPT3                               #  OPTION IS 3
042081,002243: 

Page 981

042083,002245:                                                                                                  #  OPTION 0, GET TWO ATTITUDE VECS
042084,002246: 
042085,002247: 15,3575           06037        P57OPT0            TC       INTPRET                               
042086,002248: 15,3576           77775                           VLOAD                                          
042087,002249: 15,3577           02237                                    YNBSAV                                #  Y AND Z ATTITUDE WILL BE PUT IN REF
042088,002250: 15,3600           26723                           STOVL    VEC1                                  
042089,002251: 15,3601           02245                                    ZNBSAV                                
042090,002252: 15,3602           36731                           STCALL   VEC2                                  
042091,002253: 15,3603           47537                                    CDUTRIG                               
042092,002254: 15,3604           77624                           CALL                                           
042093,002255: 15,3605           20030                                    CALCSMSC                              #  COMPUTE SC AXIS WRT PRESENT SM
042094,002256: 15,3606           77775                           VLOAD                                          
042095,002257: 15,3607           02673                                    YNB                                   
042096,002258: 15,3610           26761        SAMETYP            STOVL    STARSAV1                              #  Y SC AXIS WRT PRESENT SM
042097,002259: 15,3611           02701                                    ZNB                                   
042098,002260: 15,3612           36767                           STCALL   STARSAV2                              #  Z SC AXIS WRT PRESENT SM
042099,002261: 15,3613           33462                                    MFREF                                 #  TRANSFORM VEC1,2 FROM MF TO REF
042100,002262: 15,3614           77650                           GOTO                                           
042101,002263: 15,3615           33101                                    SURFLINE                              
042102,002264: 
042103,002265:                                                                                                  #  OPTION 1, GET LANDING SITE AND Z-ATTITUDE VEC
042104,002266: 
042105,002267: 15,3616           06037        P57OPT1            TC       INTPRET                               
042106,002268: 15,3617           53575                           VLOAD    UNIT                                  
042107,002269: 15,3620           02023                                    RLS                                   #  LANDING SITE VEC
042108,002270: 15,3621           26723                           STOVL    VEC1                                  
042109,002271: 15,3622           02245                                    ZNBSAV                                #  Z ATTITUDE VEC
042110,002272: 15,3623           36731                           STCALL   VEC2                                  
042111,002273: 15,3624           47537                                    CDUTRIG                               
042112,002274: 15,3625           77624                           CALL                                           
042113,002275: 15,3626           20030                                    CALCSMSC                              #  GET ZNB AXIS WRT PRES SM FOR STARSAV2
042114,002276: 15,3627           45175                           VLOAD    CALL                                  
042115,002277: 15,3630           02231                                    GSAV                                  #  TRANS GSAV FROM NB TO SM FOR STARSAV1
042116,002278: 15,3631           47661                                    CDU*NBSM                              
042117,002279: 15,3632           77650                           GOTO                                           
042118,002280: 15,3633           33610                                    SAMETYP                               #  NOW DO SAME AS OPTION 0
042119,002281: 

Page 982

042121,002283:                                                                                                  #  OPTION 2, GET TWO STAR SIGHTINGS
042122,002284: 
042123,002285: 15,3634           13045        P57OPT2            TCF      2STARS                                #  DO SIGHTING ON 2 STARS
042124,002286: 
042125,002287:                                                                                                  #  OPTION 3, GET LANDING SITE VEC AND ONE STAR SIGHTING
042126,002288: 
042127,002289: 15,3635           06037        P57OPT3            TC       INTPRET                               
042128,002290: 15,3636           53575                           VLOAD    UNIT                                  
042129,002291: 15,3637           02023                                    RLS                                   #  LANDING SITE VEC
042130,002292: 15,3640           02723                           STORE    VEC1                                  
042131,002293: 15,3641           26731                           STOVL    VEC2                                  #  DUMMY VEC2 FOR 2ND CATALOG STAR
042132,002294: 15,3642           02231                                    GSAV                                  #  GRAVITY VEC NB
042133,002295: 15,3643           77624                           CALL                                           
042134,002296: 15,3644           47661                                    CDU*NBSM                              #  TRANS GSAV FROM NB TO SM FOR STARSAV1
042135,002297: 15,3645           36761                           STCALL   STARSAV1                              
042136,002298: 15,3646           33462                                    MFREF                                 #  STARSAV2 IS STORED AS 2ND OBSERVED STAR
042137,002299: 15,3647           77776                           EXIT                                           
042138,002300: 15,3650           13047                           TCF      1STAR                                 #  1STAR GET VEC2, STARSAV2, GOES TO SURFLINE
042139,002301: 
042140,002302: 15,3651           01206        VB05N06            VN       506                                   
042141,002303: 

Page 983

042143,002305:                                                                                                  #  CHECK IMODES30 TO VARIFY IMU IS ON
042144,002306: 
042145,002307: 15,3652           41302        IMUCHK             CS       IMODES30                              
042146,002308: 15,3653           74743                           MASK     BIT9                                  
042147,002309: 15,3654           10000                           CCS      A                                     #  IS IMU ON
042148,002310: 15,3655           13661                           TCF      +4                                    #  YES
042149,002311: 
042150,002312: 15,3656           05567                           TC       ALARM                                 #  NO, SEND ALARM AND EXIT
042151,002313: 15,3657           00210                           OCT      210                                   
042152,002314: 15,3660           06001                           TC       GOTOPOOH                              
042153,002315: 
042154,002316: 15,3661           05504                           TC       UPFLAG                                
042155,002317: 15,3662           00007                           ADRES    IMUSE                                 #  SET IMUSE FLAG
042156,002318: 
042157,002319: 15,3663           04631                           TC       SWRETURN                              
042158,002320: 
042159,002321: 04,3013                                           BANK     04                                    
042160,002322: 04,2000                                           SETLOC   AOTMARK2                              
042161,002323: 04,2000                                           BANK                                           
042162,002324: 04,3013                                           COUNT*   $$/P57                                
042163,002325: 
042164,002326: 04,3013           77220        LSORIENT           STQ      VLOAD                                 
042165,002327: 04,3014           02746                                    QMAJ                                  
042166,002328: 04,3015           01555                                    RRECTCSM                              
042167,002329: 04,3016           47235                           VXV      VXV                                   
042168,002330: 04,3017           01563                                    VRECTCSM                              
042169,002331: 04,3020           03607                                    XSMD                                  
042170,002332: 04,3021           77656                           UNIT                                           
042171,002333: 04,3022           03623                           STORE    ZSMD                                  
042172,002334: 04,3023           53435                           VXV      UNIT                                  
042173,002335: 04,3024           03607                                    XSMD                                  
042174,002336: 04,3025           37615                           STCALL   YSMD                                  
042175,002337: 04,3026           02746                                    QMAJ                                  
042176,002338: 

End of include-file P51-P53.agc.  Parent file is MAIN.agc