Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

040846,000002:                                                                                                  ## Copyright:   Public domain.
040847,000003:                                                                                                  ## Filename:    P51-P53.agc
040848,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
040849,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
040850,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
040851,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
040852,000008:                                                                                                  ##              that the code format has been changed to conform to the
040853,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
040854,000010:                                                                                                  ##              original YUL assembler.
040855,000011:                                                                                                  ## Reference:   pp. 923-981
040856,000012:                                                                                                  ## Assembler:   yaYUL
040857,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
040858,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
040859,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
040860,000016:                                                                                                  ##              2016-12-07 MAS  Began transcription.
040861,000017:                                                                                                  ##              2016-12-08 MAS  Finished updates for Luminary 210.
040862,000018:                                                                                                  ##              2016-12-11 HG   Fix operand FLT69FLG -> FLT59FLG
040863,000019:                                                                                                  ##                                  Operator TCF GOTOPOOH -> TC GOTOPOOH   
040864,000020:                                                                                                  ##                                           TC  CHKOUT   -> TCF CHKOUT   
040865,000021:                                                                                                  ##              2016-12-26 RSB  Comment-text proofed using ProoferComments
040866,000022:                                                                                                  ##                              and corrected errors found.
040867,000023:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
040868,000024:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
040869,000025: 

Page 923

040871,000027:                                                                                                  #  PROGRAM NAME- PROG52                                                                   DATE- JAN 9, 1967
040872,000028:                                                                                                  #  MOD NO- 0                                                                              LOG SECTION- P51-P53
040873,000029:                                                                                                  #  MODIFICATION BY- LONSKE                                                                ASSEMBLY- SUNDANCE REV 46
040874,000030: 
040875,000031:                                                                                                  #  FUNCTIONAL DESCRIPTION-
040876,000032: 
040877,000033:                                                                                                  #       ALIGNS THE IMU TO ONE OF THREE ORIENTATIONS SELECTED BY THE ASTRONAUT. THE PRESENT IMU ORIENTATION IS KNOWN
040878,000034:                                                                                                  #  AND IS STORED IN REFSMMAT. THE THREE POSSIBLE ORIENTATIONS MAY BE_
040879,000035: 
040880,000036:                                                                                                  #       (A) PREFERRED ORIENTATION
040881,000037: 
040882,000038:                                                                                                  #        AN OPTIMUM ORIENTATION FOR A PREVIOUSLY CALCULATED MANUEVER. THIS ORIENTATION MUST BE CALCULATED AND
040883,000039:                                                                                                  #       STORED BY A PREVIOUSLY SELECTED PROGRAM.
040884,000040: 
040885,000041:                                                                                                  #       (B) NOMINAL ORIENTATION
040886,000042: 
040887,000043:                                                                                                  #           X   =  UNIT ( R )
040888,000044:                                                                                                  #           -SM
040889,000045: 
040890,000046:                                                                                                  #           Y  =  UNIT (V X R)
040891,000047:                                                                                                  #            SM
040892,000048: 
040893,000049:                                                                                                  #           Z   =  UNIT (X   X  Y  )
040894,000050:                                                                                                  #            SM           SM     SM
040895,000051: 
040896,000052:                                                                                                  #           WHERE_
040897,000053:                                                                                                  #            R = THE GEOCENTRIC RADIUS VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
040898,000054:                                                                                                  #            -
040899,000055: 
040900,000056:                                                                                                  #            V = THE INERTIAL VELOCITY VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
040901,000057:                                                                                                  #            -
040902,000058: 
040903,000059:                                                                                                  #       (C) REFSMMAT ORIENTATION
040904,000060: 
040905,000061:                                                                                                  #           (D)  LANDING SITE - THIS IS NOT AVAILIBLE IN SUNDANCE
040906,000062: 
040907,000063:                                                                                                  #        THIS SELECTION CORRECTS THE PRESENT IMU ORIENTATION. THE PRESENT ORIENTATION DIFFERS FROM THAT TO WHICH IT
040908,000064:                                                                                                  #       WAS LAST ALIGNED ONLY DUE TO GYRO DRIFT(I.E. NEITHER GIMBAL LOCK NOR IMU POWER INTERRUPTION HAS OCCURED
040909,000065:                                                                                                  #       SINCE THE LAST ALIGNMENT).
040910,000066: 
040911,000067:                                                                                                  #       AFTER A IMU ORIENTATION HAS BEEN SELECTED ROUTINE S52.2 IS OPERATED TO COMPUTE THE GIMBAL ANGLES USING THE
040912,000068:                                                                                                  #  NEW ORIENTATION AND THE PRESENT VEHICLE ATTITUDE. CAL52A THEN USES THESE ANGLES, STORED IN THETAD,+1,+2, TO
040913,000069:                                                                                                  #  COARSE ALIGN THE IMU. THE STAR SELECTION ROUTINE, R56, IS THEN OPERATED. IF 2 STARS ARE NOT AVAILABLE AN ALARM
040914,000070:                                                                                                  #  IS FLASHED TO NOTIFY THE ASTRONAUT. AT THIS POINT THE ASTRONAUT WILL MANUEVER THE VEHICLE AND SELECT 2 STARS
040915,000071:                                                                                                  #  EITHER MANUALLY OR AUTOMATICALLY. AFTER 2 STARS HAVE BEEN SELECTED THE IMU IS FINE ALIGNED USING ROUTINE R51. IF
040916,000072:                                                                                                  #  THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING(INDICATED BY RNDVZFLG) P20 IS DISPLAYED. OTHERWISE P00 IS
040917,000073:                                                                                                  #  REQUESTED.
040918,000074: 
040919,000075:                                                                                                  #  CALLING SEQUENCE-

Page 924

040921,000077:                                                                                                  #       THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
040922,000078: 
040923,000079:                                                                                                  #  SUBROUTINES CALLED-
040924,000080: 
040925,000081:                                                                                                  #      1. FLAGDOWN      7. S52.2           13. NEWMODEX
040926,000082:                                                                                                  #      2. R02BOTH       8. CAL53A          14. PRIOLARM
040927,000083:                                                                                                  #      3. GOPERF4       9. FLAGUP
040928,000084:                                                                                                  #      4. MATMOVE      10. R56
040929,000085:                                                                                                  #      5. GOFLASH      11. R51
040930,000086:                                                                                                  #      6. S52.3        12. GOPERF3
040931,000087: 
040932,000088:                                                                                                  #  NORMAL EXIT MODES-
040933,000089: 
040934,000090:                                                                                                  #      EXITS TO ENDOFJOB
040935,000091: 
040936,000092:                                                                                                  #  ALARM OR ABORT EXIT MODES-
040937,000093: 
040938,000094:                                                                                                  #      NONE
040939,000095: 
040940,000096:                                                                                                  #  OUTPUT-
040941,000097: 
040942,000098:                                                                                                  #      THE FOLLOWING MAY BE FLASHED ON THE DSKY
040943,000099:                                                                                                  #         1. IMU ORIENTATION CODE
040944,000100:                                                                                                  #         2. ALARM CODE 215 -PREFERRED IMU ORIENTATION NOT SPECIFIED
040945,000101:                                                                                                  #         3. TIME OF NEXT IGNITION
040946,000102:                                                                                                  #         4. GIMBAL ANGLES
040947,000103:                                                                                                  #         5. ALARM CODE 405 -TWO STARS NOT AVAILABLE
040948,000104:                                                                                                  #         6. PLEASE PERFORM P00
040949,000105:                                                                                                  #      THE MODE DISPLAY MAY BE CHANGED TO 20
040950,000106: 
040951,000107:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
040952,000108: 
040953,000109:                                                                                                  #      PFRATFLG SHOULD BE SET IF A PREFERRED ORIENTATION HAS BEEN COMPUTED.IF IT HAS BEEN COMPUTED IT IS STORED IN
040954,000110:                                                                                                  #      XSMD,YSMD,ZSMD.
040955,000111:                                                                                                  #      RNDVZFLG INDICATES WHETHER THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING.
040956,000112: 
040957,000113:                                                                                                  #  DEBRIS-
040958,000114: 
040959,000115:                                                                                                  #      WORK AREA
040960,000116: 15,2000                                           SETLOC   P50S                                  
040961,000117: 15,2000                                           BANK                                           
040962,000118: 
040963,000119: 15,2201  E5,1755                                  EBANK=   BESTI                                 
040964,000120: 15,2201                                           COUNT*   $$/P52                                
040965,000121: 15,2201           04607        PROG52             TC       BANKCALL                              
040966,000122: 15,2202           33757                           CADR     R02BOTH                               #  IMU STATUS CHECK
040967,000123: 15,2203           34741                           CAF      PFRATBIT                              
040968,000124: 15,2204           70076                           MASK     FLAGWRD2                              #  IS PFRATFLG SET?
040969,000125: 15,2205           10000                           CCS      A                                     
040970,000126: 15,2206           02211                           TC       P52A                                  #  YES

Page 925

040972,000128: 15,2207           36266                           CAF      THREE                                 #  DISPLAY REFSMMAT OPTION 3
040973,000129: 15,2210           02212                           TC       P52A       +1                         
040974,000130: 15,2211           34744        P52A               CAF      BIT1                                  
040975,000131: 15,2212           55144                           TS       OPTION2                               
040976,000132: 15,2213           34744        P52B               CAF      BIT1                                  
040977,000133: 15,2214           04607                           TC       BANKCALL                              #  FLASH OPTION CODE AND ORIENTATION CODE
040978,000134: 15,2215           20725                           CADR     GOPERF4R                              #  FLASH V04N06
040979,000135: 15,2216           06001                           TC       GOTOPOOH                              
040980,000136: 15,2217           12224                           TCF      +5                                    #  V33-PROCEED
040981,000137: 15,2220           02213                           TC       P52B                                  #  NEW CODE - NEW ORIENTATION CODE INPUT
040982,000138: 15,2221           05355                           TC       PHASCHNG                              #  DISPLAY RETURN
040983,000139: 15,2222           00014                           OCT      00014                                 
040984,000140: 15,2223           05146                           TC       ENDOFJOB                              
040985,000141: 
040986,000142: 15,2224           31144                           CA       OPTION2                               
040987,000143: 15,2225           76266                           MASK     THREE                                 
040988,000144: 15,2226           50000                           INDEX    A                                     
040989,000145: 15,2227           02230                           TC       +1                                    
040990,000146: 15,2230           12236                           TCF      OPT4                                  #  OPTION 4 LANDING SITE
040991,000147: 15,2231           12310                           TCF      P52H                                  #  OPTION 1 PREFERRED
040992,000148: 15,2232           12243                           TCF      P52T                                  #  OPTION 2 NOMINAL
040993,000149: 15,2233           06060        P52E               TC       INTPRET                               #  OPTION 3 REFSMMAT
040994,000150: 15,2234           77650                           GOTO                                           
040995,000151: 15,2235           32321                                    P52F                                  #  GO DO R51
040996,000152: 
040997,000153: 15,2236           34732        OPT4               CAF      EBANK4                                #  SET EBANK TO USE TLAND
040998,000154: 15,2237           54003                           TS       EBANK                                 
040999,000155: 15,2240  E4,1426                                  EBANK=   TLAND                                 
041000,000156: 15,2240           00006                           EXTEND                                         
041001,000157: 15,2241           31427                           DCA      TLAND                                 #  IF OPTION 4 DISPLAY TLAND
041002,000158: 15,2242           12245                           TCF      P52T       +2                         
041003,000159: 
041004,000160: 15,2243           00006        P52T               EXTEND                                         
041005,000161: 15,2244           34746                           DCA      NEG0                                  
041006,000162: 15,2245           53045                           DXCH     DSPTEM1                               
041007,000163: 15,2246           35005                           CAF      EBANK5                                #  RESTORE EBANK AFTER USE OF TLAND
041008,000164: 15,2247           54003                           TS       EBANK                                 
041009,000165: 15,2250  E5,1774                                  EBANK=   TALIGN                                
041010,000166: 15,2250           32325                           CAF      V06N34*                               
041011,000167: 15,2251           04607                           TC       BANKCALL                              
041012,000168: 15,2252           20471                           CADR     GOFLASH                               
041013,000169: 15,2253           06001                           TC       GOTOPOOH                              
041014,000170: 15,2254           02256                           TC       +2                                    
041015,000171: 15,2255           02250                           TC       -5                                    
041016,000172: 15,2256           53045                           DXCH     DSPTEM1                               
041017,000173: 15,2257           00006                           EXTEND                                         
041018,000174: 15,2260           62262                           BZMF     +2                                    #  IF TIME ZERO OR NEG USE TIME2
041019,000175: 15,2261           12264                           TCF      +3                                    
041020,000176: 15,2262           00006                           EXTEND                                         
041021,000177: 15,2263           30025                           DCA      TIME2                                 

Page 926

041023,000179: 15,2264           53775                           DXCH     TALIGN                                
041024,000180: 15,2265           31144        P52V               CA       OPTION2                               
041025,000181: 15,2266           74743                           MASK     BIT2                                  
041026,000182: 15,2267           10000                           CCS      A                                     
041027,000183: 15,2270           02274                           TC       P52W                                  
041028,000184: 15,2271           06060                           TC       INTPRET                               #  OPTION 4 - GET LS ORIENTATION
041029,000185: 15,2272           77650                           GOTO                                           
041030,000186: 15,2273           32355                                    P52LS                                 
041031,000187: 

Page 927

041033,000189:                                                                                                  #  START ALIGNMENT 
041034,000190: 
041035,000191: 15,2274           06060        P52W               TC       INTPRET                               
041036,000192: 15,2275           45145                           DLOAD    CALL                                  #  PICK UP ALIGN TIME
041037,000193: 15,2276           02775                                    TALIGN                                #  COMPUTE NOMINAL IMU
041038,000194: 15,2277           42740                                    S52.3                                 #   ORIENTATION
041039,000195: 15,2300           77624        P52D               CALL                                           #  READ VEHICLE ATTITUDE AND
041040,000196: 15,2301           42707                                    S52.2                                 #   COMPUTE GIMBAL ANGLES
041041,000197: 15,2302           77776                           EXIT                                           
041042,000198: 15,2303           35001                           CAF      V06N22                                
041043,000199: 15,2304           04607                           TC       BANKCALL                              #  DISPLAY GIMBAL ANGLES
041044,000200: 15,2305           20471                           CADR     GOFLASH                               
041045,000201: 15,2306           06001                           TC       GOTOPOOH                              
041046,000202: 15,2307           12326                           TCF      COARSTYP                              #  V33-PROCEED, SEE IF GYRO TORQUE COARSE
041047,000203: 15,2310           06060        P52H               TC       INTPRET                               
041048,000204: 15,2311           77650                           GOTO                                           
041049,000205: 15,2312           32300                                    P52D                                  
041050,000206: 15,2313           06060        REGCOARS           TC       INTPRET                               
041051,000207: 15,2314           77624                           CALL                                           #  DO COARSE ALIGN
041052,000208: 15,2315           31316                                    CAL53A                                #   ROUTINE
041053,000209: 15,2316           43014        COARSRET           SET      CLEAR                                 
041054,000210: 15,2317           01462                                    REFSMFLG                              
041055,000211: 15,2320           01273                                    PFRATFLG                              
041056,000212: 15,2321           77624        P52F               CALL                                           
041057,000213: 15,2322           31023                                    R51                                   
041058,000214: 15,2323           77776        P52OUT             EXIT                                           
041059,000215: 15,2324           06001                           TC       GOTOPOOH                              
041060,000216: 15,2325     4777               VB05N09            =        V05N09                                
041061,000217: 15,2325           01442        V06N34*            VN       634                                   
041062,000218: 

Page 928

041064,000220:                                                                                                  #  CHECK FOR GRRO TORQUE COARSE ALIGNMENT
041065,000221: 15,2326           32354        COARSTYP           CAF      OCT13                                 
041066,000222: 15,2327           04607                           TC       BANKCALL                              #  DISPLAY V 50N25 WITH COARSE ALIGN OPTION
041067,000223: 15,2330           20635                           CADR     GOPERF1                               
041068,000224: 15,2331           16001                           TCF      GOTOPOOH                              #  V34-TERMIN&OE
041069,000225: 15,2332           12313                           TCF      REGCOARS                              #  V33-NORMAL COARSE
041070,000226: 15,2333           06060                           TC       INTPRET                               #  V32-GYRO TORQUE COARSE
041071,000227: 15,2334           64375                           VLOAD    MXV                                   
041072,000228: 15,2335           03607                                    XSMD                                  #  GET SM(DESIRED) WRT SM(PRESENT)
041073,000229: 15,2336           01732                                    REFSMMAT                              
041074,000230: 15,2337           77656                           UNIT                                           
041075,000231: 15,2340           26665                           STOVL    XDC                                   
041076,000232: 15,2341           03615                                    YSMD                                  
041077,000233: 15,2342           53521                           MXV      UNIT                                  
041078,000234: 15,2343           01732                                    REFSMMAT                              
041079,000235: 15,2344           26673                           STOVL    YDC                                   
041080,000236: 15,2345           03623                                    ZSMD                                  
041081,000237: 15,2346           53521                           MXV      UNIT                                  
041082,000238: 15,2347           01732                                    REFSMMAT                              
041083,000239: 15,2350           36701                           STCALL   ZDC                                   
041084,000240: 15,2351           31174                                    GYCOARS                               
041085,000241: 15,2352           77650                           GOTO                                           
041086,000242: 15,2353           32323                                    P52OUT                                
041087,000243: 15,2354           00013        OCT13              OCT      13                                    
041088,000244: 

Page 929

041090,000246:                                                                                                  #  COMPUTE LANDING ORIENTATION FOR OPTION 4
041091,000247: 15,2355           43014        P52LS              SET      CLEAR                                 #  GET LANDING SITE ORIENTATION
041092,000248: 15,2356           01463                                    LUNAFLAG                              
041093,000249: 15,2357           00662                                    ERADFLAG                              #  TO PICK UP RLS
041094,000250: 15,2360           77201                           SETPD    VLOAD                                 
041095,000251: 15,2361           00001                                    0                                     
041096,000252: 15,2362           02021                                    RLS                                   #  PICK UP LANDING SITE VEC IN MF
041097,000253: 15,2363           41525                           PDDL     PUSH                                  #  RLS PD 0-5
041098,000254: 15,2364           02775                                    TALIGN                                
041099,000255: 15,2365           36027                           STCALL   TLAND                                 #  JAM ALIGN TIME IN TLAND FOR OPTION 4
041100,000256: 
041101,000257: 15,2366           55716                                    RP-TO-R                               #  TRANS RLS TO REF
041102,000258: 15,2367           77742                           VSR2                                           
041103,000259: 15,2370           16032                           STODL    ALPHAV                                #  INPUT TO LAT-LONG
041104,000260: 15,2371           02775                                    TALIGN                                
041105,000261: 15,2372           77624                           CALL                                           
041106,000262: 15,2373           30455                                    N89DISP                               
041107,000263: 15,2374           53575                           VLOAD    UNIT                                  #  COMPUTE LANDING SITE ORIENT (XSMD)
041108,000264: 15,2375           02032                                    ALPHAV                                
041109,000265: 15,2376           37607                           STCALL   XSMD                                  
041110,000266: 15,2377           11014                                    LSORIENT                              
041111,000267: 15,2400           77650                           GOTO                                           
041112,000268: 15,2401           32300                                    P52D                                  #  NOW GO COMPUTE GIMBAL ANGLES
041113,000269: 
041114,000270: 13,2000                                           SETLOC   P50S2                                 
041115,000271: 13,2000                                           BANK                                           
041116,000272: 
041117,000273: 13,2374           77773        MATMOVE            VLOAD*                                         
041118,000274: 13,2375           00001                                    0,1                                   
041119,000275: 13,2376           10001                           STORE    0,2                                   
041120,000276: 13,2377           77773                           VLOAD*                                         
041121,000277: 13,2400           00007                                    6D,1                                  
041122,000278: 13,2401           10007                           STORE    6D,2                                  
041123,000279: 13,2402           77773                           VLOAD*                                         
041124,000280: 13,2403           00015                                    12D,1                                 
041125,000281: 13,2404           10015                           STORE    12D,2                                 
041126,000282: 13,2405           77616                           RVQ                                            
041127,000283: 

Page 930

