Source Code

This source code is very close to the Apollo Guidance Computer software for the Apollo 13 Lunar module. This revision of the Luminary 131 program is from December of 1969, whereas there was a later revision in January of 1970, and still another revision in February, which is the code that flew on the mission. As far as this transcription is concerned, it was originally from a copy made in 1991 of a printout from the collection of AGC developer Don Eyles for collector David Craig. It was subsequently scanned by Gary Neff, reprocessed for online presentation at the now-discontinued History of Recent Science and Technology (HRST) website of MIT's Dibner Institute (the full-quality scans being discarded in the process), and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a high-quality replacement scan for a completely illegible page was later provided by Gary Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many errors to be introduced into the transcription. Accordingly, a second scan of the same physical printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive, and used to correct the transcription errors. All of the scanned materials mentioned, as well as other Luminary 131 related material, are available online. Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017, so the two scans are not identical in that respect. The page-headings in the printout read, in part:
	GAP:  ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091
	17:53 DEC. 19, 1969
Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together.

039529,000002:                                                                                                  ## Copyright:   Public domain.
039530,000003:                                                                                                  ## Filename:    P51-P53.agc
039531,000004:                                                                                                  ## Purpose:     A section of Luminary 1C, revision 131.
039532,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
039533,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13.
039534,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
039535,000008:                                                                                                  ##              that the code format has been changed to conform to the
039536,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
039537,000010:                                                                                                  ##              original YUL assembler.
039538,000011:                                                                                                  ## Reference:   pp. 921-977
039539,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
039540,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo
039541,000014:                                                                                                  ## Mod history: 05/29/03 RSB.   Began transcribing.
039542,000015:                                                                                                  ##              2010-10-25 JL   Indentation fixes.
039543,000016:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
039544,000017:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
039545,000018:                                                                                                  ##                              numbers in 1701.pdf.
039546,000019:                                                                                                  ##              2017-02-26 RSB  Proofed comment text using octopus/ProoferComments.
039547,000020:                                                                                                  ##              2017-03-01 RSB  Fixed lingering typos.
039548,000021:                                                                                                  ##              2017-03-14 RSB  Comment-text fixes noted in proofing Luminary 116.
039549,000022:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
039550,000023:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
039551,000024: 

Page 921

039553,000026:                                                                                                  #  PROGRAM NAME - PROG52                         DATE - JAN 9, 1967
039554,000027:                                                                                                  #  MOD NO - 0                                    LOG SECTION - P51-P53
039555,000028:                                                                                                  #  MODIFICATION BY - LONSKE                      ASSEMBLY - SUNDANCE REV 46
039556,000029: 
039557,000030:                                                                                                  #  FUNCTIONAL DESCRIPTION -
039558,000031: 
039559,000032:                                                                                                  #        ALIGNS THE IMU TO ONE OF THREE ORIENTATIONS SELECTED BY THE ASTRONAUT.  THE PRESENT IMU ORIENTATION IS KNOWN
039560,000033:                                                                                                  #        AND IS STORED IN REFSMMAT.  THE THREE POSSIBLE ORIENTATIONS MAY BE_
039561,000034: 
039562,000035:                                                                                                  #        (A)     PREFERRED ORIENTATION
039563,000036: 
039564,000037:                                                                                                  #                AN OPTIMUM ORIENTATION FOR A PREVIOUSLY CALCULATED MANUEVER.  THIS ORIENTATION MUST BE CALCULATED AND
039565,000038:                                                                                                  #                STORED BY A PREVIOUSLY SELECTED PROGRAM.
039566,000039: 
039567,000040:                                                                                                  #        (B)     NOMINAL ORIENTATION
039568,000041: 
039569,000042:                                                                                                  #                X   = UNIT ( R )
039570,000043:                                                                                                  #                -SM
039571,000044: 
039572,000045:                                                                                                  #                Y   = UNIT (V X R)
039573,000046:                                                                                                  #                 SM
039574,000047: 
039575,000048:                                                                                                  #                Z   = UNIT (X   X Y  )
039576,000049:                                                                                                  #                 SM          SM    SM
039577,000050: 
039578,000051:                                                                                                  #                WHERE_
039579,000052:                                                                                                  #                R = THE GEOCENTRIC RADIUS VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
039580,000053:                                                                                                  #                -
039581,000054: 
039582,000055:                                                                                                  #                V = THE INERTIAL VELOCITY VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
039583,000056:                                                                                                  #                -
039584,000057: 
039585,000058:                                                                                                  #        (C)     REFSMMAT ORIENTATION
039586,000059: 
039587,000060:                                                                                                  #        (D)     LANDING SITE - THIS IS NOT AVAILIBLE IN SUNDANCE
039588,000061: 
039589,000062:                                                                                                  #        THIS SELECTION CORRECTS THE PRESENT IMU ORIENTATION.  THE PRESENT ORIENTATION DIFFERS FROM THAT TO WHICH IT
039590,000063:                                                                                                  #        WAS LAST ALIGNED ONLY DUE TO GYRO DRIFT(I.E. NEITHER GIMBAL LOCK NOR IMU POWER INTERRUPTION HAS OCCURED
039591,000064:                                                                                                  #        SINCE THE LAST ALIGNMENT).
039592,000065: 
039593,000066:                                                                                                  #        AFTER A IMU ORIENTATION HAS BEEN SELECTED ROUTINE S52.2 IS OPERATED TO COMPUTE THE GIMBAL ANGLES USING THE
039594,000067:                                                                                                  #        NEW ORIENTATION AND THE PRESENT VEHICLE ATTITUDE.  CAL52A THEN USES THESE ANGLES, STORED IN THETAD,+1,+2, TO
039595,000068:                                                                                                  #        COARSE ALIGN THE IMU.  THE STAR SELECTION ROUTINE, R56, IS THEN OPERATED.  IF 2 STARS ARE NOT AVAILABLE AN ALARM
039596,000069:                                                                                                  #        IS FLASHED TO NOTIFY THE ASTRONAUT.  AT THIS POINT THE ASTRONAUT WILL MANUEVER THE VEHICLE AND SELECT 2 STARS
039597,000070:                                                                                                  #        EITHER MANUALLY OR AUTOMATICALLY.  AFTER 2 STARS HAVE BEEN SELECTED THE IMU IS FINE ALIGNED USING ROUTINE R51.  IF
039598,000071:                                                                                                  #        THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING (INDICATED BY RNDVZFLG) P20 IS DISPLAYED.  OTHERWISE P00 IS
039599,000072:                                                                                                  #        REQUESTED.
039600,000073: 
039601,000074:                                                                                                  #  CALLING SEQUENCE -
039602,000075: 

Page 922

039604,000077:                                                                                                  #        THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
039605,000078: 
039606,000079:                                                                                                  #  SUBROUTINES CALLED -
039607,000080: 
039608,000081:                                                                                                  #        1. FLAGDOWN              7. S52.2               13. NEWMODEX
039609,000082:                                                                                                  #        2. R02BOTH               8. CAL53A              14. PRIOLARM
039610,000083:                                                                                                  #        3. GOPERF4               9. FLAGUP
039611,000084:                                                                                                  #        4. MATMOVE              10. R56
039612,000085:                                                                                                  #        5. GOFLASH              11. R51
039613,000086:                                                                                                  #        6. S52.3                12. GOPERF3
039614,000087: 
039615,000088:                                                                                                  #  NORMAL EXIT MODES -
039616,000089: 
039617,000090:                                                                                                  #        EXITS TO ENDOFJOB
039618,000091: 
039619,000092:                                                                                                  #  ALARM OR ABORT EXIT MODES -
039620,000093: 
039621,000094:                                                                                                  #        NONE
039622,000095: 
039623,000096:                                                                                                  #  OUTPUT -
039624,000097: 
039625,000098:                                                                                                  #        THE FOLLOWING MAY BE FLASHED ON THE DSKY
039626,000099:                                                                                                  #                1. IMU ORIENTATION CODE
039627,000100:                                                                                                  #                2. ALARM CODE 215 - PREFERRED IMU ORIENTATION NOT SPECIFIED
039628,000101:                                                                                                  #                3. TIME OF NEXT IGNITION
039629,000102:                                                                                                  #                4. GIMBAL ANGLES
039630,000103:                                                                                                  #                5. ALARM CODE 405 - TWO STARS NOT AVAILABLE
039631,000104:                                                                                                  #                6. PLEASE PERFORM P00
039632,000105:                                                                                                  #        THE MODE DISPLAY MAY BE CHANGED TO 20
039633,000106: 
039634,000107:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
039635,000108: 
039636,000109:                                                                                                  #        PFRATFLG SHOULD BE SET IF A PREFERRED ORIENTATION HAS BEEN COMPUTED.  IF IT HAS BEEN COMPUTED IT IS STORED IN
039637,000110:                                                                                                  #        XSMD, YSMD, ZSMD.
039638,000111: 
039639,000112:                                                                                                  #        RNDVZFLG INDICATES WHETHER THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING.
039640,000113: 
039641,000114:                                                                                                  #  DEBRIS -
039642,000115: 
039643,000116:                                                                                                  #        WORKAREA
039644,000117: 
039645,000118: 33,3760                                           BANK     33                                    
039646,000119: 15,2000                                           SETLOC   P50S                                  
039647,000120: 15,2000                                           BANK                                           
039648,000121: 
039649,000122: 15,2050  E5,1755                                  EBANK=   BESTI                                 
039650,000123: 15,2050                                           COUNT*   $$/P52                                
039651,000124: 15,2050           04616        PROG52             TC       BANKCALL                              
039652,000125: 15,2051           11233                           CADR     R02BOTH                               #  IMU STATUS CHECK
039653,000126: 15,2052           34750                           CAF      PFRATBIT                              
039654,000127: 15,2053           70076                           MASK     FLAGWRD2                              #  IS PFRATFLG SET?
039655,000128: 15,2054           10000                           CCS      A                                     

Page 923

039657,000130: 15,2055           02060                           TC       P52A                                  #  YES
039658,000131: 15,2056           36250                           CAF      THREE                                 #  DISPLAY REFSMMAT OPTION 3
039659,000132: 15,2057           02061                           TC       P52A       +1                         
039660,000133: 15,2060           34753        P52A               CAF      BIT1                                  
039661,000134: 15,2061           55144                           TS       OPTION2                               
039662,000135: 15,2062           34753        P52B               CAF      BIT1                                  
039663,000136: 15,2063           04616                           TC       BANKCALL                              #  FLASH OPTION CODE AND ORIENTATION CODE
039664,000137: 15,2064           20714                           CADR     GOPERF4R                              #  FLASH V04N06
039665,000138: 15,2065           06001                           TC       GOTOPOOH                              
039666,000139: 15,2066           12073                           TCF      +5                                    #  V33 - PROCEED
039667,000140: 15,2067           02062                           TC       P52B                                  #  NEW CODE - NEW ORIENTATION CODE INPUT
039668,000141: 15,2070           05353                           TC       PHASCHNG                              #  DISPLAY RETURN
039669,000142: 15,2071           00014                           OCT      00014                                 
039670,000143: 15,2072           05155                           TC       ENDOFJOB                              
039671,000144: 
039672,000145: 15,2073           31144                           CA       OPTION2                               
039673,000146: 15,2074           76250                           MASK     THREE                                 
039674,000147: 15,2075           50000                           INDEX    A                                     
039675,000148: 15,2076           02077                           TC       +1                                    
039676,000149: 15,2077           12105                           TCF      OPT4                                  #  OPTION 4 LANDING SITE
039677,000150: 15,2100           12153                           TCF      P52H                                  #  OPTION 1 PREFERRED
039678,000151: 15,2101           12110                           TCF      P52T                                  #  OPTION 2 NOMINAL
039679,000152: 15,2102           06042        P52E               TC       INTPRET                               #  OPTION 3 REFSMMAT
039680,000153: 15,2103           77650                           GOTO                                           
039681,000154: 15,2104           32164                                    P52F                                  #  GO DO R51
039682,000155: 
039683,000156: 15,2105           00006        OPT4               EXTEND                                         
039684,000157: 15,2106           31401                           DCA      TLAND                                 #  IF OPTION 4 DISPLAY TLAND
039685,000158: 15,2107           12112                           TCF      P52T       +2                         
039686,000159: 
039687,000160: 15,2110           00006        P52T               EXTEND                                         
039688,000161: 15,2111           34755                           DCA      NEG0                                  
039689,000162: 15,2112           53045                           DXCH     DSPTEM1                               
039690,000163: 15,2113           32170                           CAF      V06N34*                               
039691,000164: 15,2114           04616                           TC       BANKCALL                              
039692,000165: 15,2115           20477                           CADR     GOFLASH                               
039693,000166: 15,2116           06001                           TC       GOTOPOOH                              
039694,000167: 15,2117           02121                           TC       +2                                    
039695,000168: 15,2120           02113                           TC       -5                                    
039696,000169: 15,2121           53045                           DXCH     DSPTEM1                               
039697,000170: 15,2122           00006                           EXTEND                                         
039698,000171: 15,2123           62125                           BZMF     +2                                    #  IF TIME ZERO OR NEG USE TIME2
039699,000172: 15,2124           12127                           TCF      +3                                    
039700,000173: 15,2125           00006                           EXTEND                                         
039701,000174: 15,2126           30025                           DCA      TIME2                                 
039702,000175: 15,2127           53775                           DXCH     TALIGN                                
039703,000176: 15,2130           31144        P52V               CA       OPTION2                               
039704,000177: 15,2131           74752                           MASK     BIT2                                  
039705,000178: 15,2132           10000                           CCS      A                                     
039706,000179: 15,2133           02137                           TC       P52W                                  

Page 924

039708,000181: 15,2134           06042                           TC       INTPRET                               #  OPTION 4 - GET LS ORIENTATION
039709,000182: 15,2135           77650                           GOTO                                           
039710,000183: 15,2136           32220                                    P52LS                                 
039711,000184: 

Page 925

039713,000186:                                                                                                  #  START ALIGNMENT
039714,000187: 
039715,000188: 15,2137           06042        P52W               TC       INTPRET                               
039716,000189: 15,2140           45145                           DLOAD    CALL                                  #  PICK UP ALIGN TIME
039717,000190: 15,2141           02775                                    TALIGN                                #  COMPUTE NOMINAL IMU
039718,000191: 15,2142           31651                                    S52.3                                 #        ORIENTATION
039719,000192: 15,2143           77624        P52D               CALL                                           #  READ VEHICLE ATTITUDE AND
039720,000193: 15,2144           31620                                    S52.2                                 #        COMPUTE GIMBAL ANGLES
039721,000194: 15,2145           77776                           EXIT                                           
039722,000195: 15,2146           35010                           CAF      V06N22                                
039723,000196: 15,2147           04616                           TC       BANKCALL                              #  DISPLAY GIMBAL ANGLES
039724,000197: 15,2150           20477                           CADR     GOFLASH                               
039725,000198: 15,2151           06001                           TC       GOTOPOOH                              
039726,000199: 15,2152           12171                           TCF      COARSTYP                              #  V33 - PROCEED, SEE IF GYRO TORQUE COARSE
039727,000200: 15,2153           06042        P52H               TC       INTPRET                               
039728,000201: 15,2154           77650                           GOTO                                           
039729,000202: 15,2155           32143                                    P52D                                  
039730,000203: 15,2156           06042        REGCOARS           TC       INTPRET                               
039731,000204: 15,2157           77624                           CALL                                           #  DO COARSE ALIGN
039732,000205: 15,2160           31321                                    CAL53A                                #        ROUTINE
039733,000206: 15,2161           43014        COARSRET           SET      CLEAR                                 
039734,000207: 15,2162           01462                                    REFSMFLG                              
039735,000208: 15,2163           01273                                    PFRATFLG                              
039736,000209: 15,2164           77624        P52F               CALL                                           
039737,000210: 15,2165           31007                                    R51                                   
039738,000211: 15,2166           77776        P52OUT             EXIT                                           
039739,000212: 15,2167           06001                           TC       GOTOPOOH                              
039740,000213: 15,2170     5006               VB05N09            =        V05N09                                
039741,000214: 15,2170           01442        V06N34*            VN       634                                   
039742,000215: 

Page 926

039744,000217:                                                                                                  #  CHECK FOR GRRO TORQUE COARSE ALIGNMENT
039745,000218: 
039746,000219: 15,2171           32217        COARSTYP           CAF      OCT13                                 
039747,000220: 15,2172           04616                           TC       BANKCALL                              #  DISPLAY V 50N25 WITH COARSE ALIGN OPTION
039748,000221: 15,2173           20624                           CADR     GOPERF1                               
039749,000222: 15,2174           16001                           TCF      GOTOPOOH                              #  V34 - TERMIN&OE
039750,000223: 15,2175           12156                           TCF      REGCOARS                              #  V33 - NORMAL COARSE
039751,000224: 15,2176           06042                           TC       INTPRET                               #  V32 - GYRO TORQUE COARSE
039752,000225: 15,2177           64375                           VLOAD    MXV                                   
039753,000226: 15,2200           03607                                    XSMD                                  #  GET SM(DESIRED) WRT SM(PRESENT)
039754,000227: 15,2201           01734                                    REFSMMAT                              
039755,000228: 15,2202           77656                           UNIT                                           
039756,000229: 15,2203           26665                           STOVL    XDC                                   
039757,000230: 15,2204           03615                                    YSMD                                  
039758,000231: 15,2205           53521                           MXV      UNIT                                  
039759,000232: 15,2206           01734                                    REFSMMAT                              
039760,000233: 15,2207           26673                           STOVL    YDC                                   
039761,000234: 15,2210           03623                                    ZSMD                                  
039762,000235: 15,2211           53521                           MXV      UNIT                                  
039763,000236: 15,2212           01734                                    REFSMMAT                              
039764,000237: 15,2213           36701                           STCALL   ZDC                                   
039765,000238: 15,2214           31156                                    GYCOARS                               
039766,000239: 15,2215           77650                           GOTO                                           
039767,000240: 15,2216           32166                                    P52OUT                                
039768,000241: 15,2217           00013        OCT13              OCT      13                                    
039769,000242: 

Page 927

039771,000244:                                                                                                  #  COMPUTE LANDING ORIENTATION FOR OPTION 4
039772,000245: 
039773,000246: 15,2220           43014        P52LS              SET      CLEAR                                 #  GET LANDING SITE ORIENTATION
039774,000247: 15,2221           01463                                    LUNAFLAG                              
039775,000248: 15,2222           00662                                    ERADFLAG                              #  TO PICK UP RLS
039776,000249: 15,2223           77201                           SETPD    VLOAD                                 
039777,000250: 15,2224           00001                                    0                                     
039778,000251: 15,2225           02023                                    RLS                                   #  PICK UP LANDING SITE VEC IN MF
039779,000252: 15,2226           41525                           PDDL     PUSH                                  #  RLS PD 0-5
039780,000253: 15,2227           02775                                    TALIGN                                
039781,000254: 15,2230           36401                           STCALL   TLAND                                 #  JAM ALIGN TIME IN TLAND FOR OPTION 4
039782,000255: 15,2231           55716                                    RP-TO-R                               #  TRANS RLS TO REF
039783,000256: 15,2232           77742                           VSR2                                           
039784,000257: 15,2233           16032                           STODL    ALPHAV                                #  INPUT TO LAT-LONG
039785,000258: 15,2234           02775                                    TALIGN                                
039786,000259: 15,2235           77624                           CALL                                           
039787,000260: 15,2236           30440                                    N89DISP                               
039788,000261: 15,2237           53575                           VLOAD    UNIT                                  #  COMPUTE LANDING SITE ORIENT (XSMD)
039789,000262: 15,2240           02032                                    ALPHAV                                
039790,000263: 15,2241           37607                           STCALL   XSMD                                  
039791,000264: 15,2242           10757                                    LSORIENT                              
039792,000265: 15,2243           77650                           GOTO                                           
039793,000266: 15,2244           32143                                    P52D                                  #  NOW GO COMPUTE GIMBAL ANGLES
039794,000267: 

Page 928