041129,000285:                                                                                                  #  SUBROUTINE TO CALCULATE AND DISPLAY THE LUNAR LANDING SITE
041130,000286: 
041131,000287: 14,2000                                           SETLOC   P50S1                                 
041132,000288: 14,2000                                           BANK                                           
041133,000289: 14,2455  E5,1642                                  EBANK=   XSM                                   
041134,000290: 
041135,000291: 14,2455           77620        N89DISP            STQ                                            
041136,000292: 14,2456           02746                                    QMAJ                                  
041137,000293: 14,2457           35242                           STCALL   SITIME                                #  STORE TIME
041138,000294: 14,2460           26406                                    LAT-LONG                              
041139,000295: 14,2461           70545                           DLOAD    SR1                                   
041140,000296: 14,2462           01122                                    LONG                                  
041141,000297: 14,2463           16711                           STODL    LANDLONG                              
041142,000298: 14,2464           01124                                    ALT                                   
041143,000299: 14,2465           16713                           STODL    LANDALT                               
041144,000300: 14,2466           01120                                    LAT                                   
041145,000301: 14,2467           02707                           STORE    LANDLAT                               
041146,000302: 14,2470           77776                           EXIT                                           
041147,000303: 
041148,000304: 14,2471           32514        LSDISP             CAF      V06N89*                               #  DISPLAY LAT,LONG/2,ALT
041149,000305: 14,2472           04607                           TC       BANKCALL                              
041150,000306: 14,2473           20471                           CADR     GOFLASH                               
041151,000307: 14,2474           16001                           TCF      GOTOPOOH                              #  V34-TERMINATE-EXIT P57
041152,000308: 14,2475           12477                           TCF      +2                                    #  V33-PROCEED- ACCEPT LS DATA
041153,000309: 14,2476           12471                           TCF      LSDISP                                #  V32 OR E- LOOK AGAIN AND/OR LOAD NEW LS
041154,000310: 
041155,000311: 14,2477           06060                           TC       INTPRET                               
041156,000312: 14,2500           72545                           DLOAD    SL1                                   
041157,000313: 14,2501           02711                                    LANDLONG                              
041158,000314: 14,2502           15122                           STODL    LONG                                  
041159,000315: 14,2503           02713                                    LANDALT                               
041160,000316: 14,2504           15124                           STODL    ALT                                   
041161,000317: 14,2505           02707                                    LANDLAT                               
041162,000318: 14,2506           15120                           STODL    LAT                                   
041163,000319: 14,2507           01242                                    SITIME                                #  PICK UP TIME
041164,000320: 14,2510           77624                           CALL                                           #  GET RLS BACK FROM LAT,LONG, ALT
041165,000321: 14,2511           26457                                    LALOTORV                              #  RLS B-29 IN MPAC AND ALPHAV
041166,000322: 14,2512           77650                           GOTO                                           
041167,000323: 14,2513           02746                                    QMAJ                                  
041168,000324: 14,2514           01531        V06N89*            VN       689                                   
041169,000325: 

Page 931

041171,000327:                                                                                                  #  NAME -S50 ALIAS  LOCSAM
041172,000328:                                                                                                  #  BY
041173,000329:                                                                                                  #  VINCENT
041174,000330:                                                                                                  #  FUNCTION - COMPUTE INPUTS FOR PICAPAR  AND PLANET
041175,000331: 
041176,000332:                                                                                                  #           DEFINE
041177,000333: 
041178,000334: 
041179,000335:                                                                                                  #           U    = UNIT( SUN WRT EARTH)
041180,000336:                                                                                                  #            ES
041181,000337: 
041182,000338:                                                                                                  #           U    =UNIT( MOON WRT EARTH)
041183,000339:                                                                                                  #            EM
041184,000340: 
041185,000341:                                                                                                  #           R    =POSITION VECTOR OF LEM
041186,000342:                                                                                                  #            L
041187,000343: 
041188,000344:                                                                                                  #           R    =MEAN DISTANCE (384402KM) BETWEEN EARTH AND MOON
041189,000345:                                                                                                  #            EM
041190,000346: 
041191,000347:                                                                                                  #           P    =RATIO   R   /(DISTANCE SUN TO EARTH)    >.00257125
041192,000348:                                                                                                  #                           EM
041193,000349: 
041194,000350:                                                                                                  #           R    =EQUATORIAL RADIUSS (6378.166KM) OF EARTH
041195,000351:                                                                                                  #            E
041196,000352: 
041197,000353:                                                                                                  #           LOCSAM  COMPUTES IN EARTH INFLUENCE
041198,000354: 
041199,000355:                                                                                                  #       VSUN   =   U
041200,000356:                                                                                                  #                   ES
041201,000357: 
041202,000358:                                                                                                  #      VEARTH  =   -UNIT( R  )
041203,000359:                                                                                                  #                          L
041204,000360: 
041205,000361:                                                                                                  #      VMOON   =    UNIT(R  .U   - R  )
041206,000362:                                                                                                  #                         EM  EM    L
041207,000363: 
041208,000364:                                                                                                  #      CSUN    =   COS 90
041209,000365: 
041210,000366:                                                                                                  #      CEARTH  =    COS(5 + ARCSIN(R /MAG(R )))
041211,000367:                                                                                                  #                                   E      L
041212,000368: 
041213,000369:                                                                                                  #      CMOON   =    COS 5
041214,000370: 
041215,000371: 
041216,000372:                                                                                                  #  INPUT -  TIME IN MPAC
041217,000373:                                                                                                  #  OUTPUT - LISTED ABOVE
041218,000374:                                                                                                  #  SUBROUTINES -LSPOS,LEMPREC
041219,000375:                                                                                                  #  DEBRIS - VAC AREA ,TSIGHT
041220,000376: 

Page 932

041222,000378: 14,2515                                           COUNT*   $$/LOSAM                              
041223,000379: 
041224,000380: 14,2515  14,2515               S50                =        LOCSAM                                
041225,000381: 14,2515           77620        LOCSAM             STQ                                            
041226,000382: 14,2516           02745                                    QMIN                                  
041227,000383: 14,2517           37562                           STCALL   TSIGHT                                
041228,000384: 14,2520           33646                                    LSPOS                                 
041229,000385: 14,2521           77745                           DLOAD                                          
041230,000386: 14,2522           03562                                    TSIGHT                                
041231,000387: 14,2523           34041                           STCALL   TDEC1                                 
041232,000388: 14,2524           27115                                    LEMPREC                               
041233,000389: 14,2525           61131                           SSP      TIX,2                                 
041234,000390: 14,2526           00052                                    S2                                    
041235,000391: 14,2527           00000                                    0                                     
041236,000392: 14,2530           30552                                    MOONCNTR                              
041237,000393: 14,2531           74375        EARTCNTR           VLOAD    VXSC                                  
041238,000394: 14,2532           02723                                    VMOON                                 
041239,000395: 14,2533           30001                                    RSUBEM                                
041240,000396: 14,2534           52372                           VSL1     VSU                                   
041241,000397: 14,2535           00001                                    RATT                                  
041242,000398: 14,2536           77656                           UNIT                                           
041243,000399: 14,2537           26723                           STOVL    VMOON                                 
041244,000400: 14,2540           00001                                    RATT                                  
041245,000401: 14,2541           57456                           UNIT     VCOMP                                 
041246,000402: 14,2542           16707                           STODL    VEARTH                                
041247,000403: 14,2543           30005                                    RSUBE                                 
041248,000404: 14,2544           77624                           CALL                                           
041249,000405: 14,2545           30604                                    OCCOS                                 
041250,000406: 14,2546           14017                           STODL    CEARTH                                
041251,000407: 14,2547           30613                                    CSS5                                  
041252,000408: 14,2550           34023                           STCALL   CMOON                                 
041253,000409: 14,2551           30577                                    ENDSAM                                
041254,000410: 14,2552           74375        MOONCNTR           VLOAD    VXSC                                  
041255,000411: 14,2553           02723                                    VMOON                                 
041256,000412: 14,2554           30007                                    ROE                                   
041257,000413: 14,2555           53445                           BVSU     UNIT                                  
041258,000414: 14,2556           02715                                    VSUN                                  
041259,000415: 14,2557           26715                           STOVL    VSUN                                  
041260,000416: 14,2560           02723                                    VMOON                                 
041261,000417: 14,2561           53361                           VXSC     VAD                                   
041262,000418: 14,2562           30001                                    RSUBEM                                
041263,000419: 14,2563           00001                                    RATT                                  
041264,000420: 14,2564           57456                           UNIT     VCOMP                                 
041265,000421: 14,2565           26707                           STOVL    VEARTH                                
041266,000422: 14,2566           00001                                    RATT                                  
041267,000423: 14,2567           57456                           UNIT     VCOMP                                 
041268,000424: 14,2570           16723                           STODL    VMOON                                 
041269,000425: 14,2571           30003                                    RSUBM                                 
041270,000426: 14,2572           77624                           CALL                                           
041271,000427: 14,2573           30604                                    OCCOS                                 

Page 933

041273,000429: 14,2574           14023                           STODL    CMOON                                 
041274,000430: 14,2575           30613                                    CSS5                                  
041275,000431: 14,2576           00017                           STORE    CEARTH                                
041276,000432: 14,2577           77745        ENDSAM             DLOAD                                          
041277,000433: 14,2600           30615                                    CSSUN                                 
041278,000434: 14,2601           00021                           STORE    CSUN                                  
041279,000435: 14,2602           77650                           GOTO                                           
041280,000436: 14,2603           02745                                    QMIN                                  
041281,000437: 14,2604           70471        OCCOS              DDV      SR1                                   
041282,000438: 14,2605           00045                                    36D                                   
041283,000439: 14,2606           43336                           ASIN     DAD                                   
041284,000440: 14,2607           30617                                    5DEGREES                              
041285,000441: 14,2610           70546                           COS      SR1                                   
041286,000442: 14,2611           77616                           RVQ                                            
041287,000443: 14,2612                        CEARTH             =        14D                                   
041288,000444: 14,2612                        CSUN               =        16D                                   
041289,000445: 14,2612                        CMOON              =        18D                                   
041290,000446: 14,2612           07760 14473  CSS5               2DEC     .2490475                              #  (COS 5)/4
041291,000447: 
041292,000448: 14,2614           04000 00000  CSSUN              2DEC     .125                                  #  (COS60)/4
041293,000449: 
041294,000450: 14,2616           00343 21616  5DEGREES           2DEC     .013888889                            #     SCALED IN REVS
041295,000451: 

Page 934

041297,000453:                                                                                                  #  PROGRAM NAME - R56              DATE  DEC 20 66
041298,000454:                                                                                                  #  MOD 1                           LOG SECTION P51-P53
041299,000455:                                                                                                  #                                  ASSEMBLY  SUNDISK  REV40
041300,000456:                                                                                                  #  BY KEN VINCENT
041301,000457: 
041302,000458:                                                                                                  #  FUNCTION
041303,000459:                                                                                                  #    THIS PROGRAM READ THE IMU-CDUS AND COMPUTES THE VEHICLE ORIENTATION
041304,000460:                                                                                                  #  WITH RESPECT TO INERTIAL SPACE. IT THEN COMPUTES THE SHAFT AXIS (SAX)
041305,000461:                                                                                                  #  WITH RESPECT TO REFERENCE INERTIAL. EACH STAR IN THE CATALOG IS TESTED
041306,000462:                                                                                                  #  TO DETERMINE IF IT IS OCCULTED BY EITHER THE EARTH,SUN OR MOON. IF A
041307,000463:                                                                                                  #  STAR IS NOT OCCULTED  THEN IT IS PAIRED WITH ALL STAR OF LOWER INDEX.
041308,000464:                                                                                                  #  THE PAIRED STAR  IS TESTED FOR OCCULTATION. PAIRS OF STARS THAT PASS
041309,000465:                                                                                                  #  THE OCCULTATION TESTS ARE TESTED FOR GOOD SEPARATION.A PAIR OF STARS
041310,000466:                                                                                                  #  HAVE GOOD SEPERATION IF THE ANGLE BETWEEN THEM IS LESS THAN 100 DEGREES
041311,000467:                                                                                                  #  AND MORE THAN 50 DEGREES. THOSE PAIRS WITH GOOD SEPARATION
041312,000468:                                                                                                  #  ARE THEN TESTED TO SEE IF THEY LIE IN CURRENT FIELD OF VIEW.(WITHIN
041313,000469:                                                                                                  #  50 DEGREESOF SAX).THE PAIR WITH MAX SEPARATION IS CHOSEN FROM
041314,000470:                                                                                                  #  THOSE WITH GOOD SEPARATION,AND     IN FIELD OF VIEW.
041315,000471: 
041316,000472:                                                                                                  #  CALLING SEQUENCE
041317,000473:                                                                                                  #  L        TC     BANKCALL
041318,000474:                                                                                                  #  L+1      CADR   R56
041319,000475:                                                                                                  #  L+2      ERROR RETURN - NO STARS IN FIELD OF VIEW
041320,000476:                                                                                                  #  L+3      NORMAL RETURN
041321,000477: 
041322,000478:                                                                                                  #  OUTPUT
041323,000479:                                                                                                  #  BESTI,BESTJ -SINGLE PREC,INTEGERS,STAR NUMBERS TIMES 6
041324,000480:                                                                                                  #  VFLAG - FLAG BIT  SET IMPLIES NO STARS IN FIELD OF VIEW
041325,000481: 
041326,000482:                                                                                                  #  INITIALIZATION
041327,000483:                                                                                                  #  1)A CALL TO LOCSAM MUST BE MADE
041328,000484: 
041329,000485:                                                                                                  #  DEBRIS
041330,000486:                                                                                                  #  WORK AREA
041331,000487:                                                                                                  #  X,Y,ZNB
041332,000488:                                                                                                  #  SINCDU,COSCDU
041333,000489:                                                                                                  #  STARAD - STAR +5
041334,000490: 
041335,000491: 14,2620  14,2620               R56                =        PICAPAR                               
041336,000492: 14,2620                                           COUNT*   $$/R56                                
041337,000493: 14,2620           04636        PICAPAR            TC       MAKECADR                              
041338,000494: 14,2621           55745                           TS       QMIN                                  
041339,000495: 14,2622           06060                           TC       INTPRET                               
041340,000496: 14,2623           45014                           SET      CALL                                  
041341,000497: 14,2624           01465                                    VFLAG                                 
041342,000498: 14,2625           47522                                    CDUTRIG                               
041343,000499: 14,2626           77624                           CALL                                           
041344,000500: 14,2627           20030                                    CALCSMSC                              
041345,000501: 14,2630           71201                           SETPD    DLOAD                                 
041346,000502: 14,2631           00001                                    0                                     
041347,000503: 14,2632           24007                                    DPZERO                                

Page 935

041349,000505: 14,2633           26756                           STOVL    BESTI                                 
041350,000506: 14,2634           02665                                    XNB                                   
041351,000507: 14,2635           63361                           VXSC     PDVL                                  
041352,000508: 14,2636           24005                                    HALFDP                                
041353,000509: 14,2637           02701                                    ZNB                                   
041354,000510: 14,2640           74370                           AXT,1    VXSC                                  
041355,000511: 14,2641           00344                                    228D                                  #  X1 = 37 X 6 +6
041356,000512: 14,2642           24005                                    HALFDP                                
041357,000513: 14,2643           77655                           VAD                                            
041358,000514: 14,2644           53505                           VXM      UNIT                                  
041359,000515: 14,2645           01732                                    REFSMMAT                              
041360,000516: 14,2646           02731                           STORE    SAX                                   #  SAX = SHAFT AXIS
041361,000517: 14,2647           66331                           SSP      SSP                                   #  S1=S2=6
041362,000518: 14,2650           00051                                    S1                                    
041363,000519: 14,2651           00006                                    6                                     
041364,000520: 14,2652           00052                                    S2                                    
041365,000521: 14,2653           00006                                    6                                     
041366,000522: 14,2654           52100        PIC1               TIX,1    GOTO                                  #  MAJOR STAR
041367,000523: 14,2655           30657                                    PIC2                                  
041368,000524: 14,2656           30774                                    PICEND                                
041369,000525: 14,2657           50373        PIC2               VLOAD*   DOT                                   
041370,000526: 14,2660           30347                                    CATLOG,1                              
041371,000527: 14,2661           02731                                    SAX                                   
041372,000528: 14,2662           50025                           DSU      BMN                                   
041373,000529: 14,2663           30773                                    CSS33                                 
041374,000530: 14,2664           30654                                    PIC1                                  
041375,000531: 14,2665           77754                           LXA,2                                          
041376,000532: 14,2666           00046                                    X1                                    
041377,000533: 14,2667           52104        PIC3               TIX,2    GOTO                                  
041378,000534: 14,2670           30672                                    PIC4                                  
041379,000535: 14,2671           30654                                    PIC1                                  
041380,000536: 14,2672           50373        PIC4               VLOAD*   DOT                                   
041381,000537: 14,2673           47430                                    CATLOG,2                              
041382,000538: 14,2674           02731                                    SAX                                   
041383,000539: 14,2675           50025                           DSU      BMN                                   
041384,000540: 14,2676           30773                                    CSS33                                 
041385,000541: 14,2677           30667                                    PIC3                                  
041386,000542: 14,2700           47773                           VLOAD*   DOT*                                  
041387,000543: 14,2701           30347                                    CATLOG,1                              
041388,000544: 14,2702           47430                                    CATLOG,2                              
041389,000545: 14,2703           51025                           DSU      BPL                                   
041390,000546: 14,2704           30771                                    CSS40                                 
041391,000547: 14,2705           30667                                    PIC3                                  
041392,000548: 14,2706           45173                           VLOAD*   CALL                                  
041393,000549: 14,2707           30347                                    CATLOG,1                              
041394,000550: 14,2710           30746                                    OCCULT                                
041395,000551: 14,2711           77614                           BON                                            
041396,000552: 14,2712           01710                                    CULTFLAG                              
041397,000553: 14,2713           30654                                    PIC1                                  
041398,000554: 14,2714           45173                           VLOAD*   CALL                                  

Page 936

041400,000556: 14,2715           47430                                    CATLOG,2                              
041401,000557: 14,2716           30746                                    OCCULT                                
041402,000558: 14,2717           77614                           BON                                            
041403,000559: 14,2720           01710                                    CULTFLAG                              
041404,000560: 14,2721           30667                                    PIC3                                  
041405,000561: 14,2722           77614        STRATGY            BONCLR                                         
041406,000562: 14,2723           01605                                    VFLAG                                 
041407,000563: 14,2724           30741                                    NEWPAR                                
041408,000564: 14,2725           65120                           XCHX,1   XCHX,2                                
041409,000565: 14,2726           02755                                    BESTI                                 
041410,000566: 14,2727           02756                                    BESTJ                                 
041411,000567: 14,2730           47773        STRAT              VLOAD*   DOT*                                  
041412,000568: 14,2731           30347                                    CATLOG,1                              
041413,000569: 14,2732           47430                                    CATLOG,2                              
041414,000570: 14,2733           43006                           PUSH     BOFINV                                
041415,000571: 14,2734           01545                                    VFLAG                                 
041416,000572: 14,2735           30725                                    STRAT      -3                         
041417,000573: 14,2736           45345                           DLOAD    DSU                                   
041418,000574: 14,2737           77644                           BPL                                            
041419,000575: 14,2740           30667                                    PIC3                                  
041420,000576: 14,2741           67130        NEWPAR             SXA,1    SXA,2                                 
041421,000577: 14,2742           02755                                    BESTI                                 
041422,000578: 14,2743           02756                                    BESTJ                                 
041423,000579: 14,2744           77650                           GOTO                                           
041424,000580: 14,2745           30667                                    PIC3                                  
041425,000581: 14,2746           51321        OCCULT             MXV      BVSU                                  
041426,000582: 14,2747           02707                                    CULTRIX                               
041427,000583: 14,2750           00017                                    CSS                                   
041428,000584: 14,2751           77654                           BZE                                            
041429,000585: 14,2752           30765                                    CULTED                                
041430,000586: 14,2753           75240                           BMN      SIGN                                  
041431,000587: 14,2754           30765                                    CULTED                                
041432,000588: 14,2755           00160                                    MPAC       +3                         
041433,000589: 14,2756           75240                           BMN      SIGN                                  
041434,000590: 14,2757           30765                                    CULTED                                
041435,000591: 14,2760           00162                                    MPAC       +5                         
041436,000592: 14,2761           43040                           BMN      CLRGO                                 
041437,000593: 14,2762           30765                                    CULTED                                
041438,000594: 14,2763           01630                                    CULTFLAG                              
041439,000595: 14,2764           00052                                    QPRET                                 
041440,000596: 14,2765           77614        CULTED             SETGO                                          
041441,000597: 14,2766           01430                                    CULTFLAG                              
041442,000598: 14,2767           00052                                    QPRET                                 
041443,000599: 14,2770  0000016               CSS                =        CEARTH                                
041444,000600: 14,2770           05110 35052  CSS40              2DEC     .16070                                #  COS 50 /4
041445,000601: 
041446,000602: 14,2772           05110 35052  CSS33              2DEC     .16070                                #   COS 50 /4
041447,000603: 
041448,000604: 14,2774           77414        PICEND             BOFF     EXIT                                  
041449,000605: 14,2775           01745                                    VFLAG                                 