039796,000269:                                                                                                  #  SUBROUTINE TO CALCULATE AND DISPLAY THE LUNAR LANDING SITE
039797,000270: 
039798,000271: 14,2000                                           SETLOC   P50S1                                 
039799,000272: 14,2000                                           BANK                                           
039800,000273: 14,2440  E5,1642                                  EBANK=   XSM                                   
039801,000274: 
039802,000275: 14,2440           77620        N89DISP            STQ                                            
039803,000276: 14,2441           02746                                    QMAJ                                  
039804,000277: 14,2442           35242                           STCALL   GDT/2      +4                         #  TEMP STORE TIME
039805,000278: 14,2443           26347                                    LAT-LONG                              
039806,000279: 14,2444           70545                           DLOAD    SR1                                   
039807,000280: 14,2445           01122                                    LONG                                  
039808,000281: 14,2446           16711                           STODL    LANDLONG                              
039809,000282: 14,2447           01124                                    ALT                                   
039810,000283: 14,2450           16713                           STODL    LANDALT                               
039811,000284: 14,2451           01120                                    LAT                                   
039812,000285: 14,2452           02707                           STORE    LANDLAT                               
039813,000286: 14,2453           77776                           EXIT                                           
039814,000287: 
039815,000288: 14,2454           32477        LSDISP             CAF      V06N89*                               #  DISPLAY LAT,LONG/2,ALT
039816,000289: 14,2455           04616                           TC       BANKCALL                              
039817,000290: 14,2456           20477                           CADR     GOFLASH                               
039818,000291: 14,2457           16001                           TCF      GOTOPOOH                              #  V34 - TERMINATE - EXIT P57
039819,000292: 14,2460           12462                           TCF      +2                                    #  V33 - PROCEED - ACCEPT LS DATA
039820,000293: 14,2461           12454                           TCF      LSDISP                                #  V32 OR E - LOOK AGAIN AND/OR LOAD NEW LS
039821,000294: 
039822,000295: 14,2462           06042                           TC       INTPRET                               
039823,000296: 14,2463           72545                           DLOAD    SL1                                   
039824,000297: 14,2464           02711                                    LANDLONG                              
039825,000298: 14,2465           15122                           STODL    LONG                                  
039826,000299: 14,2466           02713                                    LANDALT                               
039827,000300: 14,2467           15124                           STODL    ALT                                   
039828,000301: 14,2470           02707                                    LANDLAT                               
039829,000302: 14,2471           15120                           STODL    LAT                                   
039830,000303: 14,2472           01242                                    GDT/2      +4                         #  PICK UP TIME
039831,000304: 14,2473           77624                           CALL                                           #  GET RLS BACK FROM LAT,LONG,ALT
039832,000305: 14,2474           26420                                    LALOTORV                              #  RLS B-29 IN MPAC AND ALPHAV
039833,000306: 14,2475           77650                           GOTO                                           
039834,000307: 14,2476           02746                                    QMAJ                                  
039835,000308: 14,2477           01531        V06N89*            VN       689                                   
039836,000309: 

Page 929

039838,000311:                                                                                                  #  NAME - S50 ALIAS LOCSAM
039839,000312:                                                                                                  #  BY
039840,000313:                                                                                                  #  VINCENT
039841,000314: 
039842,000315:                                                                                                  #  FUNCTION - COMPUTE INPUTS FOR PICAPAR AND PLANET
039843,000316: 
039844,000317:                                                                                                  #        DEFINE
039845,000318: 
039846,000319:                                                                                                  #        U   = UNIT( SUN WRT EARTH )
039847,000320:                                                                                                  #         ES
039848,000321: 
039849,000322:                                                                                                  #        U   = UNIT( MOON WRT EARTH )
039850,000323:                                                                                                  #         EM
039851,000324: 
039852,000325:                                                                                                  #        R   = POSITION VECTOR OF LEM
039853,000326:                                                                                                  #         L
039854,000327: 
039855,000328:                                                                                                  #        R   = MEAN DISTANCE (384402KM) BETWEEN EARTH AND MOON
039856,000329:                                                                                                  #         EM
039857,000330: 
039858,000331:                                                                                                  #        P   = RATIO R  /(DISTANCE SUN TO EARTH) > .00257125
039859,000332:                                                                                                  #                     EM
039860,000333: 
039861,000334:                                                                                                  #        R   = EQUATORIAL RADIUSS (6378.166KM) OF EARTH
039862,000335:                                                                                                  #         E
039863,000336: 
039864,000337:                                                                                                  #        LOCSAM COMPUTES IN EARTH INFLUENCE
039865,000338: 
039866,000339:                                                                                                  #        VSUN = U
039867,000340:                                                                                                  #                ES
039868,000341: 
039869,000342:                                                                                                  #        VEARTH = -UNIT( R  )
039870,000343:                                                                                                  #                         L
039871,000344: 
039872,000345:                                                                                                  #        VMOON = UNIT(R  .U   - R  )
039873,000346:                                                                                                  #                      EM  EM    L
039874,000347: 
039875,000348:                                                                                                  #        CSUN = COS 90
039876,000349: 
039877,000350:                                                                                                  #        CEARTH = COS(5 + ARCSIN(R /MAG(R )))
039878,000351:                                                                                                  #                                 E      L
039879,000352: 
039880,000353:                                                                                                  #        CMOON   = COS 5
039881,000354: 
039882,000355:                                                                                                  #  INPUT - TIME IN MPAC
039883,000356: 
039884,000357:                                                                                                  #  OUTPUT - LISTED ABOVE
039885,000358: 
039886,000359:                                                                                                  #  SUBROUTINES - LSPOS, LEMPREC
039887,000360: 
039888,000361:                                                                                                  #  DEBRIS - VAC AREA, TSIGHT
039889,000362: 

Page 930

039891,000364: 14,2500                                           COUNT*   $$/LOSAM                              
039892,000365: 
039893,000366: 14,2500  14,2500               S50                =        LOCSAM                                
039894,000367: 14,2500           77620        LOCSAM             STQ                                            
039895,000368: 14,2501           02745                                    QMIN                                  
039896,000369: 14,2502           37562                           STCALL   TSIGHT                                
039897,000370: 14,2503           33647                                    LSPOS                                 
039898,000371: 14,2504           77745                           DLOAD                                          
039899,000372: 14,2505           03562                                    TSIGHT                                
039900,000373: 14,2506           34041                           STCALL   TDEC1                                 
039901,000374: 14,2507           27056                                    LEMPREC                               
039902,000375: 14,2510           61131                           SSP      TIX,2                                 
039903,000376: 14,2511           00052                                    S2                                    
039904,000377: 14,2512           00000                                    0                                     
039905,000378: 14,2513           30535                                    MOONCNTR                              
039906,000379: 14,2514           74375        EARTCNTR           VLOAD    VXSC                                  
039907,000380: 14,2515           02723                                    VMOON                                 
039908,000381: 14,2516           30001                                    RSUBEM                                
039909,000382: 14,2517           52372                           VSL1     VSU                                   
039910,000383: 14,2520           00001                                    RATT                                  
039911,000384: 14,2521           77656                           UNIT                                           
039912,000385: 14,2522           26723                           STOVL    VMOON                                 
039913,000386: 14,2523           00001                                    RATT                                  
039914,000387: 14,2524           57456                           UNIT     VCOMP                                 
039915,000388: 14,2525           16707                           STODL    VEARTH                                
039916,000389: 14,2526           30005                                    RSUBE                                 
039917,000390: 14,2527           77624                           CALL                                           
039918,000391: 14,2530           30567                                    OCCOS                                 
039919,000392: 14,2531           14017                           STODL    CEARTH                                
039920,000393: 14,2532           30576                                    CSS5                                  
039921,000394: 14,2533           34023                           STCALL   CMOON                                 
039922,000395: 14,2534           30562                                    ENDSAM                                
039923,000396: 14,2535           74375        MOONCNTR           VLOAD    VXSC                                  
039924,000397: 14,2536           02723                                    VMOON                                 
039925,000398: 14,2537           30007                                    ROE                                   
039926,000399: 14,2540           53445                           BVSU     UNIT                                  
039927,000400: 14,2541           02715                                    VSUN                                  
039928,000401: 14,2542           26715                           STOVL    VSUN                                  
039929,000402: 14,2543           02723                                    VMOON                                 
039930,000403: 14,2544           53361                           VXSC     VAD                                   
039931,000404: 14,2545           30001                                    RSUBEM                                
039932,000405: 14,2546           00001                                    RATT                                  
039933,000406: 14,2547           57456                           UNIT     VCOMP                                 
039934,000407: 14,2550           26707                           STOVL    VEARTH                                
039935,000408: 14,2551           00001                                    RATT                                  
039936,000409: 14,2552           57456                           UNIT     VCOMP                                 
039937,000410: 14,2553           16723                           STODL    VMOON                                 
039938,000411: 14,2554           30003                                    RSUBM                                 
039939,000412: 14,2555           77624                           CALL                                           
039940,000413: 14,2556           30567                                    OCCOS                                 

Page 931

039942,000415: 14,2557           14023                           STODL    CMOON                                 
039943,000416: 14,2560           30576                                    CSS5                                  
039944,000417: 14,2561           00017                           STORE    CEARTH                                
039945,000418: 14,2562           77745        ENDSAM             DLOAD                                          
039946,000419: 14,2563           30600                                    CSSUN                                 
039947,000420: 14,2564           00021                           STORE    CSUN                                  
039948,000421: 14,2565           77650                           GOTO                                           
039949,000422: 14,2566           02745                                    QMIN                                  
039950,000423: 14,2567           70471        OCCOS              DDV      SR1                                   
039951,000424: 14,2570           00045                                    36D                                   
039952,000425: 14,2571           43336                           ASIN     DAD                                   
039953,000426: 14,2572           30602                                    5DEGREES                              
039954,000427: 14,2573           70546                           COS      SR1                                   
039955,000428: 14,2574           77616                           RVQ                                            
039956,000429: 14,2575                        CEARTH             =        14D                                   
039957,000430: 14,2575                        CSUN               =        16D                                   
039958,000431: 14,2575                        CMOON              =        18D                                   
039959,000432: 14,2575           07760 14473  CSS5               2DEC     .2490475                              #  (COS 5)/4
039960,000433: 14,2577           04000 00000  CSSUN              2DEC     .125                                  #  (COS 60)/4
039961,000434: 14,2601           00343 21616  5DEGREES           2DEC     .013888889                            #  SCALED IN REVS
039962,000435: 

Page 932

039964,000437:                                                                                                  #  PROGRAM NAME - R56            DATE  DEC 20 66
039965,000438:                                                                                                  #  MOD 1                         LOG SECTION  P51-P53
039966,000439:                                                                                                  #                                ASSEMBLY   SUNDISK REV40
039967,000440:                                                                                                  #  BY KEN VINCENT
039968,000441: 
039969,000442:                                                                                                  #  FUNCTION
039970,000443:                                                                                                  #        THIS PROGRAM READ THE IMU-CDUS AND COMPUTES THE VEHICLE ORIENTATION
039971,000444:                                                                                                  #        WITH RESPECT TO INERTIAL SPACE.  IT THEN COMPUTES THE SHAFT AXIS (SAX)
039972,000445:                                                                                                  #        WITH RESPECT TO REFERENCE INERTIAL.  EACH STAR IN THE CATALOG IS TESTED
039973,000446:                                                                                                  #        TO DETERMINE IF IT IS OCCULTED BY EITHER THE EARTH, SUN OR MOON.  IF A
039974,000447:                                                                                                  #        STAR IS NOT OCCULTED THEN IT IS PAIRED WITH ALL STAR OF LOWER INDEX.
039975,000448:                                                                                                  #        THE PAIRED STAR IS TESTED FOR OCCULTATION.  PAIRS OF STARS THAT PASS
039976,000449:                                                                                                  #        THE OCCULTATION TESTS ARE TESTED FOR GOOD SEPARATION.  A PAIR OF STARS
039977,000450:                                                                                                  #        HAVE GOOD SEPERATION IF THE ANGLE BETWEEN THEM IS LESS THAN 100 DEGREES
039978,000451:                                                                                                  #        AND MORE THAN 50 DEGREES.  THOSE PAIRS WITH GOOD SEPARATION
039979,000452:                                                                                                  #        ARE THEN TESTED TO SEE IF THEY LIE IN CURRENT FIELD OF VIEW.  (WITHIN
039980,000453:                                                                                                  #        50 DEGREESOF SAX).  THE PAIR WITH MAX SEPARATION IS CHOSEN FROM
039981,000454:                                                                                                  #        THOSE WITH GOOD SEPARATION, AND      IN FIELD OF VIEW.
039982,000455: 
039983,000456:                                                                                                  #  CALLING SEQUENCE
039984,000457:                                                                                                  #        L       TC      BANKCALL
039985,000458:                                                                                                  #        L+1     CADR    R56
039986,000459:                                                                                                  #        L+2     ERROR RETURN - NO STARS IN FIELD OF VIEW
039987,000460:                                                                                                  #        L+3     NORMAL RETURN
039988,000461: 
039989,000462:                                                                                                  #  OUTPUT
039990,000463:                                                                                                  #        BESTI, BESTJ - SINGLE PREC, INTEGERS, STAR NUMBERS TIMES 6
039991,000464:                                                                                                  #        VFLAG - FLAG BIT SET IMPLIES NO STARS IN FIELD OF VIEW
039992,000465: 
039993,000466:                                                                                                  #  INITIALIZATION
039994,000467:                                                                                                  #        1)      A CALL TO LOCSAM MUST BE MADE
039995,000468: 
039996,000469:                                                                                                  #  DEBRIS
039997,000470:                                                                                                  #        WORKAREA
039998,000471:                                                                                                  #        X,Y,ZNB
039999,000472:                                                                                                  #        SINCDU, COSCDU
040000,000473:                                                                                                  #        STARAD - STAR +5
040001,000474: 
040002,000475: 14,2603  14,2603               R56                =        PICAPAR                               
040003,000476: 14,2603                                           COUNT*   $$/R56                                
040004,000477: 14,2603           04645        PICAPAR            TC       MAKECADR                              
040005,000478: 14,2604           55745                           TS       QMIN                                  
040006,000479: 14,2605           06042                           TC       INTPRET                               
040007,000480: 14,2606           77624                           CALL                                           
040008,000481: 14,2607           47541                                    CDUTRIG                               
040009,000482: 14,2610           77624                           CALL                                           
040010,000483: 14,2611           20030                                    CALCSMSC                              
040011,000484: 14,2612           77601                           SETPD                                          
040012,000485: 14,2613           00001                                    0                                     
040013,000486: 14,2614           71214                           SET      DLOAD                                 #  VFLAG = 1
040014,000487: 14,2615           01465                                    VFLAG                                 

Page 933

040016,000489: 14,2616           24007                                    DPZERO                                
040017,000490: 14,2617           26756                           STOVL    BESTI                                 
040018,000491: 14,2620           02665                                    XNB                                   
040019,000492: 14,2621           63361                           VXSC     PDVL                                  
040020,000493: 14,2622           24005                                    HALFDP                                
040021,000494: 14,2623           02701                                    ZNB                                   
040022,000495: 14,2624           74370                           AXT,1    VXSC                                  
040023,000496: 14,2625           00344                                    228D                                  #  X1 = 37 X 6 + 6
040024,000497: 14,2626           24005                                    HALFDP                                
040025,000498: 14,2627           77655                           VAD                                            
040026,000499: 14,2630           53505                           VXM      UNIT                                  
040027,000500: 14,2631           01734                                    REFSMMAT                              
040028,000501: 14,2632           02731                           STORE    SAX                                   #  SAX = SHAFT AXIS
040029,000502: 14,2633           66331                           SSP      SSP                                   #  S1 = S2 = 6
040030,000503: 14,2634           00051                                    S1                                    
040031,000504: 14,2635           00006                                    6                                     
040032,000505: 14,2636           00052                                    S2                                    
040033,000506: 14,2637           00006                                    6                                     
040034,000507: 14,2640           52100        PIC1               TIX,1    GOTO                                  #  MAJOR STAR
040035,000508: 14,2641           30643                                    PIC2                                  
040036,000509: 14,2642           30760                                    PICEND                                
040037,000510: 14,2643           50373        PIC2               VLOAD*   DOT                                   
040038,000511: 14,2644           30347                                    CATLOG,1                              
040039,000512: 14,2645           02731                                    SAX                                   
040040,000513: 14,2646           50025                           DSU      BMN                                   
040041,000514: 14,2647           30757                                    CSS33                                 
040042,000515: 14,2650           30640                                    PIC1                                  
040043,000516: 14,2651           77754                           LXA,2                                          
040044,000517: 14,2652           00046                                    X1                                    
040045,000518: 14,2653           52104        PIC3               TIX,2    GOTO                                  
040046,000519: 14,2654           30656                                    PIC4                                  
040047,000520: 14,2655           30640                                    PIC1                                  
040048,000521: 14,2656           50373        PIC4               VLOAD*   DOT                                   
040049,000522: 14,2657           47430                                    CATLOG,2                              
040050,000523: 14,2660           02731                                    SAX                                   
040051,000524: 14,2661           50025                           DSU      BMN                                   
040052,000525: 14,2662           30757                                    CSS33                                 
040053,000526: 14,2663           30653                                    PIC3                                  
040054,000527: 14,2664           47773                           VLOAD*   DOT*                                  
040055,000528: 14,2665           30347                                    CATLOG,1                              
040056,000529: 14,2666           47430                                    CATLOG,2                              
040057,000530: 14,2667           51025                           DSU      BPL                                   
040058,000531: 14,2670           30755                                    CSS40                                 
040059,000532: 14,2671           30653                                    PIC3                                  
040060,000533: 14,2672           45173                           VLOAD*   CALL                                  
040061,000534: 14,2673           30347                                    CATLOG,1                              
040062,000535: 14,2674           30732                                    OCCULT                                
040063,000536: 14,2675           77614                           BON                                            
040064,000537: 14,2676           01710                                    CULTFLAG                              
040065,000538: 14,2677           30640                                    PIC1                                  

Page 934

040067,000540: 14,2700           45173                           VLOAD*   CALL                                  
040068,000541: 14,2701           47430                                    CATLOG,2                              
040069,000542: 14,2702           30732                                    OCCULT                                
040070,000543: 14,2703           77614                           BON                                            
040071,000544: 14,2704           01710                                    CULTFLAG                              
040072,000545: 14,2705           30653                                    PIC3                                  
040073,000546: 14,2706           77614        STRATGY            BONCLR                                         
040074,000547: 14,2707           01605                                    VFLAG                                 
040075,000548: 14,2710           30725                                    NEWPAR                                
040076,000549: 14,2711           65120                           XCHX,1   XCHX,2                                
040077,000550: 14,2712           02755                                    BESTI                                 
040078,000551: 14,2713           02756                                    BESTJ                                 
040079,000552: 14,2714           47773        STRAT              VLOAD*   DOT*                                  
040080,000553: 14,2715           30347                                    CATLOG,1                              
040081,000554: 14,2716           47430                                    CATLOG,2                              
040082,000555: 14,2717           43006                           PUSH     BOFINV                                
040083,000556: 14,2720           01545                                    VFLAG                                 
040084,000557: 14,2721           30711                                    STRAT      -3                         
040085,000558: 14,2722           45345                           DLOAD    DSU                                   
040086,000559: 14,2723           77644                           BPL                                            
040087,000560: 14,2724           30653                                    PIC3                                  
040088,000561: 14,2725           67130        NEWPAR             SXA,1    SXA,2                                 
040089,000562: 14,2726           02755                                    BESTI                                 
040090,000563: 14,2727           02756                                    BESTJ                                 
040091,000564: 14,2730           77650                           GOTO                                           
040092,000565: 14,2731           30653                                    PIC3                                  
040093,000566: 14,2732           51321        OCCULT             MXV      BVSU                                  
040094,000567: 14,2733           02707                                    CULTRIX                               
040095,000568: 14,2734           00017                                    CSS                                   
040096,000569: 14,2735           77654                           BZE                                            
040097,000570: 14,2736           30751                                    CULTED                                
040098,000571: 14,2737           75240                           BMN      SIGN                                  
040099,000572: 14,2740           30751                                    CULTED                                
040100,000573: 14,2741           00160                                    MPAC       +3                         
040101,000574: 14,2742           75240                           BMN      SIGN                                  
040102,000575: 14,2743           30751                                    CULTED                                
040103,000576: 14,2744           00162                                    MPAC       +5                         
040104,000577: 14,2745           43040                           BMN      CLRGO                                 
040105,000578: 14,2746           30751                                    CULTED                                
040106,000579: 14,2747           01630                                    CULTFLAG                              
040107,000580: 14,2750           00052                                    QPRET                                 
040108,000581: 14,2751           77614        CULTED             SETGO                                          
040109,000582: 14,2752           01430                                    CULTFLAG                              
040110,000583: 14,2753           00052                                    QPRET                                 
040111,000584: 14,2754  0000016               CSS                =        CEARTH                                
040112,000585: 14,2754           05110 35052  CSS40              2DEC     .16070                                #  COS 50 / 4
040113,000586: 14,2756           05110 35052  CSS33              2DEC     .16070                                #  COS 50 / 4
040114,000587: 14,2760           77414        PICEND             BOFF     EXIT                                  
040115,000588: 

Page 935

040117,000590: 14,2761           01745                                    VFLAG                                 
040118,000591: 14,2762           30764                                    PICGXT                                
040119,000592: 14,2763           03005                           TC       PICBXT                                
040120,000593: 14,2764           73150        PICGXT             LXA,1    LXA,2                                 
040121,000594: 14,2765           02755                                    BESTI                                 
040122,000595: 14,2766           02756                                    BESTJ                                 
040123,000596: 14,2767           47775                           VLOAD    DOT*                                  
040124,000597: 14,2770           02731                                    SAX                                   
040125,000598: 14,2771           30347                                    CATLOG,1                              
040126,000599: 14,2772           47715                           PDVL     DOT*                                  
040127,000600: 14,2773           02731                                    SAX                                   
040128,000601: 14,2774           47430                                    CATLOG,2                              
040129,000602: 14,2775           77625                           DSU                                            
040130,000603: 14,2776           66044                           BPL      SXA,1                                 
040131,000604: 14,2777           31003                                    PICNSWP                               
040132,000605: 14,3000           02756                                    BESTJ                                 
040133,000606: 14,3001           77734                           SXA,2                                          
040134,000607: 14,3002           02755                                    BESTI                                 
040135,000608: 14,3003           77776        PICNSWP            EXIT                                           
040136,000609: 14,3004           25745                           INCR     QMIN                                  
040137,000610: 14,3005           31745        PICBXT             CA       QMIN                                  
040138,000611: 14,3006           04622                           TC       SWCALL                                
040139,000612: 14,3007                        VPD                =        0D                                    
040140,000613: 14,3007                        V0                 =        6D                                    
040141,000614: 14,3007                        V1                 =        12D                                   
040142,000615: 14,3007                        V2                 =        18D                                   
040143,000616: 14,3007                        V3                 =        24D                                   
040144,000617: 14,3007                        DP0                =        30D                                   
040145,000618: 14,3007                        DP1                =        32D                                   
040146,000619: 

Page 936

040148,000621:                                                                                                  #  NAME - R51    FINE ALIGN
040149,000622:                                                                                                  #  FUNCTION - TO ALIGN THE STABLE MEMBER TO REFSMMAT
040150,000623:                                                                                                  #  CALLING SEQ - CALL R51
040151,000624:                                                                                                  #  INPUT - REFSMMAT
040152,000625:                                                                                                  #  OUTPUT - GYRO TORQUE PULSES
040153,000626:                                                                                                  #  SUBROUTINES - LOCSAM, PICAPAR, R52, R53, R54, R55
040154,000627: 
040155,000628: 14,3007                                           COUNT*   $$/R51                                
040156,000629: 14,3007           77620        R51                STQ                                            
040157,000630: 14,3010           02746                                    QMAJ                                  
040158,000631: 14,3011           77776        R51.1              EXIT                                           
040159,000632: 14,3012           05353                           TC       PHASCHNG                              
040160,000633: 14,3013           04024                           OCT      04024                                 
040161,000634: 
040162,000635: 14,3014           34761        R51C               CAF      OCT15                                 
040163,000636: 14,3015           04616                           TC       BANKCALL                              
040164,000637: 14,3016           20624                           CADR     GOPERF1                               
040165,000638: 14,3017           06001                           TC       GOTOPOOH                              
040166,000639: 14,3020           03022                           TC       +2                                    #  V33E
040167,000640: 14,3021           03045                           TC       R51E                                  #  ENTER
040168,000641: 14,3022           06042                           TC       INTPRET                               
040169,000642: 14,3023           43234                           RTB      DAD                                   
040170,000643: 14,3024           21574                                    LOADTIME                              
040171,000644: 14,3025           31155                                    TSIGHT1                               
040172,000645: 14,3026           77624                           CALL                                           
040173,000646: 14,3027           30500                                    LOCSAM                                
040174,000647: 14,3030           77776                           EXIT                                           
040175,000648: 14,3031           04616                           TC       BANKCALL                              
040176,000649: 14,3032           30603                           CADR     R56                                   
040177,000650: 14,3033           03035                           TC       R51I                                  
040178,000651: 14,3034           03045        R51F               TC       R51E                                  
040179,000652: 14,3035           05567        R51I               TC       ALARM                                 
040180,000653: 14,3036           00405                           OCT      405                                   
040181,000654: 14,3037           35006                           CAF      VB05N09                               
040182,000655: 14,3040           04616                           TC       BANKCALL                              
040183,000656: 14,3041           20477                           CADR     GOFLASH                               
040184,000657: 14,3042           06001                           TC       GOTOPOOH                              
040185,000658: 14,3043           03045                           TC       R51E                                  
040186,000659: 14,3044           03014                           TC       R51C                                  
040187,000660: 14,3045           34755        R51E               CAF      ZERO                                  
040188,000661: 14,3046           55757                           TS       STARIND                               
040189,000662: 14,3047           06042        R51.2              TC       INTPRET                               
040190,000663: 14,3050           77776        R51.3              EXIT                                           
040191,000664: 14,3051           05353                           TC       PHASCHNG                              
040192,000665: 14,3052           04024                           OCT      04024                                 
040193,000666: 
040194,000667: 14,3053           06042                           TC       INTPRET                               
040195,000668: 14,3054           77624                           CALL                                           
040196,000669: 14,3055           31671                                    R52                                   #  AOP WILL MAKE CALLS TO SIGHTING
040197,000670: 14,3056           77776                           EXIT                                           
040198,000671: 14,3057           04616                           TC       BANKCALL                              

Page 937

040200,000673: 14,3060           16000                           CADR     AOTMARK                               
040201,000674: 14,3061           04616                           TC       BANKCALL                              
040202,000675: 14,3062           17703                           CADR     OPTSTALL                              
040203,000676: 14,3063           05701                           TC       CURTAINS                              
040204,000677: 14,3064           11757                           CCS      STARIND                               
040205,000678: 14,3065           13067                           TCF      +2                                    
040206,000679: 14,3066           03137                           TC       R51.4                                 
040207,000680: 14,3067           06042                           TC       INTPRET                               
040208,000681: 14,3070           77775                           VLOAD                                          
040209,000682: 14,3071           02715                                    STARAD     +6                         
040210,000683: 14,3072           02767                           STORE    STARSAV2                              
040211,000684: 14,3073           77776                           EXIT                                           
040212,000685: 14,3074           05353                           TC       PHASCHNG                              
040213,000686: 14,3075           04024                           OCT      04024                                 
040214,000687: 
040215,000688: 14,3076           06042                           TC       INTPRET                               
040216,000689: 14,3077           45145                           DLOAD    CALL                                  
040217,000690: 14,3100           03562                                    TSIGHT                                
040218,000691: 14,3101           32472                                    PLANET                                
040219,000692: 14,3102           53521                           MXV      UNIT                                  
040220,000693: 14,3103           01734                                    REFSMMAT                              
040221,000694: 14,3104           26715                           STOVL    STARAD     +6                         
040222,000695: 14,3105           03554                                    PLANVEC                               
040223,000696: 14,3106           53521                           MXV      UNIT                                  
040224,000697: 14,3107           01734                                    REFSMMAT                              
040225,000698: 14,3110           26707                           STOVL    STARAD                                
040226,000699: 14,3111           02761                                    STARSAV1                              
040227,000700: 14,3112           24007                           STOVL    6D                                    
040228,000701: 14,3113           02767                                    STARSAV2                              
040229,000702: 14,3114           34015                           STCALL   12D                                   
040230,000703: 14,3115           31250                                    R54                                   #  STAR DATA TEST
040231,000704: 14,3116           45014                           BOFF     CALL                                  
040232,000705: 14,3117           00354                                    FREEFLAG                              
040233,000706: 14,3120           31126                                    R51K                                  
040234,000707: 14,3121           47443                                    AXISGEN                               
040235,000708: 14,3122           77624                           CALL                                           
040236,000709: 14,3123           31216                                    R55                                   #  GYRO TORQUE
040237,000710: 14,3124           77614                           CLEAR                                          
040238,000711: 14,3125           01273                                    PFRATFLG                              
040239,000712: 14,3126           77776        R51K               EXIT                                           
040240,000713: 14,3127           35741        R51P63             CAF      OCT14                                 
040241,000714: 14,3130           04616                           TC       BANKCALL                              
040242,000715: 14,3131           20624                           CADR     GOPERF1                               
040243,000716: 14,3132           06001                           TC       GOTOPOOH                              
040244,000717: 14,3133           03014                           TC       R51C                                  
040245,000718: 14,3134           06042                           TC       INTPRET                               
040246,000719: 14,3135           77650                           GOTO                                           
040247,000720: 14,3136           02746                                    QMAJ                                  
040248,000721: 14,3137           06042        R51.4              TC       INTPRET                               
040249,000722: 14,3140           77775                           VLOAD                                          

Page 938

040251,000724: 14,3141           02715                                    STARAD     +6                         
040252,000725: 14,3142           02761                           STORE    STARSAV1                              
040253,000726: 14,3143           45145                           DLOAD    CALL                                  
040254,000727: 14,3144           03562                                    TSIGHT                                
040255,000728: 14,3145           32472                                    PLANET                                
040256,000729: 14,3146           03554                           STORE    PLANVEC                               
040257,000730: 14,3147           77731                           SSP                                            
040258,000731: 14,3150           02760                                    STARIND                               
040259,000732: 14,3151           00001                                    1                                     
040260,000733: 14,3152           77650                           GOTO                                           
040261,000734: 14,3153           31050                                    R51.3                                 
040262,000735: 14,3154           00002 06240  TSIGHT1            2DEC     36000      B-28                       #  6 MIN TO MARKING
040263,000736: 

Page 939

040265,000738:                                                                                                  #  GYRO TORQUE COARSE ALIGNMENT
040266,000739: 
040267,000740: 14,3156           45020        GYCOARS            STQ      CALL                                  
040268,000741: 14,3157           02746                                    QMAJ                                  
040269,000742: 14,3160           47251                                    CALCGTA                               
040270,000743: 14,3161           43014                           CLEAR    CLEAR                                 
040271,000744: 14,3162           01260                                    DRIFTFLG                              
040272,000745: 14,3163           01662                                    REFSMFLG                              
040273,000746: 14,3164           77776                           EXIT                                           
040274,000747: 14,3165           33215                           CAF      V16N20                                #  MONITOR GIMBALS
040275,000748: 14,3166           04616                           TC       BANKCALL                              
040276,000749: 14,3167           20452                           CADR     GODSPR                                
040277,000750: 14,3170           33247                           CA       R55CDR                                
040278,000751: 14,3171           04616                           TC       BANKCALL                              
040279,000752: 14,3172           17314                           CADR     IMUPULSE                              
040280,000753: 14,3173           04616                           TC       BANKCALL                              
040281,000754: 14,3174           17707                           CADR     IMUSTALL                              
040282,000755: 14,3175           05701                           TC       CURTAINS                              
040283,000756: 14,3176           05353                           TC       PHASCHNG                              
040284,000757: 14,3177           04024                           OCT      04024                                 
040285,000758: 
040286,000759: 14,3200           06042                           TC       INTPRET                               
040287,000760: 14,3201           75160                           AXC,1    AXC,2                                 
040288,000761: 14,3202           03606                                    XSMD                                  
040289,000762: 14,3203           01733                                    REFSMMAT                              
040290,000763: 14,3204           77624                           CALL                                           #  STORE DESIRED REFSMMAT
040291,000764: 14,3205           31371                                    MATMOVE                               
040292,000765: 14,3206           43014                           CLEAR    SET                                   
040293,000766: 14,3207           01273                                    PFRATFLG                              
040294,000767: 14,3210           01462                                    REFSMFLG                              
040295,000768: 14,3211           77624                           CALL                                           
040296,000769: 14,3212           31603                                    NCOARSE                               #  SET DRIFT AND INITIALIZE 1/PIPADT
040297,000770: 14,3213           77650                           GOTO                                           
040298,000771: 14,3214           31126                                    R51K                                  
040299,000772: 14,3215           04024        V16N20             VN       1620                                  
040300,000773: 

Page 940

040302,000775:                                                                                                  #  R55   GYROTORQUE
040303,000776:                                                                                                  #  FUNCTION - COMPUTE AND SEND GYRO PULSES
040304,000777:                                                                                                  #  CALLING SEQ - CALL R55
040305,000778:                                                                                                  #  INPUT - X,Y,ZDC - REFSMMAT WRT PRESENT STABLE MEMBER
040306,000779:                                                                                                  #  OUTPUT - GYRO PULSES
040307,000780:                                                                                                  #  SUBROUTINES - CALCGTA, GOFLASH, GODSPR, IMUFINE, IMUPULSE, GOPERF1
040308,000781: 
040309,000782: 14,3216                                           COUNT*   $$/R55                                
040310,000783: 14,3216           77620        R55                STQ                                            
040311,000784: 14,3217           02745                                    QMIN                                  
040312,000785: 14,3220           77624                           CALL                                           
040313,000786: 14,3221           47251                                    CALCGTA                               
040314,000787: 14,3222           77776        PULSEM             EXIT                                           
040315,000788: 14,3223           33246        R55.1              CAF      V06N93                                
040316,000789: 14,3224           04616                           TC       BANKCALL                              
040317,000790: 14,3225           20477                           CADR     GOFLASH                               
040318,000791: 14,3226           06001                           TC       GOTOPOOH                              
040319,000792: 14,3227           03231                           TC       R55.2                                 
040320,000793: 14,3230           03243                           TC       R55RET                                
040321,000794: 14,3231           05353        R55.2              TC       PHASCHNG                              
040322,000795: 14,3232           00214                           OCT      00214                                 
040323,000796: 14,3233           33247                           CA       R55CDR                                
040324,000797: 14,3234           04616                           TC       BANKCALL                              
040325,000798: 14,3235           17314                           CADR     IMUPULSE                              
040326,000799: 14,3236           04616                           TC       BANKCALL                              
040327,000800: 14,3237           17707                           CADR     IMUSTALL                              
040328,000801: 14,3240           05701                           TC       CURTAINS                              
040329,000802: 14,3241           05353                           TC       PHASCHNG                              
040330,000803: 14,3242           04024                           OCT      04024                                 
040331,000804: 
040332,000805: 14,3243           06042        R55RET             TC       INTPRET                               
040333,000806: 14,3244           77650                           GOTO                                           
040334,000807: 14,3245           02745                                    QMIN                                  
040335,000808: 14,3246           01535        V06N93             VN       0693                                  
040336,000809: 14,3247           02737        R55CDR             ECADR    OGC                                   
040337,000810: 14,3250  14,3250               R54                =        CHKSDATA                              
040338,000811: 
040339,000812:                                                                                                  #  ROUTINE NAME - CHKSDATA               DATE - JAN 9, 1967
040340,000813:                                                                                                  #  MOD NO - 0                            LOG SECTION - P51-P53
040341,000814:                                                                                                  #  MODIFICATION BY - LONSKE              ASSEMBLY -
040342,000815: 
040343,000816:                                                                                                  #  FUNCTIONAL DESCRIPTION - CHECKS THE VALIDITY OF A PAIR OF STAR SIGHTINGS.  WHEN A PAIR OF STAR SIGHTINGS ARE MADE
040344,000817:                                                                                                  #  BY THE ASTRONAUT THIS ROUTINE OPERATES AND CHECKS THE OBSERVED SIGHTINGS AGAINST STORED STAR VECTORS IN THE
040345,000818:                                                                                                  #  COMPUTER TO INSURE A PROPER SIGHTING WAS MADE.  THE FOLLOWING COMPUTATIONS ARE PERFORMED_
040346,000819:                                                                                                  #        OS1     =       OBSERVED STAR 1 VECTOR
040347,000820:                                                                                                  #        OS2     =       OBSERVED STAR 2 VECTOR
040348,000821:                                                                                                  #        SS1     =       STORED STAR 1 VECTOR
040349,000822:                                                                                                  #        SS2     =       STORED STAR 2 VECTOR
040350,000823:                                                                                                  #         A1     =       ARCCOS(OS1 - OS2)
040351,000824:                                                                                                  #         A2     =       ARCCOS(SS1 - SS2)
040352,000825:                                                                                                  #          A     =       ABS(2(A1 - A2))

Page 941

040354,000827:                                                                                                  #  THE ANGULAR DIFFERENCE IS DISPLAYED FOR ASTRONAUT ACCEPTENCE
040355,000828: 
040356,000829:                                                                                                  #  EXIT MODE     1. FREEFLAG SET IMPLIES ASTRONAUT WANTS TO PROCEED
040357,000830:                                                                                                  #                2. FREEFLAG RESET IMPLIES ASTRONAUT WANTS TO RECYCLE             ERANCE)
040358,000831:                                                                                                  #  OUTPUT -      1. VERB 6,NOUN 3 - DISPLAYS ANGULAR DIFFERENCE BETWEEN 2 SETS OF STARS.
040359,000832:                                                                                                  #                2. STAR VECTORS FROM STAR CATALOG ARE LEFT IN 6D AND 12D.
040360,000833: 
040361,000834:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
040362,000835:                                                                                                  #                1. MARK VECTORS ARE STORED IN STARAD AND STARAD +6.
040363,000836:                                                                                                  #                2. CATALOG VECTORS ARE STORED IN 6D AND 12D.
040364,000837: 
040365,000838:                                                                                                  #  DEBRIS -
040366,000839: 
040367,000840: 14,3250                                           COUNT*   $$/R54                                
040368,000841: 14,3250           43020        CHKSDATA           STQ      SET                                   
040369,000842: 14,3251           02745                                    QMIN                                  
040370,000843: 14,3252           00074                                    FREEFLAG                              
040371,000844: 14,3253           77760        CHKSAB             AXC,1                                          #  SET X1 TO STORE EPHEMERIS DATA
040372,000845: 14,3254           02706                                    STARAD                                
040373,000846: 
040374,000847: 14,3255           47773        CHKSB              VLOAD*   DOT*                                  #  CAL. ANGLE THETA
040375,000848: 14,3256           00001                                    0,1                                   
040376,000849: 14,3257           00007                                    6,1                                   
040377,000850: 14,3260           65552                           SL1      ACOS                                  
040378,000851: 14,3261           00025                           STORE    THETA                                 
040379,000852: 14,3262           43014                           BOFF     INVERT                                #  BRANCH TO CHKSD IF THIS IS 2ND PASS
040380,000853: 14,3263           00354                                    FREEFLAG                              
040381,000854: 14,3264           31274                                    CHKSD                                 
040382,000855: 14,3265           00174                                    FREEFLAG                              #  CLEAR FREEFLAG
040383,000856: 14,3266           71360                           AXC,1    DLOAD                                 #  SET X1 TO MARK ANGLES
040384,000857: 14,3267           00006                                    6D                                    
040385,000858: 14,3270           00025                                    THETA                                 
040386,000859: 14,3271           00023                           STORE    18D                                   
040387,000860: 14,3272           77650                           GOTO                                           
040388,000861: 14,3273           31255                                    CHKSB                                 #  RETURN TO CAL. 2ND ANGLE
040389,000862: 14,3274           45345        CHKSD              DLOAD    DSU                                   
040390,000863: 14,3275           00025                                    THETA                                 
040391,000864: 14,3276           00023                                    18D                                   
040392,000865: 14,3277           77634                           RTB                                            #  COMPUTE POS DIFF
040393,000866: 14,3300           21613                                    SGNAGREE                              
040394,000867: 14,3301           01045                           STORE    NORMTEM1                              
040395,000868: 14,3302           77414                           SET      EXIT                                  
040396,000869: 14,3303           00074                                    FREEFLAG                              
040397,000870: 14,3304           33320                           CAF      VB6N5                                 
040398,000871: 14,3305           04616                           TC       BANKCALL                              
040399,000872: 14,3306           20477                           CADR     GOFLASH                               
040400,000873: 14,3307           16001                           TCF      GOTOPOOH                              
040401,000874: 14,3310           03315                           TC       CHKSDA                                #  PROCEED
040402,000875: 14,3311           06042                           TC       INTPRET                               
040403,000876: 14,3312           52014                           CLEAR    GOTO                                  
040404,000877: 14,3313           00274                                    FREEFLAG                              
040405,000878: 14,3314           02745                                    QMIN                                  
040406,000879: 14,3315           06042        CHKSDA             TC       INTPRET                               

Page 942

040408,000881: 14,3316           77650                           GOTO                                           
040409,000882: 14,3317           02745                                    QMIN                                  
040410,000883: 14,3320           01405        VB6N5              VN       605                                   
040411,000884: 
040412,000885:                                                                                                  #  NAME - CAL53A
040413,000886:                                                                                                  #  FUNCTION - COMPUTE DESIRED GIMBAL ANGLES AND COARSE ALIGN IF NECESSARY
040414,000887:                                                                                                  #  CALLING SEQUENCE - CALL CAL53A
040415,000888:                                                                                                  #  INPUT - X,Y,ZSMD, CDUX,Y,Z
040416,000889:                                                                                                  #           DESIRED GIMBAL ANGLES - THETAD,+1,+2
040417,000890:                                                                                                  #  OUTPUT - THE IMU COORDINATES ARE STORED IN REFSMMAT