Page 937

041451,000607: 14,2776           31000                                    PICGXT                                
041452,000608: 14,2777           03021                           TC       PICBXT                                
041453,000609: 14,3000           73150        PICGXT             LXA,1    LXA,2                                 
041454,000610: 14,3001           02755                                    BESTI                                 
041455,000611: 14,3002           02756                                    BESTJ                                 
041456,000612: 14,3003           47775                           VLOAD    DOT*                                  
041457,000613: 14,3004           02731                                    SAX                                   
041458,000614: 14,3005           30347                                    CATLOG,1                              
041459,000615: 14,3006           47715                           PDVL     DOT*                                  
041460,000616: 14,3007           02731                                    SAX                                   
041461,000617: 14,3010           47430                                    CATLOG,2                              
041462,000618: 14,3011           77625                           DSU                                            
041463,000619: 14,3012           66044                           BPL      SXA,1                                 
041464,000620: 14,3013           31017                                    PICNSWP                               
041465,000621: 14,3014           02756                                    BESTJ                                 
041466,000622: 14,3015           77734                           SXA,2                                          
041467,000623: 14,3016           02755                                    BESTI                                 
041468,000624: 14,3017           77776        PICNSWP            EXIT                                           
041469,000625: 14,3020           25745                           INCR     QMIN                                  
041470,000626: 14,3021           31745        PICBXT             CA       QMIN                                  
041471,000627: 14,3022           04613                           TC       SWCALL                                
041472,000628: 14,3023                        VPD                =        0D                                    
041473,000629: 14,3023                        V0                 =        6D                                    
041474,000630: 14,3023                        V1                 =        12D                                   
041475,000631: 14,3023                        V2                 =        18D                                   
041476,000632: 14,3023                        V3                 =        24D                                   
041477,000633: 14,3023                        DP0                =        30D                                   
041478,000634: 14,3023                        DP1                =        32D                                   
041479,000635: 

Page 938

041481,000637:                                                                                                  #  NAME-R51  FINE ALIGN
041482,000638:                                                                                                  #  FUNCTION-TO ALIGN THE STABLE MEMBER TO REFSMMAT
041483,000639:                                                                                                  #  CALLING SEQ- CALL  R51
041484,000640:                                                                                                  #  INPUT -  REFSMMAT
041485,000641:                                                                                                  #  OUTPUT- GYRO TORQUE PULSES
041486,000642:                                                                                                  #  SUBROUTINES -LOCSAM,PICAPAR,R52,R53,R54,R55
041487,000643: 
041488,000644: 14,3023                                           COUNT*   $$/R51                                
041489,000645: 14,3023           77620        R51                STQ                                            
041490,000646: 14,3024           02746                                    QMAJ                                  
041491,000647: 14,3025           77776        R51.1              EXIT                                           
041492,000648: 14,3026           05355                           TC       PHASCHNG                              
041493,000649: 14,3027           04024                           OCT      04024                                 
041494,000650: 
041495,000651: 14,3030           05520        R51C               TC       DOWNFLAG                              
041496,000652: 14,3031           00222                           ADRES    FLT59FLG                              
041497,000653: 
041498,000654: 14,3032           34752                           CAF      OCT15                                 
041499,000655: 14,3033           04607                           TC       BANKCALL                              
041500,000656: 14,3034           20635                           CADR     GOPERF1                               
041501,000657: 14,3035           06001                           TC       GOTOPOOH                              
041502,000658: 14,3036           03046                           TC       DOSAM                                 
041503,000659: 14,3037           44737                           CS       BIT6                                  
041504,000660: 14,3040           70154                           MASK     MPAC                                  
041505,000661: 14,3041           10000                           CCS      A                                     
041506,000662: 14,3042           13071                           TCF      R51E                                  #  ENTER
041507,000663: 14,3043           05506                           TC       UPFLAG                                #  V32-SET FLT59FLG
041508,000664: 14,3044           00222                           ADRES    FLT59FLG                              
041509,000665: 14,3045           13071                           TCF      R51E                                  
041510,000666: 
041511,000667: 14,3046           06060        DOSAM              TC       INTPRET                               
041512,000668: 14,3047           43234                           RTB      DAD                                   
041513,000669: 14,3050           21603                                    LOADTIME                              
041514,000670: 14,3051           31173                                    TSIGHT1                               
041515,000671: 14,3052           77624                           CALL                                           
041516,000672: 14,3053           30515                                    LOCSAM                                
041517,000673: 14,3054           77776                           EXIT                                           
041518,000674: 14,3055           04607                           TC       BANKCALL                              
041519,000675: 14,3056           30620                           CADR     R56                                   
041520,000676: 14,3057           03061                           TC       R51I                                  
041521,000677: 14,3060           03071        R51F               TC       R51E                                  
041522,000678: 14,3061           05571        R51I               TC       ALARM                                 
041523,000679: 14,3062           00405                           OCT      405                                   
041524,000680: 14,3063           34777                           CAF      VB05N09                               
041525,000681: 14,3064           04607                           TC       BANKCALL                              
041526,000682: 14,3065           20471                           CADR     GOFLASH                               
041527,000683: 14,3066           06001                           TC       GOTOPOOH                              
041528,000684: 14,3067           03071                           TC       R51E                                  
041529,000685: 14,3070           03030                           TC       R51C                                  
041530,000686: 14,3071           34746        R51E               CAF      ZERO                                  
041531,000687: 14,3072           55757                           TS       STARIND                               

Page 939

041533,000689: 14,3073           06060        R51.2              TC       INTPRET                               
041534,000690: 14,3074           77776        R51.3              EXIT                                           
041535,000691: 14,3075           05355                           TC       PHASCHNG                              
041536,000692: 14,3076           04024                           OCT      04024                                 
041537,000693: 
041538,000694: 14,3077           06060                           TC       INTPRET                               
041539,000695: 14,3100           77624                           CALL                                           
041540,000696: 14,3101           31603                                    R52                                   #  AOP WILL MAKE CALLS TO SIGHTING
041541,000697: 14,3102           77776                           EXIT                                           
041542,000698: 14,3103           04607                           TC       BANKCALL                              
041543,000699: 14,3104           16000                           CADR     AOTMARK                               
041544,000700: 14,3105           04607                           TC       BANKCALL                              
041545,000701: 14,3106           17731                           CADR     OPTSTALL                              
041546,000702: 14,3107           05705                           TC       CURTAINS                              
041547,000703: 14,3110           11757                           CCS      STARIND                               
041548,000704: 14,3111           13113                           TCF      +2                                    
041549,000705: 14,3112           03156                           TC       R51.4                                 
041550,000706: 14,3113           05355                           TC       PHASCHNG                              
041551,000707: 14,3114           04024                           OCT      04024                                 
041552,000708: 
041553,000709: 14,3115           06060                           TC       INTPRET                               
041554,000710: 14,3116           45145                           DLOAD    CALL                                  
041555,000711: 14,3117           03562                                    TSIGHT                                
041556,000712: 14,3120           16607                                    PLANET                                
041557,000713: 14,3121           53521                           MXV      UNIT                                  
041558,000714: 14,3122           01732                                    REFSMMAT                              
041559,000715: 14,3123           26715                           STOVL    STARAD     +6                         
041560,000716: 14,3124           03554                                    PLANVEC                               
041561,000717: 14,3125           53521                           MXV      UNIT                                  
041562,000718: 14,3126           01732                                    REFSMMAT                              
041563,000719: 14,3127           26707                           STOVL    STARAD                                
041564,000720: 14,3130           02761                                    STARSAV1                              
041565,000721: 14,3131           24007                           STOVL    6D                                    
041566,000722: 14,3132           02767                                    STARSAV2                              
041567,000723: 14,3133           34015                           STCALL   12D                                   
041568,000724: 14,3134           31265                                    R54                                   #  STAR DATA TEST
041569,000725: 14,3135           45014                           BOFF     CALL                                  
041570,000726: 14,3136           00354                                    FREEFLAG                              
041571,000727: 14,3137           31145                                    R51K                                  
041572,000728: 14,3140           47424                                    AXISGEN                               
041573,000729: 14,3141           77624                           CALL                                           
041574,000730: 14,3142           31234                                    R55                                   #  GYRO TORQUE
041575,000731: 14,3143           77614                           CLEAR                                          
041576,000732: 14,3144           01273                                    PFRATFLG                              
041577,000733: 14,3145           77776        R51K               EXIT                                           
041578,000734: 14,3146           35745        R51P63             CAF      OCT14                                 
041579,000735: 14,3147           04607                           TC       BANKCALL                              
041580,000736: 14,3150           20635                           CADR     GOPERF1                               
041581,000737: 14,3151           06001                           TC       GOTOPOOH                              
041582,000738: 14,3152           03030                           TC       R51C                                  

Page 940

041584,000740: 14,3153           06060                           TC       INTPRET                               
041585,000741: 14,3154           77650                           GOTO                                           
041586,000742: 14,3155           02746                                    QMAJ                                  
041587,000743: 14,3156           06060        R51.4              TC       INTPRET                               
041588,000744: 14,3157           77775                           VLOAD                                          
041589,000745: 14,3160           02767                                    STARSAV2                              
041590,000746: 14,3161           02761                           STORE    STARSAV1                              
041591,000747: 14,3162           45145                           DLOAD    CALL                                  
041592,000748: 14,3163           03562                                    TSIGHT                                
041593,000749: 14,3164           16607                                    PLANET                                
041594,000750: 14,3165           03554                           STORE    PLANVEC                               
041595,000751: 14,3166           52131                           SSP      GOTO                                  
041596,000752: 14,3167           02760                                    STARIND                               
041597,000753: 14,3170           00001                                    1                                     
041598,000754: 14,3171           31074                                    R51.3                                 
041599,000755: 
041600,000756: 14,3172           00002 06240  TSIGHT1            2DEC     36000      B-28                       #  6  MIN  TO  MARKING
041601,000757: 

Page 941

041603,000759:                                                                                                  #  GYRO TORQUE COARSE ALIGNMENT
041604,000760: 14,3174           45020        GYCOARS            STQ      CALL                                  
041605,000761: 14,3175           02746                                    QMAJ                                  
041606,000762: 14,3176           47232                                    CALCGTA                               

The first CLEAR and DRIFTFLG below are circled.

041608,000764: 14,3177           43014                           CLEAR    CLEAR                                 
041609,000765: 14,3200           01260                                    DRIFTFLG                              
041610,000766: 14,3201           01662                                    REFSMFLG                              
041611,000767: 14,3202           77776                           EXIT                                           
041612,000768: 14,3203           33233                           CAF      V16N20                                #  MONITOR GIMBALS
041613,000769: 14,3204           04607                           TC       BANKCALL                              
041614,000770: 14,3205           20444                           CADR     GODSPR                                
041615,000771: 14,3206           33264                           CA       R55CDR                                
041616,000772: 14,3207           04607                           TC       BANKCALL                              
041617,000773: 14,3210           17310                           CADR     IMUPULSE                              
041618,000774: 14,3211           04607                           TC       BANKCALL                              
041619,000775: 14,3212           17735                           CADR     IMUSTALL                              
041620,000776: 14,3213           05705                           TC       CURTAINS                              
041621,000777: 14,3214           05355                           TC       PHASCHNG                              
041622,000778: 14,3215           04024                           OCT      04024                                 
041623,000779: 
041624,000780: 14,3216           06060                           TC       INTPRET                               
041625,000781: 14,3217           75160                           AXC,1    AXC,2                                 
041626,000782: 14,3220           03606                                    XSMD                                  
041627,000783: 14,3221           01731                                    REFSMMAT                              
041628,000784: 14,3222           77624                           CALL                                           #  STORE DESIRED REFSMMAT
041629,000785: 14,3223           26374                                    MATMOVE                               
041630,000786: 14,3224           43014                           CLEAR    SET                                   
041631,000787: 14,3225           01273                                    PFRATFLG                              
041632,000788: 14,3226           01462                                    REFSMFLG                              
041633,000789: 14,3227           77624                           CALL                                           
041634,000790: 14,3230           31566                                    NCOARSE                               #  SET DRIFT AND INITIALIZE 1/PIPADT
041635,000791: 14,3231           77650                           GOTO                                           
041636,000792: 14,3232           31145                                    R51K                                  
041637,000793: 14,3233           04024        V16N20             VN       1620                                  
041638,000794: 

Page 942

041640,000796:                                                                                                  #  R55  GYRO TORQUE
041641,000797:                                                                                                  #  FUNCTION-COMPUTE AND SEND GYRO PULSES
041642,000798:                                                                                                  #  CALLING SEQ- CALL R55
041643,000799:                                                                                                  #  INPUT- X,Y,ZDC- REFSMMAT WRT PRESENT STABLE MEMBER
041644,000800:                                                                                                  #  OUTPUT- GYRO PULSES
041645,000801:                                                                                                  #  SUBROUTINES- CALCGTA,GOFLASH,GODSPR,IMUFINE,IMUPULSE,GOPERF1
041646,000802: 14,3234                                           COUNT*   $$/R55                                
041647,000803: 14,3234           45020        R55                STQ      CALL                                  
041648,000804: 14,3235           02745                                    QMIN                                  
041649,000805: 14,3236           47232                                    CALCGTA                               
041650,000806: 14,3237           77776        PULSEM             EXIT                                           
041651,000807: 14,3240           33263        R55.1              CAF      V06N93                                
041652,000808: 14,3241           04607                           TC       BANKCALL                              
041653,000809: 14,3242           20471                           CADR     GOFLASH                               
041654,000810: 14,3243           06001                           TC       GOTOPOOH                              
041655,000811: 14,3244           03246                           TC       R55.2                                 
041656,000812: 14,3245           03260                           TC       R55RET                                
041657,000813: 14,3246           05355        R55.2              TC       PHASCHNG                              
041658,000814: 14,3247           00214                           OCT      00214                                 
041659,000815: 14,3250           33264                           CA       R55CDR                                
041660,000816: 14,3251           04607                           TC       BANKCALL                              
041661,000817: 14,3252           17310                           CADR     IMUPULSE                              
041662,000818: 14,3253           04607                           TC       BANKCALL                              
041663,000819: 14,3254           17735                           CADR     IMUSTALL                              
041664,000820: 14,3255           05705                           TC       CURTAINS                              
041665,000821: 14,3256           05355                           TC       PHASCHNG                              
041666,000822: 14,3257           04024                           OCT      04024                                 
041667,000823: 
041668,000824: 14,3260           06060        R55RET             TC       INTPRET                               
041669,000825: 14,3261           77650                           GOTO                                           
041670,000826: 14,3262           02745                                    QMIN                                  
041671,000827: 14,3263           01535        V06N93             VN       0693                                  
041672,000828: 14,3264           02737        R55CDR             ECADR    OGC                                   
041673,000829: 14,3265  14,3265               R54                =        CHKSDATA                              
041674,000830: 

Page 943

041676,000832:                                                                                                  #  CHKSDATA                                                                               DATE- JAN 9, 1967
041677,000833:                                                                                                  #  THE ANGULAR DIFFERENCE IS DISPLAYED FOR ASTRONAUT ACCEPTENCE
041678,000834:                                                                                                  #  EXIT MODE 1. FREEFLAG SET  IMPLIES  ASTRONAUT WANTS TO PROCEED
041679,000835:                                                                                                  #            2. FREEFLAG RESET IMPLIES ASTRONAUT WANTS TO RECYCLE          ERANCE)
041680,000836:                                                                                                  #  OUTPUT - 1.VERB 6,NOUN 3- DISPLAYS ANGULAR DIFFERENCE BETWEEN 2 SETS OF STARS.
041681,000837:                                                                                                  #           2.STAR VECTORS FROM STAR CATALOG ARE LEFT IN 6D AND 12D.
041682,000838: 
041683,000839:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
041684,000840:                                                                                                  #           1.MARK VECTORS ARE STORED IN STARAD AND STARAD +6.
041685,000841:                                                                                                  #           2.CATALOG VECTORS ARE STORED IN 6D AND 12D.
041686,000842:                                                                                                  #  DEBRIS -
041687,000843: 14,3265                                           COUNT*   $$/R54                                
041688,000844: 14,3265           50375        CHKSDATA           VLOAD    DOT                                   
041689,000845: 14,3266           02707                                    STARAD                                #  1ST CATALOG STAR
041690,000846: 14,3267           02715                                    STARAD     +6                         #  2ND CATALOG STAR
041691,000847: 14,3270           65552                           SL1      ACOS                                  
041692,000848: 14,3271           24025                           STOVL    THETA                                 
041693,000849: 14,3272           00007                                    6                                     #  1ST OBSERVED STAR
041694,000850: 14,3273           72441                           DOT      SL1                                   
041695,000851: 14,3274           00015                                    12D                                   #  2ND OBSERVED STAR
041696,000852: 14,3275           45326                           ACOS     DSU                                   
041697,000853: 14,3276           00025                                    THETA                                 
041698,000854: 14,3277           77634                           RTB                                            
041699,000855: 14,3300           21622                                    SGNAGREE                              
041700,000856: 14,3301           01045                           STORE    NORMTEM1                              #  OBSERVED DIF - CATALOG DIF
041701,000857: 14,3302           77414                           SET      EXIT                                  
041702,000858: 14,3303           00074                                    FREEFLAG                              
041703,000859: 14,3304           33315                           CAF      VB6N5                                 
041704,000860: 14,3305           04607                           TC       BANKCALL                              
041705,000861: 14,3306           20471                           CADR     GOFLASH                               
041706,000862: 14,3307           06001                           TC       GOTOPOOH                              #  V34
041707,000863: 14,3310           13313                           TCF      CHKOUT                                #  V33-PROCEED
041708,000864: 14,3311           05520                           TC       DOWNFLAG                              #  V32-REJECT DATA-CLEAR FLAG
041709,000865: 14,3312           00014                           ADRES    FREEFLAG                              
041710,000866: 14,3313           06060        CHKOUT             TC       INTPRET                               
041711,000867: 14,3314           77616                           RVQ                                            
041712,000868: 
041713,000869: 14,3315           01405        VB6N5              VN       605                                   
041714,000870: 

Page 944