The printout appears to say "IMUGOARSE" in the line below, but many other AGC versions have an identical card reading "IMUCOARSE", so I believe there is a smudge on the paper that merely makes the 'C' appear to be a 'G' — RSB 2017.

040422,000895:                                                                                                  #  SUBROUTINES - S52.2, IMUCOARSE, IMUFINE
040423,000896: 
040424,000897: 14,3321                                           COUNT*   $$/R50                                
040425,000898: 14,3321           77624        CAL53A             CALL                                           
040426,000899: 14,3322           31620                                    S52.2                                 #  MAKE ONE FINAL COMP OF GIMBALE ANGLES
040427,000900: 14,3323           66234                           RTB      SSP                                   
040428,000901: 14,3324           31405                                    RDCDUS                                #  READ CDUS
040429,000902: 14,3325           00051                                    S1                                    
040430,000903: 14,3326           00001                                    1                                     
040431,000904: 14,3327           40370                           AXT,1    SETPD                                 
040432,000905: 14,3330           00003                                    3                                     
040433,000906: 14,3331           00005                                    4                                     
040434,000907: 14,3332           70543        CALOOP             DLOAD*   SR1                                   
040435,000908: 14,3333           00325                                    THETAD     +3D,1                      
040436,000909: 14,3334           70523                           PDDL*    SR1                                   
040437,000910: 14,3335           00005                                    4,1                                   
040438,000911: 14,3336           51425                           DSU      ABS                                   
040439,000912: 14,3337           45206                           PUSH     DSU                                   
040440,000913: 14,3340           31404                                    DEGREE1                               
040441,000914: 14,3341           71240                           BMN      DLOAD                                 
040442,000915: 14,3342           31360                                    CALOOP1                               
040443,000916: 14,3343           51025                           DSU      BPL                                   
040444,000917: 14,3344           31405                                    DEG359                                
040445,000918: 14,3345           31360                                    CALOOP1                               
040446,000919: 14,3346           77776                           EXIT                                           
040447,000920: 14,3347           05353                           TC       PHASCHNG                              
040448,000921: 14,3350           04024                           OCT      04024                                 
040449,000922: 
040450,000923: 14,3351           06042                           TC       INTPRET                               
040451,000924: 14,3352           77624        COARFINE           CALL                                           
040452,000925: 14,3353           31557                                    COARSE                                
040453,000926: 14,3354           77624                           CALL                                           
040454,000927: 14,3355           31603                                    NCOARSE                               
040455,000928: 14,3356           77650                           GOTO                                           
040456,000929: 14,3357           31362                                    FINEONLY                              
040457,000930: 14,3360           77700        CALOOP1            TIX,1                                          
040458,000931: 14,3361           31332                                    CALOOP                                
040459,000932: 14,3362           75160        FINEONLY           AXC,1    AXC,2                                 
040460,000933: 14,3363           02642                                    XSM                                   
040461,000934: 14,3364           01733                                    REFSMMAT                              
040462,000935: 14,3365           77624                           CALL                                           
040463,000936: 14,3366           31371                                    MATMOVE                               

Page 943

040465,000938: 14,3367           77650                           GOTO                                           
040466,000939: 14,3370           32161                                    COARSRET                              
040467,000940: 14,3371           77773        MATMOVE            VLOAD*                                         #  TRANSFER MATRIX
040468,000941: 14,3372           00001                                    0,1                                   
040469,000942: 14,3373           10001                           STORE    0,2                                   
040470,000943: 14,3374           77773                           VLOAD*                                         
040471,000944: 14,3375           00007                                    6D,1                                  
040472,000945: 14,3376           10007                           STORE    6D,2                                  
040473,000946: 14,3377           77773                           VLOAD*                                         
040474,000947: 14,3400           00015                                    12D,1                                 
040475,000948: 14,3401           10015                           STORE    12D,2                                 
040476,000949: 14,3402           77616                           RVQ                                            
040477,000950: 14,3403           00056        DEGREE1            DEC      46         B-14                       #  1 DEG SCALED CDU/2
040478,000951: 14,3404           37722        DEG359             DEC      16338      B-14                       #  359 DEG SCALED CDU/2
040479,000952: 14,3405           00004        RDCDUS             INHINT                                         #  READ CDUS
040480,000953: 14,3406           30032                           CA       CDUX                                  
040481,000954: 14,3407           50120                           INDEX    FIXLOC                                
040482,000955: 14,3410           54001                           TS       1                                     
040483,000956: 14,3411           30033                           CA       CDUY                                  
040484,000957: 14,3412           50120                           INDEX    FIXLOC                                
040485,000958: 14,3413           54002                           TS       2                                     
040486,000959: 14,3414           30034                           CA       CDUZ                                  
040487,000960: 14,3415           50120                           INDEX    FIXLOC                                
040488,000961: 14,3416           54003                           TS       3                                     
040489,000962: 14,3417           00003                           RELINT                                         
040490,000963: 14,3420           06064                           TC       DANZIG                                #                                +
040491,000964: 14,3421                                           COUNT*   $$/INFLT                              
040492,000965: 

Page 944

040494,000967:                                                                                                  #  NAME - P51 - IMU ORIENTATION DETERMINATION
040495,000968:                                                                                                  #  MOD. NO. 1    23 JAN 67                               LOG SECTION - P51-P53
040496,000969:                                                                                                  #  MOD BY STURLAUGSON                                    ASSEMBLY SUNDANCE REV56
040497,000970: 
040498,000971:                                                                                                  #  FUNCTIONAL DESCRIPTION
040499,000972:                                                                                                  #        DETERMINES THE INERTIAL ORIENTATION OF THE IMU.  THE PROGRAM IS SELECTED BY DSKY ENTRY.  THE SIGHTING
040500,000973:                                                                                                  #        (AOTMARK) ROUTINE IS CALLED TO COLLECT AND PROCESS MARKED-STAR DATA.  AOTMARK (R53) RETURNS THE STAR NUMBER AND THE
040501,000974:                                                                                                  #        STAR LOS VECTOR IN STARAD +6.  TWO STARS ARE THUS SIGHTED.  THE ANGLE BETWEEN THE TWO STARS IS THEN CHECKED AT
040502,000975:                                                                                                  #        CHKSDATA (R54).  REFSMMAT IS THEN COMPUTED AT AXISGEN.
040503,000976: 
040504,000977:                                                                                                  #  CALLING SEQUENCE
040505,000978:                                                                                                  #        THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
040506,000979: 
040507,000980:                                                                                                  #  SUBROUTINES CALLED.
040508,000981:                                                                                                  #        GOPERF3
040509,000982:                                                                                                  #        GOPERF1
040510,000983:                                                                                                  #        GODSPR
040511,000984:                                                                                                  #        IMUCOARS
040512,000985:                                                                                                  #        IMUFIN20
040513,000986:                                                                                                  #        AOTMARK (R53)
040514,000987:                                                                                                  #        CHKSDATA (R54)
040515,000988:                                                                                                  #        MKRELEAS
040516,000989:                                                                                                  #        AXISGEN
040517,000990:                                                                                                  #        MATMOVE
040518,000991: 
040519,000992:                                                                                                  #  ALARMS
040520,000993:                                                                                                  #        NONE.
040521,000994: 
040522,000995:                                                                                                  #  ERASABLE INITIALIZATION
040523,000996:                                                                                                  #        IMU ZERO FLAG SHOULD BE SET.
040524,000997: 
040525,000998:                                                                                                  #  OUTPUT
040526,000999:                                                                                                  #        REFSMMAT
040527,001000:                                                                                                  #        REFSMFLG
040528,001001: 
040529,001002:                                                                                                  #  DEBRIS
040530,001003:                                                                                                  #        WORK AREA
040531,001004:                                                                                                  #        STARAD
040532,001005:                                                                                                  #        STARIND
040533,001006:                                                                                                  #        BESTI
040534,001007:                                                                                                  #        BESTJ
040535,001008: 
040536,001009: 14,3421                                           COUNT*   $$/P51                                

Page 945

040538,001011: 14,3421           04616        P51                TC       BANKCALL                              #  IS ISS ON - IF NOT, IMUCHK WILL SEND
040539,001012: 14,3422           33635                           CADR     IMUCHK                                #  ALARM CODE 210 AND EXIT VIA GOTOPOOH.
040540,001013: 
040541,001014: 14,3423           34761                           CAF      OCT15                                 
040542,001015: 14,3424           04616                           TC       BANKCALL                              
040543,001016: 14,3425           20624                           CADR     GOPERF1                               
040544,001017: 14,3426           06001                           TC       GOTOPOOH                              #  TERM.
040545,001018: 14,3427           13453                           TCF      P51B                                  #  V33
040546,001019: 14,3430           05353                           TC       PHASCHNG                              
040547,001020: 14,3431           04024                           OCT      04024                                 
040548,001021: 
040549,001022: 14,3432           34755                           CAF      ZERO                                  
040550,001023: 14,3433           54321                           TS       THETAD                                #  ZERO THE GIMBALS
040551,001024: 14,3434           54322                           TS       THETAD     +1                         
040552,001025: 14,3435           54323                           TS       THETAD     +2                         
040553,001026: 14,3436           35010                           CAF      V06N22                                
040554,001027: 14,3437           04616                           TC       BANKCALL                              
040555,001028: 14,3440           20447                           CADR     GODSPRET                              
040556,001029: 14,3441           33556                           CAF      V41K                                  #  NOW DISPLAY COARSE ALIGN VERB 41
040557,001030: 14,3442           04616                           TC       BANKCALL                              
040558,001031: 14,3443           20447                           CADR     GODSPRET                              
040559,001032: 14,3444           06042                           TC       INTPRET                               
040560,001033: 14,3445           77624                           CALL                                           
040561,001034: 14,3446           31557                                    COARSE                                
040562,001035: 14,3447           77776                           EXIT                                           
040563,001036: 14,3450           05353                           TC       PHASCHNG                              
040564,001037: 14,3451           04024                           OCT      04024                                 
040565,001038: 14,3452           13423                           TCF      P51        +2                         
040566,001039: 
040567,001040: 14,3453           05353        P51B               TC       PHASCHNG                              
040568,001041: 14,3454           00014                           OCT      00014                                 
040569,001042: 14,3455           06042                           TC       INTPRET                               
040570,001043: 14,3456           77624                           CALL                                           
040571,001044: 14,3457           31603                                    NCOARSE                               
040572,001045: 14,3460           40331                           SSP      SETPD                                 
040573,001046: 14,3461           02760                                    STARIND                               #  INDEX - STAR 1 OR 2
040574,001047: 14,3462           00000                                    0                                     
040575,001048: 14,3463           00001                                    0                                     
040576,001049: 14,3464           77776        P51C               EXIT                                           
040577,001050: 14,3465           05353                           TC       PHASCHNG                              
040578,001051: 14,3466           04024                           OCT      04024                                 
040579,001052: 
040580,001053: 14,3467           04616                           TC       BANKCALL                              
040581,001054: 14,3470           16000                           CADR     AOTMARK                               #  R53
040582,001055: 14,3471           04616                           TC       BANKCALL                              
040583,001056: 14,3472           17703                           CADR     AOTSTALL                              
040584,001057: 14,3473           05701                           TC       CURTAINS                              
040585,001058: 14,3474           11757                           CCS      STARIND                               
040586,001059: 14,3475           13503                           TCF      P51D       +1                         
040587,001060: 14,3476           06042                           TC       INTPRET                               

Page 946

040589,001062: 14,3477           77775                           VLOAD                                          
040590,001063: 14,3500           02715                                    STARAD     +6                         
040591,001064: 14,3501           02761                           STORE    STARSAV1                              
040592,001065: 14,3502           77776        P51D               EXIT                                           
040593,001066: 14,3503           05353                           TC       PHASCHNG                              
040594,001067: 14,3504           04024                           OCT      04024                                 
040595,001068: 
040596,001069: 14,3505           11757                           CCS      STARIND                               
040597,001070: 14,3506           13522                           TCF      P51E                                  
040598,001071: 14,3507           05353                           TC       PHASCHNG                              
040599,001072: 14,3510           04024                           OCT      04024                                 
040600,001073: 
040601,001074: 14,3511           06042                           TC       INTPRET                               
040602,001075: 14,3512           45145                           DLOAD    CALL                                  
040603,001076: 14,3513           03562                                    TSIGHT                                
040604,001077: 14,3514           32472                                    PLANET                                
040605,001078: 14,3515           03554                           STORE    PLANVEC                               
040606,001079: 14,3516           77776                           EXIT                                           
040607,001080: 14,3517           34753                           CAF      BIT1                                  
040608,001081: 14,3520           55757                           TS       STARIND                               
040609,001082: 14,3521           13465                           TCF      P51C       +1                         #  DO SECOND STAR
040610,001083: 14,3522           05353        P51E               TC       PHASCHNG                              
040611,001084: 14,3523           04024                           OCT      04024                                 
040612,001085: 
040613,001086: 14,3524           06042                           TC       INTPRET                               
040614,001087: 14,3525           45145                           DLOAD    CALL                                  
040615,001088: 14,3526           03562                                    TSIGHT                                
040616,001089: 14,3527           32472                                    PLANET                                
040617,001090: 14,3530           24015                           STOVL    12D                                   
040618,001091: 14,3531           03554                                    PLANVEC                               
040619,001092: 14,3532           24007                           STOVL    6D                                    
040620,001093: 14,3533           02761                                    STARSAV1                              
040621,001094: 14,3534           26707                           STOVL    STARAD                                
040622,001095: 14,3535           02767                                    STARSAV2                              
040623,001096: 14,3536           36715                           STCALL   STARAD     +6                         
040624,001097: 14,3537           31250                                    CHKSDATA                              #  CHECK STAR ANGLES IN STARAD AND
040625,001098: 14,3540           77414                           BON      EXIT                                  
040626,001099: 14,3541           00314                                    FREEFLAG                              
040627,001100: 14,3542           31544                                    P51G                                  
040628,001101: 14,3543           03423                           TC       P51        +2                         
040629,001102: 14,3544           77624        P51G               CALL                                           
040630,001103: 14,3545           47443                                    AXISGEN                               #  COME BACK WITH REFSMMAT IN XDC
040631,001104: 14,3546           75160                           AXC,1    AXC,2                                 
040632,001105: 14,3547           02664                                    XDC                                   
040633,001106: 14,3550           01733                                    REFSMMAT                              
040634,001107: 14,3551           77624                           CALL                                           
040635,001108: 14,3552           31371                                    MATMOVE                               
040636,001109: 14,3553           77414                           SET      EXIT                                  
040637,001110: 14,3554           01462                                    REFSMFLG                              
040638,001111: 14,3555           06001                           TC       GOTOPOOH                              #  FINIS

Page 947

040640,001113: 14,3556           12200        V41K               VN       4100                                  
040641,001114: 14,3557           77776        COARSE             EXIT                                           
040642,001115: 14,3560           31301                 +1        CA       MODECADR                              #  SEE IF IMU DEVICE IS IN USE.
040643,001116: 14,3561           00006                           EXTEND                                         
040644,001117: 14,3562           13567                           BZF      DOCORS                                #  NOT IN USE, DO COARSE ALIGN
040645,001118: 14,3563           34777                           CAF      1SEC                                  #  IN USE, DELAY ONE SEC
040646,001119: 14,3564           04616                           TC       BANKCALL                              
040647,001120: 14,3565           01736                           CADR     DELAYJOB                              
040648,001121: 14,3566           13560                           TCF      COARSE     +1                         
040649,001122: 14,3567           04616        DOCORS             TC       BANKCALL                              
040650,001123: 14,3570           16771                           CADR     IMUCOARS                              
040651,001124: 14,3571           04616                           TC       BANKCALL                              
040652,001125: 14,3572           17707                           CADR     IMUSTALL                              
040653,001126: 14,3573           05701                           TC       CURTAINS                              
040654,001127: 14,3574           04616                           TC       BANKCALL                              
040655,001128: 14,3575           17201                           CADR     IMUFINE                               
040656,001129: 14,3576           04616                           TC       BANKCALL                              
040657,001130: 14,3577           17707                           CADR     IMUSTALL                              
040658,001131: 14,3600           05701                           TC       CURTAINS                              
040659,001132: 14,3601           06042                           TC       INTPRET                               
040660,001133: 14,3602           77616                           RVQ                                            
040661,001134: 14,3603           77776        NCOARSE            EXIT                                           
040662,001135: 14,3604           30025                           CA       TIME1                                 
040663,001136: 14,3605           55074                           TS       1/PIPADT                              
040664,001137: 14,3606           44755                           CS       ZERO                                  
040665,001138: 14,3607           54037                           TS       PIPAX                                 
040666,001139: 14,3610           54040                           TS       PIPAY                                 
040667,001140: 14,3611           54041                           TS       PIPAZ                                 
040668,001141: 14,3612           06042                           TC       INTPRET                               
040669,001142: 14,3613           77775                           VLOAD                                          
040670,001143: 14,3614           24007                                    ZEROVEC                               
040671,001144: 14,3615           01472                           STORE    GCOMP                                 
040672,001145: 14,3616           43414                           SET      RVQ                                   
040673,001146: 14,3617           01060                                    DRIFTFLG                              
040674,001147: 

Page 948

040676,001149:                                                                                                  #  NAME - S52.2
040677,001150:                                                                                                  #  FUNCTION - COMPUTE GIMBAL ANGLES FOR DESIRED SM AND PRESENT VEHICLE
040678,001151:                                                                                                  #  CALL - CALL S52.2
040679,001152:                                                                                                  #  INPUT - X,Y,ZSMD
040680,001153:                                                                                                  #  OUTPUT - OGC,IGC,MGC,THETAD,+1,+2
040681,001154:                                                                                                  #  SUBROUTINES - CDUTRIG, CALCSMSC, MATMOVE, CALCGA
040682,001155: 
040683,001156: 14,3620                                           COUNT*   $$/S52.1                              
040684,001157: 14,3620           45020        S52.2              STQ      CALL                                  
040685,001158: 14,3621           02746                                    QMAJ                                  
040686,001159: 14,3622           47541                                    CDUTRIG                               
040687,001160: 14,3623           77624                           CALL                                           
040688,001161: 14,3624           20030                                    CALCSMSC                              
040689,001162: 14,3625           66370                           AXT,1    SSP                                   
040690,001163: 14,3626           00022                                    18D                                   
040691,001164: 14,3627           00051                                    S1                                    
040692,001165: 14,3630           00006                                    6D                                    
040693,001166: 14,3631           61373        S52.2A             VLOAD*   VXM                                   
040694,001167: 14,3632           02707                                    XNB        +18D,1                     
040695,001168: 14,3633           01734                                    REFSMMAT                              
040696,001169: 14,3634           77656                           UNIT                                           
040697,001170: 14,3635           06707                           STORE    XNB        +18D,1                     
040698,001171: 14,3636           77700                           TIX,1                                          
040699,001172: 14,3637           31631                                    S52.2A                                
040700,001173: 14,3640           75160        S52.2.1            AXC,1    AXC,2                                 
040701,001174: 14,3641           03606                                    XSMD                                  
040702,001175: 14,3642           02642                                    XSM                                   
040703,001176: 14,3643           77624                           CALL                                           
040704,001177: 14,3644           31371                                    MATMOVE                               
040705,001178: 14,3645           77624                           CALL                                           
040706,001179: 14,3646           47355                                    CALCGA                                
040707,001180: 14,3647           77650                           GOTO                                           
040708,001181: 14,3650           02746                                    QMAJ                                  
040709,001182: 

Page 949

040711,001184:                                                                                                  #  NAME - S52.3
040712,001185:                                                                                                  #  FUNCTION      XSMD= UNIT  R
040713,001186:                                                                                                  #                YSMD= UNIT(V X R)
040714,001187:                                                                                                  #                ZSMD= UNIT(XSMD X YSMD)
040715,001188:                                                                                                  #  CALL  DLOAD   CALL
040716,001189:                                                                                                  #                        TALIGN
040717,001190:                                                                                                  #                        S52.3
040718,001191:                                                                                                  #  INPUT -       TIME OF ALIGNMENT IN MPAC
040719,001192:                                                                                                  #  OUTPUT -      X,Y,ZSMD
040720,001193:                                                                                                  #  SUBROUTINES - CSMCONIC
040721,001194: 
040722,001195: 14,3651                                           COUNT*   $$/S52.3                              
040723,001196: 14,3651           77620        S52.3              STQ                                            
040724,001197: 14,3652           02746                                    QMAJ                                  
040725,001198: 14,3653           34041                           STCALL   TDEC1                                 
040726,001199: 14,3654           27077                                    LEMCONIC                              
040727,001200: 14,3655           53575                           VLOAD    UNIT                                  
040728,001201: 14,3656           00001                                    RATT                                  
040729,001202: 14,3657           27607                           STOVL    XSMD                                  
040730,001203: 14,3660           00007                                    VATT                                  
040731,001204: 14,3661           53435                           VXV      UNIT                                  
040732,001205: 14,3662           00001                                    RATT                                  
040733,001206: 14,3663           27615                           STOVL    YSMD                                  
040734,001207: 14,3664           03607                                    XSMD                                  
040735,001208: 14,3665           53435                           VXV      UNIT                                  
040736,001209: 14,3666           03615                                    YSMD                                  
040737,001210: 14,3667           37623                           STCALL   ZSMD                                  
040738,001211: 14,3670           02746                                    QMAJ                                  
040739,001212: 

Page 950

040741,001214:                                                                                                  #  NAME - R52 (AUTOMATIC OPTICS POSITIONING ROUTINE)
040742,001215: 
040743,001216:                                                                                                  #  FUNCTION - POINT THE AOT OPTIC AXIS BY MANEUVERING THE LEM TO A NAVIGATION
040744,001217:                                                                                                  #  STAR SELECTED BY ALIGNMENT PROGRAMS OR DSKY INPUT
040745,001218: 
040746,001219:                                                                                                  #  CALLING - CALL R52
040747,001220: 
040748,001221:                                                                                                  #  INPUT - BESTI AND BESTJ (STAR CODES TIMES 6)
040749,001222: 
040750,001223:                                                                                                  #  OUTPUT - STAR CODE IN BITS 1-6, DETENT CODE IN BITS 7-9
040751,001224:                                                                                                  #  (NO CHECK IS MADE TO INSURE THE DETENT CODE TO BE VALID)
040752,001225:                                                                                                  #  POINTVSM-1/2 UNIT NAV STAR VEC IN SM
040753,001226:                                                                                                  #  SCAXIS-AOT OPTIC AXIS VEC IN NB X-Z PLANE
040754,001227: 
040755,001228:                                                                                                  #  SUBROUT - R60LEM
040756,001229: 
040757,001230: 14,3671                                           COUNT*   $$/R52                                
040758,001231: 14,3671           77420        R52                STQ      EXIT                                  
040759,001232: 14,3672           03665                                    SAVQR52                               
040760,001233: 14,3673           51757                           INDEX    STARIND                               
040761,001234: 14,3674           31755                           CA       BESTI                                 #  PICK UP STARCODE DETERMINED BY R56
040762,001235: 14,3675           00006                           EXTEND                                         
040763,001236: 14,3676           73772                           MP       1/6TH                                 
040764,001237: 14,3677           64744                           AD       BIT8                                  #  SET DETENT POSITION 2
040765,001238: 14,3700           54734                           TS       STARCODE                              #  SCALE AND STORE IN STARCODE
040766,001239: 
040767,001240: 14,3701           33773        R52A               CAF      V01N70                                
040768,001241: 14,3702           04616                           TC       BANKCALL                              
040769,001242: 14,3703           20477                           CADR     GOFLASH                               #  DISPLAY STARCODE AND WAIT FOR RESPONSE
040770,001243: 14,3704           06001                           TC       GOTOPOOH                              #  V34 - TERMINATE
040771,001244: 14,3705           13707                           TCF      R52B                                  #  V33 - PROCEED TO ORIENT LEM
040772,001245: 14,3706           13701                           TCF      R52A                                  #  ENTER - SELECT NEW STARCODE - RECYCLE
040773,001246: 
040774,001247: 14,3707           05516        R52B               TC       DOWNFLAG                              
040775,001248: 14,3710           00124                           ADRES    3AXISFLG                              #  BIT6 OF FLAGWRD5 ZERO TO ALLOW VECPOINT
040776,001249: 14,3711           30734                           CA       STARCODE                              #  GRAB DETENT CODE
040777,001250: 14,3712           77747                           MASK     HIGH9                                 
040778,001251: 14,3713           00006                           EXTEND                                         
040779,001252: 14,3714           74743                           MP       BIT9                                  
040780,001253: 14,3715           54001                           TS       L                                     #  TEMP STORE DETENT
040781,001254: 
040782,001255: 14,3716           00006                           EXTEND                                         
040783,001256: 14,3717           63735                           BZMF     GETAZEL                               #  CODE 0, COAS CALIBRATION
040784,001257: 
040785,001258: 14,3720           65650                           AD       NEG7                                  
040786,001259: 14,3721           00006                           EXTEND                                         
040787,001260: 14,3722           13735                           BZF      GETAZEL                               #  CODE 7, COAS SIGHTING
040788,001261: 
040789,001262: 14,3723  E7,1551                                  EBANK=   XYMARK                                
040790,001263: 14,3723           35016                           CA       EBANK7                                
040791,001264: 14,3724           54003                           TS       EBANK                                 

Page 951

040793,001266: 14,3725           50001                           INDEX    L                                     
040794,001267: 14,3726           31403                           CA       AOTAZ      -1                         #  PICK UP AZ CORRESPONDING TO DETENT
040795,001268: 14,3727           54001                           TS       L                                     
040796,001269: 14,3730  E5,1642                                  EBANK=   XSM                                   
040797,001270: 14,3730           35014                           CA       EBANK5                                #  CHANGE TO EBANK5 BUT DONT DISTURB L
040798,001271: 14,3731           54003                           TS       EBANK                                 
040799,001272: 14,3732           34737                           CA       BIT13                                 #  SET ELV TO 45 DEG
040800,001273: 14,3733           56001                           XCH      L                                     #  SET C(A)=AZ, C(L)=45 DEG
040801,001274: 14,3734           13745                           TCF      AZEL                                  #  GO COMP OPTIC AXIS
040802,001275: 
040803,001276: 14,3735           33774        GETAZEL            CAF      V06N87                                #  CODE 0 OR 7, GET AZ AND EL KEY IN
040804,001277: 14,3736           04616                           TC       BANKCALL                              
040805,001278: 14,3737           20477                           CADR     GOFLASH                               
040806,001279: 14,3740           06001                           TC       GOTOPOOH                              #  V34 - TERMINATE
040807,001280: 14,3741           13743                           TCF      +2                                    #  PROCEED - CALC OPTIC AXIS
040808,001281: 14,3742           13735                           TCF      GETAZEL                               #  ENTER - RECYCLE
040809,001282: 
040810,001283: 14,3743           00006                           EXTEND                                         
040811,001284: 14,3744           31345                           DCA      AZ                                    #  PICK UP AZ AND EL IN SP 2S COMP
040812,001285: 14,3745           50120        AZEL               INDEX    FIXLOC                                #  JAM AZ AND EL IN 8 AND 9 OF VAC
040813,001286: 14,3746           52011                           DXCH     8D                                    
040814,001287: 14,3747           06042                           TC       INTPRET                               
040815,001288: 14,3750           77624                           CALL                                           #  GO COMPUTE OPTIC AXIS AND STORE IN
040816,001289: 14,3751           10522                                    OANB                                  #  SCAXIS IN NB COORDS
040817,001290: 14,3752           45034                           RTB      CALL                                  
040818,001291: 14,3753           21574                                    LOADTIME                              
040819,001292: 14,3754           32472                                    PLANET                                
040820,001293: 14,3755           53521                           MXV      UNIT                                  
040821,001294: 14,3756           01734                                    REFSMMAT                              
040822,001295: 14,3757           03773                           STORE    POINTVSM                              #  STORE FOR VECPOINT
040823,001296: 
040824,001297: 14,3760           77776                           EXIT                                           
040825,001298: 14,3761           04616                           TC       BANKCALL                              
040826,001299: 14,3762           54123                           CADR     R60LEM                                #  GO TORQUE LEM OPTIC AXIS TO STAR LOS
040827,001300: 
040828,001301: 14,3763           37747                           CAF      HIGH9                                 #  IF COAS CALIBRATION CODE 0, RECYCLE
040829,001302: 14,3764           70734                           MASK     STARCODE                              
040830,001303: 14,3765           00006                           EXTEND                                         
040831,001304: 14,3766           13701                           BZF      R52A                                  
040832,001305: 
040833,001306: 14,3767           06042                           TC       INTPRET                               #  RETURN FROM KALCMANU
040834,001307: 14,3770           77650                           GOTO                                           
040835,001308: 14,3771           03665                                    SAVQR52                               #  RETURN TO CALLER
040836,001309: 
040837,001310: 14,3772           05253        1/6TH              DEC      .1666667                              
040838,001311: 14,3773           00306        V01N70             VN       0170                                  
040839,001312: 14,3774           01527        V06N87             VN       687                                   
040840,001313: 

Page 952

040842,001315:                                                                                                  #  LUNAR SURFACE STAR AQUISITION
040843,001316: 
040844,001317: 15,2245                                           BANK     15                                    
040845,001318: 15,2000                                           SETLOC   P50S                                  
040846,001319: 15,2000                                           BANK                                           
040847,001320: 15,2245                                           COUNT*   $$/R59                                
040848,001321: 
040849,001322: 15,2245           40077        R59                CS       FLAGWRD3                              
040850,001323: 15,2246           74737                           MASK     REFSMBIT                              #  IF REFSMMAT FLAG CLEAR BYPASS STAR AQUIR
040851,001324: 15,2247           10000                           CCS      A                                     
040852,001325: 15,2250           12455                           TCF      R59OUT                                #  NO REFSMMAT GO TO AOTMARK
040853,001326: 
040854,001327: 15,2251           32463                           CAF      V01N70*                               #  SELECT STAR CODE FOR ACQUISITION
040855,001328: 15,2252           04616                           TC       BANKCALL                              
040856,001329: 15,2253           20477                           CADR     GOFLASH                               
040857,001330: 15,2254           06001                           TC       GOTOPOOH                              #  V34 - TERMINATE
040858,001331: 15,2255           12257                           TCF      R59A                                  #  V33 - PROCEED
040859,001332: 15,2256           12245                           TCF      R59                                   #  V32 - RECYCLE
040860,001333: 
040861,001334: 15,2257           47747        R59A               CS       HIGH9                                 #  GRAB STARCODE FOR INDEX
040862,001335: 15,2260           70734                           MASK     AOTCODE                               
040863,001336: 15,2261           00006                           EXTEND                                         
040864,001337: 15,2262           76245                           MP       REVCNT                                #  JUST 6
040865,001338: 15,2263           56001                           XCH      L                                     
040866,001339: 15,2264           51757                           INDEX    STARIND                               
040867,001340: 15,2265           55755                           TS       BESTI                                 
040868,001341: 15,2266           50120                           INDEX    FIXLOC                                
040869,001342: 15,2267           54046                           TS       X1                                    #  CODE X 6 FOR CATLOG STAR INDEX
040870,001343: 15,2270           00006                           EXTEND                                         
040871,001344: 15,2271           12455                           BZF      R59OUT                                #  BYPASS AQUISITION IF NOT CATLOG STAR
040872,001345: 15,2272           40000                           COM                                            
040873,001346: 15,2273           62557                           AD       DEC227                                
040874,001347: 15,2274           00006                           EXTEND                                         
040875,001348: 15,2275           62455                           BZMF     R59OUT                                
040876,001349: 
040877,001350: 15,2276           06042                           TC       INTPRET                               
040878,001351: 15,2277           64373                           VLOAD*   MXV                                   
040879,001352: 15,2300           30347                                    CATLOG,1                              #  GRAB STAR VECTOR
040880,001353: 15,2301           01734                                    REFSMMAT                              #  TRANSFORM TO SM
040881,001354: 15,2302           45056                           UNIT     CALL                                  
040882,001355: 15,2303           47650                                    CDU*SMNB                              
040883,001356: 15,2304           02731                           STORE    STAR                                  #  TEMP STORE STAR VEC(NB)
040884,001357: 15,2305           77776                           EXIT                                           
040885,001358: 
040886,001359: 15,2306           34753                           CAF      BIT1                                  #  INITIALIZE AZ POSITION CODE TO 1 (-60)
040887,001360: 15,2307           55241                           TS       POSCODE                               
040888,001361: 
040889,001362: 15,2310  E7,1551                                  EBANK=   XYMARK                                
040890,001363: 15,2310           35016        INCAZ              CA       EBANK7                                
040891,001364: 15,2311           54003                           TS       EBANK                                 
040892,001365: 

Page 953

040894,001367: 15,2312           51241                           INDEX    POSCODE                               
040895,001368: 15,2313           31403                           CA       AOTAZ      -1                         #  PICK UP AZ CORRESPONDING TO POSCODE
040896,001369: 15,2314           54001                           TS       L                                     
040897,001370: 
040898,001371: 15,2315  E5,1642                                  EBANK=   XSM                                   
040899,001372: 15,2315           35014                           CA       EBANK5                                
040900,001373: 15,2316           54003                           TS       EBANK                                 
040901,001374: 
040902,001375: 15,2317           34737                           CA       BIT13                                 #  SET ELV TO 45 DEG
040903,001376: 15,2320           56001                           XCH      L                                     #  SET C(A)=AZ, C(L)=45 DEG
040904,001377: 15,2321           55745                           TS       QMIN                                  #  STORE QMIN=AZ FOR LATER
040905,001378: 15,2322           50120                           INDEX    FIXLOC                                
040906,001379: 15,2323           52011                           DXCH     8D                                    #  JAM AZ IN 8D, 45 DEG IN 9D FOR OANB
040907,001380: 
040908,001381: 15,2324           06042                           TC       INTPRET                               
040909,001382: 15,2325           77624                           CALL                                           
040910,001383: 15,2326           10522                                    OANB                                  #  GO CALC OPTIC AXIS WRT NB
040911,001384: 15,2327           50375                           VLOAD    DOT                                   
040912,001385: 15,2330           02731                                    STAR                                  #  DOT STAR WITH OA
040913,001386: 15,2331           03765                                    SCAXIS                                
040914,001387: 15,2332           65552                           SL1      ARCCOS                                
040915,001388: 15,2333           00031                           STORE    24D                                   #  TEMP STORE ARCCOS(STAR.OPTAXIS)
040916,001389: 
040917,001390: 15,2334           51025                           DSU      BPL                                   
040918,001391: 15,2335           32466                                    DEG30                                 #  SEE IF STAR IN AOT FIELD-OF-VIEW
040919,001392: 15,2336           32420                                    NXAX                                  #  NOT IN FIELD - TRY NEXT POSITION
040920,001393: 15,2337           45345                           DLOAD    DSU                                   #  SEE IF STAR AT FIELD CENTER
040921,001394: 15,2340           00031                                    24D                                   
040922,001395: 15,2341           32470                                    DEG.5                                 
040923,001396: 15,2342           71240                           BMN      DLOAD                                 #  CALC SPIRAL AND CURSOR
040924,001397: 15,2343           32413                                    ZSPCR                                 #  GO ZERO CURSOR AND SPIRAL
040925,001398: 15,2344           00031                                    24D                                   #  GET SPIRAL
040926,001399: 15,2345           42405                           DMP      SL4                                   
040927,001400: 15,2346           11220                                    3/4                                   #  12 SCALED AT 16
040928,001401: 15,2347           24031                           STOVL    24D                                   #  12(ARCCOS(AO.STAR)) SCALED IN REVS
040929,001402: 
040930,001403: 15,2350           03765                                    SCAXIS                                #  OA
040931,001404: 15,2351           53435                           VXV      UNIT                                  
040932,001405: 15,2352           24005                                    XUNIT                                 
040933,001406: 15,2353           47206                           PUSH     VXV                                   #  OA X UNITX    PD 0-5
040934,001407: 15,2354           03765                                    SCAXIS                                
040935,001408: 15,2355           77676                           VCOMP                                          
040936,001409: 15,2356           63256                           UNIT     PDVL                                  #  UNIT(OA X (OA X UNITX))       PD 6-11
040937,001410: 15,2357           03765                                    SCAXIS                                
040938,001411: 15,2360           53435                           VXV      UNIT                                  
040939,001412: 15,2361           02731                                    STAR                                  
040940,001413: 15,2362           50206                           PUSH     DOT                                   #  1/2(OA X STAR)        PD 12-17
040941,001414: 15,2363           00001                                    0                                     #  DOT WITH 1/2(OA X UNITX) FOR YROT
040942,001415: 15,2364           65552                           SL1      ARCCOS                                
040943,001416: 15,2365           24033                           STOVL    26D                                   #  STORE THET SCALED IN REVS

Page 954

040945,001418: 15,2366           77641                           DOT                                            #  UP 12-17, UP 6-11 FOR C2
040946,001419: 15,2367           71244                           BPL      DLOAD                                 #  IF THET NEG - GET 360-THET
040947,001420: 15,2370           32375                                    R59D                                  
040948,001421: 15,2371           32047                                    ABOUTONE                              
040949,001422: 15,2372           77625                           DSU                                            
040950,001423: 15,2373           00033                                    26D                                   
040951,001424: 15,2374           00033                           STORE    26D                                   #  360-THET SCALED IN REVS
040952,001425: 
040953,001426: 15,2375           70535        R59D               SLOAD    SR1                                   
040954,001427: 15,2376           02746                                    QMIN                                  #  RESCALE AZ(N) TO REVS
040955,001428: 15,2377           41415                           DAD      PUSH                                  #  PUSH YROT + AZ(N) REVS
040956,001429: 15,2400           00033                                    26D                                   
040957,001430: 15,2401           77634                           RTB                                            
040958,001431: 15,2402           21615                                    1STO2S                                
040959,001432: 15,2403           15236                           STODL    CURSOR                                #  YROT IN 1/2 REVS
040960,001433: 15,2404           00031                                    24D                                   #  LOAD SROT IN REVS
040961,001434: 15,2405           77615                           DAD                                            #  12(SEP) + YROT
040962,001435: 15,2406           77634                           RTB                                            
040963,001436: 15,2407           21615                                    1STO2S                                
040964,001437: 15,2410           01240                           STORE    SPIRAL                                #  SROT IN 1/2 REVS
040965,001438: 15,2411           77776                           EXIT                                           
040966,001439: 15,2412           12437                           TCF      79DISP                                #  GO DISPLAY CURSOR-SPIRAL-POS CODE
040967,001440: 
040968,001441: 15,2413           77776        ZSPCR              EXIT                                           
040969,001442: 15,2414           34755                           CAF      ZERO                                  #  STAR ALMOST OPTIC AXIS, ZERO CURSOR
040970,001443: 15,2415           55235                           TS       CURSOR                                #  AND SPIRAL ANGLES
040971,001444: 15,2416           55237                           TS       SPIRAL                                
040972,001445: 15,2417           12437                           TCF      79DISP                                
040973,001446: 
040974,001447: 15,2420           77776        NXAX               EXIT                                           
040975,001448: 15,2421           25241                           INCR     POSCODE                               
040976,001449: 15,2422           41241                           CS       POSCODE                               
040977,001450: 15,2423           64757                           AD       SEVEN                                 
040978,001451: 15,2424           00006                           EXTEND                                         
040979,001452: 15,2425           62427                           BZMF     R59ALM                                #  THIS STAR NOT AT ANY POSITION
040980,001453: 15,2426           12310                           TCF      INCAZ                                 
040981,001454: 
040982,001455: 15,2427           05567        R59ALM             TC       ALARM                                 #  THIS STAR CANT BE LOCATED IN AOT FIELD
040983,001456: 15,2430           00404                           OCT      404                                   
040984,001457: 15,2431           35006                           CAF      VB05N09                               #  DISPLAY ALARM
040985,001458: 15,2432           04616                           TC       BANKCALL                              
040986,001459: 15,2433           20477                           CADR     GOFLASH                               
040987,001460: 15,2434           16001                           TCF      GOTOPOOH                              #  VB34 - TERMINATE
040988,001461: 15,2435           12455                           TCF      R59OUT                                #  VB33 - PROCEED, GO WITHOUT AQUIRE
040989,001462: 15,2436           12245                           TCF      R59                                   #  VB32 - RECYCLE AND TRY ANOTHER STAR
040990,001463: 
040991,001464: 15,2437           32464        79DISP             CAF      V06N79                                #  DISPLAY CURSOR, SPIRAL AND POS CODE
040992,001465: 15,2440           04616                           TC       BANKCALL                              
040993,001466: 15,2441           20477                           CADR     GOFLASH                               
040994,001467: 15,2442           16001                           TCF      GOTOPOOH                              #  V34 - TERMINATE

Page 955