041716,000872:                                                                                                  #  CAL53A
041717,000873:                                                                                                  #  FUNCTION -COMPUTE DESIRED GIMBAL ANGLES AND COARSE ALIGN IF NECESSARY
041718,000874:                                                                                                  #  CALLING SEQUENCE - CALL CAL53A
041719,000875:                                                                                                  #  INPUT - X,Y,ZSMD ,CDUX,Y,Z
041720,000876:                                                                                                  #          DESIRED GIMBAL ANGLES - THETAD,+1,+2
041721,000877:                                                                                                  #  OUTPUT - THE IMU COORDINATES ARE STORED IN REFSMMAT
041722,000878:                                                                                                  #  SUBROUTINES - S52.2, IMUCOARSE , IMUFINE
041723,000879: 14,3316                                           COUNT*   $$/R50                                
041724,000880: 14,3316           77624        CAL53A             CALL                                           
041725,000881: 14,3317           42707                                    S52.2                                 #  MAKE ONE FINAL COMP OF GIMBALE ANGLES
041726,000882: 14,3320           66234                           RTB      SSP                                   
041727,000883: 14,3321           31370                                    RDCDUS                                #  READ CDUS
041728,000884: 14,3322           00051                                    S1                                    
041729,000885: 14,3323           00001                                    1                                     
041730,000886: 14,3324           40370                           AXT,1    SETPD                                 
041731,000887: 14,3325           00003                                    3                                     
041732,000888: 14,3326           00005                                    4                                     
041733,000889: 14,3327           70543        CALOOP             DLOAD*   SR1                                   
041734,000890: 14,3330           00325                                    THETAD     +3D,1                      
041735,000891: 14,3331           70523                           PDDL*    SR1                                   
041736,000892: 14,3332           00005                                    4,1                                   
041737,000893: 14,3333           51425                           DSU      ABS                                   
041738,000894: 14,3334           45206                           PUSH     DSU                                   
041739,000895: 14,3335           31367                                    DEGREE1                               
041740,000896: 14,3336           71240                           BMN      DLOAD                                 
041741,000897: 14,3337           31355                                    CALOOP1                               
041742,000898: 14,3340           51025                           DSU      BPL                                   
041743,000899: 14,3341           31370                                    DEG359                                
041744,000900: 14,3342           31355                                    CALOOP1                               
041745,000901: 14,3343           77776                           EXIT                                           
041746,000902: 14,3344           05355                           TC       PHASCHNG                              
041747,000903: 14,3345           04024                           OCT      04024                                 
041748,000904: 
041749,000905: 14,3346           06060                           TC       INTPRET                               
041750,000906: 14,3347           77624        COARFINE           CALL                                           
041751,000907: 14,3350           31542                                    COARSE                                
041752,000908: 14,3351           77624                           CALL                                           
041753,000909: 14,3352           31566                                    NCOARSE                               
041754,000910: 14,3353           77650                           GOTO                                           
041755,000911: 14,3354           31357                                    FINEONLY                              
041756,000912: 14,3355           77700        CALOOP1            TIX,1                                          
041757,000913: 14,3356           31327                                    CALOOP                                
041758,000914: 14,3357           75160        FINEONLY           AXC,1    AXC,2                                 
041759,000915: 14,3360           02642                                    XSM                                   
041760,000916: 14,3361           01731                                    REFSMMAT                              
041761,000917: 14,3362           77624                           CALL                                           
041762,000918: 14,3363           26374                                    MATMOVE                               
041763,000919: 14,3364           77650                           GOTO                                           
041764,000920: 14,3365           32316                                    COARSRET                              
041765,000921: 14,3366           00056        DEGREE1            DEC      46         B-14                       #  1 DEG SCALED CDU/2

Page 945

041767,000923: 14,3367           37722        DEG359             DEC      16338      B-14                       #  359 DEG SCALED CDU/2
041768,000924: 14,3370           00004        RDCDUS             INHINT                                         #  READ CDUS
041769,000925: 14,3371           30032                           CA       CDUX                                  
041770,000926: 14,3372           50120                           INDEX    FIXLOC                                
041771,000927: 14,3373           54001                           TS       1                                     
041772,000928: 14,3374           30033                           CA       CDUY                                  
041773,000929: 14,3375           50120                           INDEX    FIXLOC                                
041774,000930: 14,3376           54002                           TS       2                                     
041775,000931: 14,3377           30034                           CA       CDUZ                                  
041776,000932: 14,3400           50120                           INDEX    FIXLOC                                
041777,000933: 14,3401           54003                           TS       3                                     
041778,000934: 14,3402           00003                           RELINT                                         
041779,000935: 14,3403           06102                           TC       DANZIG                                #                                +
041780,000936: 14,3404                                           COUNT*   $$/INFLT                              
041781,000937: 

Page 946

041783,000939:                                                                                                  #  NAME - P51 - IMU ORIENTATION DETERMINATION
041784,000940:                                                                                                  #           MOD.NO.1  23 JAN 67                                                             LOG SECTION - P51-P53
041785,000941:                                                                                                  #  MOD BY STURLAUGSON                                                                      ASSEMBLY SUNDANCE REV56
041786,000942: 
041787,000943:                                                                                                  #  FUNCTIONAL DESCRIPTION
041788,000944: 
041789,000945:                                                                                                  #       DETERMINES THE INERTIAL ORIENTATION OF THE IMU. THE PROGRAM IS SELECTED BY DSKY ENTRY. THE SIGHTING
041790,000946:                                                                                                  #  (AOTMARK)ROUTINE IS CALLED TO COLLECT AND PROCESS MARKED-STAR DATA. AOTMARK(R53) RETURNS THE STAR NUMBER AND THE
041791,000947:                                                                                                  #  STAR LOS VECTOR IN STARAD+6. TWO STARS ARE THUS SIGHTED. THE ANGLE BETWEEN THE TWO STARS IS THEN CHECKED AT
041792,000948:                                                                                                  #  CHKSDATA(R54). REFSMMAT IS THEN COMPUTED AT AXISGEN.
041793,000949: 
041794,000950:                                                                                                  #  CALLING SEQUENCE
041795,000951: 
041796,000952:                                                                                                  #    THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
041797,000953: 
041798,000954:                                                                                                  #  SUBROUTINES CALLED.
041799,000955: 
041800,000956:                                                                                                  #       GOPERF3
041801,000957:                                                                                                  #       GOPERF1
041802,000958:                                                                                                  #       GODSPR
041803,000959:                                                                                                  #       IMUCOARS
041804,000960:                                                                                                  #       IMUFIN20
041805,000961:                                                                                                  #       AOTMARK(R53)
041806,000962:                                                                                                  #       CHKSDATA(R54)
041807,000963:                                                                                                  #       MKRELEAS
041808,000964:                                                                                                  #       AXISGEN
041809,000965:                                                                                                  #       MATMOVE
041810,000966: 
041811,000967:                                                                                                  #  ALARMS
041812,000968: 
041813,000969:                                                                                                  #       NONE.
041814,000970: 
041815,000971:                                                                                                  #  ERASABLE INITIALIZATION
041816,000972: 
041817,000973:                                                                                                  #       IMU ZERO FLAG SHOULD BE SET.
041818,000974: 
041819,000975:                                                                                                  #  OUTPUT
041820,000976: 
041821,000977:                                                                                                  #       REFSMMAT
041822,000978:                                                                                                  #       REFSMFLG
041823,000979: 
041824,000980:                                                                                                  #  DEBRIS
041825,000981: 
041826,000982:                                                                                                  #       WORK AREA
041827,000983:                                                                                                  #       STARAD
041828,000984:                                                                                                  #       STARIND
041829,000985:                                                                                                  #       BESTI
041830,000986:                                                                                                  #       BESTJ
041831,000987: 
041832,000988: 14,3404                                           COUNT*   $$/P51                                

Page 947

041834,000990: 14,3404           04607        P51                TC       BANKCALL                              #  IS ISS ON - IF NOT, IMUCHK WILL SEND
041835,000991: 14,3405           33634                           CADR     IMUCHK                                #  ALARM CODE 210 AND EXIT VIA GOTOPOOH.
041836,000992: 
041837,000993: 14,3406           34752                           CAF      OCT15                                 
041838,000994: 14,3407           04607                           TC       BANKCALL                              
041839,000995: 14,3410           20635                           CADR     GOPERF1                               
041840,000996: 14,3411           06001                           TC       GOTOPOOH                              #  TERM.
041841,000997: 14,3412           13436                           TCF      P51B                                  #  V33
041842,000998: 14,3413           05355                           TC       PHASCHNG                              
041843,000999: 14,3414           04024                           OCT      04024                                 
041844,001000: 
041845,001001: 14,3415           34746                           CAF      ZERO                                  
041846,001002: 14,3416           54321                           TS       THETAD                                #  ZERO THE GIMBALS
041847,001003: 14,3417           54322                           TS       THETAD     +1                         
041848,001004: 14,3420           54323                           TS       THETAD     +2                         
041849,001005: 14,3421           35001                           CAF      V06N22                                
041850,001006: 14,3422           04607                           TC       BANKCALL                              
041851,001007: 14,3423           20441                           CADR     GODSPRET                              
041852,001008: 14,3424           33541                           CAF      V41K                                  #  NOW DISPLAY COARSE ALIGN VERB 41
041853,001009: 14,3425           04607                           TC       BANKCALL                              
041854,001010: 14,3426           20441                           CADR     GODSPRET                              
041855,001011: 14,3427           06060                           TC       INTPRET                               
041856,001012: 14,3430           77624                           CALL                                           
041857,001013: 14,3431           31542                                    COARSE                                
041858,001014: 14,3432           77776                           EXIT                                           
041859,001015: 14,3433           05355                           TC       PHASCHNG                              
041860,001016: 14,3434           04024                           OCT      04024                                 
041861,001017: 14,3435           13406                           TCF      P51        +2                         
041862,001018: 
041863,001019: 14,3436           05355        P51B               TC       PHASCHNG                              
041864,001020: 14,3437           00014                           OCT      00014                                 
041865,001021: 14,3440           06060                           TC       INTPRET                               
041866,001022: 14,3441           77624                           CALL                                           
041867,001023: 14,3442           31566                                    NCOARSE                               
041868,001024: 14,3443           40331                           SSP      SETPD                                 
041869,001025: 14,3444           02760                                    STARIND                               #  INDEX-STAR 1 OR 2
041870,001026: 14,3445           00000                                    0                                     
041871,001027: 14,3446           00001                                    0                                     
041872,001028: 14,3447           77776        P51C               EXIT                                           
041873,001029: 14,3450           05355                           TC       PHASCHNG                              
041874,001030: 14,3451           04024                           OCT      04024                                 
041875,001031: 
041876,001032: 14,3452           04607                           TC       BANKCALL                              
041877,001033: 14,3453           16000                           CADR     AOTMARK                               #  R53
041878,001034: 14,3454           04607                           TC       BANKCALL                              
041879,001035: 14,3455           17731                           CADR     AOTSTALL                              
041880,001036: 14,3456           05705                           TC       CURTAINS                              
041881,001037: 14,3457           11757                           CCS      STARIND                               
041882,001038: 14,3460           13466                           TCF      P51D       +1                         
041883,001039: 14,3461           06060                           TC       INTPRET                               

Page 948

041885,001041: 14,3462           77775                           VLOAD                                          
041886,001042: 14,3463           02767                                    STARSAV2                              
041887,001043: 14,3464           02761                           STORE    STARSAV1                              
041888,001044: 14,3465           77776        P51D               EXIT                                           
041889,001045: 14,3466           05355                           TC       PHASCHNG                              
041890,001046: 14,3467           04024                           OCT      04024                                 
041891,001047: 
041892,001048: 14,3470           11757                           CCS      STARIND                               
041893,001049: 14,3471           13505                           TCF      P51E                                  
041894,001050: 14,3472           05355                           TC       PHASCHNG                              
041895,001051: 14,3473           04024                           OCT      04024                                 
041896,001052: 
041897,001053: 14,3474           06060                           TC       INTPRET                               
041898,001054: 14,3475           45145                           DLOAD    CALL                                  
041899,001055: 14,3476           03562                                    TSIGHT                                
041900,001056: 14,3477           16607                                    PLANET                                
041901,001057: 14,3500           03554                           STORE    PLANVEC                               
041902,001058: 14,3501           77776                           EXIT                                           
041903,001059: 14,3502           34744                           CAF      BIT1                                  
041904,001060: 14,3503           55757                           TS       STARIND                               
041905,001061: 14,3504           13450                           TCF      P51C       +1                         #  DO SECOND STAR
041906,001062: 14,3505           05355        P51E               TC       PHASCHNG                              
041907,001063: 14,3506           04024                           OCT      04024                                 
041908,001064: 
041909,001065: 14,3507           06060                           TC       INTPRET                               
041910,001066: 14,3510           45145                           DLOAD    CALL                                  
041911,001067: 14,3511           03562                                    TSIGHT                                
041912,001068: 14,3512           16607                                    PLANET                                
041913,001069: 14,3513           24015                           STOVL    12D                                   
041914,001070: 14,3514           03554                                    PLANVEC                               
041915,001071: 14,3515           24007                           STOVL    6D                                    
041916,001072: 14,3516           02761                                    STARSAV1                              
041917,001073: 14,3517           26707                           STOVL    STARAD                                
041918,001074: 14,3520           02767                                    STARSAV2                              
041919,001075: 14,3521           36715                           STCALL   STARAD     +6                         
041920,001076: 14,3522           31265                                    CHKSDATA                              #  CHECK STAR ANGLES IN STARAD AND
041921,001077: 14,3523           77414                           BON      EXIT                                  
041922,001078: 14,3524           00314                                    FREEFLAG                              
041923,001079: 14,3525           31527                                    P51G                                  
041924,001080: 14,3526           03406                           TC       P51        +2                         
041925,001081: 14,3527           77624        P51G               CALL                                           
041926,001082: 14,3530           47424                                    AXISGEN                               #  COME BACK WITH REFSMMAT IN XDC
041927,001083: 14,3531           75160                           AXC,1    AXC,2                                 
041928,001084: 14,3532           02664                                    XDC                                   
041929,001085: 14,3533           01731                                    REFSMMAT                              
041930,001086: 14,3534           77624                           CALL                                           
041931,001087: 14,3535           26374                                    MATMOVE                               
041932,001088: 14,3536           77414                           SET      EXIT                                  
041933,001089: 14,3537           01462                                    REFSMFLG                              
041934,001090: 14,3540           06001                           TC       GOTOPOOH                              #  FINIS

Page 949

041936,001092: 14,3541           12200        V41K               VN       4100                                  
041937,001093: 14,3542           77776        COARSE             EXIT                                           
041938,001094: 14,3543           31301                 +1        CA       MODECADR                              #  SEE IF IMU DEVICE IS IN USE.
041939,001095: 14,3544           00006                           EXTEND                                         
041940,001096: 14,3545           13552                           BZF      DOCORS                                #  NOT IN USE, DO COARSE ALIGN
041941,001097: 14,3546           34770                           CAF      1SEC                                  #  IN USE, DELAY ONE SEC
041942,001098: 14,3547           04607                           TC       BANKCALL                              
041943,001099: 14,3550           01736                           CADR     DELAYJOB                              
041944,001100: 14,3551           13543                           TCF      COARSE     +1                         
041945,001101: 14,3552           04607        DOCORS             TC       BANKCALL                              
041946,001102: 14,3553           16765                           CADR     IMUCOARS                              
041947,001103: 14,3554           04607                           TC       BANKCALL                              
041948,001104: 14,3555           17735                           CADR     IMUSTALL                              
041949,001105: 14,3556           05705                           TC       CURTAINS                              
041950,001106: 14,3557           04607                           TC       BANKCALL                              
041951,001107: 14,3560           17175                           CADR     IMUFINE                               
041952,001108: 14,3561           04607                           TC       BANKCALL                              
041953,001109: 14,3562           17735                           CADR     IMUSTALL                              
041954,001110: 14,3563           05705                           TC       CURTAINS                              
041955,001111: 14,3564           06060                           TC       INTPRET                               
041956,001112: 14,3565           77616                           RVQ                                            
041957,001113: 14,3566           77776        NCOARSE            EXIT                                           
041958,001114: 14,3567           30025                           CA       TIME1                                 
041959,001115: 14,3570           55074                           TS       1/PIPADT                              
041960,001116: 14,3571           44746                           CS       ZERO                                  
041961,001117: 14,3572           54037                           TS       PIPAX                                 
041962,001118: 14,3573           54040                           TS       PIPAY                                 
041963,001119: 14,3574           54041                           TS       PIPAZ                                 
041964,001120: 14,3575           06060                           TC       INTPRET                               
041965,001121: 14,3576           77775                           VLOAD                                          
041966,001122: 14,3577           24007                                    ZEROVEC                               
041967,001123: 14,3600           01472                           STORE    GCOMP                                 

SET and DRIFTFLG below are circled.

041969,001125: 14,3601           43414                           SET      RVQ                                   
041970,001126: 14,3602           01060                                    DRIFTFLG                              
041971,001127: 

Page 950

041973,001129:                                                                                                  #  NAME-S52.2
041974,001130:                                                                                                  #  FUNCTION-COMPUTE GIMBAL ANGLES FOR DESIRED SM AND PRESENT VEHICLE
041975,001131:                                                                                                  #  CALL-  CALL  S52.2
041976,001132:                                                                                                  #  INPUT- X,Y,ZSMD
041977,001133:                                                                                                  #  OUTPUT- OGC,IGC,MGC,THETAD,+1,+2
041978,001134:                                                                                                  #  SUBROUTINES-CDUTRIG,CALCSMSC,MATMOVE,CALCGA
041979,001135: 21,2000                                           SETLOC   P50S3                                 
041980,001136: 21,2000                                           BANK                                           
041981,001137: 
041982,001138: 21,2707                                           COUNT*   $$/S52.1                              
041983,001139: 21,2707           45020        S52.2              STQ      CALL                                  
041984,001140: 21,2710           02746                                    QMAJ                                  
041985,001141: 21,2711           47522                                    CDUTRIG                               
041986,001142: 21,2712           77624                           CALL                                           
041987,001143: 21,2713           20030                                    CALCSMSC                              
041988,001144: 21,2714           66370                           AXT,1    SSP                                   
041989,001145: 21,2715           00022                                    18D                                   
041990,001146: 21,2716           00051                                    S1                                    
041991,001147: 21,2717           00006                                    6D                                    
041992,001148: 21,2720           61373        S52.2A             VLOAD*   VXM                                   
041993,001149: 21,2721           02707                                    XNB        +18D,1                     
041994,001150: 21,2722           01732                                    REFSMMAT                              
041995,001151: 21,2723           77656                           UNIT                                           
041996,001152: 21,2724           06707                           STORE    XNB        +18D,1                     
041997,001153: 21,2725           77700                           TIX,1                                          
041998,001154: 21,2726           42720                                    S52.2A                                
041999,001155: 21,2727           75160        S52.2.1            AXC,1    AXC,2                                 
042000,001156: 21,2730           03606                                    XSMD                                  
042001,001157: 21,2731           02642                                    XSM                                   
042002,001158: 21,2732           77624                           CALL                                           
042003,001159: 21,2733           26374                                    MATMOVE                               
042004,001160: 21,2734           77624                           CALL                                           
042005,001161: 21,2735           47336                                    CALCGA                                
042006,001162: 21,2736           77650                           GOTO                                           
042007,001163: 21,2737           02746                                    QMAJ                                  
042008,001164: 

Page 951

042010,001166:                                                                                                  #  NAME-S52.3
042011,001167:                                                                                                  #  FUNCTION  XSMD= UNIT R
042012,001168:                                                                                                  #            YSMD= UNIT(V X R)
042013,001169:                                                                                                  #            ZSMD= UNIT(XSMD X YSMD)
042014,001170:                                                                                                  #  CALL     DLOAD  CALL
042015,001171:                                                                                                  #                  TALIGN
042016,001172:                                                                                                  #                  S52.3
042017,001173:                                                                                                  #  INPUT-   TIME OF ALIGNMENT IN MPAC
042018,001174:                                                                                                  #  OUTPUT-  X,Y,ZSMD
042019,001175:                                                                                                  #  SUBROUTINES- CSMCONIC
042020,001176: 21,2740                                           COUNT*   $$/S52.3                              
042021,001177: 21,2740           77620        S52.3              STQ                                            
042022,001178: 21,2741           02746                                    QMAJ                                  
042023,001179: 21,2742           34041                           STCALL   TDEC1                                 
042024,001180: 21,2743           27136                                    LEMCONIC                              
042025,001181: 21,2744           53575                           VLOAD    UNIT                                  
042026,001182: 21,2745           00001                                    RATT                                  
042027,001183: 21,2746           27607                           STOVL    XSMD                                  
042028,001184: 21,2747           00007                                    VATT                                  
042029,001185: 21,2750           53435                           VXV      UNIT                                  
042030,001186: 21,2751           00001                                    RATT                                  
042031,001187: 21,2752           27615                           STOVL    YSMD                                  
042032,001188: 21,2753           03607                                    XSMD                                  
042033,001189: 21,2754           53435                           VXV      UNIT                                  
042034,001190: 21,2755           03615                                    YSMD                                  
042035,001191: 21,2756           37623                           STCALL   ZSMD                                  
042036,001192: 21,2757           02746                                    QMAJ                                  
042037,001193: 

Page 952