040996,001469: 15,2443           12445                           TCF      R59E                                  #  V33 - PROCEED TO MARK ROUTINE
040997,001470: 15,2444           12245                           TCF      R59                                   #  V32 - RECYCLE TO TOP OF R59 AGAIN
040998,001471: 
040999,001472: 15,2445           34757        R59E               CAF      SEVEN                                 #  GET DETENT CODE CORRESPONDING TO POSCODE
041000,001473: 15,2446           71241                           MASK     POSCODE                               
041001,001474: 15,2447           00006                           EXTEND                                         
041002,001475: 15,2450           74745                           MP       BIT7                                  #  DETENT CODE NOW IN L
041003,001476: 15,2451           47747                           CS       HIGH9                                 
041004,001477: 15,2452           70734                           MASK     AOTCODE                               #  ISOLATE STAR NO IN BIT 1-6
041005,001478: 15,2453           60001                           AD       L                                     
041006,001479: 15,2454           54734                           TS       AOTCODE                               #  STORE DETENT 7-9
041007,001480: 
041008,001481: 15,2455           04616        R59OUT             TC       BANKCALL                              #  GO TO AOTMARK FOR SIGHTING
041009,001482: 15,2456           16000                           CADR     AOTMARK                               
041010,001483: 15,2457           04616                           TC       BANKCALL                              
041011,001484: 15,2460           17703                           CADR     AOTSTALL                              #  SLEEP TILL SIGHTING DONE
041012,001485: 15,2461           05701                           TC       CURTAINS                              #  BADEND RETURN FROM AOTMARK
041013,001486: 15,2462           13037                           TCF      R59RET                                #  RETURN TO 1 STAR OR 2STAR
041014,001487: 
041015,001488: 15,2463           00306        V01N70*            VN       170                                   
041016,001489: 15,2464           01517        V06N79             VN       679                                   
041017,001490: 15,2465           02525 12525  DEG30              2DEC     .083333333                            #  30 DEGRESS
041018,001491: 15,2467           00026 30131  DEG.5              2DEC     .00138888                             #  .5 DEGRESS SCALED IN REVS
041019,001492: 15,2471           12525        DEG60              OCT      12525                                 #  60 DEG CDU SCALING
041020,001493: 15,2472     1235               CURSOR             EQUALS   GDT/2                                 
041021,001494: 15,2472     1237               SPIRAL             EQUALS   GDT/2      +2                         
041022,001495: 15,2472     1241               POSCODE            EQUALS   GDT/2      +4                         
041023,001496: 

Page 956

041025,001498:                                                                                                  #  NAME -        PLANET
041026,001499:                                                                                                  #  FUNCTION -    TO PROVIDE THE REFERENCE VECTOR FOR THE SIGHTED CELESTIAL
041027,001500:                                                                                                  #                BODY.  STARS ARE FETCHED FROM THE CATALOG, SUN, EARTH AND
041028,001501:                                                                                                  #                MOON ARE COMPUTED BY LOCSAM, PLANET VECTORS ARE ENTERED
041029,001502:                                                                                                  #                BY DSDY INPUT
041030,001503:                                                                                                  #  CALL -        CALL
041031,001504:                                                                                                  #                        PLANET
041032,001505:                                                                                                  #  INPUT -       TIME IN MPAC
041033,001506:                                                                                                  #  OUTPUT -      VECTOR IN MPAC
041034,001507:                                                                                                  #  SUBROUTINES - LOCSAM
041035,001508:                                                                                                  #  DEBRIS -      VAC, STARAD - STARAD +17
041036,001509: 
041037,001510: 15,2000                                           SETLOC   P50S                                  
041038,001511: 15,2000                                           BANK                                           
041039,001512: 15,2472                                           COUNT*   $$/P51                                
041040,001513: 
041041,001514: 15,2472           03562        PLANET             STORE    TSIGHT                                
041042,001515: 15,2473           77420                           STQ      EXIT                                  
041043,001516: 15,2474           02736                                    GCTR                                  
041044,001517: 15,2475           47747                           CS       HIGH9                                 
041045,001518: 15,2476           70734                           MASK     AOTCODE                               
041046,001519: 15,2477           00006                           EXTEND                                         
041047,001520: 15,2500           76245                           MP       REVCNT                                
041048,001521: 15,2501           56001                           XCH      L                                     
041049,001522: 15,2502           51757                           INDEX    STARIND                               
041050,001523: 15,2503           55755                           TS       BESTI                                 
041051,001524: 15,2504           10000                           CCS      A                                     
041052,001525: 15,2505           12521                           TCF      NOTPLAN                               
041053,001526: 15,2506           32560                           CAF      VNPLANV                               
041054,001527: 15,2507           04616                           TC       BANKCALL                              
041055,001528: 15,2510           20477                           CADR     GOFLASH                               
041056,001529: 15,2511           02506                           TC       -3                                    
041057,001530: 15,2512           02514                           TC       +2                                    
041058,001531: 15,2513           02506                           TC       -5                                    
041059,001532: 15,2514           06042                           TC       INTPRET                               
041060,001533: 15,2515           53575                           VLOAD    UNIT                                  
041061,001534: 15,2516           02707                                    STARAD                                
041062,001535: 15,2517           77650                           GOTO                                           
041063,001536: 15,2520           02736                                    GCTR                                  
041064,001537: 15,2521           40000        NOTPLAN            CS       A                                     
041065,001538: 15,2522           62557                           AD       DEC227                                
041066,001539: 15,2523           00006                           EXTEND                                         
041067,001540: 15,2524           62535                           BZMF     CALSAM1                               
041068,001541: 15,2525           51757                           INDEX    STARIND                               
041069,001542: 15,2526           31755                           CA       BESTI                                 
041070,001543: 15,2527           50120                           INDEX    FIXLOC                                
041071,001544: 15,2530           54046                           TS       X1                                    
041072,001545: 15,2531           06042                           TC       INTPRET                               
041073,001546: 15,2532           52173                           VLOAD*   GOTO                                  
041074,001547: 15,2533           30347                                    CATLOG,1                              

Page 957

041076,001549: 15,2534           02736                                    GCTR                                  
041077,001550: 15,2535           06042        CALSAM1            TC       INTPRET                               
041078,001551: 15,2536           45145        CALSAM             DLOAD    CALL                                  
041079,001552: 15,2537           03562                                    TSIGHT                                
041080,001553: 15,2540           30500                                    LOCSAM                                
041081,001554: 15,2541           77340                           LXC,1    VLOAD                                 
041082,001555: 15,2542           02757                                    STARIND                               
041083,001556: 15,2543           02707                                    VEARTH                                
041084,001557: 15,2544           24001                           STOVL    0D                                    
041085,001558: 15,2545           02715                                    VSUN                                  
041086,001559: 15,2546           26707                           STOVL    VEARTH                                
041087,001560: 15,2547           00001                                    0D                                    
041088,001561: 15,2550           02715                           STORE    VSUN                                  
041089,001562: 15,2551           70143                           DLOAD*   LXC,1                                 
041090,001563: 15,2552           02756                                    BESTI,1                               
041091,001564: 15,2553           00154                                    MPAC                                  
041092,001565: 15,2554           52173                           VLOAD*   GOTO                                  
041093,001566: 15,2555           02343                                    STARAD     -228D,1                    
041094,001567: 15,2556           02736                                    GCTR                                  
041095,001568: 15,2557           00343        DEC227             DEC      227        B-14                       
041096,001569: 15,2560           01530        VNPLANV            VN       0688                                  
041097,001570: 15,2561  37,3541               PIPSRINE           =        PIPASR     +3                         #  EBANK NOT 4 SO DONT LOAD PIPTIME1
041098,001571: 

Page 958

041100,001573:                                                                                                  #  GRAVITY VECTOR DETERMINATION ROUTINE
041101,001574:                                                                                                  #  BY KEN VINCENT
041102,001575: 
041103,001576:                                                                                                  #  FOR DETAILED DESCRIPTION SEE 504GSOP 5.6.3.2.5
041104,001577:                                                                                                  #  THIS PROGRAM FINDS THE DIRECTION OF THE MOONS GRAVITY
041105,001578:                                                                                                  #  WHILE THE LM IS ON THE MOONS SURFACE.  IT WILL BE USED
041106,001579:                                                                                                  #  FOR LUNAR SURFACE ALIGNMENT.  THE GRAVITY VECTOR IS
041107,001580:                                                                                                  #  DETERMINED BY READING THE PIPAS WITH THE IMU AT TWO
041108,001581:                                                                                                  #  PARTICULAR ORIONTATIONS.  THE TWO READINGS ARE AVERAGED
041109,001582:                                                                                                  #  AND UNITIZED AND TRANSFORMED TO NB COORDINATES.  THE TWO
041110,001583:                                                                                                  #  ORIENTATION WERE CHOSEN TO REDUCE BIAS ERRORS IN THE
041111,001584:                                                                                                  #  READINGS.
041112,001585: 
041113,001586:                                                                                                  #  CALL -
041114,001587:                                                                                                  #        TC      BANKCALL
041115,001588:                                                                                                  #        CADR    GVDETER
041116,001589: 
041117,001590:                                                                                                  #  INPUTS -
041118,001591:                                                                                                  #        PIPAS, CDUS
041119,001592: 
041120,001593:                                                                                                  #  OUTPUTS -
041121,001594:                                                                                                  #        STARSAV1 = UNIT GRAVITY
041122,001595:                                                                                                  #        GSAV     = DITTO
041123,001596:                                                                                                  #        GRAVBIT  = 1
041124,001597: 
041125,001598:                                                                                                  #  SUBROUTINES -
041126,001599:                                                                                                  #        PIPASR, IMUCOARS, IMUFINE, IMUSTALL, 1/PIPA, DELAYJOB, CDUTRIG,
041127,001600:                                                                                                  #        *NBSM*, *SNMB*, CALCGA, FOFLASH
041128,001601: 
041129,001602:                                                                                                  #  DEBRIS -
041130,001603:                                                                                                  #        VAC, SAC, STARAD, XSM, XNB, THETAD, DELV, COSCDU, SINCDU
041131,001604: 
041132,001605: 15,2561           32762        GVDETER            CAF      42DEG                                 
041133,001606: 15,2562           54321                           TS       THETAD                                
041134,001607: 15,2563           40000                           COM                                            
041135,001608: 15,2564           54322                           TS       THETAD     +1                         
041136,001609: 15,2565           32763                           CAF      35DEG                                 
041137,001610: 15,2566           54323                           TS       THETAD     +2                         
041138,001611: 15,2567           06042                           TC       INTPRET                               
041139,001612: 15,2570           45014                           CLEAR    CALL                                  
041140,001613: 15,2571           01662                                    REFSMFLG                              
041141,001614: 15,2572           32666                                    LUNG                                  
041142,001615: 
041143,001616:                                                                                                  #  FIND GIMBAL ANGLES WHICH ROTATE SM 180 DEG ABOUT G VEC
041144,001617: 
041145,001618:                                                                                                  #        DEFINE G COOR SYS
041146,001619:                                                                                                  #                      -
041147,001620:                                                                                                  #                      X          UNIT G     
041148,001621:                                                                                                  #                *     -                  -  
041149,001622:                                                                                                  #                M =   Y   =   UNITEZSM * X )
041150,001623:                                                                                                  #                      -             -    -   
041151,001624:                                                                                                  #                      Z       UNIT( X  * Y ) 
041152,001625: 
041153,001626:                                                                                                  #        THEN ROTATED SM WRT PRESENT IS
041154,001627: 
041155,001628:                                                                                                  #                             1,  0 , 0  
041156,001629:                                                                                                  #                 *      *T               *             *      *

Page 959

041158,001631:                                                                                                  #                XSM =   M    0, -1 , 0   M  =  2 (X X ) - 1/2 I  *
041159,001632:                                                                                                  #                                                   I J
041160,001633:                                                                                                  #                             0 , 0 ,-1  
041161,001634: 
041162,001635:                                                                                                  #        ALSO NB WRT PRES SM IS
041163,001636: 
041164,001637:                                                                                                  #                 *      *  *
041165,001638:                                                                                                  #                XNB = NBSM I
041166,001639: 
041167,001640:                                                                                                  #                                 *     *
041168,001641:                                                                                                  #        GIMBAL ANGLES = CALCGA( XSM , XNB )
041169,001642: 
041170,001643: 15,2000                                           SETLOC   P50S                                  
041171,001644: 15,2000                                           BANK                                           
041172,001645: 15,2573                                           COUNT*   $$/P57                                
041173,001646: 15,2573           66370                           AXT,1    SSP                                   #  X1=18
041174,001647: 15,2574           00022                                    18D                                   #  S1=6
041175,001648: 15,2575           00051                                    S1                                    #  X2, -2
041176,001649: 15,2576           00006                                    6D                                    
041177,001650: 15,2577           77744                           LXC,2                                          
041178,001651: 15,2600           00050                                    S1                                    
041179,001652: 15,2601           45173        GRAVEL             VLOAD*   CALL                                  
041180,001653: 15,2602           54000                                    XUNIT      -6,2                       
041181,001654: 15,2603           47675                                    *NBSM*                                #  SIN AND COS COMPUTED IN LUNG
041182,001655: 15,2604           06707                           STORE    XNB        +18D,1                     
041183,001656: 15,2605           77775                           VLOAD                                          
041184,001657: 15,2606           02731                                    STAR                                  
041185,001658: 15,2607           73744                           LXC,2    VXSC*                                 #  COMPLEMENT - UNITX ARE BACKWARD -
041186,001659: 15,2610           00047                                    X2                                    
041187,001660: 15,2611           75040                                    STAR       +6,2                       #  OUTER PRODUCT
041188,001661: 15,2612           71152                           VSL2     LXC,2                                 
041189,001662: 15,2613           00047                                    X2                                    
041190,001663: 15,2614           63047                           VSU*     INCR,2                                
041191,001664: 15,2615           54000                                    XUNIT      -6,2                       
041192,001665: 15,2616           00002                                    2D                                    
041193,001666: 15,2617           06665                           STORE    XSM        +18D,1                     
041194,001667: 15,2620           45100                           TIX,1    CALL                                  
041195,001668: 15,2621           32601                                    GRAVEL                                
041196,001669: 15,2622           47355                                    CALCGA                                
041197,001670: 15,2623           74575                           VLOAD    VSR1                                  
041198,001671: 15,2624           02715                                    GOUT                                  
041199,001672: 15,2625           36723                           STCALL   STARAD     +12D                       
041200,001673: 15,2626           32666                                    LUNG                                  
041201,001674: 15,2627           74575                           VLOAD    VSR1                                  
041202,001675: 15,2630           02715                                    GOUT                                  
041203,001676: 15,2631           53455                           VAD      UNIT                                  
041204,001677: 15,2632           02723                                    STARAD     +12D                       
041205,001678: 15,2633           02761                           STORE    STARSAV1                              
041206,001679: 15,2634           77641                           DOT                                            
041207,001680: 15,2635           02231                                    GSAV                                  
041208,001681: 15,2636           65552                           SL1      ACOS                                  

Page 960

041210,001683: 15,2637           01045                           STORE    DSPTEM1                               
041211,001684: 15,2640           77776                           EXIT                                           
041212,001685: 15,2641           05516                           TC       DOWNFLAG                              #  CLEAR FREEFLAG IN CASE OF RECYCLE
041213,001686: 15,2642           00014                           ADRES    FREEFLAG                              
041214,001687: 
041215,001688: 15,2643           32761                           CA       DISGRVER                              
041216,001689: 15,2644           04616                           TC       BANKCALL                              
041217,001690: 15,2645           20477                           CADR     GOFLASH                               
041218,001691: 15,2646           06001                           TC       GOTOPOOH                              
041219,001692: 15,2647           12652                           TCF      PROGRAV                               #  VB33 - PROCEED
041220,001693: 15,2650           05504                           TC       UPFLAG                                #  VB32 - RECYCLE - STORE GRAV AND DO IT AGAIN
041221,001694: 15,2651           00014                           ADRES    FREEFLAG                              #  AND SET FREEFLAG TO SHOW RECYCLE
041222,001695: 
041223,001696: 15,2652           05353        PROGRAV            TC       PHASCHNG                              
041224,001697: 15,2653           04024                           OCT      04024                                 
041225,001698: 
041226,001699: 15,2654           06042                           TC       INTPRET                               
041227,001700: 15,2655           77775                           VLOAD                                          
041228,001701: 15,2656           02761                                    STARSAV1                              
041229,001702: 15,2657           02231                           STORE    GSAV                                  
041230,001703: 15,2660           77776                           EXIT                                           
041231,001704: 15,2661           34751                           CAF      FREEFBIT                              #  IF FREEFLAG SET, RE-COMPUTE GRAVITY.
041232,001705: 15,2662           70074                           MASK     FLAGWRD0                              
041233,001706: 15,2663           10000                           CCS      A                                     
041234,001707: 15,2664           12561                           TCF      GVDETER                               #  SET
041235,001708: 15,2665           13536                           TCF      ATTCHK                                #  EXIT FROM GVDETER
041236,001709: 
041237,001710: 15,2666           77220        LUNG               STQ      VLOAD                                 
041238,001711: 15,2667           02745                                    QMIN                                  
041239,001712: 15,2670           24007                                    ZEROVEC                               
041240,001713: 15,2671           02707                           STORE    GACC                                  
041241,001714: 15,2672           77776                           EXIT                                           
041242,001715: 15,2673           05353                           TC       PHASCHNG                              
041243,001716: 15,2674           04024                           OCT      04024                                 
041244,001717: 
041245,001718: 15,2675           06042                           TC       INTPRET                               
041246,001719: 15,2676           77624                           CALL                                           
041247,001720: 15,2677           31557                                    COARSE                                
041248,001721: 15,2700           77776                           EXIT                                           
041249,001722: 15,2701           32760                           CA       T/2SEC                                
041250,001723: 15,2702           55736                           TS       GCTR                                  
041251,001724: 15,2703           37721                           CA       PRIO31                                
041252,001725: 15,2704           55074                           TS       1/PIPADT                              
041253,001726: 15,2705           04616                           TC       BANKCALL                              
041254,001727: 15,2706           15707                           CADR     GCOMPZER                              #  INITIALIZE COMPENSATION
041255,001728: 15,2707           05353                           TC       PHASCHNG                              
041256,001729: 15,2710           04024                           OCT      04024                                 
041257,001730: 
041258,001731: 15,2711           04616                           TC       BANKCALL                              #   DONT NEED TO INHINY  THIS USED TO
041259,001732: 15,2712           77541                           CADR     PIPSRINE                              #  INITIALIZE PIPAS  DONT USE DATA

Page 961

041261,001734: 15,2713           06042                           TC       INTPRET                               
041262,001735: 15,2714           77776        GREED              EXIT                                           #  = MASK 7776 IN BASIC SO DONT CARE
041263,001736: 15,2715           35000                           CAF      2SECS                                 
041264,001737: 15,2716           05173                           TC       TWIDDLE                               #  SET UP 2 SEC TASK TO READ PIPAS
041265,001738: 15,2717           02721                           ADRES    GRABGRAV                              
041266,001739: 
041267,001740: 15,2720           05155                           TC       ENDOFJOB                              
041268,001741: 
041269,001742: 15,2721           04674        GRABGRAV           TC       IBNKCALL                              
041270,001743: 15,2722           77541                           CADR     PIPSRINE                              
041271,001744: 15,2723           35023                           CAF      PRIO13                                #  RE-ESTABLISH MAINLINE JOB
041272,001745: 15,2724           05105                           TC       FINDVAC                               
041273,001746: 15,2725  E5,1706                                  EBANK=   STARAD                                
041274,001747: 15,2725           02730 32065                     2CADR    ADDGRAV                               
041275,001748: 
041276,001749: 15,2727           05261                           TC       TASKOVER                              
041277,001750: 
041278,001751: 15,2730           04616        ADDGRAV            TC       BANKCALL                              
041279,001752: 15,2731           15271                           CADR     1/PIPA                                
041280,001753: 15,2732           25736                           INCR     GCTR                                  
041281,001754: 15,2733           06042                           TC       INTPRET                               
041282,001755: 15,2734           53375                           VLOAD    VAD                                   
041283,001756: 15,2735           00325                                    DELV                                  
041284,001757: 15,2736           02707                                    GACC                                  
041285,001758: 15,2737           02707                           STORE    GACC                                  #  ACCUMULATE G VECTOR
041286,001759: 15,2740           50135                           SLOAD    BMN                                   
041287,001760: 15,2741           02737                                    GCTR                                  
041288,001761: 15,2742           32714                                    GREED                                 
041289,001762: 15,2743           53575                           VLOAD    UNIT                                  
041290,001763: 15,2744           02707                                    GACC                                  
041291,001764: 15,2745           36731                           STCALL   STAR                                  
041292,001765: 15,2746           47541                                    CDUTRIG                               #  TRANSFORM IN NB COOR AND STORE
041293,001766: 15,2747           77624                           CALL                                           #        IN OUTPUT
041294,001767: 15,2750           47673                                    *SMNB*                                
041295,001768: 15,2751           02715                           STORE    GOUT                                  
041296,001769: 15,2752           77776                           EXIT                                           
041297,001770: 15,2753           05353                           TC       PHASCHNG                              
041298,001771: 15,2754           04024                           OCT      04024                                 
041299,001772: 
041300,001773: 15,2755           06042        QMINEXIT           TC       INTPRET                               
041301,001774: 15,2756           77650                           GOTO                                           
041302,001775: 15,2757           02745                                    QMIN                                  
041303,001776: 15,2760           77753        T/2SEC             DEC      -20        B-14                       
041304,001777: 15,2761           01404        DISGRVER           VN       0604                                  
041305,001778: 15,2762           07357        42DEG              OCT      07357                                 
041306,001779: 15,2763           06211        35DEG              OCT      06211                                 
041307,001780: 