042039,001195:                                                                                                  #  NAME    -R52 (AUTOMATIC OPTICS POSITIONING ROUTINE)
042040,001196: 
042041,001197:                                                                                                  #  FUNCTION-POINT THE AOT OPTIC AXIS BY MANEUVERING THE LEM TO A NAVIGATION
042042,001198:                                                                                                  #           STAR SELECTED BY ALIGNMENT PROGRAMS OR DSKY INPUT
042043,001199: 
042044,001200:                                                                                                  #  CALLING -CALL R52
042045,001201: 
042046,001202:                                                                                                  #  INPUT   -BESTI AND BESTJ (STAR CODES TIMES 6)
042047,001203:                                                                                                  #  OUTPUT  -STAR CODE IN BITS1-6, DETENT CODE IN BITS 7-9
042048,001204:                                                                                                  #           (NO CHECK IS MADE TO INSURE THE DETENT  CODE TO BE VALID)
042049,001205:                                                                                                  #           POINTVSM-1/2 UNIT NAV STAR VEC IN SM
042050,001206:                                                                                                  #           SCAXIS-AOT OPTIC AXIS VEC IN NB X-Z PLANE
042051,001207: 
042052,001208:                                                                                                  #  SUBROUT -R60LEM
042053,001209: 
042054,001210: 14,2000                                           SETLOC   P50S1                                 
042055,001211: 14,2000                                           BANK                                           
042056,001212: 
042057,001213: 14,3603                                           COUNT*   $$/R52                                
042058,001214: 14,3603           77420        R52                STQ      EXIT                                  
042059,001215: 14,3604           03665                                    SAVQR52                               
042060,001216: 14,3605           34741                           CAF      BIT4                                  
042061,001217: 14,3606           70105                           MASK     FLAGWRD9                              
042062,001218: 14,3607           00006                           EXTEND                                         
042063,001219: 14,3610           13613                           BZF      DOR52                                 
042064,001220: 14,3611           04607                           TC       BANKCALL                              
042065,001221: 14,3612           32402                           CADR     R59                                   
042066,001222: 
042067,001223: 14,3613           51757        DOR52              INDEX    STARIND                               
042068,001224: 14,3614           31755                           CA       BESTI                                 #  PICK UP STARCODE DETERMINED BY R56
042069,001225: 14,3615           00006                           EXTEND                                         
042070,001226: 14,3616           73712                           MP       1/6TH                                 
042071,001227: 14,3617           64735                           AD       BIT8                                  #  SET DETENT POSITION 2
042072,001228: 14,3620           55235                           TS       STARCODE                              #  SCALE AND STORE IN STARCODE
042073,001229: 
042074,001230: 14,3621           33713        R52A               CAF      V01N70                                
042075,001231: 14,3622           04607                           TC       BANKCALL                              
042076,001232: 14,3623           20471                           CADR     GOFLASH                               #  DISPLAY STARCODE AND WAIT FOR RESPONSE
042077,001233: 14,3624           06001                           TC       GOTOPOOH                              #  V34-TERMINATE
042078,001234: 14,3625           13627                           TCF      R52B                                  #  V33-PROCEED TO ORIENT LEM
042079,001235: 14,3626           13621                           TCF      R52A                                  #  ENTER-SELECT NEW STARCODE-RECYCLE
042080,001236: 
042081,001237: 14,3627           05520        R52B               TC       DOWNFLAG                              
042082,001238: 14,3630           00124                           ADRES    3AXISFLG                              #  BIT6 OF FLAGWRD5 ZERO TO ALLOW VECPOINT
042083,001239: 14,3631           31235                           CA       STARCODE                              #  GRAB DETENT CODE
042084,001240: 14,3632           77765                           MASK     HIGH9                                 
042085,001241: 14,3633           00006                           EXTEND                                         
042086,001242: 14,3634           74734                           MP       BIT9                                  
042087,001243: 14,3635           54001                           TS       L                                     #  TEMP STORE DETENT
042088,001244: 

Page 953

042090,001246: 14,3636           00006                           EXTEND                                         
042091,001247: 14,3637           63655                           BZMF     GETAZEL                               #  CODE 0, COAS CALIBRATION
042092,001248: 
042093,001249: 14,3640           65652                           AD       NEG7                                  
042094,001250: 14,3641           00006                           EXTEND                                         
042095,001251: 14,3642           13655                           BZF      GETAZEL                               #  CODE 7, COAS SIGHTING
042096,001252: 
042097,001253: 14,3643  E7,1551                                  EBANK=   XYMARK                                
042098,001254: 14,3643           35007                           CA       EBANK7                                
042099,001255: 14,3644           54003                           TS       EBANK                                 
042100,001256: 
042101,001257: 14,3645           50001                           INDEX    L                                     
042102,001258: 14,3646           31403                           CA       AOTAZ      -1                         #  PICK UP AZ CORRESPONDING TO DETENT
042103,001259: 14,3647           54001                           TS       L                                     
042104,001260: 14,3650  E5,1642                                  EBANK=   XSM                                   
042105,001261: 14,3650           35005                           CA       EBANK5                                #  CHANGE TO EBANK5 BUT DONT DISTURB L
042106,001262: 14,3651           54003                           TS       EBANK                                 
042107,001263: 14,3652           34730                           CA       BIT13                                 #  SET ELV TO 45 DEG
042108,001264: 14,3653           56001                           XCH      L                                     #  SET C(A)=AZ, C(L)=45 DEG
042109,001265: 14,3654           13665                           TCF      AZEL                                  #  GO COMP OPTIC AXIS
042110,001266: 
042111,001267: 14,3655           33714        GETAZEL            CAF      V06N87                                #  CODE 0 OR 7, GET AZ AND EL KEY IN
042112,001268: 14,3656           04607                           TC       BANKCALL                              
042113,001269: 14,3657           20471                           CADR     GOFLASH                               
042114,001270: 14,3660           06001                           TC       GOTOPOOH                              #  V34-TERMINATE
042115,001271: 14,3661           13663                           TCF      +2                                    #  PROCEED-CALC OPTIC AXIS
042116,001272: 14,3662           13655                           TCF      GETAZEL                               #  ENTER-RECYCLE
042117,001273: 
042118,001274: 14,3663           00006                           EXTEND                                         
042119,001275: 14,3664           31345                           DCA      AZ                                    #  PICK UP AZ AND EL IN SP 2S COMP
042120,001276: 14,3665           50120        AZEL               INDEX    FIXLOC                                #  JAM AZ AND EL IN 8 AND 9 OF VAC
042121,001277: 14,3666           52011                           DXCH     8D                                    
042122,001278: 14,3667           06060                           TC       INTPRET                               
042123,001279: 14,3670           77624                           CALL                                           #  GO COMPUTE OPTIC AXIS AND STORE IN
042124,001280: 14,3671           10557                                    OANB                                  #  SCAXIS IN NB COORDS
042125,001281: 14,3672           45034                           RTB      CALL                                  
042126,001282: 14,3673           21603                                    LOADTIME                              
042127,001283: 14,3674           16607                                    PLANET                                
042128,001284: 14,3675           53521                           MXV      UNIT                                  
042129,001285: 14,3676           01732                                    REFSMMAT                              
042130,001286: 14,3677           03773                           STORE    POINTVSM                              #  STORE FOR VECPOINT
042131,001287: 
042132,001288: 14,3700           77776                           EXIT                                           
042133,001289: 14,3701           04607                           TC       BANKCALL                              
042134,001290: 14,3702           54125                           CADR     R60LEM                                #  GO TORQUE LEM OPTIC AXIS TO STAR LOS
042135,001291: 
042136,001292: 14,3703           37765                           CAF      HIGH9                                 #  IF COAS CALIBRATION CODE 0, RECYCLE
042137,001293: 14,3704           71235                           MASK     STARCODE                              
042138,001294: 14,3705           00006                           EXTEND                                         
042139,001295: 14,3706           13621                           BZF      R52A                                  
042140,001296: 

Page 954

042142,001298: 14,3707           06060                           TC       INTPRET                               #  RETURN FROM KALCMANU
042143,001299: 14,3710           77650                           GOTO                                           
042144,001300: 14,3711           03665                                    SAVQR52                               #  RETURN TO CALLER
042145,001301: 
042146,001302: 14,3712           05253        1/6TH              DEC      .1666667                              
042147,001303: 14,3713           00306        V01N70             VN       0170                                  
042148,001304: 14,3714           01527        V06N87             VN       687                                   
042149,001305: 

Page 955

042151,001307:                                                                                                  #  LUNAR SURFACE STAR AQUISITION
042152,001308: 
042153,001309: 15,2000                                           SETLOC   P50S                                  
042154,001310: 15,2000                                           BANK                                           
042155,001311: 15,2402                                           COUNT*   $$/R59                                
042156,001312: 
042157,001313: 15,2402           40077        R59                CS       FLAGWRD3                              
042158,001314: 15,2403           74730                           MASK     REFSMBIT                              #  IF REFSMMAT FLAG CLEAR BYPASS STAR AQUIR
042159,001315: 15,2404           10000                           CCS      A                                     
042160,001316: 15,2405           12574                           TCF      R59OUT                                #  NO REFSMMAT GO TO AOTMARK
042161,001317: 
042162,001318: 15,2406           32606                           CAF      V01N70*                               #  SELECT STAR CODE FOR ACQUISITION
042163,001319: 15,2407           04607                           TC       BANKCALL                              
042164,001320: 15,2410           20471                           CADR     GOFLASH                               
042165,001321: 15,2411           06001                           TC       GOTOPOOH                              #  V34-TERMINATE
042166,001322: 15,2412           12414                           TCF      R59A                                  #  V33-PROCEED
042167,001323: 15,2413           12402                           TCF      R59                                   #  V32-RECYCLE
042168,001324: 
042169,001325: 15,2414           06060        R59A               TC       INTPRET                               
042170,001326: 15,2415           45034                           RTB      CALL                                  
042171,001327: 15,2416           21603                                    LOADTIME                              
042172,001328: 15,2417           16607                                    PLANET                                #  GO GET CELESTRIAL BODY IN REF COORDS.
042173,001329: 15,2420           53521                           MXV      UNIT                                  
042174,001330: 15,2421           01732                                    REFSMMAT                              #  TRANSFORM TO NB COORDS.
042175,001331: 15,2422           77624                           CALL                                           
042176,001332: 15,2423           47640                                    CDU*SMNB                              
042177,001333: 15,2424           02731                           STORE    STAR                                  #  TEMP STORE STAR VEC(NB)
042178,001334: 15,2425           77776                           EXIT                                           
042179,001335: 
042180,001336: 15,2426           34744                           CAF      BIT1                                  #  INITIALIZE AZ POSITION CODE TO 1 (-60)
042181,001337: 15,2427           54734                           TS       POSCODE                               
042182,001338: 
042183,001339: 15,2430  E7,1551                                  EBANK=   XYMARK                                
042184,001340: 15,2430           35007        INCAZ              CA       EBANK7                                
042185,001341: 15,2431           54003                           TS       EBANK                                 
042186,001342: 
042187,001343: 15,2432           50734                           INDEX    POSCODE                               
042188,001344: 15,2433           31403                           CA       AOTAZ      -1                         #  PICK UP AZ CORRESPONDING TO POSCODE
042189,001345: 15,2434           54001                           TS       L                                     
042190,001346: 
042191,001347: 15,2435  E5,1642                                  EBANK=   XSM                                   
042192,001348: 15,2435           35005                           CA       EBANK5                                
042193,001349: 15,2436           54003                           TS       EBANK                                 
042194,001350: 
042195,001351: 15,2437           34730                           CA       BIT13                                 #  SET ELV TO 45 DEG
042196,001352: 15,2440           56001                           XCH      L                                     #  SET C(A)=AZ, C(L)=45 DEG
042197,001353: 15,2441           55745                           TS       QMIN                                  #  STORE QMIN=AZ FOR LATER
042198,001354: 15,2442           50120                           INDEX    FIXLOC                                
042199,001355: 15,2443           52011                           DXCH     8D                                    #  JAM AZ IN 8D, 45 DEG IN 9D FOR OANB
042200,001356: 

Page 956

042202,001358: 15,2444           06060                           TC       INTPRET                               
042203,001359: 15,2445           77624                           CALL                                           
042204,001360: 15,2446           10557                                    OANB                                  #  GO CALC OPTIC AXIS WRT NB
042205,001361: 15,2447           50375                           VLOAD    DOT                                   
042206,001362: 15,2450           02731                                    STAR                                  #  DOT STAR WITH OA
042207,001363: 15,2451           03765                                    SCAXIS                                
042208,001364: 15,2452           65552                           SL1      ARCCOS                                
042209,001365: 15,2453           00031                           STORE    24D                                   #  TEMP STORE ARCCOS(STAR.OPTAXIS)
042210,001366: 
042211,001367: 15,2454           51025                           DSU      BPL                                   
042212,001368: 15,2455           32611                                    DEG30                                 #  SEE IF STAR IN AOT FIELD-OF-VIEW
042213,001369: 15,2456           32533                                    NXAX                                  #  NOT IN FIELD - TRY NEXT POSITION
042214,001370: 15,2457           45345                           DLOAD    DSU                                   #  SEE IF STAR AT FIELD CENTER
042215,001371: 15,2460           00031                                    24D                                   
042216,001372: 15,2461           32613                                    DEG.5                                 
042217,001373: 15,2462           71240                           BMN      DLOAD                                 #  CALC SPIRAL AND CURSOR
042218,001374: 15,2463           32552                                    ZSPCR                                 #  GO ZERO CURSOR AND SPIRAL
042219,001375: 15,2464           00031                                    24D                                   #  GET SPIRAL
042220,001376: 15,2465           42405                           DMP      SL4                                   
042221,001377: 15,2466           23773                                    3/4                                   #  12 SCALED AT 16
042222,001378: 15,2467           24031                           STOVL    24D                                   #  12(ARCCOS(AO.STAR)) SCALED IN REVS
042223,001379: 
042224,001380: 15,2470           03765                                    SCAXIS                                #  OA
042225,001381: 15,2471           53435                           VXV      UNIT                                  
042226,001382: 15,2472           24005                                    XUNIT                                 
042227,001383: 15,2473           47206                           PUSH     VXV                                   #   OA X UNITX   PD 0-5
042228,001384: 15,2474           03765                                    SCAXIS                                
042229,001385: 15,2475           77676                           VCOMP                                          
042230,001386: 15,2476           63256                           UNIT     PDVL                                  #  UNIT(OA X(OA X UNITX))  PD 6-11
042231,001387: 15,2477           03765                                    SCAXIS                                
042232,001388: 15,2500           53435                           VXV      UNIT                                  
042233,001389: 15,2501           02731                                    STAR                                  
042234,001390: 15,2502           50206                           PUSH     DOT                                   #  1/2(OA X STAR)   PD 12-17
042235,001391: 15,2503           00001                                    0                                     #  DOT WITH 1/2(OA X UNITX)  FOR YROT
042236,001392: 15,2504           65552                           SL1      ARCCOS                                
042237,001393: 15,2505           24033                           STOVL    26D                                   #  STORE THET SCALED IN REVS
042238,001394: 
042239,001395: 15,2506           77641                           DOT                                            #  UP 12-17, UP 6-11 FOR C2
042240,001396: 15,2507           71244                           BPL      DLOAD                                 #  IF THET NEG-GET 360-THET
042241,001397: 15,2510           32515                                    R59D                                  
042242,001398: 15,2511           32157                                    ABOUTONE                              
042243,001399: 15,2512           77625                           DSU                                            
042244,001400: 15,2513           00033                                    26D                                   
042245,001401: 15,2514           00033                           STORE    26D                                   #  360-THET SCALED IN REVS
042246,001402: 
042247,001403: 15,2515           70535        R59D               SLOAD    SR1                                   
042248,001404: 15,2516           02746                                    QMIN                                  #  RESCALE AZ(N) TO REVS
042249,001405: 15,2517           41415                           DAD      PUSH                                  #  PUSH YROT + AZ(N) REVS
042250,001406: 15,2520           00033                                    26D                                   
042251,001407: 15,2521           77634                           RTB                                            

Page 957

042253,001409: 15,2522           21624                                    1STO2S                                
042254,001410: 15,2523           15241                           STODL    CURSOR                                #  YROT IN 1/2 REVS
042255,001411: 15,2524           00031                                    24D                                   #  LOAD SROT IN REVS
042256,001412: 15,2525           77615                           DAD                                            #  12(SEP) + YROT
042257,001413: 15,2526           77634                           RTB                                            
042258,001414: 15,2527           21624                                    1STO2S                                
042259,001415: 15,2530           01242                           STORE    SPIRAL                                #  SROT IN 1/2 REVS
042260,001416: 15,2531           77776                           EXIT                                           
042261,001417: 15,2532           12556                           TCF      79DISP                                #  GO DISPLAY CURSOR-SPIRAL-POS CODE
042262,001418: 
042263,001419: 15,2533           77776        NXAX               EXIT                                           
042264,001420: 15,2534           24734                           INCR     POSCODE                               
042265,001421: 15,2535           40734                           CS       POSCODE                               
042266,001422: 15,2536           64750                           AD       SEVEN                                 
042267,001423: 15,2537           00006                           EXTEND                                         
042268,001424: 15,2540           62542                           BZMF     R59ALM                                #  THIS STAR NOT AT ANY POSITION
042269,001425: 15,2541           12430                           TCF      INCAZ                                 
042270,001426: 
042271,001427: 15,2542           05571        R59ALM             TC       ALARM                                 #  THIS STAR CANT BE LOCATED IN AOT FIELD
042272,001428: 15,2543           00404                           OCT      404                                   
042273,001429: 15,2544           34777                           CAF      VB05N09                               #  DISPLAY ALARM
042274,001430: 15,2545           04607                           TC       BANKCALL                              
042275,001431: 15,2546           20471                           CADR     GOFLASH                               
042276,001432: 15,2547           16001                           TCF      GOTOPOOH                              #  VB34-TERMINATE
042277,001433: 15,2550           12574                           TCF      R59OUT                                #  VB33-PROCEED, GO WITHOUT AQUIRE
042278,001434: 15,2551           12402                           TCF      R59                                   #  VB32-RECYCLE AND TRY ANOTHER STAR
042279,001435: 
042280,001436: 15,2552           77776        ZSPCR              EXIT                                           
042281,001437: 15,2553           34746                           CAF      ZERO                                  
042282,001438: 15,2554           55240                           TS       CURSOR                                
042283,001439: 15,2555           55241                           TS       SPIRAL                                
042284,001440: 
042285,001441: 15,2556           32607        79DISP             CAF      V06N79                                #  DISPLAY CURSOR, SPIRAL AND POS CODE
042286,001442: 15,2557           04607                           TC       BANKCALL                              
042287,001443: 15,2560           20471                           CADR     GOFLASH                               
042288,001444: 15,2561           16001                           TCF      GOTOPOOH                              #  V34-TERMINATE
042289,001445: 15,2562           12564                           TCF      R59E                                  #  V33-PROCEED TO MARK ROUTINE
042290,001446: 15,2563           12402                           TCF      R59                                   #  V32-RECYCLE TO TOP OF R59 AGAIN
042291,001447: 
042292,001448: 15,2564           34750        R59E               CAF      SEVEN                                 #  GET DETENT CODE CORRESPONDING TO POSCODE
042293,001449: 15,2565           70734                           MASK     POSCODE                               
042294,001450: 15,2566           00006                           EXTEND                                         
042295,001451: 15,2567           74736                           MP       BIT7                                  #  DETENT CODE NOW IN L
042296,001452: 15,2570           47765                           CS       HIGH9                                 
042297,001453: 15,2571           71235                           MASK     AOTCODE                               #  ISOLATE STAR NO IN BIT 1-6
042298,001454: 15,2572           60001                           AD       L                                     
042299,001455: 15,2573           55235                           TS       AOTCODE                               #  STORE DETENT 7-9
042300,001456: 
042301,001457: 15,2574           06060        R59OUT             TC       INTPRET                               
042302,001458: 15,2575           77414                           BON      EXIT                                  

Page 958

042304,001460: 15,2576           04713                                    FLT59FLG                              #  IF FLT59FLG SET GO BACK TO R51 TO
042305,001461: 15,2577           03665                                    SAVQR52                               #  DO AOTMARK
042306,001462: 15,2600           04607                           TC       BANKCALL                              
042307,001463: 15,2601           16000                           CADR     AOTMARK                               
042308,001464: 15,2602           04607                           TC       BANKCALL                              
042309,001465: 15,2603           17731                           CADR     AOTSTALL                              #  SLEEP TILL SIGHTING DONE
042310,001466: 15,2604           05705                           TC       CURTAINS                              #  BADEND RETURN FROM AOTMARK
042311,001467: 15,2605           13073                           TCF      R59RET                                #  RETURN TO 1 STAR OR 2STAR
042312,001468: 
042313,001469: 15,2606           00306        V01N70*            VN       170                                   
042314,001470: 15,2607           01517        V06N79             VN       679                                   
042315,001471: 15,2610           02525 12525  DEG30              2DEC     .083333333                            #  30 DEGRESS
042316,001472: 
042317,001473: 15,2612           00026 30131  DEG.5              2DEC     .00138888                             #  .5 DEGRESS SCALED IN REVS
042318,001474: 
042319,001475: 15,2614           12525        DEG60              OCT      12525                                 #  60 DEG CDU SCALING
042320,001476: 