Page 962

041309,001782:                                                                                                  #  NAME   GYROTRIM
041310,001783: 
041311,001784:                                                                                                  #  THIS PROGRAM COMPUTES AND SENDS GYRO COMMANDS WHICH CAUSE THE CDUS
041312,001785:                                                                                                  #  TO ATTAIN A PRESCRIBED SET OF ANGLES.  THIS ROUTINE ASSUMES THE
041313,001786:                                                                                                  #  VEHICLES ATTITUDE REMAINS STATIONARY DURING ITS OPERATION.
041314,001787: 
041315,001788:                                                                                                  #  CALL          CALL
041316,001789:                                                                                                  #                        GYROTRIM
041317,001790: 
041318,001791:                                                                                                  #  INPUT         THETAD,+1,+2 = DESIRED CDU ANGLES
041319,001792:                                                                                                  #                CDUX,CDUY,CDUZ
041320,001793: 
041321,001794:                                                                                                  #  OUTPUT -      GYRO TORQUE PULSES
041322,001795: 
041323,001796:                                                                                                  #  SUBROUTINES-  TRG*NBSM, *NBSM*, CDUTRIG, AXISGEN, CALCGTA, IMUFINE
041324,001797:                                                                                                  #                IMPULSE, IMUSTALL
041325,001798:                                                                                                  #                 -         -        -       *          *    -
041326,001799:                                                                                                  #  DEBRIS -      CDUSPOT, SINCDU, COSCDU, STARAD, VAC, XDC, OGC
041327,001800: 
041328,001801: 15,2764                                           COUNT*   $$/P57                                
041329,001802: 15,2764           71220        GYROTRIM           STQ      DLOAD                                 
041330,001803: 15,2765           02745                                    QMIN                                  
041331,001804: 15,2766           00322                                    THETAD                                
041332,001805: 15,2767           65325                           PDDL     PDDL                                  
041333,001806: 15,2770           00324                                    THETAD     +2                         
041334,001807: 15,2771           00323                                    THETAD     +1                         
041335,001808: 15,2772           77666                           VDEF                                           
041336,001809: 15,2773           24766                           STOVL    CDUSPOT                               
041337,001810: 15,2774           24005                                    XUNIT                                 
041338,001811: 15,2775           77624                           CALL                                           
041339,001812: 15,2776           47666                                    TRG*NBSM                              
041340,001813: 15,2777           26707                           STOVL    STARAD                                
041341,001814: 15,3000           24003                                    YUNIT                                 
041342,001815: 15,3001           77624                           CALL                                           
041343,001816: 15,3002           47675                                    *NBSM*                                
041344,001817: 15,3003           36715                           STCALL   STARAD     +6                         
041345,001818: 15,3004           47541                                    CDUTRIG                               
041346,001819: 15,3005           77624                           CALL                                           
041347,001820: 15,3006           20030                                    CALCSMSC                              
041348,001821: 15,3007           77775                           VLOAD                                          
041349,001822: 15,3010           02665                                    XNB                                   
041350,001823: 15,3011           24007                           STOVL    6D                                    
041351,001824: 15,3012           02673                                    YNB                                   
041352,001825: 15,3013           34015                           STCALL   12D                                   
041353,001826: 15,3014           47443                                    AXISGEN                               
041354,001827: 15,3015           77624                           CALL                                           
041355,001828: 15,3016           47251                                    CALCGTA                               
041356,001829: 15,3017           77776        JUSTTRIM           EXIT                                           
041357,001830: 15,3020           33027                           CA       GYRCDR                                
041358,001831: 15,3021           04616                           TC       BANKCALL                              
041359,001832: 15,3022           17314                           CADR     IMUPULSE                              

Page 963

041361,001834: 15,3023           04616                           TC       BANKCALL                              
041362,001835: 15,3024           17707                           CADR     IMUSTALL                              
041363,001836: 15,3025           05701                           TC       CURTAINS                              
041364,001837: 15,3026           12755                           TCF      QMINEXIT                              
041365,001838: 
041366,001839: 15,3027           02737        GYRCDR             ECADR    OGC                                   
041367,001840: 

Page 964

041369,001842:                                                                                                  #  PERFORM STAR AQUISITION AND STAR SIGHTINGS
041370,001843: 
041371,001844: 15,3030           34755        2STARS             CAF      ZERO                                  #  INITALIZE STARIND
041372,001845: 15,3031           13033                           TCF      +2                                    #  ZERO FOR 1ST STAR, ONE FOR 2ND STAR
041373,001846: 15,3032           34753        1STAR              CAF      BIT1                                  
041374,001847: 15,3033           55757                           TS       STARIND                               
041375,001848: 
041376,001849: 15,3034           05353                           TC       PHASCHNG                              
041377,001850: 15,3035           04024                           OCT      04024                                 
041378,001851: 
041379,001852: 15,3036           12245                           TCF      R59                                   #  GO DO STAR AQUIRE AND AOTMARK
041380,001853: 
041381,001854: 15,3037           31757        R59RET             CA       STARIND                               #  BACK FROM SURFACE MARKING
041382,001855: 15,3040           00006                           EXTEND                                         
041383,001856: 15,3041           13052                           BZF      ASTAR                                 #  1ST STAR MARKED
041384,001857: 
041385,001858: 15,3042           05353                           TC       PHASCHNG                              
041386,001859: 15,3043           04024                           OCT      04024                                 
041387,001860: 
041388,001861: 15,3044           06042                           TC       INTPRET                               
041389,001862: 15,3045           45145                           DLOAD    CALL                                  
041390,001863: 15,3046           03562                                    TSIGHT                                #  TIME OF 2ND MARK
041391,001864: 15,3047           32472                                    PLANET                                
041392,001865: 15,3050           37254                           STCALL   VEC2                                  #  STORE 2ND CATALOG VEC (REF)
041393,001866: 15,3051           33064                                    SURFLINE                              
041394,001867: 
041395,001868: 15,3052           06042        ASTAR              TC       INTPRET                               
041396,001869: 15,3053           77775                           VLOAD                                          
041397,001870: 15,3054           02715                                    STARAD     +6                         
041398,001871: 15,3055           02761                           STORE    STARSAV1                              #  1ST OBSERVED STAR (SM)
041399,001872: 15,3056           45145                           DLOAD    CALL                                  
041400,001873: 15,3057           03562                                    TSIGHT                                #  TIME OF 1ST MARK
041401,001874: 15,3060           32472                                    PLANET                                
041402,001875: 15,3061           03246                           STORE    VEC1                                  #  STORE 1ST CATALOG VEC (REF)
041403,001876: 15,3062           77776                           EXIT                                           
041404,001877: 15,3063           13032                           TCF      1STAR                                 #  GO GET 2ND STAR SIGHTING
041405,001878: 

Page 965

041407,001880:                                                                                                  #  DO FINE OR COARSE ALIGNMENT OF IMU
041408,001881: 
041409,001882: 15,3064           77131        SURFLINE           SSP      AXT,2                                 
041410,001883: 15,3065           00052                                    S2                                    
041411,001884: 15,3066           00006                                    6                                     
041412,001885: 15,3067           00014                                    12D                                   
041413,001886: 15,3070           64373        WRTDESIR           VLOAD*   MXV                                   
041414,001887: 15,3071           74515                                    VEC1       +12D,2                     #  PICK UP VEC IN REF, TRANS TO DESIRED SH
041415,001888: 15,3072           03607                                    XSMD                                  
041416,001889: 15,3073           77656                           UNIT                                           
041417,001890: 15,3074           12723                           STORE    STARAD     +12D,2                     #  VEC IN SM
041418,001891: 15,3075           77773                           VLOAD*                                         
041419,001892: 15,3076           75002                                    STARSAV1   +12D,2                     #  PICK UP VEC IN PRESENT SM
041420,001893: 15,3077           10023                           STORE    18D,2                                 
041421,001894: 15,3100           43104                           TIX,2    BON                                   
041422,001895: 15,3101           33070                                    WRTDESIR                              
041423,001896: 15,3102           04315                                    INITALGN                              #  IF INITIAL PASS (OPTION 0) BYPASS R54
041424,001897: 15,3103           33111                                    INITBY                                
041425,001898: 15,3104           77624        DOALIGN            CALL                                           
041426,001899: 15,3105           31250                                    R54                                   #  DO CHKSDATA
041427,001900: 15,3106           77614                           BOFF                                           
041428,001901: 15,3107           00354                                    FREEFLAG                              
041429,001902: 15,3110           33171                                    P57POST                               #  ASTRO DOES NOT LIKE DATA TEST RESULTS
041430,001903: 15,3111           77624        INITBY             CALL                                           
041431,001904: 15,3112           47443                                    AXISGEN                               #  GET DESIRED ORIENT WRT PRES. XDC,YDC,ZDC
041432,001905: 15,3113           77624                           CALL                                           
041433,001906: 15,3114           47251                                    CALCGTA                               #  GET GYRO TORQ ANGLES, OGC,IGC,MGC
041434,001907: 15,3115           77776                           EXIT                                           
041435,001908: 15,3116           34752                           CAF      INITABIT                              #  IF INITIAL PASS BYPASS NOUN 93 DISPLAY
041436,001909: 15,3117           70104                           MASK     FLAGWRD8                              
041437,001910: 15,3120           10000                           CCS      A                                     
041438,001911: 15,3121           13130                           TCF      5DEGTEST                              
041439,001912: 15,3122           33276                           CAF      DISPGYRO                              #  DISPLAY GYRO TORQ ANGLES V 06N93
041440,001913: 15,3123           04616                           TC       BANKCALL                              
041441,001914: 15,3124           20477                           CADR     GOFLASH                               
041442,001915: 15,3125           06001                           TC       GOTOPOOH                              #  V34 - TERMINATE
041443,001916: 15,3126           13130                           TCF      5DEGTEST                              #  VB33 - PROCEED TO COARSE OR FINE
041444,001917: 15,3127           13172                           TCF      P57POST    +1                         #  VB32 - RECYCLE, MAYBE RE-ALIGN
041445,001918: 
041446,001919: 15,3130           06042        5DEGTEST           TC       INTPRET                               #  IF ANGLES GREATER THAN 5 DEGS, DO COARSE
041447,001920: 15,3131           40175                           VLOAD    BOV                                   
041448,001921: 15,3132           02740                                    OGC                                   
041449,001922: 15,3133           33134                                    SURFSUP                               
041450,001923: 15,3134           02750        SURFSUP            STORE    OGCT                                  
041451,001924: 15,3135           40141                           V/SC     BOV                                   
041452,001925: 15,3136           30602                                    5DEGREES                              
041453,001926: 15,3137           33237                                    COATRIM                               
041454,001927: 15,3140           52131                           SSP      GOTO                                  
041455,001928: 15,3141           02746                                    QMIN                                  
041456,001929: 15,3142           33144                                    SURFDISP                              

Page 966

041458,001931: 15,3143           33017                                    JUSTTRIM                              #  ANGLES LESS THAN 5DEG, DO GYRO TORQ
041459,001932: 
041460,001933: 15,3144           77776        SURFDISP           EXIT                                           
041461,001934: 15,3145           05353                           TC       PHASCHNG                              
041462,001935: 15,3146           04024                           OCT      04024                                 
041463,001936: 
041464,001937: 15,3147           06042                           TC       INTPRET                               
041465,001938: 15,3150           75160                           AXC,1    AXC,2                                 
041466,001939: 15,3151           03606                                    XSMD                                  
041467,001940: 15,3152           01733                                    REFSMMAT                              
041468,001941: 15,3153           45014                           SET      CALL                                  
041469,001942: 15,3154           01462                                    REFSMFLG                              
041470,001943: 15,3155           31371                                    MATMOVE                               
041471,001944: 15,3156           77776                           EXIT                                           
041472,001945: 15,3157           11144                           CCS      OPTION2                               #  IF OPTION ZERO DO FINISH
041473,001946: 15,3160           13162                           TCF      B2F8                                  
041474,001947: 15,3161           13172                           TCF      P57POST    +1                         
041475,001948: 
041476,001949: 15,3162           34752        B2F8               CAF      INITABIT                              #  IF INITIAL FLAG SET, RE-CYCLE.
041477,001950: 15,3163           70104                           MASK     FLAGWRD8                              
041478,001951: 15,3164           10000                           CCS      A                                     
041479,001952: 15,3165           13544                           TCF      P57JUMP                               #  ITS SET
041480,001953: 15,3166           06042                           TC       INTPRET                               
041481,001954: 15,3167           77624                           CALL                                           
041482,001955: 15,3170           33471                                    REFMF                                 #  GO GET ATTITUDE VEC IN MF(YNBSAV,XNBSAV)
041483,001956: 15,3171           77776        P57POST            EXIT                                           
041484,001957: 15,3172           35741                           CAF      OCT14                                 #  DISPLAY V50N25 CHK CODE 14
041485,001958: 15,3173           04616                           TC       BANKCALL                              
041486,001959: 15,3174           20624                           CADR     GOPERF1                               
041487,001960: 15,3175           16001                           TCF      GOTOPOOH                              #  VB34 - TERMINATE
041488,001961: 15,3176           13544                           TCF      P57JUMP                               #  VB33 - PROCEED TO RE-ALIGN
041489,001962: 15,3177           44752                           CS       BIT2                                  #  TEST TO SE IF ALIGNED BY OPTION 2
041490,001963: 15,3200           61144                           AD       OPTION2                               
041491,001964: 15,3201           00006                           EXTEND                                         
041492,001965: 15,3202           13204                           BZF      +2                                    #  YES - GO CALCULATE LANDING SITE
041493,001966: 15,3203           16001                           TCF      GOTOPOOH                              #  NO - EXIT P57
041494,001967: 15,3204           05353                           TC       PHASCHNG                              #  RESTART PLACE
041495,001968: 15,3205           04024                           OCT      04024                                 
041496,001969: 15,3206           06042                           TC       INTPRET                               
041497,001970: 15,3207           45175                           VLOAD    CALL                                  #  USE GNB
041498,001971: 15,3210           02231                                    GSAV                                  
041499,001972: 15,3211           47663                                    CDU*NBSM                              #  GO TO SM COORDS
041500,001973: 15,3212           43105                           VXM      SET                                   #        ON MOON SO SET LUNAFLAG
041501,001974: 15,3213           01734                                    REFSMMAT                              #        G(REF) = (REFSMMAT)T (NBSM)GNB
041502,001975: 15,3214           01463                                    LUNAFLAG                              
041503,001976: 15,3215           51515                           PDVL     ABVAL                                 
041504,001977: 15,3216           02023                                    RLS                                   
041505,001978: 15,3217           45561                           VXSC     STADR                                 
041506,001979: 15,3220           75745                           STORE    ALPHAV                                #  ALPHAV = RLSMAG * G(REF)
041507,001980: 15,3221           47014                           CLEAR    RTB                                   

Page 967

041509,001982: 15,3222           00662                                    ERADFLAG                              
041510,001983: 15,3223           21574                                    LOADTIME                              
041511,001984: 15,3224           77624                           CALL                                           
041512,001985: 15,3225           30440                                    N89DISP                               #  SUBROUTINE TO CALC LS AND GIVE RLS BACK
041513,001986: 15,3226           01220                           STORE    RN                                    #  RN=RLS B-29 = LM POSITION
041514,001987: 15,3227           65352                           VSL2     PDDL                                  #  R-TO-RP GETS RLS B-27 AT 0-5D IN PDLIST
041515,001988: 15,3230           01242                                    GDT/2      +4                         #  TIME TEMP STORED IN N89DISP
041516,001989: 15,3231           77606                           PUSH                                           #  TIME AT 6-7 IN PDLIST
041517,001990: 15,3232           35234                           STCALL   PIPTIME                               #  PIPTIME = LM STATE TIME
041518,001991: 15,3233           51700                                    R-TO-RP                               
041519,001992: 15,3234           02023                           STORE    RLS                                   #  RLS IN MOON-FIXED COORDS
041520,001993: 15,3235           77776                           EXIT                                           
041521,001994: 15,3236           16001                           TCF      GOTOPOOH                              #  EXIT P57
041522,001995: 

Page 968

041524,001997:                                                                                                  #  COARSE AND FINE ALIGN IMU
041525,001998: 
041526,001999: 15,3237           75160        COATRIM            AXC,1    AXC,2                                 
041527,002000: 15,3240           02664                                    XDC                                   
041528,002001: 15,3241           02642                                    XSM                                   
041529,002002: 15,3242           77624                           CALL                                           
041530,002003: 15,3243           31371                                    MATMOVE                               
041531,002004: 15,3244           77624                           CALL                                           
041532,002005: 15,3245           47541                                    CDUTRIG                               
041533,002006: 15,3246           77624                           CALL                                           
041534,002007: 15,3247           20030                                    CALCSMSC                              
041535,002008: 15,3250           77624                           CALL                                           
041536,002009: 15,3251           47355                                    CALCGA                                
041537,002010: 15,3252           77414                           BOFF     EXIT                                  
041538,002011: 15,3253           04355                                    INITALGN                              #  IF INITIAL ALGNMENT DISPLAY FINAL
041539,002012: 15,3254           33266                                    CORSIT                                #  GIMBAL ANGLES IF COARSE ANGLES GREATER
041540,002013: 15,3255           35010                           CAF      V06N22                                #  THAN 5 DEGREES
041541,002014: 15,3256           04616                           TC       BANKCALL                              
041542,002015: 15,3257           20477                           CADR     GOFLASH                               
041543,002016: 15,3260           06001                           TC       GOTOPOOH                              
041544,002017: 15,3261           13263                           TCF      +2                                    
041545,002018: 15,3262           13255                           TCF      -5                                    
041546,002019: 15,3263           05353                           TC       PHASCHNG                              
041547,002020: 15,3264           04024                           OCT      04024                                 
041548,002021: 
041549,002022: 15,3265           06042                           TC       INTPRET                               
041550,002023: 15,3266           77624        CORSIT             CALL                                           
041551,002024: 15,3267           31557                                    COARSE                                
041552,002025: 15,3270           77624                           CALL                                           
041553,002026: 15,3271           31603                                    NCOARSE                               
041554,002027: 15,3272           77624                           CALL                                           
041555,002028: 15,3273           32764                                    GYROTRIM                              
041556,002029: 15,3274           77650                           GOTO                                           
041557,002030: 15,3275           33144                                    SURFDISP                              
041558,002031: 15,3276           01535        DISPGYRO           VN       0693                                  
041559,002032: 

Page 969