Page 959

042322,001478:                                                                                                  #  NAME -    PLANET
042323,001479:                                                                                                  #  FUNCTION -TO PROVIDE THE REFERENCE VECTOR FOR THE SIGHTED CELESTIAL
042324,001480:                                                                                                  #            BODY. STARS ARE FETCHED FROM THE CATALOG,SUN,EARTH AND
042325,001481:                                                                                                  #            MOON ARE COMPUTED BY LOCSAM,PLANET VECTORS ARE ENTERED
042326,001482:                                                                                                  #            BY DSDY INPUT
042327,001483:                                                                                                  #  CALL  -  CALL
042328,001484:                                                                                                  #                  PLANET
042329,001485:                                                                                                  #  INPUT -  TIME IN MPAC
042330,001486:                                                                                                  #  OUTPUT - VECTOR  IN MPAC
042331,001487:                                                                                                  #  SUBROUTINES - LOCSAM
042332,001488:                                                                                                  #  DEBRIS - VAC ,STARAD - STARAD +17
042333,001489: 
042334,001490: 07,2000                                           SETLOC   AOTMARK1                              
042335,001491: 07,2000                                           BANK                                           
042336,001492: 07,2607                                           COUNT*   $$/R58                                
042337,001493: 
042338,001494: 07,2607           03562        PLANET             STORE    TSIGHT                                
042339,001495: 07,2610           77420                           STQ      EXIT                                  
042340,001496: 07,2611           02736                                    GCTR                                  
042341,001497: 07,2612           47765                           CS       HIGH9                                 
042342,001498: 07,2613           71235                           MASK     AOTCODE                               
042343,001499: 07,2614           00006                           EXTEND                                         
042344,001500: 07,2615           76263                           MP       REVCNT                                
042345,001501: 07,2616           56001                           XCH      L                                     
042346,001502: 07,2617           51757                           INDEX    STARIND                               
042347,001503: 07,2620           55755                           TS       BESTI                                 
042348,001504: 07,2621           10000                           CCS      A                                     
042349,001505: 07,2622           12637                           TCF      NOTPLAN                               
042350,001506: 07,2623           32676                           CAF      VNPLANV                               
042351,001507: 07,2624           04607                           TC       BANKCALL                              
042352,001508: 07,2625           20471                           CADR     GOFLASH                               
042353,001509: 07,2626           02623                           TC       -3                                    
042354,001510: 07,2627           02631                           TC       +2                                    
042355,001511: 07,2630           02623                           TC       -5                                    
042356,001512: 07,2631           06060                           TC       INTPRET                               
042357,001513: 07,2632           74375                           VLOAD    VXSC                                  
042358,001514: 07,2633           02707                                    STARAD                                
042359,001515: 07,2634           16700                                    1/SQR3                                
042360,001516: 07,2635           52056                           UNIT     GOTO                                  
042361,001517: 07,2636           02736                                    GCTR                                  
042362,001518: 
042363,001519: 07,2637           40000        NOTPLAN            CS       A                                     
042364,001520: 07,2640           62675                           AD       DEC227                                
042365,001521: 07,2641           00006                           EXTEND                                         
042366,001522: 07,2642           62653                           BZMF     CALSAM1                               
042367,001523: 07,2643           51757                           INDEX    STARIND                               
042368,001524: 07,2644           31755                           CA       BESTI                                 
042369,001525: 07,2645           50120                           INDEX    FIXLOC                                
042370,001526: 07,2646           54046                           TS       X1                                    
042371,001527: 07,2647           06060                           TC       INTPRET                               

Page 960

042373,001529: 07,2650           52173                           VLOAD*   GOTO                                  
042374,001530: 07,2651           30347                                    CATLOG,1                              
042375,001531: 07,2652           02736                                    GCTR                                  
042376,001532: 07,2653           06060        CALSAM1            TC       INTPRET                               
042377,001533: 07,2654           45145        CALSAM             DLOAD    CALL                                  
042378,001534: 07,2655           03562                                    TSIGHT                                
042379,001535: 07,2656           30515                                    LOCSAM                                
042380,001536: 07,2657           77340                           LXC,1    VLOAD                                 
042381,001537: 07,2660           02757                                    STARIND                               
042382,001538: 07,2661           02707                                    VEARTH                                
042383,001539: 07,2662           24001                           STOVL    0D                                    
042384,001540: 07,2663           02715                                    VSUN                                  
042385,001541: 07,2664           26707                           STOVL    VEARTH                                
042386,001542: 07,2665           00001                                    0D                                    
042387,001543: 07,2666           02715                           STORE    VSUN                                  
042388,001544: 07,2667           70143                           DLOAD*   LXC,1                                 
042389,001545: 07,2670           02756                                    BESTI,1                               
042390,001546: 07,2671           00154                                    MPAC                                  
042391,001547: 07,2672           52173                           VLOAD*   GOTO                                  
042392,001548: 07,2673           02343                                    STARAD     -228D,1                    
042393,001549: 07,2674           02736                                    GCTR                                  
042394,001550: 07,2675           00343        DEC227             DEC      227        B-14                       
042395,001551: 07,2676           01530        VNPLANV            VN       0688                                  
042396,001552: 07,2677  37,3543               PIPSRINE           =        PIPASR     +3                         #  EBANK NOT 4 SO DONT LOAD PIPTIME1
042397,001553: 07,2677           22363 11623  1/SQR3             2DEC     .57735021                             
042398,001554: 

Page 961

042400,001556:                                                                                                  #  GRAVITY VECTOR DETERMINATION ROUTINE
042401,001557:                                                                                                  #  BY KEN VINCENT
042402,001558:                                                                                                  #  FOR DETAILED DESCRIPTION SEE 504GSOP 5.6.3.2.5
042403,001559:                                                                                                  #  THIS PROGRAM FINDS THE DIRECTION OF THE MOONS GRAVITY
042404,001560:                                                                                                  #  WHILE THE LM IS ON THE MOONS SURFACE. IT WILL BE USED
042405,001561:                                                                                                  #  FOR LUNAR SURFACE ALIGNMENT. THE GRAVITY VECTOR IS
042406,001562:                                                                                                  #  DETERMINED BY READING THE PIPAS WITH THE IMU AT TWO
042407,001563:                                                                                                  #  PARTICULAR ORIONTATIONS. THE TWO READINGS ARE AVERAGED
042408,001564:                                                                                                  #  AND UNITIZED AND TRANSFORMED TO NB COORDINATES. THE TWO
042409,001565:                                                                                                  #  ORIENTATION WERE CHOSEN TO REDUCE BIAS ERRORS IN THE
042410,001566:                                                                                                  #  READINGS.
042411,001567: 
042412,001568:                                                                                                  #  CALL-
042413,001569:                                                                                                  #           TC     BANKCALL
042414,001570:                                                                                                  #           CADR   GVDETER
042415,001571:                                                                                                  #  INPUTS-
042416,001572:                                                                                                  #           PIPAS,CDUS
042417,001573:                                                                                                  #  OUTPUTS-
042418,001574:                                                                                                  #           STARSAV1 = UNIT GRAVITY
042419,001575:                                                                                                  #           GSAV     =   DITTO
042420,001576:                                                                                                  #           GRAVBIT  = 1
042421,001577:                                                                                                  #  SUBROUTINES-
042422,001578:                                                                                                  #           PIPASR,IMUCOARS,IMUFINE,IMUSTALL,1/PIPA,DELAYJOB,CDUTRIG,
042423,001579:                                                                                                  #           *NBSM* ,*SNMB*, CALCGA,FOFLASH
042424,001580:                                                                                                  #  DEBRIS-
042425,001581:                                                                                                  #           VAC,SAC,STARAD,XSM,XNB,THETAD,DELV,COSCDU,SINCDU
042426,001582: 15,2000                                           SETLOC   P50S                                  
042427,001583: 15,2000                                           BANK                                           
042428,001584: 15,2615                                           COUNT*   $$/P57                                
042429,001585: 
042430,001586: 15,2615           33016        GVDETER            CAF      42DEG                                 
042431,001587: 15,2616           54321                           TS       THETAD                                
042432,001588: 15,2617           40000                           COM                                            
042433,001589: 15,2620           54322                           TS       THETAD     +1                         
042434,001590: 15,2621           33017                           CAF      35DEG                                 
042435,001591: 15,2622           54323                           TS       THETAD     +2                         
042436,001592: 15,2623           06060                           TC       INTPRET                               
042437,001593: 15,2624           45014                           CLEAR    CALL                                  
042438,001594: 15,2625           01662                                    REFSMFLG                              
042439,001595: 15,2626           32722                                    LUNG                                  
042440,001596:                                                                                                  #  FIND  GIMBAL ANGLES WHICH ROTATE SM 180DEG  ABOUT  G VEC
042441,001597: 
042442,001598:                                                                                                  #   DEFINE G COOR SYS
042443,001599:                                                                                                  #                       -
042444,001600:                                                                                                  #                       X    UNIT G    
042445,001601:                                                                                                  #                   *   -               -
042446,001602:                                                                                                  #                   M=  Y =  UNITEZSM * X )
042447,001603:                                                                                                  #                       -         -     -
042448,001604:                                                                                                  #                       Z    UNIT(X   * Y )
042449,001605:                                                                                                  #   THEN   ROTATED  SM WRT  PRESENT IS

Page 962

042451,001607:                                                                                                  #                      1,  0 , 0  
042452,001608:                                                                                                  #            *      *T            *            *         *
042453,001609:                                                                                                  #           XSM =   M  0, -1 , 0  M   =  2  (X X ) - 1/2 I  *
042454,001610:                                                                                                  #                                             I J
042455,001611:                                                                                                  #                      0,  0 ,-1
042456,001612: 
042457,001613:                                                                                                  #   ALSO   NB WRT PRES SM  IS
042458,001614: 
042459,001615:                                                                                                  #                 *      *   *
042460,001616:                                                                                                  #                XNB = NBSM  I
042461,001617:                                                                                                  #                             *     *
042462,001618:                                                                                                  #   GIMBAL ANGLES  = CALCGA( XSM , XNB )
042463,001619: 
042464,001620: 15,2000                                           SETLOC   P50S                                  
042465,001621: 15,2000                                           BANK                                           
042466,001622: 15,2627                                           COUNT*   $$/P57                                
042467,001623: 15,2627           66370                           AXT,1    SSP                                   #  X1=18
042468,001624: 15,2630           00022                                    18D                                   #  S1= 6
042469,001625: 15,2631           00051                                    S1                                    #  X2, -2
042470,001626: 15,2632           00006                                    6D                                    
042471,001627: 15,2633           77744                           LXC,2                                          
042472,001628: 15,2634           00050                                    S1                                    
042473,001629: 15,2635           45173        GRAVEL             VLOAD*   CALL                                  
042474,001630: 15,2636           54000                                    XUNIT      -6,2                       
042475,001631: 15,2637           47665                                    *NBSM*                                #  SIN AND COS COMPUTED IN LUNG
042476,001632: 15,2640           06707                           STORE    XNB        +18D,1                     
042477,001633: 15,2641           77775                           VLOAD                                          
042478,001634: 15,2642           02731                                    STAR                                  
042479,001635: 15,2643           73744                           LXC,2    VXSC*                                 #  COMPLEMENT- UNITX  ARE BACKWARD -
042480,001636: 15,2644           00047                                    X2                                    
042481,001637: 15,2645           75040                                    STAR       +6,2                       #  OUTER PRODUCT
042482,001638: 15,2646           71152                           VSL2     LXC,2                                 
042483,001639: 15,2647           00047                                    X2                                    
042484,001640: 15,2650           63047                           VSU*     INCR,2                                
042485,001641: 15,2651           54000                                    XUNIT      -6,2                       
042486,001642: 15,2652           00002                                    2D                                    
042487,001643: 15,2653           06665                           STORE    XSM        +18D,1                     
042488,001644: 15,2654           45100                           TIX,1    CALL                                  
042489,001645: 15,2655           32635                                    GRAVEL                                
042490,001646: 15,2656           47336                                    CALCGA                                
042491,001647: 15,2657           74575                           VLOAD    VSR1                                  
042492,001648: 15,2660           02715                                    GOUT                                  
042493,001649: 15,2661           36723                           STCALL   STARAD     +12D                       
042494,001650: 15,2662           32722                                    LUNG                                  
042495,001651: 15,2663           74575                           VLOAD    VSR1                                  
042496,001652: 15,2664           02715                                    GOUT                                  
042497,001653: 15,2665           53455                           VAD      UNIT                                  
042498,001654: 15,2666           02723                                    STARAD     +12D                       

Page 963

042500,001656: 15,2667           02761                           STORE    STARSAV1                              
042501,001657: 15,2670           77641                           DOT                                            
042502,001658: 15,2671           02222                                    GSAV                                  
042503,001659: 15,2672           65552                           SL1      ACOS                                  
042504,001660: 15,2673           01045                           STORE    DSPTEM1                               
042505,001661: 15,2674           77776                           EXIT                                           
042506,001662: 15,2675           05520                           TC       DOWNFLAG                              #  CLEAR FREEFLAG IN CASE OF RECYCLE
042507,001663: 15,2676           00014                           ADRES    FREEFLAG                              
042508,001664: 
042509,001665: 15,2677           33015                           CA       DISGRVER                              
042510,001666: 15,2700           04607                           TC       BANKCALL                              
042511,001667: 15,2701           20471                           CADR     GOFLASH                               
042512,001668: 15,2702           06001                           TC       GOTOPOOH                              
042513,001669: 15,2703           12706                           TCF      PROGRAV                               #  VB33-PROCEED
042514,001670: 15,2704           05506                           TC       UPFLAG                                #  VB32-RECYCLE-STORE GRAV AND DO IT AGAIN
042515,001671: 15,2705           00014                           ADRES    FREEFLAG                              #  AND SET FREEFLAG TO SHOW RECYCLE
042516,001672: 
042517,001673: 15,2706           05355        PROGRAV            TC       PHASCHNG                              
042518,001674: 15,2707           04024                           OCT      04024                                 
042519,001675: 
042520,001676: 15,2710           06060                           TC       INTPRET                               
042521,001677: 15,2711           77775                           VLOAD                                          
042522,001678: 15,2712           02761                                    STARSAV1                              
042523,001679: 15,2713           02222                           STORE    GSAV                                  
042524,001680: 15,2714           77776                           EXIT                                           
042525,001681: 15,2715           34742                           CAF      FREEFBIT                              #  IF FREEFLAG SET, RE-COMPUTE GRAVITY.
042526,001682: 15,2716           70074                           MASK     FLAGWRD0                              
042527,001683: 15,2717           10000                           CCS      A                                     
042528,001684: 15,2720           12615                           TCF      GVDETER                               #  SET
042529,001685: 15,2721           13535                           TCF      ATTCHK                                #  EXIT FROM GVDETER
042530,001686: 
042531,001687: 15,2722           77220        LUNG               STQ      VLOAD                                 
042532,001688: 15,2723           02745                                    QMIN                                  
042533,001689: 15,2724           24007                                    ZEROVEC                               
042534,001690: 15,2725           02707                           STORE    GACC                                  
042535,001691: 15,2726           77776                           EXIT                                           
042536,001692: 15,2727           05355                           TC       PHASCHNG                              
042537,001693: 15,2730           04024                           OCT      04024                                 
042538,001694: 
042539,001695: 15,2731           06060                           TC       INTPRET                               
042540,001696: 15,2732           77624                           CALL                                           
042541,001697: 15,2733           31542                                    COARSE                                
042542,001698: 15,2734           77776                           EXIT                                           
042543,001699: 15,2735           33014                           CA       T/2SEC                                
042544,001700: 15,2736           55736                           TS       GCTR                                  
042545,001701: 15,2737           37737                           CA       PRIO31                                
042546,001702: 15,2740           55074                           TS       1/PIPADT                              
042547,001703: 15,2741           04607                           TC       BANKCALL                              
042548,001704: 15,2742           15751                           CADR     GCOMPZER                              #  INITIALIZE  COMPENSATION
042549,001705: 15,2743           05355                           TC       PHASCHNG                              

Page 964

042551,001707: 15,2744           04024                           OCT      04024                                 
042552,001708: 
042553,001709: 15,2745           04607                           TC       BANKCALL                              #   DONT NEED TO INHINY  THIS USED TO
042554,001710: 15,2746           77543                           CADR     PIPSRINE                              #  INITIALIZE PIPAS  DONT USE DATA
042555,001711: 15,2747           06060                           TC       INTPRET                               
042556,001712: 15,2750           77776        GREED              EXIT                                           #  = MASK 7776 IN BASIC SO DONT CARE
042557,001713: 15,2751           34771                           CAF      2SECS                                 
042558,001714: 15,2752           05175                           TC       TWIDDLE                               #  SET UP 2 SEC TASK TO READ PIPAS
042559,001715: 15,2753           02755                           ADRES    GRABGRAV                              
042560,001716: 
042561,001717: 15,2754           05146                           TC       ENDOFJOB                              
042562,001718: 
042563,001719: 15,2755           04665        GRABGRAV           TC       IBNKCALL                              
042564,001720: 15,2756           77543                           CADR     PIPSRINE                              
042565,001721: 15,2757           35014                           CAF      PRIO13                                #  RE-ESTABLISH MAINLINE JOB
042566,001722: 15,2760           05076                           TC       FINDVAC                               
042567,001723: 15,2761  E5,1706                                  EBANK=   STARAD                                
042568,001724: 15,2761           02764 32065                     2CADR    ADDGRAV                               
042569,001725: 
042570,001726: 
042571,001727: 15,2763           05263                           TC       TASKOVER                              
042572,001728: 
042573,001729: 15,2764           04607        ADDGRAV            TC       BANKCALL                              
042574,001730: 15,2765           15333                           CADR     1/PIPA                                
042575,001731: 15,2766           25736                           INCR     GCTR                                  
042576,001732: 15,2767           06060                           TC       INTPRET                               
042577,001733: 15,2770           53375                           VLOAD    VAD                                   
042578,001734: 15,2771           00325                                    DELV                                  
042579,001735: 15,2772           02707                                    GACC                                  
042580,001736: 15,2773           02707                           STORE    GACC                                  #  ACCUMULATE G VECTOR
042581,001737: 15,2774           50135                           SLOAD    BMN                                   
042582,001738: 15,2775           02737                                    GCTR                                  
042583,001739: 15,2776           32750                                    GREED                                 
042584,001740: 15,2777           53575                           VLOAD    UNIT                                  
042585,001741: 15,3000           02707                                    GACC                                  
042586,001742: 15,3001           36731                           STCALL   STAR                                  
042587,001743: 15,3002           47522                                    CDUTRIG                               #  TRANSFORM  IN NB COOR  AND  STORE
042588,001744: 15,3003           77624                           CALL                                           #   IN OUTPUT
042589,001745: 15,3004           47663                                    *SMNB*                                
042590,001746: 15,3005           02715                           STORE    GOUT                                  
042591,001747: 15,3006           77776                           EXIT                                           
042592,001748: 15,3007           05355                           TC       PHASCHNG                              
042593,001749: 15,3010           04024                           OCT      04024                                 
042594,001750: 
042595,001751: 15,3011           06060        QMINEXIT           TC       INTPRET                               
042596,001752: 15,3012           77650                           GOTO                                           
042597,001753: 15,3013           02745                                    QMIN                                  
042598,001754: 15,3014           77753        T/2SEC             DEC      -20        B-14                       
042599,001755: 15,3015           01404        DISGRVER           VN       0604                                  
042600,001756: 15,3016           07357        42DEG              OCT      07357                                 

Page 965

042602,001758: 15,3017           06211        35DEG              OCT      06211                                 
042603,001759: 

Page 966

042605,001761:                                                                                                  #  NAME  GYROTRIM
042606,001762: 
042607,001763:                                                                                                  #  THIS PROGRAM COMPUTES AND SENDS GYRO COMMANDS WHICH CAUSE THE CDUS
042608,001764:                                                                                                  #    TO ATTAIN A PRESCRIBED SET OF ANGLES. THIS ROUTINE ASSUMES THE
042609,001765:                                                                                                  #    VEHICLES ATTITUDE REMAINS STATIONARY DURING ITS OPERATION.
042610,001766: 
042611,001767:                                                                                                  #  CALL     CALL
042612,001768:                                                                                                  #                  GYROTRIM
042613,001769: 
042614,001770:                                                                                                  #  INPUT    THETAD,+1,+2 = DESIRED CDU ANGLES
042615,001771:                                                                                                  #           CDUX,CDUY,CDUZ
042616,001772: 
042617,001773:                                                                                                  #  OUTPUT - GYRO TORQUE PULSES
042618,001774: 
042619,001775:                                                                                                  #  SUBROUTINES- TRG*NBSM,*NBSM*,CDUTRIG,AXISGEN,CALCGTA,IMUFINE
042620,001776:                                                                                                  #               IMPULSE,IMUSTALL
042621,001777:                                                                                                  #             -         -        -        *           *     -
042622,001778:                                                                                                  #  DEBRIS -  CDUSPOT ,SINCDU ,COSCDU , STARAD ,VAC , XDC , OGC
042623,001779: 15,3020                                           COUNT*   $$/P57                                
042624,001780: 15,3020           71220        GYROTRIM           STQ      DLOAD                                 
042625,001781: 15,3021           02745                                    QMIN                                  
042626,001782: 15,3022           00322                                    THETAD                                
042627,001783: 15,3023           65325                           PDDL     PDDL                                  
042628,001784: 15,3024           00324                                    THETAD     +2                         
042629,001785: 15,3025           00323                                    THETAD     +1                         
042630,001786: 15,3026           77666                           VDEF                                           
042631,001787: 15,3027           24766                           STOVL    CDUSPOT                               
042632,001788: 15,3030           24005                                    XUNIT                                 
042633,001789: 15,3031           77624                           CALL                                           
042634,001790: 15,3032           47656                                    TRG*NBSM                              
042635,001791: 15,3033           26707                           STOVL    STARAD                                
042636,001792: 15,3034           24003                                    YUNIT                                 
042637,001793: 15,3035           77624                           CALL                                           
042638,001794: 15,3036           47665                                    *NBSM*                                
042639,001795: 15,3037           36715                           STCALL   STARAD     +6                         
042640,001796: 15,3040           47522                                    CDUTRIG                               
042641,001797: 15,3041           77624                           CALL                                           
042642,001798: 15,3042           20030                                    CALCSMSC                              
042643,001799: 15,3043           77775                           VLOAD                                          
042644,001800: 15,3044           02665                                    XNB                                   
042645,001801: 15,3045           24007                           STOVL    6D                                    
042646,001802: 15,3046           02673                                    YNB                                   
042647,001803: 15,3047           34015                           STCALL   12D                                   
042648,001804: 15,3050           47424                                    AXISGEN                               
042649,001805: 15,3051           77624                           CALL                                           
042650,001806: 15,3052           47232                                    CALCGTA                               
042651,001807: 15,3053           77776        JUSTTRIM           EXIT                                           
042652,001808: 15,3054           33063                           CA       GYRCDR                                
042653,001809: 15,3055           04607                           TC       BANKCALL                              
042654,001810: 15,3056           17310                           CADR     IMUPULSE                              

Page 967

042656,001812: 15,3057           04607                           TC       BANKCALL                              
042657,001813: 15,3060           17735                           CADR     IMUSTALL                              
042658,001814: 15,3061           05705                           TC       CURTAINS                              
042659,001815: 15,3062           13011                           TCF      QMINEXIT                              
042660,001816: 
042661,001817: 15,3063           02737        GYRCDR             ECADR    OGC                                   
042662,001818: 

Page 968

042664,001820:                                                                                                  #  PERFORM STAR AQUISITION AND STAR SIGHTINGS
042665,001821: 
042666,001822: 15,3064           34746        2STARS             CAF      ZERO                                  #  INITALIZE STARIND
042667,001823: 15,3065           13067                           TCF      +2                                    #  ZERO FOR 1ST STAR, ONE FOR 2ND STAR
042668,001824: 15,3066           34744        1STAR              CAF      BIT1                                  
042669,001825: 15,3067           55757                           TS       STARIND                               
042670,001826: 
042671,001827: 15,3070           05355                           TC       PHASCHNG                              
042672,001828: 15,3071           04024                           OCT      04024                                 
042673,001829: 
042674,001830: 15,3072           12402                           TCF      R59                                   #  GO DO STAR AQUIRE AND AOTMARK
042675,001831: 
042676,001832: 15,3073           31757        R59RET             CA       STARIND                               #  BACK FROM SURFACE MARKING
042677,001833: 15,3074           00006                           EXTEND                                         
042678,001834: 15,3075           13106                           BZF      ASTAR                                 #  1ST STAR MARKED
042679,001835: 
042680,001836: 15,3076           05355                           TC       PHASCHNG                              
042681,001837: 15,3077           04024                           OCT      04024                                 
042682,001838: 
042683,001839: 15,3100           06060                           TC       INTPRET                               
042684,001840: 15,3101           45145                           DLOAD    CALL                                  
042685,001841: 15,3102           03562                                    TSIGHT                                #  TIME OF 2ND MARK
042686,001842: 15,3103           16607                                    PLANET                                
042687,001843: 15,3104           37254                           STCALL   VEC2                                  #  STORE 2ND CATALOG VEC (REF)
042688,001844: 15,3105           33120                                    SURFLINE                              
042689,001845: 
042690,001846: 15,3106           06060        ASTAR              TC       INTPRET                               
042691,001847: 15,3107           77775                           VLOAD                                          
042692,001848: 15,3110           02767                                    STARSAV2                              
042693,001849: 15,3111           02761                           STORE    STARSAV1                              #  1ST OBSERVED STAR (SM)
042694,001850: 15,3112           45145                           DLOAD    CALL                                  
042695,001851: 15,3113           03562                                    TSIGHT                                #  TIME OF 1ST MARK
042696,001852: 15,3114           16607                                    PLANET                                
042697,001853: 15,3115           03246                           STORE    VEC1                                  #  STORE 1ST CATALOG VEC (REF)
042698,001854: 15,3116           77776                           EXIT                                           
042699,001855: 15,3117           13066                           TCF      1STAR                                 #  GO GET 2ND STAR SIGHTING
042700,001856: 

Page 969

042702,001858:                                                                                                  #  DO FINE OR COARSE ALIGNMENT OF IMU
042703,001859: 
042704,001860: 15,3120           77131        SURFLINE           SSP      AXT,2                                 
042705,001861: 15,3121           00052                                    S2                                    
042706,001862: 15,3122           00006                                    6                                     
042707,001863: 15,3123           00014                                    12D                                   
042708,001864: 15,3124           64373        WRTDESIR           VLOAD*   MXV                                   
042709,001865: 15,3125           74515                                    VEC1       +12D,2                     #  PICK UP VEC IN REF, TRANS TO DESIRED SH
042710,001866: 15,3126           03607                                    XSMD                                  
042711,001867: 15,3127           77656                           UNIT                                           
042712,001868: 15,3130           12723                           STORE    STARAD     +12D,2                     #  VEC IN SM
042713,001869: 15,3131           77773                           VLOAD*                                         
042714,001870: 15,3132           75002                                    STARSAV1   +12D,2                     #  PICK UP VEC IN PRESENT SM
042715,001871: 15,3133           10023                           STORE    18D,2                                 
042716,001872: 15,3134           43104                           TIX,2    BON                                   
042717,001873: 15,3135           33124                                    WRTDESIR                              
042718,001874: 15,3136           04315                                    INITALGN                              #  IF INITIAL PASS (OPTION 0) BYPASS R54
042719,001875: 15,3137           33145                                    INITBY                                
042720,001876: 15,3140           77624        DOALIGN            CALL                                           
042721,001877: 15,3141           31265                                    R54                                   #  DO CHKSDATA
042722,001878: 15,3142           77614                           BOFF                                           
042723,001879: 15,3143           00354                                    FREEFLAG                              
042724,001880: 15,3144           33225                                    P57POST                               #  ASTRO DOES NOT LIKE DATA TEST RESULTS
042725,001881: 15,3145           77624        INITBY             CALL                                           
042726,001882: 15,3146           47424                                    AXISGEN                               #  GET DESIRED ORIENT WRT PRES.XDC,YDC,ZDC
042727,001883: 15,3147           77624                           CALL                                           
042728,001884: 15,3150           47232                                    CALCGTA                               #  GET GYRO TORQ ANGLES, OGC,IGC,MGC
042729,001885: 15,3151           77776                           EXIT                                           
042730,001886: 15,3152           34743                           CAF      INITABIT                              #  IF INITIAL PASS BYPASS NOUN 93 DISPLAY
042731,001887: 15,3153           70104                           MASK     FLAGWRD8                              
042732,001888: 15,3154           10000                           CCS      A                                     
042733,001889: 15,3155           13164                           TCF      5DEGTEST                              
042734,001890: 15,3156           33273                           CAF      DISPGYRO                              #  DISPLAY GYRO TORQ ANGLES V 06N93
042735,001891: 15,3157           04607                           TC       BANKCALL                              
042736,001892: 15,3160           20471                           CADR     GOFLASH                               
042737,001893: 15,3161           06001                           TC       GOTOPOOH                              #  V34-TERMINATE
042738,001894: 15,3162           13164                           TCF      5DEGTEST                              #  VB33-PROCEED TO COARSE OR FINE
042739,001895: 15,3163           13226                           TCF      P57POST    +1                         #  VB32-RECYCLE, MAYBE RE-ALIGN
042740,001896: 
042741,001897: 15,3164           06060        5DEGTEST           TC       INTPRET                               #  IF ANGLES GREATER THAN 5 DEGS, DO COARSE
042742,001898: 15,3165           40175                           VLOAD    BOV                                   
042743,001899: 15,3166           02740                                    OGC                                   
042744,001900: 15,3167           33170                                    SURFSUP                               
042745,001901: 15,3170           02750        SURFSUP            STORE    OGCT                                  
042746,001902: 15,3171           40141                           V/SC     BOV                                   
042747,001903: 15,3172           30617                                    5DEGREES                              
042748,001904: 15,3173           31715                                    COATRIM                               
042749,001905: 15,3174           52131                           SSP      GOTO                                  
042750,001906: 15,3175           02746                                    QMIN                                  
042751,001907: 15,3176           33200                                    SURFDISP                              

Page 970

042753,001909: 15,3177           33053                                    JUSTTRIM                              #  ANGLES LESS THAN 5DEG, DO GYRO TORQ
042754,001910: 
042755,001911: 15,3200           77776        SURFDISP           EXIT                                           
042756,001912: 15,3201           05355                           TC       PHASCHNG                              
042757,001913: 15,3202           04024                           OCT      04024                                 
042758,001914: 
042759,001915: 15,3203           06060                           TC       INTPRET                               
042760,001916: 15,3204           75160                           AXC,1    AXC,2                                 
042761,001917: 15,3205           03606                                    XSMD                                  
042762,001918: 15,3206           01731                                    REFSMMAT                              
042763,001919: 15,3207           45014                           SET      CALL                                  
042764,001920: 15,3210           01462                                    REFSMFLG                              
042765,001921: 15,3211           26374                                    MATMOVE                               
042766,001922: 15,3212           77776                           EXIT                                           
042767,001923: 15,3213           11144                           CCS      OPTION2                               #  IF OPTION ZERO DO FINISH
042768,001924: 15,3214           13216                           TCF      B2F8                                  
042769,001925: 15,3215           13226                           TCF      P57POST    +1                         
042770,001926: 
042771,001927: 15,3216           34743        B2F8               CAF      INITABIT                              #  IF INITIAL FLAG SET, RE-CYCLE.
042772,001928: 15,3217           70104                           MASK     FLAGWRD8                              
042773,001929: 15,3220           10000                           CCS      A                                     
042774,001930: 15,3221           13543                           TCF      P57JUMP                               #  ITS SET
042775,001931: 15,3222           06060                           TC       INTPRET                               
042776,001932: 15,3223           77624                           CALL                                           
042777,001933: 15,3224           33470                                    REFMF                                 #  GO GET ATTITUDE VEC IN MF(YNBSAV,XNBSAV)
042778,001934: 15,3225           77776        P57POST            EXIT                                           
042779,001935: 15,3226           35745                           CAF      OCT14                                 #  DISPLAY V50N25 CHK CODE 14
042780,001936: 15,3227           04607                           TC       BANKCALL                              
042781,001937: 15,3230           20635                           CADR     GOPERF1                               
042782,001938: 15,3231           16001                           TCF      GOTOPOOH                              #  VB34-TERMINATE
042783,001939: 15,3232           13543                           TCF      P57JUMP                               #  VB33-PROCEED TO RE-ALIGN
042784,001940: 15,3233           44743                           CS       BIT2                                  #  TEST TO SE IF ALIGNED BY OPTION 2
042785,001941: 15,3234           61144                           AD       OPTION2                               
042786,001942: 15,3235           00006                           EXTEND                                         
042787,001943: 15,3236           13240                           BZF      +2                                    #  YES-GO CALCULATE LANDING SITE
042788,001944: 15,3237           16001                           TCF      GOTOPOOH                              #  NO-EXIT P57
042789,001945: 15,3240           05355                           TC       PHASCHNG                              #  RESTART PLACE
042790,001946: 15,3241           04024                           OCT      04024                                 
042791,001947: 15,3242           06060                           TC       INTPRET                               
042792,001948: 15,3243           45175                           VLOAD    CALL                                  #  USE GNB
042793,001949: 15,3244           02222                                    GSAV                                  
042794,001950: 15,3245           47653                                    CDU*NBSM                              #  GO TO SM COORDS
042795,001951: 15,3246           43105                           VXM      SET                                   #           ON MOON SO SET LUNAFLAG
042796,001952: 15,3247           01732                                    REFSMMAT                              #           G(REF) = (REFSMMAT)T (NBSM)GNB
042797,001953: 15,3250           01463                                    LUNAFLAG                              
042798,001954: 15,3251           51515                           PDVL     ABVAL                                 
042799,001955: 15,3252           02021                                    RLS                                   
042800,001956: 15,3253           45561                           VXSC     STADR                                 
042801,001957: 15,3254           75745                           STORE    ALPHAV                                #           ALPHAV =  RLSMAG * G(REF)
042802,001958: 15,3255           47014                           CLEAR    RTB                                   

Page 971

042804,001960: 15,3256           00662                                    ERADFLAG                              
042805,001961: 15,3257           21603                                    LOADTIME                              
042806,001962: 15,3260           77624                           CALL                                           
042807,001963: 15,3261           30455                                    N89DISP                               #  SUBROUTINE TO CALC LS AND GIVE RLS BACK
042808,001964: 15,3262           01220                           STORE    RN                                    #  RN=RLS B-29 = LM POSITION
042809,001965: 15,3263           65352                           VSL2     PDDL                                  #  R-TO-RP GETS RLS B-27 AT  0-5D IN PDLIST
042810,001966: 15,3264           01242                                    SITIME                                #  TIME STORED IN N89DISP
042811,001967: 15,3265           77606                           PUSH                                           #  TIME AT  6-7 IN PDLIST
042812,001968: 15,3266           35234                           STCALL   PIPTIME                               #  PIPTIME = LM STATE TIME
042813,001969: 15,3267           51644                                    R-TO-RP                               
042814,001970: 15,3270           02021                           STORE    RLS                                   #  RLS IN MOON-FIXED COORDS
042815,001971: 15,3271           77776                           EXIT                                           
042816,001972: 15,3272           16001                           TCF      GOTOPOOH                              #  EXIT P57
042817,001973: 

Page 972

042819,001975:                                                                                                  #  COARSE AND FINE ALIGN IMU
042820,001976: 14,2000                                           SETLOC   P50S1                                 
042821,001977: 14,2000                                           BANK                                           
042822,001978: 
042823,001979: 14,3715                                           COUNT*   $$/P57                                
042824,001980: 
042825,001981: 14,3715           75160        COATRIM            AXC,1    AXC,2                                 
042826,001982: 14,3716           02664                                    XDC                                   
042827,001983: 14,3717           02642                                    XSM                                   
042828,001984: 14,3720           77624                           CALL                                           
042829,001985: 14,3721           26374                                    MATMOVE                               
042830,001986: 14,3722           77624                           CALL                                           
042831,001987: 14,3723           47522                                    CDUTRIG                               
042832,001988: 14,3724           77624                           CALL                                           
042833,001989: 14,3725           20030                                    CALCSMSC                              
042834,001990: 14,3726           77624                           CALL                                           
042835,001991: 14,3727           47336                                    CALCGA                                
042836,001992: 14,3730           77414                           BOFF     EXIT                                  
042837,001993: 14,3731           04355                                    INITALGN                              #  IF INITIAL ALGNMENT DISPLAY FINAL
042838,001994: 14,3732           31744                                    CORSIT                                #  GIMBAL ANGLES IF COARSE ANGLES GREATER
042839,001995: 14,3733           35001                           CAF      V06N22                                #  THAN 5 DEGREES
042840,001996: 14,3734           04607                           TC       BANKCALL                              
042841,001997: 14,3735           20471                           CADR     GOFLASH                               
042842,001998: 14,3736           06001                           TC       GOTOPOOH                              
042843,001999: 14,3737           13741                           TCF      +2                                    
042844,002000: 14,3740           13733                           TCF      -5                                    
042845,002001: 14,3741           05355                           TC       PHASCHNG                              
042846,002002: 14,3742           04024                           OCT      04024                                 
042847,002003: 
042848,002004: 14,3743           06060                           TC       INTPRET                               
042849,002005: 14,3744           77624        CORSIT             CALL                                           
042850,002006: 14,3745           31542                                    COARSE                                
042851,002007: 14,3746           77624                           CALL                                           
042852,002008: 14,3747           31566                                    NCOARSE                               
042853,002009: 14,3750           77624                           CALL                                           
042854,002010: 14,3751           33020                                    GYROTRIM                              
042855,002011: 14,3752           77650                           GOTO                                           
042856,002012: 14,3753           33200                                    SURFDISP                              
042857,002013: 15,2000                                           SETLOC   P50S                                  
042858,002014: 15,2000                                           BANK                                           
042859,002015: 15,3273                                           COUNT*   $$/P57                                
042860,002016: 
042861,002017: 15,3273           01535        DISPGYRO           VN       0693                                  
042862,002018: 

Page 973

042864,002020:                                                                                                  #  LUNAR SURFACE IMU ALIGNMENT PROGRAM
042865,002021: 
042866,002022: 15,3274           04607        P57                TC       BANKCALL                              #  IS ISS ON - IF NOT, IMUCHK WILL SEND
042867,002023: 15,3275           33634                           CADR     IMUCHK                                #  ALARM CODE 210 AND EXIT VIA GOTOPOOH
042868,002024: 
042869,002025: 15,3276           05520                           TC       DOWNFLAG                              
042870,002026: 15,3277           00222                           ADRES    FLT59FLG                              
042871,002027: 
042872,002028: 15,3300           36266                           CAF      THREE                                 #  JAM REFSMMAT OPTION 3 FOR INITIAL DISP.
042873,002029: 15,3301           55144                           TS       OPTION2                               
042874,002030: 15,3302           34744        P57OPT             CAF      BIT1                                  
042875,002031: 15,3303           04607                           TC       BANKCALL                              
042876,002032: 15,3304           20725                           CADR     GOPERF4R                              #  FLASH V04N06 FOR ALIGNMENT CODE
042877,002033: 15,3305           06001                           TC       GOTOPOOH                              #  V34 TERMINATE
042878,002034: 15,3306           13313                           TCF      ALIGNOPT                              #  V33 PROCEED
042879,002035: 15,3307           13302                           TCF      P57OPT                                #  V32 RECYCLE
042880,002036: 
042881,002037: 15,3310           05355                           TC       PHASCHNG                              
042882,002038: 15,3311           00014                           OCT      00014                                 
042883,002039: 15,3312           05146                           TC       ENDOFJOB                              
042884,002040: 
042885,002041: 15,3313           31144        ALIGNOPT           CA       OPTION2                               
042886,002042: 15,3314           76266                           MASK     THREE                                 
042887,002043: 15,3315           50000                           INDEX    A                                     
042888,002044: 15,3316           13317                           TCF      +1                                    
042889,002045: 15,3317           13332                           TCF      TDISP                                 #  OPTION 4 LS ORIENTATION
042890,002046: 15,3320           13373                           TCF      PACKOPTN                              #  OPTION 1 PREFERRED
042891,002047: 15,3321           13302                           TCF      P57OPT                                #  OPTION 2 INVALID IN P57, RECYCLE
042892,002048: 15,3322           06060                           TC       INTPRET                               #  OPTION 3 REFSMMAT
042893,002049: 15,3323           75160                           AXC,1    AXC,2                                 #  JAM REFSMMAT IN XSMD LOC
042894,002050: 15,3324           01731                                    REFSMMAT                              
042895,002051: 15,3325           03606                                    XSMD                                  
042896,002052: 15,3326           77624                           CALL                                           
042897,002053: 15,3327           26374                                    MATMOVE                               
042898,002054: 15,3330           77650                           GOTO                                           
042899,002055: 15,3331           33372                                    PACKOPTN   -1                         
042900,002056: 
042901,002057: 15,3332           06060        TDISP              TC       INTPRET                               
042902,002058: 15,3333           77745                           DLOAD                                          
042903,002059: 15,3334           03442                                    TIG                                   #  LOAD ASCENT TIME FOR DISPLAY
042904,002060: 15,3335           01045        P57A               STORE    DSPTEM1                               
042905,002061: 15,3336           77776                           EXIT                                           
042906,002062: 15,3337           32325        P57AA              CAF      V06N34*                               #  DISPLAY TALIGN, TALIGN : DSPTEM1
042907,002063: 15,3340           04607                           TC       BANKCALL                              
042908,002064: 15,3341           20471                           CADR     GOFLASH                               
042909,002065: 15,3342           16001                           TCF      GOTOPOOH                              #  V34-TERMINATE
042910,002066: 15,3343           13345                           TCF      +2                                    
042911,002067: 15,3344           13337                           TCF      P57AA                                 #  VB32-RECYCLE
042912,002068: 
042913,002069: 15,3345           06060                           TC       INTPRET                               