041561,002034:                                                                                                  #  LUNAR SURFACE IMU ALIGNMENT PROGRAM
041562,002035: 
041563,002036: 15,3277           04616        P57                TC       BANKCALL                              #  IS ISS ON - IF NOT, IMUCHK WILL SEND
041564,002037: 15,3300           33635                           CADR     IMUCHK                                #  ALARM CODE 210 AND EXIT VIA GOTOPOOH
041565,002038: 
041566,002039: 15,3301           36250                           CAF      THREE                                 #  JAM REFSMMAT OPTION 3 FOR INITIAL DISP.
041567,002040: 15,3302           55144                           TS       OPTION2                               
041568,002041: 15,3303           34753        P57OPT             CAF      BIT1                                  
041569,002042: 15,3304           04616                           TC       BANKCALL                              
041570,002043: 15,3305           20714                           CADR     GOPERF4R                              #  FLASH V04N06 FOR ALIGNMENT CODE
041571,002044: 15,3306           06001                           TC       GOTOPOOH                              #  V34 TERMINATE
041572,002045: 15,3307           13314                           TCF      ALIGNOPT                              #  V33 PROCEED
041573,002046: 15,3310           13303                           TCF      P57OPT                                #  V32 RECYCLE
041574,002047: 
041575,002048: 15,3311           05353                           TC       PHASCHNG                              
041576,002049: 15,3312           00014                           OCT      00014                                 
041577,002050: 15,3313           05155                           TC       ENDOFJOB                              
041578,002051: 
041579,002052: 15,3314           31144        ALIGNOPT           CA       OPTION2                               
041580,002053: 15,3315           76250                           MASK     THREE                                 
041581,002054: 15,3316           50000                           INDEX    A                                     
041582,002055: 15,3317           13320                           TCF      +1                                    
041583,002056: 15,3320           13333                           TCF      TDISP                                 #  OPTION 4 LS ORIENTATION
041584,002057: 15,3321           13374                           TCF      PACKOPTN                              #  OPTION 1 PREFERRED
041585,002058: 15,3322           13303                           TCF      P57OPT                                #  OPTION 2 INVALID IN P57, RECYCLE
041586,002059: 15,3323           06042                           TC       INTPRET                               #  OPTION 3 REFSMMAT
041587,002060: 15,3324           75160                           AXC,1    AXC,2                                 #  JAM REFSMMAT IN XSMD LOC
041588,002061: 15,3325           01733                                    REFSMMAT                              
041589,002062: 15,3326           03606                                    XSMD                                  
041590,002063: 15,3327           77624                           CALL                                           
041591,002064: 15,3330           31371                                    MATMOVE                               
041592,002065: 15,3331           77650                           GOTO                                           
041593,002066: 15,3332           33373                                    PACKOPTN   -1                         
041594,002067: 
041595,002068: 15,3333           06042        TDISP              TC       INTPRET                               
041596,002069: 15,3334           77745                           DLOAD                                          
041597,002070: 15,3335           03442                                    TIG                                   #  LOAD ASCENT TIME FOR DISPLAY
041598,002071: 15,3336           01045        P57A               STORE    DSPTEM1                               
041599,002072: 15,3337           77776                           EXIT                                           
041600,002073: 15,3340           32170        P57AA              CAF      V06N34*                               #  DISPLAY TALIGN, TALIGN : DSPTEM1
041601,002074: 15,3341           04616                           TC       BANKCALL                              
041602,002075: 15,3342           20477                           CADR     GOFLASH                               
041603,002076: 15,3343           16001                           TCF      GOTOPOOH                              #  V34 - TERMINATE
041604,002077: 15,3344           13346                           TCF      +2                                    
041605,002078: 15,3345           13340                           TCF      P57AA                                 #  VB32 - RECYCLE
041606,002079: 
041607,002080: 15,3346           06042                           TC       INTPRET                               
041608,002081: 15,3347           65234                           RTB      PDDL                                  
041609,002082: 15,3350           21574                                    LOADTIME                              #  PUSH CURRENT TIME AND PICK UP KEY IN
041610,002083: 15,3351           01045                                    DSPTEM1                               

Page 970

041612,002085: 15,3352           65254                           BZE      PDDL                                  
041613,002086: 15,3353           33363                                    P57C                                  #  IF KEY IN TIME ZERO - TALIGN=CURRENT TIME
041614,002087: 15,3354           51025                           DSU      BPL                                   #  NOT ZERO SO EXCHANGE PD WITH DSPTEM1
041615,002088: 15,3355           01045                                    DSPTEM1                               
041616,002089: 15,3356           33363                                    P57C                                  
041617,002090: 15,3357           45545                           DLOAD    STADR                                 #  IF KEYIN TIME GREATER THAN CURRENT TIME
041618,002091: 15,3360           74335                           STORE    TIG                                   #  STORE IT IN TIG
041619,002092: 15,3361           36775                           STCALL   TALIGN                                
041620,002093: 15,3362           33365                                    P57D                                  
041621,002094: 15,3363           45545        P57C               DLOAD    STADR                                 
041622,002095: 15,3364           75002                           STORE    TALIGN                                
041623,002096: 15,3365           34041        P57D               STCALL   TDEC1                                 
041624,002097: 15,3366           27056                                    LEMPREC                               #  COMPUTE DESIRED IMU ORIENTATION STORE
041625,002098: 15,3367           53575                           VLOAD    UNIT                                  #  IN X,Y,ZSMD
041626,002099: 15,3370           00001                                    RATT                                  
041627,002100: 15,3371           37607                           STCALL   XSMD                                  
041628,002101: 15,3372           10757                                    LSORIENT                              
041629,002102: 15,3373           77776                           EXIT                                           
041630,002103: 15,3374           34755        PACKOPTN           CAF      ZERO                                  #  PACK FLAG BITS FOR OPTION DISPLAY
041631,002104: 15,3375           55144                           TS       OPTION1    +1                         #  JAM ZERO IN ALIGNMENT OPTION
041632,002105: 15,3376           55145                           TS       OPTION1    +2                         #  INITIALIZE FLAG BIT CONFIGURATION
041633,002106: 15,3377           34737                           CAF      REFSMBIT                              
041634,002107: 15,3400           70077                           MASK     FLAGWRD3                              #  REFSMFLG
041635,002108: 15,3401           10000                           CCS      A                                     
041636,002109: 15,3402           34745                           CAF      BIT7                                  #  SET
041637,002110: 15,3403           27145                           ADS      OPTION1    +2                         #  CLEAR - JUST ZERO
041638,002111: 15,3404           34753                           CAF      ATTFLBIT                              
041639,002112: 15,3405           70102                           MASK     FLAGWRD6                              #  ATTFLG
041640,002113: 15,3406           10000                           CCS      A                                     
041641,002114: 15,3407           34750                           CAF      BIT4                                  #  SET
041642,002115: 15,3410           27145                           ADS      OPTION1    +2                         #  CLEAR - ZERO IN A
041643,002116: 15,3411           34750                           CAF      BIT4                                  
041644,002117: 15,3412           55143                           TS       OPTION1                               #  JAM 00010 IN OPTION1 FOR CHECK LIST
041645,002118: 
041646,002119: 15,3413           33634        DSPOPTN            CAF      VB05N06                               #  DISPLAY OPTION CODE AND FLAG BITS
041647,002120: 15,3414           04616                           TC       BANKCALL                              
041648,002121: 15,3415           20477                           CADR     GOFLASH                               
041649,002122: 15,3416           16001                           TCF      GOTOPOOH                              #  VB34 - TERMINATE
041650,002123: 15,3417           13421                           TCF      +2                                    #  V33 - PROCEED
041651,002124: 15,3420           13413                           TCF      DSPOPTN                               #  V32 - RECYCLE
041652,002125: 
041653,002126: 15,3421           34737                           CAF      REFSMBIT                              
041654,002127: 15,3422           70077                           MASK     FLAGWRD3                              
041655,002128: 15,3423           10000                           CCS      A                                     
041656,002129: 15,3424           13524                           TCF      GETLMATT                              #  SET, GO COMPUTE LM ATTITUDE
041657,002130: 15,3425           34753                           CAF      ATTFLBIT                              #  CLEAR - CHECK ATTFLAG FOR STORED ATTITUDE.
041658,002131: 15,3426           70102                           MASK     FLAGWRD6                              
041659,002132: 15,3427           10000                           CCS      A                                     
041660,002133: 15,3430           13530                           TCF      BYLMATT                               #  ALLFLG SET, CHK OPTION FOR GRAVITY COMP
041661,002134: 15,3431           34752                           CAF      BIT2                                  #  SEE IF OPTION 2 OR 3

Page 971

041663,002136: 15,3432           71144                           MASK     OPTION2                               
041664,002137: 15,3433           10000                           CCS      A                                     
041665,002138: 15,3434           13530                           TCF      BYLMATT                               #  OPTION 2 OR 3 BUT DONT HAVE ATTITUDE
041666,002139: 15,3435           05567                           TC       ALARM                                 #  OPTION INCONSISTANT WITH FLAGS - ALARM 701
041667,002140: 15,3436           00701                           OCT      701                                   
041668,002141: 15,3437           35006                           CAF      VB05N09                               #  DISPLAY ALARM FOR ACTION
041669,002142: 15,3440           04616                           TC       BANKCALL                              
041670,002143: 15,3441           20477                           CADR     GOFLASH                               
041671,002144: 15,3442           16001                           TCF      GOTOPOOH                              #  VB34-TERMINATE
041672,002145: 15,3443           13413                           TCF      DSPOPTN                               #  V33-PROCEED   ********TEMPORARY
041673,002146: 15,3444           13413                           TCF      DSPOPTN                               #  VB32-RECYCLE TO OPTION DISPLAY V 05N06
041674,002147: 

Page 972

041676,002149:                                                                                                  #  TRANSFORM VEC1,2 FROM MOON FIXED TO REF AND JAM BACK IN VEC1,2
041677,002150: 
041678,002151: 15,3445           40220        MFREF              STQ      SETPD                                 
041679,002152: 15,3446           02746                                    QMAJ                                  
041680,002153: 15,3447           00001                                    0                                     
041681,002154: 15,3450           77634                           RTB                                            
041682,002155: 15,3451           21574                                    LOADTIME                              
041683,002156: 15,3452           27562                           STOVL    TSIGHT                                
041684,002157: 15,3453           03246                                    VEC1                                  
041685,002158: 15,3454           41525                           PDDL     PUSH                                  
041686,002159: 15,3455           03562                                    TSIGHT                                
041687,002160: 15,3456           77624                           CALL                                           
041688,002161: 15,3457           55716                                    RP-TO-R                               
041689,002162: 15,3460           27246                           STOVL    VEC1                                  
041690,002163: 15,3461           03254                                    VEC2                                  
041691,002164: 15,3462           65201                           SETPD    PDDL                                  
041692,002165: 15,3463           00001                                    0                                     
041693,002166: 15,3464           03562                                    TSIGHT                                
041694,002167: 15,3465           45006                           PUSH     CALL                                  
041695,002168: 15,3466           55716                                    RP-TO-R                               
041696,002169: 15,3467           37254                           STCALL   VEC2                                  
041697,002170: 15,3470           02746                                    QMAJ                                  
041698,002171: 

Page 973

041700,002173:                                                                                                  #  COMPUTE LM ATTITUDE IN MOON FIXED COORDINATES USING REFSMMAT AND
041701,002174:                                                                                                  #  STORE IN YNBSAV AND ZNBSAV
041702,002175: 
041703,002176: 15,3471           45020        REFMF              STQ      CALL                                  
041704,002177: 15,3472           02746                                    QMAJ                                  
041705,002178: 15,3473           47541                                    CDUTRIG                               #  GET SIN AND COS OF CDUS
041706,002179: 15,3474           40234                           RTB      SETPD                                 
041707,002180: 15,3475           21574                                    LOADTIME                              
041708,002181: 15,3476           00001                                    0                                     
041709,002182: 15,3477           37562                           STCALL   TSIGHT                                
041710,002183: 15,3500           20030                                    CALCSMSC                              #  GET YNB IN SM
041711,002184: 15,3501           61375                           VLOAD    VXM                                   
041712,002185: 15,3502           02673                                    YNB                                   
041713,002186: 15,3503           01734                                    REFSMMAT                              #  YNB TO REF
041714,002187: 15,3504           65256                           UNIT     PDDL                                  
041715,002188: 15,3505           03562                                    TSIGHT                                
041716,002189: 15,3506           45006                           PUSH     CALL                                  
041717,002190: 15,3507           51700                                    R-TO-RP                               
041718,002191: 15,3510           26237                           STOVL    YNBSAV                                #  YNB TO MF
041719,002192: 15,3511           02701                                    ZNB                                   
041720,002193: 15,3512           53505                           VXM      UNIT                                  
041721,002194: 15,3513           01734                                    REFSMMAT                              #  ZNB TO REF
041722,002195: 15,3514           41525                           PDDL     PUSH                                  
041723,002196: 15,3515           03562                                    TSIGHT                                
041724,002197: 15,3516           77624                           CALL                                           
041725,002198: 15,3517           51700                                    R-TO-RP                               #  ZNB TO MF
041726,002199: 15,3520           02245                           STORE    ZNBSAV                                
041727,002200: 15,3521           77614                           SETGO                                          
041728,002201: 15,3522           03036                                    ATTFLAG                               
041729,002202: 15,3523           02746                                    QMAJ                                  
041730,002203: 

Page 974

041732,002205:                                                                                                  #  BRANCH TO ALIGNMENT OPTION
041733,002206: 
041734,002207: 15,3524           06042        GETLMATT           TC       INTPRET                               
041735,002208: 15,3525           77624                           CALL                                           
041736,002209: 15,3526           33471                                    REFMF                                 #  GO TRANSFORM TO MF IN YNBSAV, ZNBSAV
041737,002210: 15,3527           77776                           EXIT                                           
041738,002211: 
041739,002212: 15,3530           05504        BYLMATT            TC       UPFLAG                                #  SET INITIAL ALIGN FLAG
041740,002213: 15,3531           00205                           ADRES    INITALGN                              
041741,002214: 15,3532           34753                           CAF      BIT1                                  
041742,002215: 15,3533           71144                           MASK     OPTION2                               #  SEE IF OPTION 1 OR 3
041743,002216: 15,3534           10000                           CCS      A                                     
041744,002217: 15,3535           12561                           TCF      GVDETER                               #  OPTION 1 OR 2, GET GRAVITY
041745,002218: 
041746,002219: 15,3536           05353        ATTCHK             TC       PHASCHNG                              
041747,002220: 15,3537           04024                           OCT      04024                                 
041748,002221: 
041749,002222: 15,3540           34753                           CAF      ATTFLBIT                              #  NOT 1 OR 3, CHECK ATTFLAG
041750,002223: 15,3541           70102                           MASK     FLAGWRD6                              
041751,002224: 15,3542           10000                           CCS      A                                     
041752,002225: 15,3543           13560                           TCF      P57OPT0                               #  GET ALIGNMENT VECS FOR OPTION 0
041753,002226: 15,3544           05353        P57JUMP            TC       PHASCHNG                              
041754,002227: 15,3545           04024                           OCT      04024                                 
041755,002228: 
041756,002229: 15,3546           05516                           TC       DOWNFLAG                              #  ATTFLG CLEAR - RESET INTALIGN FLAG
041757,002230: 15,3547           00205                           ADRES    INITALGN                              
041758,002231: 15,3550           36250                           CAF      THREE                                 
041759,002232: 15,3551           71144                           MASK     OPTION2                               #  BRANCH ON OPTION CODE
041760,002233: 15,3552           50000                           INDEX    A                                     
041761,002234: 15,3553           13554                           TCF      +1                                    
041762,002235: 15,3554           13560                           TCF      P57OPT0                               #  OPTION IS 0
041763,002236: 15,3555           13601                           TCF      P57OPT1                               #  OPTION IS 1
041764,002237: 15,3556           13617                           TCF      P57OPT2                               #  OPTION IS 2
041765,002238: 15,3557           13620                           TCF      P57OPT3                               #  OPTION IS 3
041766,002239: 

Page 975

041768,002241:                                                                                                  #  OPTION 0, GET TWO ATTITUDE VECS
041769,002242: 
041770,002243: 15,3560           06042        P57OPT0            TC       INTPRET                               
041771,002244: 15,3561           77775                           VLOAD                                          
041772,002245: 15,3562           02237                                    YNBSAV                                #  Y AND Z ATTITUDE WILL BE PUT IN REF
041773,002246: 15,3563           27246                           STOVL    VEC1                                  
041774,002247: 15,3564           02245                                    ZNBSAV                                
041775,002248: 15,3565           37254                           STCALL   VEC2                                  
041776,002249: 15,3566           47541                                    CDUTRIG                               
041777,002250: 15,3567           77624                           CALL                                           
041778,002251: 15,3570           20030                                    CALCSMSC                              #  COMPUTE SC AXIS WRT PRESENT SM
041779,002252: 15,3571           77775                           VLOAD                                          
041780,002253: 15,3572           02673                                    YNB                                   
041781,002254: 15,3573           26761        SAMETYP            STOVL    STARSAV1                              #  Y SC AXIS WRT PRESENT SM
041782,002255: 15,3574           02701                                    ZNB                                   
041783,002256: 15,3575           36767                           STCALL   STARSAV2                              #  Z SC AXIS WRT PRESENT SM
041784,002257: 15,3576           33445                                    MFREF                                 #  TRANSFORM VEC1,2 FROM MF TO REF
041785,002258: 15,3577           77650                           GOTO                                           
041786,002259: 15,3600           33064                                    SURFLINE                              
041787,002260: 
041788,002261:                                                                                                  #  OPTION 1, GET LANDING SITE AND Z-ATTITUDE VEC
041789,002262: 
041790,002263: 15,3601           06042        P57OPT1            TC       INTPRET                               
041791,002264: 15,3602           53575                           VLOAD    UNIT                                  
041792,002265: 15,3603           02023                                    RLS                                   #  LANDING SITE VEC
041793,002266: 15,3604           27246                           STOVL    VEC1                                  
041794,002267: 15,3605           02245                                    ZNBSAV                                #  Z ATTITUDE VEC
041795,002268: 15,3606           37254                           STCALL   VEC2                                  
041796,002269: 15,3607           47541                                    CDUTRIG                               
041797,002270: 15,3610           77624                           CALL                                           
041798,002271: 15,3611           20030                                    CALCSMSC                              #  GET ZNB AXIS WRT PRES SM FOR STARSAV2
041799,002272: 15,3612           45175                           VLOAD    CALL                                  
041800,002273: 15,3613           02231                                    GSAV                                  #  TRANS GSAV FROM NB TO SM FOR STARSAV1
041801,002274: 15,3614           47663                                    CDU*NBSM                              
041802,002275: 15,3615           77650                           GOTO                                           
041803,002276: 15,3616           33573                                    SAMETYP                               #  NOW DO SAME AS OPTION 0
041804,002277: 

Page 976

041806,002279:                                                                                                  #  OPTION 2, GET TWO STAR SIGHTINGS
041807,002280: 
041808,002281: 15,3617           13030        P57OPT2            TCF      2STARS                                #  DO SIGHTING ON 2 STARS
041809,002282: 
041810,002283:                                                                                                  #  OPTION 3, GET LANDING SITE VEC AND ONE STAR SIGHTING
041811,002284: 
041812,002285: 15,3620           06042        P57OPT3            TC       INTPRET                               
041813,002286: 15,3621           53575                           VLOAD    UNIT                                  
041814,002287: 15,3622           02023                                    RLS                                   #  LANDING SITE VEC
041815,002288: 15,3623           03246                           STORE    VEC1                                  
041816,002289: 15,3624           27254                           STOVL    VEC2                                  #  DUMMY VEC2 FOR 2ND CATALOG STAR
041817,002290: 15,3625           02231                                    GSAV                                  #  GRAVITY VEC NB
041818,002291: 15,3626           77624                           CALL                                           
041819,002292: 15,3627           47663                                    CDU*NBSM                              #  TRANS GSAV FROM NB TO SM FOR STARSAV1
041820,002293: 15,3630           36761                           STCALL   STARSAV1                              
041821,002294: 15,3631           33445                                    MFREF                                 #  STARSAV2 IS STORED AS 2ND OBSERVED STAR
041822,002295: 15,3632           77776                           EXIT                                           
041823,002296: 15,3633           13032                           TCF      1STAR                                 #  1STAR GET VEC2,STARSAV2,GOES TO SURFLINE
041824,002297: 
041825,002298: 15,3634           01206        VB05N06            VN       506                                   
041826,002299: 

Page 977

041828,002301:                                                                                                  #  CHECK IMODES30 TO VARIFY IMU IS ON
041829,002302: 
041830,002303: 15,3635           41277        IMUCHK             CS       IMODES30                              
041831,002304: 15,3636           74743                           MASK     BIT9                                  
041832,002305: 15,3637           10000                           CCS      A                                     #  IS IMU ON
041833,002306: 15,3640           13644                           TCF      +4                                    #  YES
041834,002307: 
041835,002308: 15,3641           05567                           TC       ALARM                                 #  NO, SEND ALARM AND EXIT
041836,002309: 15,3642           00210                           OCT      210                                   
041837,002310: 15,3643           06001                           TC       GOTOPOOH                              
041838,002311: 
041839,002312: 15,3644           05504                           TC       UPFLAG                                
041840,002313: 15,3645           00007                           ADRES    IMUSE                                 #  SET IMUSE FLAG
041841,002314: 
041842,002315: 15,3646           04631                           TC       SWRETURN                              
041843,002316: 
041844,002317: 04,2757                                           BANK     04                                    
041845,002318: 04,2000                                           SETLOC   AOTMARK2                              
041846,002319: 04,2000                                           BANK                                           
041847,002320: 04,2757                                           COUNT*   $$/P57                                
041848,002321: 
041849,002322: 04,2757           77220        LSORIENT           STQ      VLOAD                                 
041850,002323: 04,2760           02746                                    QMAJ                                  
041851,002324: 04,2761           01555                                    RRECTCSM                              
041852,002325: 04,2762           47235                           VXV      VXV                                   
041853,002326: 04,2763           01563                                    VRECTCSM                              
041854,002327: 04,2764           03607                                    XSMD                                  
041855,002328: 04,2765           77656                           UNIT                                           
041856,002329: 04,2766           03623                           STORE    ZSMD                                  
041857,002330: 04,2767           53435                           VXV      UNIT                                  
041858,002331: 04,2770           03607                                    XSMD                                  
041859,002332: 04,2771           37615                           STCALL   YSMD                                  
041860,002333: 04,2772           02746                                    QMAJ                                  
041861,002334: 

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