Page 974

042915,002071: 15,3346           65234                           RTB      PDDL                                  
042916,002072: 15,3347           21603                                    LOADTIME                              #  PUSH CURRENT TIME AND PICK UP KEY IN
042917,002073: 15,3350           01045                                    DSPTEM1                               
042918,002074: 15,3351           65254                           BZE      PDDL                                  
042919,002075: 15,3352           33362                                    P57C                                  #  IF KEY IN TIME ZERO-TALIGN=CURRENT TIME
042920,002076: 15,3353           51025                           DSU      BPL                                   #  NOT ZERO SO EXCHANGE PD WITH DSPTEM1
042921,002077: 15,3354           01045                                    DSPTEM1                               
042922,002078: 15,3355           33362                                    P57C                                  
042923,002079: 15,3356           45545                           DLOAD    STADR                                 #  IF KEYIN TIME GREATER THAN CURRENT TIME
042924,002080: 15,3357           74335                           STORE    TIG                                   #  STORE IT IN TIG
042925,002081: 15,3360           36775                           STCALL   TALIGN                                
042926,002082: 15,3361           33364                                    P57D                                  
042927,002083: 15,3362           45545        P57C               DLOAD    STADR                                 
042928,002084: 15,3363           75002                           STORE    TALIGN                                
042929,002085: 15,3364           34041        P57D               STCALL   TDEC1                                 
042930,002086: 15,3365           27115                                    LEMPREC                               #  COMPUTE DESIRED IMU ORIENTATION STORE
042931,002087: 15,3366           53575                           VLOAD    UNIT                                  #  IN  X,Y,ZSMD
042932,002088: 15,3367           00001                                    RATT                                  
042933,002089: 15,3370           37607                           STCALL   XSMD                                  
042934,002090: 15,3371           11014                                    LSORIENT                              
042935,002091: 15,3372           77776                           EXIT                                           
042936,002092: 15,3373           34746        PACKOPTN           CAF      ZERO                                  #  PACK FLAG BITS FOR OPTION DISPLAY
042937,002093: 15,3374           55144                           TS       OPTION1    +1                         #  JAM ZERO IN ALIGNMENT OPTION
042938,002094: 15,3375           55145                           TS       OPTION1    +2                         #  INITIALIZE FLAG BIT CONFIGURATION
042939,002095: 15,3376           34730                           CAF      REFSMBIT                              
042940,002096: 15,3377           70077                           MASK     FLAGWRD3                              #  REFSMFLG
042941,002097: 15,3400           10000                           CCS      A                                     
042942,002098: 15,3401           34736                           CAF      BIT7                                  #  SET
042943,002099: 15,3402           27145                           ADS      OPTION1    +2                         #  CLEAR-JUST ZERO
042944,002100: 15,3403           34744                           CAF      ATTFLBIT                              
042945,002101: 15,3404           70102                           MASK     FLAGWRD6                              #  ATTFLG
042946,002102: 15,3405           10000                           CCS      A                                     
042947,002103: 15,3406           34741                           CAF      BIT4                                  #  SET
042948,002104: 15,3407           27145                           ADS      OPTION1    +2                         #  CLEAR-ZERO IN A
042949,002105: 15,3410           34741                           CAF      BIT4                                  
042950,002106: 15,3411           55143                           TS       OPTION1                               #  JAM 00010 IN OPTION1 FOR CHECK LIST
042951,002107: 
042952,002108: 15,3412           33633        DSPOPTN            CAF      VB05N06                               #  DISPLAY OPTION CODE AND FLAG BITS
042953,002109: 15,3413           04607                           TC       BANKCALL                              
042954,002110: 15,3414           20471                           CADR     GOFLASH                               
042955,002111: 15,3415           16001                           TCF      GOTOPOOH                              #  VB34-TERMINATE
042956,002112: 15,3416           13420                           TCF      +2                                    #  V33-PROCEED
042957,002113: 15,3417           13412                           TCF      DSPOPTN                               #  V32-RECYCLE
042958,002114: 
042959,002115: 15,3420           34730                           CAF      REFSMBIT                              
042960,002116: 15,3421           70077                           MASK     FLAGWRD3                              
042961,002117: 15,3422           10000                           CCS      A                                     
042962,002118: 15,3423           13523                           TCF      GETLMATT                              #  SET, GO COMPUTE LM ATTITUDE
042963,002119: 15,3424           34744                           CAF      ATTFLBIT                              #  CLEAR-CHECK ATTFLAG FOR STORED ATTITUDE.
042964,002120: 15,3425           70102                           MASK     FLAGWRD6                              

Page 975

042966,002122: 15,3426           10000                           CCS      A                                     
042967,002123: 15,3427           13527                           TCF      BYLMATT                               #  ALLFLG SET, CHK OPTION FOR GRAVITY COMP
042968,002124: 15,3430           34743                           CAF      BIT2                                  #  SEE IF OPTION 2 OR 3
042969,002125: 15,3431           71144                           MASK     OPTION2                               
042970,002126: 15,3432           10000                           CCS      A                                     
042971,002127: 15,3433           13527                           TCF      BYLMATT                               #  OPTION 2 OR 3 BUT DONT HAVE ATTITUDE
042972,002128: 15,3434           05571                           TC       ALARM                                 #  OPTION INCONSISTANT WITH FLAGS-ALARM 701
042973,002129: 15,3435           00701                           OCT      701                                   
042974,002130: 15,3436           34777                           CAF      VB05N09                               #  DISPLAY ALARM FOR ACTION
042975,002131: 15,3437           04607                           TC       BANKCALL                              
042976,002132: 15,3440           20471                           CADR     GOFLASH                               
042977,002133: 15,3441           16001                           TCF      GOTOPOOH                              #  VB34-TERMINATE
042978,002134: 15,3442           13412                           TCF      DSPOPTN                               #  V33-PROCEED   ********TEMPORARY
042979,002135: 15,3443           13412                           TCF      DSPOPTN                               #  VB32-RECYCLE TO OPTION DISPLAY V 05N06
042980,002136: 

Page 976

042982,002138:                                                                                                  #  TRANSFORM VEC1,2 FROM MOON FIXED TO REF AND JAM BACK IN VEC1,2
042983,002139: 
042984,002140: 15,3444           40220        MFREF              STQ      SETPD                                 
042985,002141: 15,3445           02746                                    QMAJ                                  
042986,002142: 15,3446           00001                                    0                                     
042987,002143: 15,3447           77634                           RTB                                            
042988,002144: 15,3450           21603                                    LOADTIME                              
042989,002145: 15,3451           27562                           STOVL    TSIGHT                                
042990,002146: 15,3452           03246                                    VEC1                                  
042991,002147: 15,3453           41525                           PDDL     PUSH                                  
042992,002148: 15,3454           03562                                    TSIGHT                                
042993,002149: 15,3455           77624                           CALL                                           
042994,002150: 15,3456           55716                                    RP-TO-R                               
042995,002151: 15,3457           27246                           STOVL    VEC1                                  
042996,002152: 15,3460           03254                                    VEC2                                  
042997,002153: 15,3461           65201                           SETPD    PDDL                                  
042998,002154: 15,3462           00001                                    0                                     
042999,002155: 15,3463           03562                                    TSIGHT                                
043000,002156: 15,3464           45006                           PUSH     CALL                                  
043001,002157: 15,3465           55716                                    RP-TO-R                               
043002,002158: 15,3466           37254                           STCALL   VEC2                                  
043003,002159: 15,3467           02746                                    QMAJ                                  
043004,002160: 

Page 977

043006,002162:                                                                                                  #  COMPUTE LM ATTITUDE IN MOON FIXED COORDINATES USING REFSMMAT AND
043007,002163:                                                                                                  #  STORE IN YNBSAV AND ZNBSAV
043008,002164: 
043009,002165: 15,3470           45020        REFMF              STQ      CALL                                  
043010,002166: 15,3471           02746                                    QMAJ                                  
043011,002167: 15,3472           47522                                    CDUTRIG                               #  GET SIN AND COS OF CDUS
043012,002168: 15,3473           40234                           RTB      SETPD                                 
043013,002169: 15,3474           21603                                    LOADTIME                              
043014,002170: 15,3475           00001                                    0                                     
043015,002171: 15,3476           37562                           STCALL   TSIGHT                                
043016,002172: 15,3477           20030                                    CALCSMSC                              #  GET YNB IN SM
043017,002173: 15,3500           61375                           VLOAD    VXM                                   
043018,002174: 15,3501           02673                                    YNB                                   
043019,002175: 15,3502           01732                                    REFSMMAT                              #   YNB TO REF
043020,002176: 15,3503           65256                           UNIT     PDDL                                  
043021,002177: 15,3504           03562                                    TSIGHT                                
043022,002178: 15,3505           45006                           PUSH     CALL                                  
043023,002179: 15,3506           51644                                    R-TO-RP                               
043024,002180: 15,3507           26230                           STOVL    YNBSAV                                #  YNB TO MF
043025,002181: 15,3510           02701                                    ZNB                                   
043026,002182: 15,3511           53505                           VXM      UNIT                                  
043027,002183: 15,3512           01732                                    REFSMMAT                              #  ZNB TO REF
043028,002184: 15,3513           41525                           PDDL     PUSH                                  
043029,002185: 15,3514           03562                                    TSIGHT                                
043030,002186: 15,3515           77624                           CALL                                           
043031,002187: 15,3516           51644                                    R-TO-RP                               #  ZNB TO MF
043032,002188: 15,3517           02236                           STORE    ZNBSAV                                
043033,002189: 15,3520           77614                           SETGO                                          
043034,002190: 15,3521           03036                                    ATTFLAG                               
043035,002191: 15,3522           02746                                    QMAJ                                  
043036,002192: 

Page 978

043038,002194:                                                                                                  #  BRANCH TO ALIGNMENT OPTION
043039,002195: 
043040,002196: 15,3523           06060        GETLMATT           TC       INTPRET                               
043041,002197: 15,3524           77624                           CALL                                           
043042,002198: 15,3525           33470                                    REFMF                                 #  GO TRANSFORM TO MF IN YNBSAV,ZNBSAV
043043,002199: 15,3526           77776                           EXIT                                           
043044,002200: 
043045,002201: 15,3527           05506        BYLMATT            TC       UPFLAG                                #  SET INITIAL ALIGN FLAG
043046,002202: 15,3530           00205                           ADRES    INITALGN                              
043047,002203: 15,3531           34744                           CAF      BIT1                                  
043048,002204: 15,3532           71144                           MASK     OPTION2                               #  SEE IF OPTION 1 OR 3
043049,002205: 15,3533           10000                           CCS      A                                     
043050,002206: 15,3534           12615                           TCF      GVDETER                               #  OPTION 1 OR 2, GET GRAVITY
043051,002207: 
043052,002208: 15,3535           05355        ATTCHK             TC       PHASCHNG                              
043053,002209: 15,3536           04024                           OCT      04024                                 
043054,002210: 
043055,002211: 15,3537           34744                           CAF      ATTFLBIT                              #  NOT 1 OR 3, CHECK ATTFLAG
043056,002212: 15,3540           70102                           MASK     FLAGWRD6                              
043057,002213: 15,3541           10000                           CCS      A                                     
043058,002214: 15,3542           13557                           TCF      P57OPT0                               #  GET ALIGNMENT VECS FOR OPTION 0
043059,002215: 15,3543           05355        P57JUMP            TC       PHASCHNG                              
043060,002216: 15,3544           04024                           OCT      04024                                 
043061,002217: 
043062,002218: 15,3545           05520                           TC       DOWNFLAG                              #  ATTFLG CLEAR-RESET INTALIGN FLAG
043063,002219: 15,3546           00205                           ADRES    INITALGN                              
043064,002220: 15,3547           36266                           CAF      THREE                                 
043065,002221: 15,3550           71144                           MASK     OPTION2                               #  BRANCH ON OPTION CODE
043066,002222: 15,3551           50000                           INDEX    A                                     
043067,002223: 15,3552           13553                           TCF      +1                                    
043068,002224: 15,3553           13557                           TCF      P57OPT0                               #  OPTION IS 0
043069,002225: 15,3554           13600                           TCF      P57OPT1                               #  OPTION IS 1
043070,002226: 15,3555           13616                           TCF      P57OPT2                               #  OPTION IS 2
043071,002227: 15,3556           13617                           TCF      P57OPT3                               #  OPTION IS 3
043072,002228: 

Page 979

043074,002230:                                                                                                  #  OPTION 0, GET TWO ATTITUDE VECS
043075,002231: 
043076,002232: 15,3557           06060        P57OPT0            TC       INTPRET                               
043077,002233: 15,3560           77775                           VLOAD                                          
043078,002234: 15,3561           02230                                    YNBSAV                                #  Y AND Z ATTITUDE WILL BE PUT IN REF
043079,002235: 15,3562           27246                           STOVL    VEC1                                  
043080,002236: 15,3563           02236                                    ZNBSAV                                
043081,002237: 15,3564           37254                           STCALL   VEC2                                  
043082,002238: 15,3565           47522                                    CDUTRIG                               
043083,002239: 15,3566           77624                           CALL                                           
043084,002240: 15,3567           20030                                    CALCSMSC                              #  COMPUTE SC AXIS WRT PRESENT SM
043085,002241: 15,3570           77775                           VLOAD                                          
043086,002242: 15,3571           02673                                    YNB                                   
043087,002243: 15,3572           26761        SAMETYP            STOVL    STARSAV1                              #  Y SC AXIS WRT PRESENT SM
043088,002244: 15,3573           02701                                    ZNB                                   
043089,002245: 15,3574           36767                           STCALL   STARSAV2                              #  Z SC AXIS WRT PRESENT SM
043090,002246: 15,3575           33444                                    MFREF                                 #  TRANSFORM VEC1,2 FROM MF TO REF
043091,002247: 15,3576           77650                           GOTO                                           
043092,002248: 15,3577           33120                                    SURFLINE                              
043093,002249: 
043094,002250:                                                                                                  #  OPTION 1, GET LANDING SITE AND Z-ATTITUDE VEC
043095,002251: 
043096,002252: 15,3600           06060        P57OPT1            TC       INTPRET                               
043097,002253: 15,3601           53575                           VLOAD    UNIT                                  
043098,002254: 15,3602           02021                                    RLS                                   #  LANDING SITE VEC
043099,002255: 15,3603           27246                           STOVL    VEC1                                  
043100,002256: 15,3604           02236                                    ZNBSAV                                #  Z ATTITUDE VEC
043101,002257: 15,3605           37254                           STCALL   VEC2                                  
043102,002258: 15,3606           47522                                    CDUTRIG                               
043103,002259: 15,3607           77624                           CALL                                           
043104,002260: 15,3610           20030                                    CALCSMSC                              #  GET ZNB AXIS WRT PRES SM FOR STARSAV2
043105,002261: 15,3611           45175                           VLOAD    CALL                                  
043106,002262: 15,3612           02222                                    GSAV                                  #  TRANS GSAV FROM NB TO SM FOR STARSAV1
043107,002263: 15,3613           47653                                    CDU*NBSM                              
043108,002264: 15,3614           77650                           GOTO                                           
043109,002265: 15,3615           33572                                    SAMETYP                               #  NOW DO SAME AS OPTION 0
043110,002266: 

Page 980

043112,002268:                                                                                                  #  OPTION 2, GET TWO STAR SIGHTINGS
043113,002269: 
043114,002270: 15,3616           13064        P57OPT2            TCF      2STARS                                #  DO SIGHTING ON 2 STARS
043115,002271: 
043116,002272:                                                                                                  #  OPTION 3, GET LANDING SITE VEC AND ONE STAR SIGHTING
043117,002273: 
043118,002274: 15,3617           06060        P57OPT3            TC       INTPRET                               
043119,002275: 15,3620           53575                           VLOAD    UNIT                                  
043120,002276: 15,3621           02021                                    RLS                                   #  LANDING SITE VEC
043121,002277: 15,3622           03246                           STORE    VEC1                                  
043122,002278: 15,3623           27254                           STOVL    VEC2                                  #  DUMMY VEC2 FOR 2ND CATALOG STAR
043123,002279: 15,3624           02222                                    GSAV                                  #  GRAVITY VEC NB
043124,002280: 15,3625           77624                           CALL                                           
043125,002281: 15,3626           47653                                    CDU*NBSM                              #  TRANS GSAV FROM NB TO SM FOR STARSAV1
043126,002282: 15,3627           36761                           STCALL   STARSAV1                              
043127,002283: 15,3630           33444                                    MFREF                                 #  STARSAV2 IS STORED AS 2ND OBSERVED STAR
043128,002284: 15,3631           77776                           EXIT                                           
043129,002285: 15,3632           13066                           TCF      1STAR                                 #  1STAR GET VEC2,STARSAV2,GOES TO SURFLINE
043130,002286: 
043131,002287: 15,3633           01206        VB05N06            VN       506                                   
043132,002288: 

Page 981

043134,002290:                                                                                                  #  CHECK IMODES30 TO VARIFY IMU IS ON
043135,002291: 
043136,002292: 15,3634           41277        IMUCHK             CS       IMODES30                              
043137,002293: 15,3635           74734                           MASK     BIT9                                  
043138,002294: 15,3636           10000                           CCS      A                                     #  IS IMU ON
043139,002295: 15,3637           13643                           TCF      +4                                    #  YES
043140,002296: 
043141,002297: 15,3640           05571                           TC       ALARM                                 #  NO, SEND ALARM AND EXIT
043142,002298: 15,3641           00210                           OCT      210                                   
043143,002299: 15,3642           06001                           TC       GOTOPOOH                              
043144,002300: 
043145,002301: 15,3643           05506                           TC       UPFLAG                                
043146,002302: 15,3644           00007                           ADRES    IMUSE                                 #  SET IMUSE FLAG
043147,002303: 
043148,002304: 15,3645           04622                           TC       SWRETURN                              
043149,002305: 
043150,002306: 04,2000                                           SETLOC   AOTMARK2                              
043151,002307: 04,2000                                           BANK                                           
043152,002308: 04,3014                                           COUNT*   $$/P57                                
043153,002309: 
043154,002310: 04,3014           77220        LSORIENT           STQ      VLOAD                                 
043155,002311: 04,3015           02746                                    QMAJ                                  
043156,002312: 04,3016           01555                                    RRECTCSM                              
043157,002313: 04,3017           47235                           VXV      VXV                                   
043158,002314: 04,3020           01563                                    VRECTCSM                              
043159,002315: 04,3021           03607                                    XSMD                                  
043160,002316: 04,3022           77656                           UNIT                                           
043161,002317: 04,3023           03623                           STORE    ZSMD                                  
043162,002318: 04,3024           53435                           VXV      UNIT                                  
043163,002319: 04,3025           03607                                    XSMD                                  
043164,002320: 04,3026           37615                           STCALL   YSMD                                  
043165,002321: 04,3027           02746                                    QMAJ                                  

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