Source Code

This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the second release of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 97. A bug (which had been around since at least Apollo 10, Luminary 69) was discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute revision into Rev 1, which is what actually flew rather than the Rev 0 presented here. A hardcopy of Rev 0 is known to exist — it belonged to AGC developer Allan Klumpp for many years — but unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus the code you see here had been reconstructed (we believe accurately) rather than transcribed. The first step of the reconstruction of the Rev 0 source code was the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection. The process of reverting the active portion of the source code (i.e., other than program comments) from Rev 1 to Rev 0 was very minor, consisting only of moving the position of the STARTSB1 label in FRESH START AND RESTART. Allan had previously given us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read, in part:

	GAP:  ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051

A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here.

041258,000002:                                                                                                  ## Copyright:   Public domain.
041259,000003:                                                                                                  ## Filename:    P51-P53.agc
041260,000004:                                                                                                  ## Purpose:     Part of the reconstructed source code for LMY99 Rev 0,
041261,000005:                                                                                                  ##              otherwise known as Luminary Rev 99, the second release
041262,000006:                                                                                                  ##              of the Apollo Guidance Computer (AGC) software for Apollo 11.
041263,000007:                                                                                                  ##              It differs from LMY99 Rev 1 (the flown version) only in the
041264,000008:                                                                                                  ##              placement of a single label. The corrections shown here have
041265,000009:                                                                                                  ##              been verified to have the same bank checksums as AGC developer
041266,000010:                                                                                                  ##              Allan Klumpp's copy of Luminary Rev 99, and so are believed
041267,000011:                                                                                                  ##              to be accurate. This file is intended to be a faithful 
041268,000012:                                                                                                  ##              recreation, except that the code format has been changed to 
041269,000013:                                                                                                  ##              conform to the requirements of the yaYUL assembler rather than 
041270,000014:                                                                                                  ##              the original YUL assembler.
041271,000015:                                                                                                  ##
041272,000016:                                                                                                  ## Assembler:   yaYUL
041273,000017:                                                                                                  ## Contact:     Hartmuth Gutsche <hgutsche@xplornet.com>.
041274,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo.
041275,000019:                                                                                                  ## Pages:       926-983
041276,000020:                                                                                                  ## Mod history: 2009-05-31 HG   Transcribed from page images.
041277,000021:                                                                                                  ##              2009-06-07 RSB  Corrected a typo.
041278,000022:                                                                                                  ##              2016-12-13 RSB  GOTOP00H -> GOTOPOOH
041279,000023:                                                                                                  ##              2016-12-17 RSB  Proofed text comments with octopus/ProoferComments
041280,000024:                                                                                                  ##                              and corrected the errors found.
041281,000025:                                                                                                  ##              2017-03-14 RSB  Comment-text fixes noted in proofing Luminary 116.
041282,000026:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
041283,000027:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
041284,000028:                                                                                                  ##              2017-08-01 MAS  Created from LMY99 Rev 1.
041285,000029: 
041286,000030:                                                                                                  ## This source code has been transcribed or otherwise adapted from
041287,000031:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
041288,000032:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
041289,000033:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
041290,000034:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
041291,000035:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
041292,000036:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
041293,000037:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
041294,000038:                                                                                                  ## actually created.
041295,000039:                                                                                                  ##
041296,000040:                                                                                                  ## The code has been modified to match LMY99 Revision 0, otherwise
041297,000041:                                                                                                  ## known as Luminary Revision 99, the Apollo 11 software release preceeding
041298,000042:                                                                                                  ## the listing from which it was transcribed. It has been verified to
041299,000043:                                                                                                  ## contain the same bank checksums as AGC developer Allan Klumpp's listing
041300,000044:                                                                                                  ## of Luminary Revision 99 (for which we do not have scans).
041301,000045:                                                                                                  ##
041302,000046:                                                                                                  ## Notations on Allan Klumpp's listing read, in part:
041303,000047:                                                                                                  ##
041304,000048:                                                                                                  ##      ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
041305,000049: 

Page 926

041307,000051:                                                                                                  #  PROGRAM NAME - PROG52                 DATE - JAN 9, 1967
041308,000052:                                                                                                  #  MOD NO - 0                                    LOG SECTION - P51-P53
041309,000053:                                                                                                  #  MODIFICATION BY - LONSKE                      ASSEMBLY - SUNDANCE REV 46
041310,000054: 
041311,000055:                                                                                                  #  FUNCTIONAL DESCRIPTION -
041312,000056: 
041313,000057:                                                                                                  #        ALIGNS THE IMU TO ONE OF THREE ORIENTATIONS SELECTED BY THE ASTRONAUT.  THE PRESENT IMU ORIENTATION IS KNOWN
041314,000058:                                                                                                  #        AND IS STORED IN REFSMMAT.  THE THREE POSSIBLE ORIENTATIONS MAY BE_
041315,000059: 
041316,000060:                                                                                                  #        (A)     PREFERRED ORIENTATION
041317,000061: 
041318,000062:                                                                                                  #                AN OPTIMUM ORIENTATION FOR A PREVIOUSLY CALCULATED MANUEVER.  THIS ORIENTATION MUST BE CALCULATED AND
041319,000063:                                                                                                  #                STORED BY A PREVIOUSLY SELECTED PROGRAM.
041320,000064: 
041321,000065:                                                                                                  #        (B)     NOMINAL ORIENTATION
041322,000066: 
041323,000067:                                                                                                  #                X   = UNIT ( R )
041324,000068:                                                                                                  #                -SM
041325,000069: 
041326,000070:                                                                                                  #                Y   = UNIT (V X R)
041327,000071:                                                                                                  #                 SM
041328,000072: 
041329,000073:                                                                                                  #                Z   = UNIT (X   X Y  )
041330,000074:                                                                                                  #                 SM          SM    SM
041331,000075: 
041332,000076:                                                                                                  #                WHERE_
041333,000077: 
041334,000078:                                                                                                  #                R = THE GEOCENTRIC RADIUS VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
041335,000079:                                                                                                  #                -
041336,000080: 
041337,000081:                                                                                                  #                V = THE INERTIAL VELOCITY VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
041338,000082:                                                                                                  #                -
041339,000083: 
041340,000084:                                                                                                  #        (C)     REFSMMAT ORIENTATION
041341,000085: 
041342,000086:                                                                                                  #        (D)     LANDING SITE - THIS IS NOT AVAILIBLE IN SUNDANCE
041343,000087: 
041344,000088:                                                                                                  #        THIS SELECTION CORRECTS THE PRESENT IMU ORIENTATION.  THE PRESENT ORIENTATION DIFFERS FROM THAT TO WHICH IT
041345,000089:                                                                                                  #        WAS LAST ALIGNED ONLY DUE TO GYRO DRIFT (I.E. NEITHER GIMBAL LOCK NOR IMU POWER INTERRUPTION HAS OCCURED
041346,000090:                                                                                                  #        SINCE THE LAST ALIGNMENT).
041347,000091: 
041348,000092:                                                                                                  #        AFTER A IMU ORIENTATION HAS BEEN SELECTED ROUTINE S52.2 IS OPERATED TO COMPUTE THE GIMBAL ANGLES USING THE
041349,000093:                                                                                                  #        NEW ORIENTATION AND THE PRESENT VEHICLE ATTITUDE.  CAL52A THEN USES THESE ANGLES, STORED IN THETAD,+1,+2, TO
041350,000094:                                                                                                  #        COARSE ALIGN THE IMU.  THE STAR SELECTION ROUTINE, R56, IS THEN OPERATED.  IF 2 STARS ARE NOT AVAILABLE AN ALARM
041351,000095:                                                                                                  #        IS FLASHED TO NOTIFY THE ASTRONAUT.  AT THIS POINT THE ASTRONAUT WILL MANUEVER THE VEHICLE AND SELECT 2 STARS
041352,000096:                                                                                                  #        EITHER MANUALLY OR AUTOMATICALLY.  AFTER 2 STARS HAVE BEEN SELECTED THE IMU IS FINE ALIGNED USING ROUTINE R51.  IF
041353,000097:                                                                                                  #        THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING (INDICATED BY RNDVZFLG) P20 IS DISPLAYED.  OTHERWISE P00 IS
041354,000098:                                                                                                  #        REQUESTED.
041355,000099: 
041356,000100:                                                                                                  #  CALLING SEQUENCE -
041357,000101: 

Page 927

041359,000103:                                                                                                  #        THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
041360,000104: 
041361,000105:                                                                                                  #  SUBROUTINES CALLED -
041362,000106: 
041363,000107:                                                                                                  #        1. FLAGDOWN              7. S52.2               13. NEWMODEX
041364,000108:                                                                                                  #        2. R02BOTH               8. CAL53A              14. PRIOLARM
041365,000109:                                                                                                  #        3. GOPERF4               9. FLAGUP
041366,000110:                                                                                                  #        4. MATMOVE              10. R56
041367,000111:                                                                                                  #        5. GOFLASH              11. R51
041368,000112:                                                                                                  #        6. S52.3                12. GOPERF3
041369,000113: 
041370,000114:                                                                                                  #  NORMAL EXIT MODES -
041371,000115: 
041372,000116:                                                                                                  #        EXITS TO ENDOFJOB
041373,000117: 
041374,000118:                                                                                                  #  ALARM OR ABORT EXIT MODES -
041375,000119: 
041376,000120:                                                                                                  #        NONE
041377,000121: 
041378,000122:                                                                                                  #  OUTPUT -
041379,000123: 
041380,000124:                                                                                                  #        THE FOLLOWING MAY BE FLASHED ON THE DSKY
041381,000125:                                                                                                  #                1. IMU ORIENTATION CODE
041382,000126:                                                                                                  #                2. ALARM CODE 215 - PREFERRED IMU ORIENTATION NOT SPECIFIED
041383,000127:                                                                                                  #                3. TIME OF NEXT IGNITION
041384,000128:                                                                                                  #                4. GIMBAL ANGLES
041385,000129:                                                                                                  #                5. ALARM CODE 405 - TWO STARS NOT AVAILABLE
041386,000130:                                                                                                  #                6. PLEASE PERFORM P00
041387,000131:                                                                                                  #        THE MODE DISPLAY MAY BE CHANGED TO 20
041388,000132: 
041389,000133:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
041390,000134: 
041391,000135:                                                                                                  #        PFRATFLG SHOULD BE SET IF A PREFERRED ORIENTATION HAS BEEN COMPUTED.  IF IT HAS BEEN COMPUTED IT IS STORED IN
041392,000136:                                                                                                  #        XSMD, YSMD, ZSMD.
041393,000137: 
041394,000138:                                                                                                  #        RNDVZFLG INDICATES WHETHER THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING.
041395,000139: 
041396,000140:                                                                                                  #  DEBRIS -
041397,000141: 
041398,000142:                                                                                                  #        WORK AREA
041399,000143: 
041400,000144: 33,3777                                           BANK     33                                    
041401,000145: 15,2000                                           SETLOC   P50S                                  
041402,000146: 15,2000                                           BANK                                           
041403,000147: 
041404,000148: 15,2050  E5,1755                                  EBANK=   BESTI                                 
041405,000149: 15,2050                                           COUNT*   $$/P52                                
041406,000150: 15,2050           04616        PROG52             TC       BANKCALL                              
041407,000151: 15,2051           11254                           CADR     R02BOTH                               #  IMU STATUS CHECK
041408,000152: 15,2052           34750                           CAF      PFRATBIT                              
041409,000153: 15,2053           70076                           MASK     FLAGWRD2                              #  IS PFRATFLG SET?
041410,000154: 15,2054           10000                           CCS      A                                     

Page 928

041412,000156: 15,2055           02060                           TC       P52A                                  #  YES
041413,000157: 15,2056           34752                           CAF      BIT2                                  #  NO
041414,000158: 15,2057           02061                           TC       P52A       +1                         
041415,000159: 15,2060           34753        P52A               CAF      BIT1                                  
041416,000160: 15,2061           55145                           TS       OPTION2                               
041417,000161: 15,2062           34753        P52B               CAF      BIT1                                  
041418,000162: 15,2063           04616                           TC       BANKCALL                              #  FLASH OPTION CODE AND ORIENTATION CODE
041419,000163: 15,2064           20713                           CADR     GOPERF4R                              #  FLASH V04N06
041420,000164: 15,2065           06001                           TC       GOTOPOOH                              
041421,000165: 15,2066           12073                           TCF      +5                                    #  V33 - PROCEED
041422,000166: 15,2067           02062                           TC       P52B                                  #  NEW CODE - NEW ORIENTATION CODE INPUT
041423,000167: 15,2070           05353                           TC       PHASCHNG                              #  DISPLAY RETURN
041424,000168: 15,2071           00014                           OCT      00014                                 
041425,000169: 15,2072           05155                           TC       ENDOFJOB                              
041426,000170: 
041427,000171: 15,2073           31145                           CA       OPTION2                               
041428,000172: 15,2074           76245                           MASK     THREE                                 
041429,000173: 15,2075           50000                           INDEX    A                                     
041430,000174: 15,2076           02077                           TC       +1                                    
041431,000175: 15,2077           12105                           TCF      OPT4                                  #  OPTION 4 LANDING SITE
041432,000176: 15,2100           12153                           TCF      P52H                                  #  OPTION 1 PREFERRED
041433,000177: 15,2101           12110                           TCF      P52T                                  #  OPTION 2 NOMINAL
041434,000178: 15,2102           06037        P52E               TC       INTPRET                               #  OPTION 3 REFSMMAT
041435,000179: 15,2103           77650                           GOTO                                           
041436,000180: 15,2104           32164                                    P52F                                  #  GO DO R51
041437,000181: 
041438,000182: 15,2105           00006        OPT4               EXTEND                                         
041439,000183: 15,2106           31401                           DCA      TLAND                                 #  IF OPTION 4 DISPLAY TLAND
041440,000184: 15,2107           12112                           TCF      P52T       +2                         
041441,000185: 
041442,000186: 15,2110           00006        P52T               EXTEND                                         
041443,000187: 15,2111           34755                           DCA      NEG0                                  
041444,000188: 15,2112           53046                           DXCH     DSPTEM1                               
041445,000189: 15,2113           32170                           CAF      V06N34*                               
041446,000190: 15,2114           04616                           TC       BANKCALL                              
041447,000191: 15,2115           20476                           CADR     GOFLASH                               
041448,000192: 15,2116           06001                           TC       GOTOPOOH                              
041449,000193: 15,2117           02121                           TC       +2                                    
041450,000194: 15,2120           02113                           TC       -5                                    
041451,000195: 15,2121           53046                           DXCH     DSPTEM1                               
041452,000196: 15,2122           00006                           EXTEND                                         
041453,000197: 15,2123           62125                           BZMF     +2                                    #  IF TIME ZERO OR NEG USE TIME2
041454,000198: 15,2124           12127                           TCF      +3                                    
041455,000199: 15,2125           00006                           EXTEND                                         
041456,000200: 15,2126           30025                           DCA      TIME2                                 
041457,000201: 15,2127           53775                           DXCH     TALIGN                                
041458,000202: 15,2130           31145        P52V               CA       OPTION2                               
041459,000203: 15,2131           74752                           MASK     BIT2                                  
041460,000204: 15,2132           10000                           CCS      A                                     
041461,000205: 15,2133           02137                           TC       P52W                                  

Page 929

041463,000207: 15,2134           06037                           TC       INTPRET                               #  OPTION 4 - GET LS ORIENTATION
041464,000208: 15,2135           77650                           GOTO                                           
041465,000209: 15,2136           32220                                    P52LS                                 
041466,000210: 

Page 930

041468,000212:                                                                                                  #  START ALIGNMENT
041469,000213: 
041470,000214: 15,2137           06037        P52W               TC       INTPRET                               
041471,000215: 15,2140           45145                           DLOAD    CALL                                  #  PICK UP ALIGN TIME
041472,000216: 15,2141           02775                                    TALIGN                                #  COMPUTE NOMINAL IMU
041473,000217: 15,2142           31650                                    S52.3                                 #        ORIENTATION
041474,000218: 15,2143           77624        P52D               CALL                                           #  READ VEHICLE ATTITUDE AND
041475,000219: 15,2144           31617                                    S52.2                                 #        COMPUTE GIMBAL ANGLES
041476,000220: 15,2145           77776                           EXIT                                           
041477,000221: 15,2146           35010                           CAF      V06N22                                
041478,000222: 15,2147           04616                           TC       BANKCALL                              #  DISPLAY GIMBAL ANGLES
041479,000223: 15,2150           20476                           CADR     GOFLASH                               
041480,000224: 15,2151           06001                           TC       GOTOPOOH                              
041481,000225: 15,2152           12171                           TCF      COARSTYP                              #  V33 - PROCEED, SEE IF GYRO TORQUE COARSE
041482,000226: 15,2153           06037        P52H               TC       INTPRET                               
041483,000227: 15,2154           77650                           GOTO                                           
041484,000228: 15,2155           32143                                    P52D                                  
041485,000229: 15,2156           06037        REGCOARS           TC       INTPRET                               
041486,000230: 15,2157           77624                           CALL                                           #  DO COARSE ALIGN
041487,000231: 15,2160           31327                                    CAL53A                                #        ROUTINE
041488,000232: 15,2161           43014        COARSRET           SET      CLEAR                                 
041489,000233: 15,2162           01462                                    REFSMFLG                              
041490,000234: 15,2163           01273                                    PFRATFLG                              
041491,000235: 15,2164           77624        P52F               CALL                                           
041492,000236: 15,2165           31015                                    R51                                   
041493,000237: 15,2166           77776        P52OUT             EXIT                                           
041494,000238: 15,2167           06001                           TC       GOTOPOOH                              
041495,000239: 15,2170     5006               VB05N09            =        V05N09                                
041496,000240: 15,2170           01442        V06N34*            VN       634                                   
041497,000241: 

Page 931

041499,000243:                                                                                                  #  CHECK FOR GRRO TORQUE COARSE ALIGNMENT
041500,000244: 
041501,000245: 15,2171           32217        COARSTYP           CAF      OCT13                                 
041502,000246: 15,2172           04616                           TC       BANKCALL                              #  DISPLAY V 50N25 WITH COARSE ALIGN OPTION
041503,000247: 15,2173           20623                           CADR     GOPERF1                               
041504,000248: 15,2174           16001                           TCF      GOTOPOOH                              #  V34 - TERMIN&OE
041505,000249: 15,2175           12156                           TCF      REGCOARS                              #  V33 - NORMAL COARSE
041506,000250: 15,2176           06037                           TC       INTPRET                               #  V32 - GYRO TORQUE COARSE
041507,000251: 15,2177           64375                           VLOAD    MXV                                   
041508,000252: 15,2200           03607                                    XSMD                                  #  GET SM(DESIRED) WRT SM(PRESENT)
041509,000253: 15,2201           01734                                    REFSMMAT                              
041510,000254: 15,2202           77656                           UNIT                                           
041511,000255: 15,2203           26665                           STOVL    XDC                                   
041512,000256: 15,2204           03615                                    YSMD                                  
041513,000257: 15,2205           53521                           MXV      UNIT                                  
041514,000258: 15,2206           01734                                    REFSMMAT                              
041515,000259: 15,2207           26673                           STOVL    YDC                                   
041516,000260: 15,2210           03623                                    ZSMD                                  
041517,000261: 15,2211           53521                           MXV      UNIT                                  
041518,000262: 15,2212           01734                                    REFSMMAT                              
041519,000263: 15,2213           36701                           STCALL   ZDC                                   
041520,000264: 15,2214           31164                                    GYCOARS                               
041521,000265: 15,2215           77650                           GOTO                                           
041522,000266: 15,2216           32166                                    P52OUT                                
041523,000267: 15,2217           00013        OCT13              OCT      13                                    
041524,000268: 

Page 932

041526,000270:                                                                                                  #  COMPUTE LANDING ORIENTATION FOR OPTION 4
041527,000271: 
041528,000272: 15,2220           43014        P52LS              SET      CLEAR                                 #  GET LANDING SITE ORIENTATION
041529,000273: 15,2221           01463                                    LUNAFLAG                              
041530,000274: 15,2222           00662                                    ERADFLAG                              #  TO PICK UP RLS
041531,000275: 15,2223           77201                           SETPD    VLOAD                                 
041532,000276: 15,2224           00001                                    0                                     
041533,000277: 15,2225           02023                                    RLS                                   #  PICK UP LANDING SITE VEC IN MF
041534,000278: 15,2226           41525                           PDDL     PUSH                                  #  RLS PD 0-5
041535,000279: 15,2227           02775                                    TALIGN                                
041536,000280: 15,2230           36401                           STCALL   TLAND                                 #  JAM ALIGN TIME IN TLAND FOR OPTION 4
041537,000281: 15,2231           55716                                    RP-TO-R                               #  TRANS RLS TO REF
041538,000282: 15,2232           77742                           VSR2                                           
041539,000283: 15,2233           16032                           STODL    ALPHAV                                #  INPUT TO LAT-LONG
041540,000284: 15,2234           02775                                    TALIGN                                
041541,000285: 15,2235           77624                           CALL                                           
041542,000286: 15,2236           30446                                    N89DISP                               
041543,000287: 15,2237           53575                           VLOAD    UNIT                                  #  COMPUTE LANDING SITE ORIENT (XSMD)
041544,000288: 15,2240           02032                                    ALPHAV                                
041545,000289: 15,2241           37607                           STCALL   XSMD                                  
041546,000290: 15,2242           11013                                    LSORIENT                              
041547,000291: 15,2243           77650                           GOTO                                           
041548,000292: 15,2244           32143                                    P52D                                  #  NOW GO COMPUTE GIMBAL ANGLES
041549,000293: 

Page 933

041551,000295:                                                                                                  #  SUBROUTINE TO CALCULATE AND DISPLAY THE LUNAR LANDING SITE
041552,000296: 
041553,000297: 14,2000                                           SETLOC   P50S1                                 
041554,000298: 14,2000                                           BANK                                           
041555,000299: 14,2446  E5,1642                                  EBANK=   XSM                                   
041556,000300: 
041557,000301: 14,2446           77620        N89DISP            STQ                                            
041558,000302: 14,2447           02746                                    QMAJ                                  
041559,000303: 14,2450           35243                           STCALL   GDT/2      +4                         #  TEMP STORE TIME
041560,000304: 14,2451           26351                                    LAT-LONG                              
041561,000305: 14,2452           70545                           DLOAD    SR1                                   
041562,000306: 14,2453           01123                                    LONG                                  
041563,000307: 14,2454           16711                           STODL    LANDLONG                              
041564,000308: 14,2455           01125                                    ALT                                   
041565,000309: 14,2456           16713                           STODL    LANDALT                               
041566,000310: 14,2457           01121                                    LAT                                   
041567,000311: 14,2460           16707                           STODL    LANDLAT                               
041568,000312: 14,2461           77776                           EXIT                                           
041569,000313: 
041570,000314: 14,2462           32505        LSDISP             CAF      V06N89*                               #  DISPLAY LAT,LONG/2,ALT
041571,000315: 14,2463           04616                           TC       BANKCALL                              
041572,000316: 14,2464           20476                           CADR     GOFLASH                               
041573,000317: 14,2465           16001                           TCF      GOTOPOOH                              #  V34 - TERMINATE - EXIT P57
041574,000318: 14,2466           12470                           TCF      +2                                    #  V33 - PROCEED - ACCEPT LS DATA
041575,000319: 14,2467           12462                           TCF      LSDISP                                #  V32 OR E - LOOK AGAIN AND/OR LOAD NEW LS
041576,000320: 
041577,000321: 14,2470           06037                           TC       INTPRET                               
041578,000322: 14,2471           72545                           DLOAD    SL1                                   
041579,000323: 14,2472           02711                                    LANDLONG                              
041580,000324: 14,2473           15123                           STODL    LONG                                  
041581,000325: 14,2474           02713                                    LANDALT                               
041582,000326: 14,2475           15125                           STODL    ALT                                   
041583,000327: 14,2476           02707                                    LANDLAT                               
041584,000328: 14,2477           15121                           STODL    LAT                                   
041585,000329: 14,2500           01243                                    GDT/2      +4                         #  PICK UP TIME
041586,000330: 14,2501           77624                           CALL                                           #  GET RLS BACK FROM LAT,LONG,ALT
041587,000331: 14,2502           26422                                    LALOTORV                              #  RLS B-29 IN MPAC AND ALPHAV
041588,000332: 14,2503           77650                           GOTO                                           
041589,000333: 14,2504           02746                                    QMAJ                                  
041590,000334: 14,2505           01531        V06N89*            VN       689                                   
041591,000335: 

Page 934

041593,000337:                                                                                                  #  NAME - S50 ALIAS LOCSAM
041594,000338:                                                                                                  #  BY
041595,000339:                                                                                                  #  VINCENT
041596,000340: 
041597,000341:                                                                                                  #  FUNCTION - COMPUTE INPUTS FOR PICAPAR AND PLANET
041598,000342: 
041599,000343:                                                                                                  #        DEFINE
041600,000344: 
041601,000345:                                                                                                  #        U   = UNIT( SUN WRT EARTH )
041602,000346:                                                                                                  #         ES
041603,000347: 
041604,000348:                                                                                                  #        U   = UNIT( MOON WRT EARTH )
041605,000349:                                                                                                  #         EM
041606,000350: 
041607,000351:                                                                                                  #        R   = POSITION VECTOR OF LEM
041608,000352:                                                                                                  #         L
041609,000353: 
041610,000354:                                                                                                  #        R   = MEAN DISTANCE (384402KM) BETWEEN EARTH AND MOON
041611,000355:                                                                                                  #         EM
041612,000356: 
041613,000357:                                                                                                  #        P   = RATIO R  /(DISTANCE SUN TO EARTH) > .00257125
041614,000358:                                                                                                  #                     EM
041615,000359: 
041616,000360:                                                                                                  #        R   = EQUATORIAL RADIUSS (6378.166KM) OF EARTH
041617,000361:                                                                                                  #         E
041618,000362: 
041619,000363:                                                                                                  #        LOCSAM COMPUTES IN EARTH INFLUENCE
041620,000364: 
041621,000365:                                                                                                  #        VSUN = U
041622,000366:                                                                                                  #                ES
041623,000367: 
041624,000368:                                                                                                  #        VEARTH = -UNIT( R  )
041625,000369:                                                                                                  #                         L
041626,000370: 
041627,000371:                                                                                                  #        VMOON = UNIT(R  .U   - R  )
041628,000372:                                                                                                  #                      EM  EM    L
041629,000373: 
041630,000374:                                                                                                  #        CSUN = COS 90
041631,000375: 
041632,000376:                                                                                                  #        CEARTH = COS(5 + ARCSIN(R /MAG(R )))
041633,000377:                                                                                                  #                                 E      L
041634,000378: 
041635,000379:                                                                                                  #        CMOON   = COS 5
041636,000380: 
041637,000381:                                                                                                  #  INPUT - TIME IN MPAC
041638,000382: 
041639,000383:                                                                                                  #  OUTPUT - LISTED ABOVE
041640,000384: 
041641,000385:                                                                                                  #  SUBROUTINES - LSPOS, LEMPREC
041642,000386: 
041643,000387:                                                                                                  #  DEBRIS - VAC AREA, TSIGHT
041644,000388: 

Page 935

041646,000390: 14,2506                                           COUNT*   $$/LOSAM                              
041647,000391: 
041648,000392: 14,2506  14,2506               S50                =        LOCSAM                                
041649,000393: 14,2506           77620        LOCSAM             STQ                                            
041650,000394: 14,2507           02745                                    QMIN                                  
041651,000395: 14,2510           37562                           STCALL   TSIGHT                                
041652,000396: 14,2511           33664                                    LSPOS                                 
041653,000397: 14,2512           77745                           DLOAD                                          
041654,000398: 14,2513           03562                                    TSIGHT                                
041655,000399: 14,2514           34041                           STCALL   TDEC1                                 
041656,000400: 14,2515           27057                                    LEMPREC                               
041657,000401: 14,2516           61131                           SSP      TIX,2                                 
041658,000402: 14,2517           00052                                    S2                                    
041659,000403: 14,2520           00000                                    0                                     
041660,000404: 14,2521           30543                                    MOONCNTR                              
041661,000405: 14,2522           74375        EARTCNTR           VLOAD    VXSC                                  
041662,000406: 14,2523           02723                                    VMOON                                 
041663,000407: 14,2524           30001                                    RSUBEM                                
041664,000408: 14,2525           52372                           VSL1     VSU                                   
041665,000409: 14,2526           00001                                    RATT                                  
041666,000410: 14,2527           77656                           UNIT                                           
041667,000411: 14,2530           26723                           STOVL    VMOON                                 
041668,000412: 14,2531           00001                                    RATT                                  
041669,000413: 14,2532           57456                           UNIT     VCOMP                                 
041670,000414: 14,2533           16707                           STODL    VEARTH                                
041671,000415: 14,2534           30005                                    RSUBE                                 
041672,000416: 14,2535           77624                           CALL                                           
041673,000417: 14,2536           30575                                    OCCOS                                 
041674,000418: 14,2537           14017                           STODL    CEARTH                                
041675,000419: 14,2540           30604                                    CSS5                                  
041676,000420: 14,2541           34023                           STCALL   CMOON                                 
041677,000421: 14,2542           30570                                    ENDSAM                                
041678,000422: 14,2543           74375        MOONCNTR           VLOAD    VXSC                                  
041679,000423: 14,2544           02723                                    VMOON                                 
041680,000424: 14,2545           30007                                    ROE                                   
041681,000425: 14,2546           53445                           BVSU     UNIT                                  
041682,000426: 14,2547           02715                                    VSUN                                  
041683,000427: 14,2550           26715                           STOVL    VSUN                                  
041684,000428: 14,2551           02723                                    VMOON                                 
041685,000429: 14,2552           53361                           VXSC     VAD                                   
041686,000430: 14,2553           30001                                    RSUBEM                                
041687,000431: 14,2554           00001                                    RATT                                  
041688,000432: 14,2555           57456                           UNIT     VCOMP                                 
041689,000433: 14,2556           26707                           STOVL    VEARTH                                
041690,000434: 14,2557           00001                                    RATT                                  
041691,000435: 14,2560           57456                           UNIT     VCOMP                                 
041692,000436: 14,2561           16723                           STODL    VMOON                                 
041693,000437: 14,2562           30003                                    RSUBM                                 
041694,000438: 14,2563           77624                           CALL                                           
041695,000439: 14,2564           30575                                    OCCOS                                 

Page 936

041697,000441: 14,2565           14023                           STODL    CMOON                                 
041698,000442: 14,2566           30604                                    CSS5                                  
041699,000443: 14,2567           00017                           STORE    CEARTH                                
041700,000444: 14,2570           77745        ENDSAM             DLOAD                                          
041701,000445: 14,2571           30606                                    CSSUN                                 
041702,000446: 14,2572           00021                           STORE    CSUN                                  
041703,000447: 14,2573           77650                           GOTO                                           
041704,000448: 14,2574           02745                                    QMIN                                  
041705,000449: 14,2575           70471        OCCOS              DDV      SR1                                   
041706,000450: 14,2576           00045                                    36D                                   
041707,000451: 14,2577           43336                           ASIN     DAD                                   
041708,000452: 14,2600           30610                                    5DEGREES                              
041709,000453: 14,2601           70546                           COS      SR1                                   
041710,000454: 14,2602           77616                           RVQ                                            
041711,000455: 14,2603                        CEARTH             =        14D                                   
041712,000456: 14,2603                        CSUN               =        16D                                   
041713,000457: 14,2603                        CMOON              =        18D                                   
041714,000458: 14,2603           07760 14473  CSS5               2DEC     .2490475                              #  (COS 5)/4
041715,000459: 14,2605           04000 00000  CSSUN              2DEC     .125                                  #  (COS 60)/4
041716,000460: 14,2607           00343 21616  5DEGREES           2DEC     .013888889                            #  SCALED IN REVS
041717,000461: 

Page 937

041719,000463:                                                                                                  #  PROGRAM NAME - R56            DATE  DEC 20 66
041720,000464:                                                                                                  #  MOD 1                         LOG SECTION P51-P53
041721,000465:                                                                                                  #                                ASSEMBLY   SUNDISK REV40
041722,000466:                                                                                                  #  BY KEN VINCENT
041723,000467: 
041724,000468:                                                                                                  #  FUNCTION
041725,000469:                                                                                                  #        THIS PROGRAM READ THE IMU-CDUS AND COMPUTES THE VEHICLE ORIENTATION
041726,000470:                                                                                                  #        WITH RESPECT TO INERTIAL SPACE.  IT THEN COMPUTES THE SHAFT AXIS (SAX)
041727,000471:                                                                                                  #        WITH RESPECT TO REFERENCE INERTIAL.  EACH STAR IN THE CATALOG IS TESTED
041728,000472:                                                                                                  #        TO DETERMINE IF IT IS OCCULTED BY EITHER THE EARTH, SUN OR MOON.  IF A
041729,000473:                                                                                                  #        STAR IS NOT OCCULTED THEN IT IS PAIRED WITH ALL STAR OF LOWER INDEX.
041730,000474:                                                                                                  #        THE PAIRED STAR IS TESTED FOR OCCULTATION.  PAIRS OF STARS THAT PASS
041731,000475:                                                                                                  #        THE OCCULTATION TESTS ARE TESTED FOR GOOD SEPARATION.  A PAIR OF STARS
041732,000476:                                                                                                  #        HAVE GOOD SEPERATION IF THE ANGLE BETWEEN THEM IS LESS THAN 100 DEGREES
041733,000477:                                                                                                  #        AND MORE THAN 50 DEGREES.  THOSE PAIRS WITH GOOD SEPARATION
041734,000478:                                                                                                  #        ARE THEN TESTED TO SEE IF THEY LIE IN CURRENT FIELD OF VIEW.  (WITHIN
041735,000479:                                                                                                  #        50 DEGREES OF SAX).  THE PAIR WITH MAX SEPARATION IS CHOSEN FROM
041736,000480:                                                                                                  #        THOSE WITH GOOD SEPARATION, AND IN FIELD OF VIEW.
041737,000481: 
041738,000482:                                                                                                  #  CALLING SEQUENCE
041739,000483:                                                                                                  #        L       TC      BANKCALL
041740,000484:                                                                                                  #        L+1     CADR    R56
041741,000485:                                                                                                  #        L+2     ERROR RETURN - NO STARS IN FIELD OF VIEW
041742,000486:                                                                                                  #        L+3     NORMAL RETURN
041743,000487: 
041744,000488:                                                                                                  #  OUTPUT
041745,000489:                                                                                                  #        BESTI, BESTJ - SINGLE PREC, INTEGERS, STAR NUMBERS TIMES 6
041746,000490:                                                                                                  #        VFLAG - FLAG BIT SET IMPLIES NO STARS IN FIELD OF VIEW
041747,000491: 
041748,000492:                                                                                                  #  INITIALIZATION
041749,000493:                                                                                                  #        1)      A CALL TO LOCSAM MUST BE MADE
041750,000494: 
041751,000495:                                                                                                  #  DEBRIS
041752,000496:                                                                                                  #        WORKAREA
041753,000497:                                                                                                  #        X,Y,ZNB
041754,000498:                                                                                                  #        SINCDU, COSCDU
041755,000499:                                                                                                  #        STARAD - STAR +5
041756,000500: 
041757,000501: 14,2611  14,2611               R56                =        PICAPAR                               
041758,000502: 14,2611                                           COUNT*   $$/R56                                
041759,000503: 14,2611           04645        PICAPAR            TC       MAKECADR                              
041760,000504: 14,2612           55745                           TS       QMIN                                  
041761,000505: 14,2613           06037                           TC       INTPRET                               
041762,000506: 14,2614           77624                           CALL                                           
041763,000507: 14,2615           47537                                    CDUTRIG                               
041764,000508: 14,2616           77624                           CALL                                           
041765,000509: 14,2617           20030                                    CALCSMSC                              
041766,000510: 14,2620           77601                           SETPD                                          
041767,000511: 14,2621           00001                                    0                                     
041768,000512: 14,2622           71214                           SET      DLOAD                                 #  VFLAG = 1
041769,000513: 14,2623           01465                                    VFLAG                                 

Page 938

041771,000515: 14,2624           24007                                    DPZERO                                
041772,000516: 14,2625           26756                           STOVL    BESTI                                 
041773,000517: 14,2626           02665                                    XNB                                   
041774,000518: 14,2627           63361                           VXSC     PDVL                                  
041775,000519: 14,2630           24005                                    HALFDP                                
041776,000520: 14,2631           02701                                    ZNB                                   
041777,000521: 14,2632           74370                           AXT,1    VXSC                                  
041778,000522: 14,2633           00344                                    228D                                  #  X1 = 37 X 6 + 6
041779,000523: 14,2634           24005                                    HALFDP                                
041780,000524: 14,2635           77655                           VAD                                            
041781,000525: 14,2636           53505                           VXM      UNIT                                  
041782,000526: 14,2637           01734                                    REFSMMAT                              
041783,000527: 14,2640           02731                           STORE    SAX                                   #  SAX = SHAFT AXIS
041784,000528: 14,2641           66331                           SSP      SSP                                   #  S1 = S2 = 6
041785,000529: 14,2642           00051                                    S1                                    
041786,000530: 14,2643           00006                                    6                                     
041787,000531: 14,2644           00052                                    S2                                    
041788,000532: 14,2645           00006                                    6                                     
041789,000533: 14,2646           52100        PIC1               TIX,1    GOTO                                  #  MAJOR STAR
041790,000534: 14,2647           30651                                    PIC2                                  
041791,000535: 14,2650           30766                                    PICEND                                
041792,000536: 14,2651           50373        PIC2               VLOAD*   DOT                                   
041793,000537: 14,2652           30347                                    CATLOG,1                              
041794,000538: 14,2653           02731                                    SAX                                   
041795,000539: 14,2654           50025                           DSU      BMN                                   
041796,000540: 14,2655           30765                                    CSS33                                 
041797,000541: 14,2656           30646                                    PIC1                                  
041798,000542: 14,2657           77754                           LXA,2                                          
041799,000543: 14,2660           00046                                    X1                                    
041800,000544: 14,2661           52104        PIC3               TIX,2    GOTO                                  
041801,000545: 14,2662           30664                                    PIC4                                  
041802,000546: 14,2663           30646                                    PIC1                                  
041803,000547: 14,2664           50373        PIC4               VLOAD*   DOT                                   
041804,000548: 14,2665           47430                                    CATLOG,2                              
041805,000549: 14,2666           02731                                    SAX                                   
041806,000550: 14,2667           50025                           DSU      BMN                                   
041807,000551: 14,2670           30765                                    CSS33                                 
041808,000552: 14,2671           30661                                    PIC3                                  
041809,000553: 14,2672           47773                           VLOAD*   DOT*                                  
041810,000554: 14,2673           30347                                    CATLOG,1                              
041811,000555: 14,2674           47430                                    CATLOG,2                              
041812,000556: 14,2675           51025                           DSU      BPL                                   
041813,000557: 14,2676           30763                                    CSS40                                 
041814,000558: 14,2677           30661                                    PIC3                                  
041815,000559: 14,2700           45173                           VLOAD*   CALL                                  
041816,000560: 14,2701           30347                                    CATLOG,1                              
041817,000561: 14,2702           30740                                    OCCULT                                
041818,000562: 14,2703           77614                           BON                                            
041819,000563: 14,2704           01710                                    CULTFLAG                              
041820,000564: 14,2705           30646                                    PIC1                                  

Page 939

041822,000566: 14,2706           45173                           VLOAD*   CALL                                  
041823,000567: 14,2707           47430                                    CATLOG,2                              
041824,000568: 14,2710           30740                                    OCCULT                                
041825,000569: 14,2711           77614                           BON                                            
041826,000570: 14,2712           01710                                    CULTFLAG                              
041827,000571: 14,2713           30661                                    PIC3                                  
041828,000572: 14,2714           77614        STRATGY            BONCLR                                         
041829,000573: 14,2715           01605                                    VFLAG                                 
041830,000574: 14,2716           30733                                    NEWPAR                                
041831,000575: 14,2717           65120                           XCHX,1   XCHX,2                                
041832,000576: 14,2720           02755                                    BESTI                                 
041833,000577: 14,2721           02756                                    BESTJ                                 
041834,000578: 14,2722           47773        STRAT              VLOAD*   DOT*                                  
041835,000579: 14,2723           30347                                    CATLOG,1                              
041836,000580: 14,2724           47430                                    CATLOG,2                              
041837,000581: 14,2725           43006                           PUSH     BOFINV                                
041838,000582: 14,2726           01545                                    VFLAG                                 
041839,000583: 14,2727           30717                                    STRAT      -3                         
041840,000584: 14,2730           45345                           DLOAD    DSU                                   
041841,000585: 14,2731           77644                           BPL                                            
041842,000586: 14,2732           30661                                    PIC3                                  
041843,000587: 14,2733           67130        NEWPAR             SXA,1    SXA,2                                 
041844,000588: 14,2734           02755                                    BESTI                                 
041845,000589: 14,2735           02756                                    BESTJ                                 
041846,000590: 14,2736           77650                           GOTO                                           
041847,000591: 14,2737           30661                                    PIC3                                  
041848,000592: 14,2740           51321        OCCULT             MXV      BVSU                                  
041849,000593: 14,2741           02707                                    CULTRIX                               
041850,000594: 14,2742           00017                                    CSS                                   
041851,000595: 14,2743           77654                           BZE                                            
041852,000596: 14,2744           30757                                    CULTED                                
041853,000597: 14,2745           75240                           BMN      SIGN                                  
041854,000598: 14,2746           30757                                    CULTED                                
041855,000599: 14,2747           00160                                    MPAC       +3                         
041856,000600: 14,2750           75240                           BMN      SIGN                                  
041857,000601: 14,2751           30757                                    CULTED                                
041858,000602: 14,2752           00162                                    MPAC       +5                         
041859,000603: 14,2753           43040                           BMN      CLRGO                                 
041860,000604: 14,2754           30757                                    CULTED                                
041861,000605: 14,2755           01630                                    CULTFLAG                              
041862,000606: 14,2756           00052                                    QPRET                                 
041863,000607: 14,2757           77614        CULTED             SETGO                                          
041864,000608: 14,2760           01430                                    CULTFLAG                              
041865,000609: 14,2761           00052                                    QPRET                                 
041866,000610: 14,2762  0000016               CSS                =        CEARTH                                
041867,000611: 14,2762           05110 35052  CSS40              2DEC     .16070                                #  COS 50 / 4
041868,000612: 14,2764           05110 35052  CSS33              2DEC     .16070                                #  COS 50 / 4
041869,000613: 14,2766           77414        PICEND             BOFF     EXIT                                  
041870,000614: 

Page 940

041872,000616: 14,2767           01745                                    VFLAG                                 
041873,000617: 14,2770           30772                                    PICGXT                                
041874,000618: 14,2771           03013                           TC       PICBXT                                
041875,000619: 14,2772           73150        PICGXT             LXA,1    LXA,2                                 
041876,000620: 14,2773           02755                                    BESTI                                 
041877,000621: 14,2774           02756                                    BESTJ                                 
041878,000622: 14,2775           47775                           VLOAD    DOT*                                  
041879,000623: 14,2776           02731                                    SAX                                   
041880,000624: 14,2777           30347                                    CATLOG,1                              
041881,000625: 14,3000           47715                           PDVL     DOT*                                  
041882,000626: 14,3001           02731                                    SAX                                   
041883,000627: 14,3002           47430                                    CATLOG,2                              
041884,000628: 14,3003           77625                           DSU                                            
041885,000629: 14,3004           66044                           BPL      SXA,1                                 
041886,000630: 14,3005           31011                                    PICNSWP                               
041887,000631: 14,3006           02756                                    BESTJ                                 
041888,000632: 14,3007           77734                           SXA,2                                          
041889,000633: 14,3010           02755                                    BESTI                                 
041890,000634: 14,3011           77776        PICNSWP            EXIT                                           
041891,000635: 14,3012           25745                           INCR     QMIN                                  
041892,000636: 14,3013           31745        PICBXT             CA       QMIN                                  
041893,000637: 14,3014           04622                           TC       SWCALL                                
041894,000638: 14,3015                        VPD                =        0D                                    
041895,000639: 14,3015                        V0                 =        6D                                    
041896,000640: 14,3015                        V1                 =        12D                                   
041897,000641: 14,3015                        V2                 =        18D                                   
041898,000642: 14,3015                        V3                 =        24D                                   
041899,000643: 14,3015                        DP0                =        30D                                   
041900,000644: 14,3015                        DP1                =        32D                                   
041901,000645: 

Page 941

041903,000647:                                                                                                  #  NAME - R51    FINE ALIGN
041904,000648:                                                                                                  #  FUNCTION - TO ALIGN THE STABLE MEMBER TO REFSMMAT
041905,000649:                                                                                                  #  CALLING SEQ - CALL R51
041906,000650:                                                                                                  #  INPUT - REFSMMAT
041907,000651:                                                                                                  #  OUTPUT - GYRO TORQUE PULSES
041908,000652:                                                                                                  #  SUBROUTINES - LOCSAM, PICAPAR, R52, R53, R54, R55
041909,000653: 
041910,000654: 14,3015                                           COUNT*   $$/R51                                
041911,000655: 14,3015           77620        R51                STQ                                            
041912,000656: 14,3016           02746                                    QMAJ                                  
041913,000657: 14,3017           77776        R51.1              EXIT                                           
041914,000658: 14,3020           05353                           TC       PHASCHNG                              
041915,000659: 14,3021           04024                           OCT      04024                                 
041916,000660: 
041917,000661: 14,3022           34761        R51C               CAF      OCT15                                 
041918,000662: 14,3023           04616                           TC       BANKCALL                              
041919,000663: 14,3024           20623                           CADR     GOPERF1                               
041920,000664: 14,3025           06001                           TC       GOTOPOOH                              
041921,000665: 14,3026           03030                           TC       +2                                    #  V33E
041922,000666: 14,3027           03053                           TC       R51E                                  #  ENTER
041923,000667: 14,3030           06037                           TC       INTPRET                               
041924,000668: 14,3031           43234                           RTB      DAD                                   
041925,000669: 14,3032           21573                                    LOADTIME                              
041926,000670: 14,3033           31163                                    TSIGHT1                               
041927,000671: 14,3034           77624                           CALL                                           
041928,000672: 14,3035           30506                                    LOCSAM                                
041929,000673: 14,3036           77776                           EXIT                                           
041930,000674: 14,3037           04616                           TC       BANKCALL                              
041931,000675: 14,3040           30611                           CADR     R56                                   
041932,000676: 14,3041           03043                           TC       R51I                                  
041933,000677: 14,3042           03053        R51F               TC       R51E                                  
041934,000678: 14,3043           05567        R51I               TC       ALARM                                 
041935,000679: 14,3044           00405                           OCT      405                                   
041936,000680: 14,3045           35006                           CAF      VB05N09                               
041937,000681: 14,3046           04616                           TC       BANKCALL                              
041938,000682: 14,3047           20476                           CADR     GOFLASH                               
041939,000683: 14,3050           06001                           TC       GOTOPOOH                              
041940,000684: 14,3051           03053                           TC       R51E                                  
041941,000685: 14,3052           03022                           TC       R51C                                  
041942,000686: 14,3053           34755        R51E               CAF      ZERO                                  
041943,000687: 14,3054           55757                           TS       STARIND                               
041944,000688: 14,3055           06037        R51.2              TC       INTPRET                               
041945,000689: 14,3056           77776        R51.3              EXIT                                           
041946,000690: 14,3057           05353                           TC       PHASCHNG                              
041947,000691: 14,3060           04024                           OCT      04024                                 
041948,000692: 
041949,000693: 14,3061           06037                           TC       INTPRET                               
041950,000694: 14,3062           77624                           CALL                                           
041951,000695: 14,3063           31670                                    R52                                   #  AOP WILL MAKE CALLS TO SIGHTING
041952,000696: 14,3064           77776                           EXIT                                           
041953,000697: 14,3065           04616                           TC       BANKCALL                              

Page 942

041955,000699: 14,3066           16000                           CADR     AOTMARK                               
041956,000700: 14,3067           04616                           TC       BANKCALL                              
041957,000701: 14,3070           17712                           CADR     OPTSTALL                              
041958,000702: 14,3071           05711                           TC       CURTAINS                              
041959,000703: 14,3072           11757                           CCS      STARIND                               
041960,000704: 14,3073           13075                           TCF      +2                                    
041961,000705: 14,3074           03145                           TC       R51.4                                 
041962,000706: 14,3075           06037                           TC       INTPRET                               
041963,000707: 14,3076           77775                           VLOAD                                          
041964,000708: 14,3077           02715                                    STARAD     +6                         
041965,000709: 14,3100           02767                           STORE    STARSAV2                              
041966,000710: 14,3101           77776                           EXIT                                           
041967,000711: 14,3102           05353                           TC       PHASCHNG                              
041968,000712: 14,3103           04024                           OCT      04024                                 
041969,000713: 
041970,000714: 14,3104           06037                           TC       INTPRET                               
041971,000715: 14,3105           45145                           DLOAD    CALL                                  
041972,000716: 14,3106           03562                                    TSIGHT                                
041973,000717: 14,3107           32472                                    PLANET                                
041974,000718: 14,3110           53521                           MXV      UNIT                                  
041975,000719: 14,3111           01734                                    REFSMMAT                              
041976,000720: 14,3112           26715                           STOVL    STARAD     +6                         
041977,000721: 14,3113           03554                                    PLANVEC                               
041978,000722: 14,3114           53521                           MXV      UNIT                                  
041979,000723: 14,3115           01734                                    REFSMMAT                              
041980,000724: 14,3116           26707                           STOVL    STARAD                                
041981,000725: 14,3117           02761                                    STARSAV1                              
041982,000726: 14,3120           24007                           STOVL    6D                                    
041983,000727: 14,3121           02767                                    STARSAV2                              
041984,000728: 14,3122           34015                           STCALL   12D                                   
041985,000729: 14,3123           31256                                    R54                                   #  STAR DATA TEST
041986,000730: 14,3124           45014                           BOFF     CALL                                  
041987,000731: 14,3125           00354                                    FREEFLAG                              
041988,000732: 14,3126           31134                                    R51K                                  
041989,000733: 14,3127           47441                                    AXISGEN                               
041990,000734: 14,3130           77624                           CALL                                           
041991,000735: 14,3131           31224                                    R55                                   #  GYRO TORQUE
041992,000736: 14,3132           77614                           CLEAR                                          
041993,000737: 14,3133           01273                                    PFRATFLG                              
041994,000738: 14,3134           77776        R51K               EXIT                                           
041995,000739: 14,3135           35751        R51P63             CAF      OCT14                                 
041996,000740: 14,3136           04616                           TC       BANKCALL                              
041997,000741: 14,3137           20623                           CADR     GOPERF1                               
041998,000742: 14,3140           06001                           TC       GOTOPOOH                              
041999,000743: 14,3141           03022                           TC       R51C                                  
042000,000744: 14,3142           06037                           TC       INTPRET                               
042001,000745: 14,3143           77650                           GOTO                                           
042002,000746: 14,3144           02746                                    QMAJ                                  
042003,000747: 14,3145           06037        R51.4              TC       INTPRET                               
042004,000748: 14,3146           77775                           VLOAD                                          

Page 943

042006,000750: 14,3147           02715                                    STARAD     +6                         
042007,000751: 14,3150           02761                           STORE    STARSAV1                              
042008,000752: 14,3151           45145                           DLOAD    CALL                                  
042009,000753: 14,3152           03562                                    TSIGHT                                
042010,000754: 14,3153           32472                                    PLANET                                
042011,000755: 14,3154           03554                           STORE    PLANVEC                               
042012,000756: 14,3155           77731                           SSP                                            
042013,000757: 14,3156           02760                                    STARIND                               
042014,000758: 14,3157           00001                                    1                                     
042015,000759: 14,3160           77650                           GOTO                                           
042016,000760: 14,3161           31056                                    R51.3                                 
042017,000761: 14,3162           00002 06240  TSIGHT1            2DEC     36000      B-28                       #  6 MIN TO MARKING
042018,000762: 

Page 944

042020,000764:                                                                                                  #  GYRO TORQUE COARSE ALIGNMENT
042021,000765: 
042022,000766: 14,3164           45020        GYCOARS            STQ      CALL                                  
042023,000767: 14,3165           02746                                    QMAJ                                  
042024,000768: 14,3166           47247                                    CALCGTA                               
042025,000769: 14,3167           43014                           CLEAR    CLEAR                                 
042026,000770: 14,3170           01260                                    DRIFTFLG                              
042027,000771: 14,3171           01662                                    REFSMFLG                              
042028,000772: 14,3172           77776                           EXIT                                           
042029,000773: 14,3173           33223                           CAF      V16N20                                #  MONITOR GIMBALS
042030,000774: 14,3174           04616                           TC       BANKCALL                              
042031,000775: 14,3175           20451                           CADR     GODSPR                                
042032,000776: 14,3176           33255                           CA       R55CDR                                
042033,000777: 14,3177           04616                           TC       BANKCALL                              
042034,000778: 14,3200           17323                           CADR     IMUPULSE                              
042035,000779: 14,3201           04616                           TC       BANKCALL                              
042036,000780: 14,3202           17716                           CADR     IMUSTALL                              
042037,000781: 14,3203           05711                           TC       CURTAINS                              
042038,000782: 14,3204           05353                           TC       PHASCHNG                              
042039,000783: 14,3205           04024                           OCT      04024                                 
042040,000784: 
042041,000785: 14,3206           06037                           TC       INTPRET                               
042042,000786: 14,3207           75160                           AXC,1    AXC,2                                 
042043,000787: 14,3210           03606                                    XSMD                                  
042044,000788: 14,3211           01733                                    REFSMMAT                              
042045,000789: 14,3212           77624                           CALL                                           #  STORE DESIRED REFSMMAT
042046,000790: 14,3213           31377                                    MATMOVE                               
042047,000791: 14,3214           43014                           CLEAR    SET                                   
042048,000792: 14,3215           01273                                    PFRATFLG                              
042049,000793: 14,3216           01462                                    REFSMFLG                              
042050,000794: 14,3217           77624                           CALL                                           
042051,000795: 14,3220           31602                                    NCOARSE                               #  SET DRIFT AND INITIALIZE 1/PIPADT
042052,000796: 14,3221           77650                           GOTO                                           
042053,000797: 14,3222           31134                                    R51K                                  
042054,000798: 14,3223           04024        V16N20             VN       1620                                  
042055,000799: 

Page 945

042057,000801:                                                                                                  #  R55   GYRO TORQUE
042058,000802:                                                                                                  #  FUNCTION - COMPUTE AND SEND GYRO PULSES
042059,000803:                                                                                                  #  CALLING SEQ - CALL R55
042060,000804:                                                                                                  #  INPUT - X,Y,ZDC - REFSMMAT WRT PRESENT STABLE MEMBER
042061,000805:                                                                                                  #  OUTPUT - GYRO PULSES
042062,000806:                                                                                                  #  SUBROUTINES - CALCGTA, GOFLASH, GODSPR, IMUFINE, IMUPULSE, GOPERF1
042063,000807: 
042064,000808: 14,3224                                           COUNT*   $$/R55                                
042065,000809: 14,3224           77620        R55                STQ                                            
042066,000810: 14,3225           02745                                    QMIN                                  
042067,000811: 14,3226           77624                           CALL                                           
042068,000812: 14,3227           47247                                    CALCGTA                               
042069,000813: 14,3230           77776        PULSEM             EXIT                                           
042070,000814: 14,3231           33254        R55.1              CAF      V06N93                                
042071,000815: 14,3232           04616                           TC       BANKCALL                              
042072,000816: 14,3233           20476                           CADR     GOFLASH                               
042073,000817: 14,3234           06001                           TC       GOTOPOOH                              
042074,000818: 14,3235           03237                           TC       R55.2                                 
042075,000819: 14,3236           03251                           TC       R55RET                                
042076,000820: 14,3237           05353        R55.2              TC       PHASCHNG                              
042077,000821: 14,3240           00214                           OCT      00214                                 
042078,000822: 14,3241           33255                           CA       R55CDR                                
042079,000823: 14,3242           04616                           TC       BANKCALL                              
042080,000824: 14,3243           17323                           CADR     IMUPULSE                              
042081,000825: 14,3244           04616                           TC       BANKCALL                              
042082,000826: 14,3245           17716                           CADR     IMUSTALL                              
042083,000827: 14,3246           05711                           TC       CURTAINS                              
042084,000828: 14,3247           05353                           TC       PHASCHNG                              
042085,000829: 14,3250           04024                           OCT      04024                                 
042086,000830: 
042087,000831: 14,3251           06037        R55RET             TC       INTPRET                               
042088,000832: 14,3252           77650                           GOTO                                           
042089,000833: 14,3253           02745                                    QMIN                                  
042090,000834: 14,3254           01535        V06N93             VN       0693                                  
042091,000835: 14,3255           02737        R55CDR             ECADR    OGC                                   
042092,000836: 14,3256  14,3256               R54                =        CHKSDATA                              
042093,000837: 
042094,000838:                                                                                                  #  ROUTINE NAME - CHKSDATA               DATE - JAN 9, 1967
042095,000839:                                                                                                  #  MOD NO - 0                            LOG SECTION - P51-P53
042096,000840:                                                                                                  #  MODIFICATION BY - LONSKE              ASSEMBLY -
042097,000841: 
042098,000842:                                                                                                  #  FUNCTIONAL DESCRIPTION - CHECKS THE VALIDITY OF A PAIR OF STAR SIGHTINGS.  WHEN A PAIR OF STAR SIGHTINGS ARE MADE
042099,000843:                                                                                                  #  BY THE ASTRONAUT THIS ROUTINE OPERATES AND CHECKS THE OBSERVED SIGHTINGS AGAINST STORED STAR VECTORS IN THE
042100,000844:                                                                                                  #  COMPUTER TO INSURE A PROPER SIGHTING WAS MADE.  THE FOLLOWING COMPUTATIONS ARE PERFORMED_
042101,000845:                                                                                                  #        OS1     =       OBSERVED STAR 1 VECTOR
042102,000846:                                                                                                  #        OS2     =       OBSERVED STAR 2 VECTOR
042103,000847:                                                                                                  #        SS1     =       STORED STAR 1 VECTOR
042104,000848:                                                                                                  #        SS2     =       STORED STAR 2 VECTOR
042105,000849:                                                                                                  #         A1     =       ARCCOS(OS1 - OS2)
042106,000850:                                                                                                  #         A2     =       ARCCOS(SS1 - SS2)
042107,000851:                                                                                                  #          A     =       ABS(2(A1 - A2))

Page 946

042109,000853:                                                                                                  #  THE ANGULAR DIFFERENCE IS DISPLAYED FOR ASTRONAUT ACCEPTENCE
042110,000854: 
042111,000855:                                                                                                  #  EXIT MODE     1. FREEFLAG SET IMPLIES ASTRONAUT WANTS TO PROCEED
042112,000856:                                                                                                  #                2. FREEFLAG RESET IMPLIES ASTRONAUT WANTS TO RECYCLE            ERANCE)
042113,000857: 
042114,000858:                                                                                                  #  OUTPUT -      1. VERB 6,NOUN 3 - DISPLAYS ANGULAR DIFFERENCE BETWEEN 2 SETS OF STARS.
042115,000859:                                                                                                  #                2. STAR VECTORS FROM STAR CATALOG ARE LEFT IN 6D AND 12D.
042116,000860: 
042117,000861:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
042118,000862:                                                                                                  #                1. MARK VECTORS ARE STORED IN STARAD AND STARAD +6.
042119,000863:                                                                                                  #                2. CATALOG VECTORS ARE STORED IN 6D AND 12D.
042120,000864: 
042121,000865:                                                                                                  #  DEBRIS -
042122,000866: 
042123,000867: 14,3256                                           COUNT*   $$/R54                                
042124,000868: 14,3256           43020        CHKSDATA           STQ      SET                                   
042125,000869: 14,3257           02745                                    QMIN                                  
042126,000870: 14,3260           00074                                    FREEFLAG                              
042127,000871: 14,3261           77760        CHKSAB             AXC,1                                          #  SET X1 TO STORE EPHEMERIS DATA
042128,000872: 14,3262           02706                                    STARAD                                
042129,000873: 
042130,000874: 14,3263           47773        CHKSB              VLOAD*   DOT*                                  #  CAL. ANGLE THETA
042131,000875: 14,3264           00001                                    0,1                                   
042132,000876: 14,3265           00007                                    6,1                                   
042133,000877: 14,3266           65552                           SL1      ACOS                                  
042134,000878: 14,3267           00025                           STORE    THETA                                 
042135,000879: 14,3270           43014                           BOFF     INVERT                                #  BRANCH TO CHKSD IF THIS IS 2ND PASS
042136,000880: 14,3271           00354                                    FREEFLAG                              
042137,000881: 14,3272           31302                                    CHKSD                                 
042138,000882: 14,3273           00174                                    FREEFLAG                              #  CLEAR FREEFLAG
042139,000883: 14,3274           71360                           AXC,1    DLOAD                                 #  SET X1 TO MARK ANGLES
042140,000884: 14,3275           00006                                    6D                                    
042141,000885: 14,3276           00025                                    THETA                                 
042142,000886: 14,3277           00023                           STORE    18D                                   
042143,000887: 14,3300           77650                           GOTO                                           
042144,000888: 14,3301           31263                                    CHKSB                                 #  RETURN TO CAL. 2ND ANGLE
042145,000889: 14,3302           45345        CHKSD              DLOAD    DSU                                   
042146,000890: 14,3303           00025                                    THETA                                 
042147,000891: 14,3304           00023                                    18D                                   
042148,000892: 14,3305           47046                           ABS      RTB                                   #  COMPUTE POS DIFF
042149,000893: 14,3306           21612                                    SGNAGREE                              
042150,000894: 14,3307           01046                           STORE    NORMTEM1                              
042151,000895: 14,3310           77414                           SET      EXIT                                  
042152,000896: 14,3311           00074                                    FREEFLAG                              
042153,000897: 14,3312           33326                           CAF      VB6N5                                 
042154,000898: 14,3313           04616                           TC       BANKCALL                              
042155,000899: 14,3314           20476                           CADR     GOFLASH                               
042156,000900: 14,3315           16001                           TCF      GOTOPOOH                              
042157,000901: 14,3316           03323                           TC       CHKSDA                                #  PROCEED
042158,000902: 14,3317           06037                           TC       INTPRET                               
042159,000903: 14,3320           52014                           CLEAR    GOTO                                  
042160,000904: 14,3321           00274                                    FREEFLAG                              
042161,000905: 14,3322           02745                                    QMIN                                  
042162,000906: 14,3323           06037        CHKSDA             TC       INTPRET                               

Page 947

042164,000908: 14,3324           77650                           GOTO                                           
042165,000909: 14,3325           02745                                    QMIN                                  
042166,000910: 14,3326           01405        VB6N5              VN       605                                   
042167,000911: 
042168,000912:                                                                                                  #  NAME - CAL53A
042169,000913:                                                                                                  #  FUNCTION - COMPUTE DESIRED GIMBAL ANGLES AND COARSE ALIGN IF NECESSARY
042170,000914:                                                                                                  #  CALLING SEQUENCE - CALL CAL53A
042171,000915:                                                                                                  #  INPUT - X,Y,ZSMD, CDUX,Y,Z
042172,000916:                                                                                                  #           DESIRED GIMBAL ANGLES - THETAD,+1,+2
042173,000917:                                                                                                  #  OUTPUT - THE IMU COORDINATES ARE STORED IN REFSMMAT
042174,000918:                                                                                                  #  SUBROUTINES - S52.2, IMUCOARSE, IMUFINE
042175,000919: 
042176,000920: 14,3327                                           COUNT*   $$/R50                                
042177,000921: 14,3327           77624        CAL53A             CALL                                           
042178,000922: 14,3330           31617                                    S52.2                                 #  MAKE ONE FINAL COMP OF GIMBALE ANGLES
042179,000923: 14,3331           66234                           RTB      SSP                                   
042180,000924: 14,3332           31413                                    RDCDUS                                #  READ CDUS
042181,000925: 14,3333           00051                                    S1                                    
042182,000926: 14,3334           00001                                    1                                     
042183,000927: 14,3335           40370                           AXT,1    SETPD                                 
042184,000928: 14,3336           00003                                    3                                     
042185,000929: 14,3337           00005                                    4                                     
042186,000930: 14,3340           70543        CALOOP             DLOAD*   SR1                                   
042187,000931: 14,3341           00325                                    THETAD     +3D,1                      
042188,000932: 14,3342           70523                           PDDL*    SR1                                   
042189,000933: 14,3343           00005                                    4,1                                   
042190,000934: 14,3344           51425                           DSU      ABS                                   
042191,000935: 14,3345           45206                           PUSH     DSU                                   
042192,000936: 14,3346           31412                                    DEGREE1                               
042193,000937: 14,3347           71240                           BMN      DLOAD                                 
042194,000938: 14,3350           31366                                    CALOOP1                               
042195,000939: 14,3351           51025                           DSU      BPL                                   
042196,000940: 14,3352           31413                                    DEG359                                
042197,000941: 14,3353           31366                                    CALOOP1                               
042198,000942: 14,3354           77776                           EXIT                                           
042199,000943: 14,3355           05353                           TC       PHASCHNG                              
042200,000944: 14,3356           04024                           OCT      04024                                 
042201,000945: 
042202,000946: 14,3357           06037                           TC       INTPRET                               
042203,000947: 14,3360           77624        COARFINE           CALL                                           
042204,000948: 14,3361           31565                                    COARSE                                
042205,000949: 14,3362           77624                           CALL                                           
042206,000950: 14,3363           31602                                    NCOARSE                               
042207,000951: 14,3364           77650                           GOTO                                           
042208,000952: 14,3365           31370                                    FINEONLY                              
042209,000953: 14,3366           77700        CALOOP1            TIX,1                                          
042210,000954: 14,3367           31340                                    CALOOP                                
042211,000955: 14,3370           75160        FINEONLY           AXC,1    AXC,2                                 
042212,000956: 14,3371           02642                                    XSM                                   
042213,000957: 14,3372           01733                                    REFSMMAT                              
042214,000958: 14,3373           77624                           CALL                                           
042215,000959: 14,3374           31377                                    MATMOVE                               

Page 948

042217,000961: 14,3375           77650                           GOTO                                           
042218,000962: 14,3376           32161                                    COARSRET                              
042219,000963: 14,3377           77773        MATMOVE            VLOAD*                                         #  TRANSFER MATRIX
042220,000964: 14,3400           00001                                    0,1                                   
042221,000965: 14,3401           10001                           STORE    0,2                                   
042222,000966: 14,3402           77773                           VLOAD*                                         
042223,000967: 14,3403           00007                                    6D,1                                  
042224,000968: 14,3404           10007                           STORE    6D,2                                  
042225,000969: 14,3405           77773                           VLOAD*                                         
042226,000970: 14,3406           00015                                    12D,1                                 
042227,000971: 14,3407           10015                           STORE    12D,2                                 
042228,000972: 14,3410           77616                           RVQ                                            
042229,000973: 14,3411           00056        DEGREE1            DEC      46         B-14                       #  1 DEG SCALED CDU/2
042230,000974: 14,3412           37722        DEG359             DEC      16338      B-14                       #  359 DEG SCALED CDU/2
042231,000975: 14,3413           00004        RDCDUS             INHINT                                         #  READ CDUS
042232,000976: 14,3414           30032                           CA       CDUX                                  
042233,000977: 14,3415           50120                           INDEX    FIXLOC                                
042234,000978: 14,3416           54001                           TS       1                                     
042235,000979: 14,3417           30033                           CA       CDUY                                  
042236,000980: 14,3420           50120                           INDEX    FIXLOC                                
042237,000981: 14,3421           54002                           TS       2                                     
042238,000982: 14,3422           30034                           CA       CDUZ                                  
042239,000983: 14,3423           50120                           INDEX    FIXLOC                                
042240,000984: 14,3424           54003                           TS       3                                     
042241,000985: 14,3425           00003                           RELINT                                         
042242,000986: 14,3426           06061                           TC       DANZIG                                #                                        +
042243,000987: 14,3427                                           COUNT*   $$/INFLT                              
042244,000988: 

Page 949

042246,000990:                                                                                                  #  NAME - P51 - IMU ORIENTATION DETERMINATION
042247,000991:                                                                                                  #  MOD. NO. 1    23 JAN 67                               LOG SECTION - P51-P53
042248,000992:                                                                                                  #  MOD BY STURLAUGSON                                    ASSEMBLY SUNDANCE REV56
042249,000993: 
042250,000994:                                                                                                  #  FUNCTIONAL DESCRIPTION
042251,000995:                                                                                                  #        DETERMINES THE INERTIAL ORIENTATION OF THE IMU.  THE PROGRAM IS SELECTED BY DSKY ENTRY.  THE SIGHTING
042252,000996:                                                                                                  #        (AOTMARK) ROUTINE IS CALLED TO COLLECT AND PROCESS MARKED-STAR DATA.  AOTMARK (R53) RETURNS THE STAR NUMBER AND THE
042253,000997:                                                                                                  #        STAR LOS VECTOR IN STARAD +6.  TWO STARS ARE THUS SIGHTED.  THE ANGLE BETWEEN THE TWO STARS IS THEN CHECKED AT
042254,000998:                                                                                                  #        CHKSDATA (R54).  REFSMMAT IS THEN COMPUTED AT AXISGEN.
042255,000999: 
042256,001000:                                                                                                  #  CALLING SEQUENCE
042257,001001:                                                                                                  #        THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
042258,001002: 
042259,001003:                                                                                                  #  SUBROUTINES CALLED.
042260,001004:                                                                                                  #        GOPERF3
042261,001005:                                                                                                  #        GOPERF1
042262,001006:                                                                                                  #        GODSPR
042263,001007:                                                                                                  #        IMUCOARS
042264,001008:                                                                                                  #        IMUFIN20
042265,001009:                                                                                                  #        AOTMARK (R53)
042266,001010:                                                                                                  #        CHKSDATA (R54)
042267,001011:                                                                                                  #        MKRELEAS
042268,001012:                                                                                                  #        AXISGEN
042269,001013:                                                                                                  #        MATMOVE
042270,001014: 
042271,001015:                                                                                                  #  ALARMS
042272,001016:                                                                                                  #        NONE.
042273,001017: 
042274,001018:                                                                                                  #  ERASABLE INITIALIZATION
042275,001019:                                                                                                  #        IMU ZERO FLAG SHOULD BE SET.
042276,001020: 
042277,001021:                                                                                                  #  OUTPUT
042278,001022:                                                                                                  #        REFSMMAT
042279,001023:                                                                                                  #        REFSMFLG
042280,001024: 
042281,001025:                                                                                                  #  DEBRIS
042282,001026:                                                                                                  #        WORK AREA
042283,001027:                                                                                                  #        STARAD
042284,001028:                                                                                                  #        STARIND
042285,001029:                                                                                                  #        BESTI
042286,001030:                                                                                                  #        BESTJ
042287,001031: 
042288,001032: 14,3427                                           COUNT*   $$/P51                                

Page 950

042290,001034: 14,3427           04616        P51                TC       BANKCALL                              #  IS ISS ON - IF NOT, IMUCHK WILL SEND
042291,001035: 14,3430           33652                           CADR     IMUCHK                                #  ALARM CODE 210 AND EXIT VIA GOTOPOOH.
042292,001036: 
042293,001037: 14,3431           34761                           CAF      OCT15                                 
042294,001038: 14,3432           04616                           TC       BANKCALL                              
042295,001039: 14,3433           20623                           CADR     GOPERF1                               
042296,001040: 14,3434           06001                           TC       GOTOPOOH                              #  TERM.
042297,001041: 14,3435           13461                           TCF      P51B                                  #  V33
042298,001042: 14,3436           05353                           TC       PHASCHNG                              
042299,001043: 14,3437           04024                           OCT      04024                                 
042300,001044: 
042301,001045: 14,3440           34755                           CAF      ZERO                                  
042302,001046: 14,3441           54321                           TS       THETAD                                #  ZERO THE GIMBALS
042303,001047: 14,3442           54322                           TS       THETAD     +1                         
042304,001048: 14,3443           54323                           TS       THETAD     +2                         
042305,001049: 14,3444           35010                           CAF      V06N22                                
042306,001050: 14,3445           04616                           TC       BANKCALL                              
042307,001051: 14,3446           20446                           CADR     GODSPRET                              
042308,001052: 14,3447           33564                           CAF      V41K                                  #  NOW DISPLAY COARSE ALIGN VERB 41
042309,001053: 14,3450           04616                           TC       BANKCALL                              
042310,001054: 14,3451           20446                           CADR     GODSPRET                              
042311,001055: 14,3452           06037                           TC       INTPRET                               
042312,001056: 14,3453           77624                           CALL                                           
042313,001057: 14,3454           31565                                    COARSE                                
042314,001058: 14,3455           77776                           EXIT                                           
042315,001059: 14,3456           05353                           TC       PHASCHNG                              
042316,001060: 14,3457           04024                           OCT      04024                                 
042317,001061: 14,3460           13431                           TCF      P51        +2                         
042318,001062: 
042319,001063: 14,3461           05353        P51B               TC       PHASCHNG                              
042320,001064: 14,3462           00014                           OCT      00014                                 
042321,001065: 14,3463           06037                           TC       INTPRET                               
042322,001066: 14,3464           77624                           CALL                                           
042323,001067: 14,3465           31602                                    NCOARSE                               
042324,001068: 14,3466           40331                           SSP      SETPD                                 
042325,001069: 14,3467           02760                                    STARIND                               #  INDEX - STAR 1 OR 2
042326,001070: 14,3470           00000                                    0                                     
042327,001071: 14,3471           00001                                    0                                     
042328,001072: 14,3472           77776        P51C               EXIT                                           
042329,001073: 14,3473           05353                           TC       PHASCHNG                              
042330,001074: 14,3474           04024                           OCT      04024                                 
042331,001075: 
042332,001076: 14,3475           04616                           TC       BANKCALL                              
042333,001077: 14,3476           16000                           CADR     AOTMARK                               #  R53
042334,001078: 14,3477           04616                           TC       BANKCALL                              
042335,001079: 14,3500           17712                           CADR     AOTSTALL                              
042336,001080: 14,3501           05711                           TC       CURTAINS                              
042337,001081: 14,3502           11757                           CCS      STARIND                               
042338,001082: 14,3503           13511                           TCF      P51D       +1                         
042339,001083: 14,3504           06037                           TC       INTPRET                               

Page 951

042341,001085: 14,3505           77775                           VLOAD                                          
042342,001086: 14,3506           02715                                    STARAD     +6                         
042343,001087: 14,3507           02761                           STORE    STARSAV1                              
042344,001088: 14,3510           77776        P51D               EXIT                                           
042345,001089: 14,3511           05353                           TC       PHASCHNG                              
042346,001090: 14,3512           04024                           OCT      04024                                 
042347,001091: 
042348,001092: 14,3513           11757                           CCS      STARIND                               
042349,001093: 14,3514           13530                           TCF      P51E                                  
042350,001094: 14,3515           05353                           TC       PHASCHNG                              
042351,001095: 14,3516           04024                           OCT      04024                                 
042352,001096: 
042353,001097: 14,3517           06037                           TC       INTPRET                               
042354,001098: 14,3520           45145                           DLOAD    CALL                                  
042355,001099: 14,3521           03562                                    TSIGHT                                
042356,001100: 14,3522           32472                                    PLANET                                
042357,001101: 14,3523           03554                           STORE    PLANVEC                               
042358,001102: 14,3524           77776                           EXIT                                           
042359,001103: 14,3525           34753                           CAF      BIT1                                  
042360,001104: 14,3526           55757                           TS       STARIND                               
042361,001105: 14,3527           13473                           TCF      P51C       +1                         #  DO SECOND STAR
042362,001106: 14,3530           05353        P51E               TC       PHASCHNG                              
042363,001107: 14,3531           04024                           OCT      04024                                 
042364,001108: 
042365,001109: 14,3532           06037                           TC       INTPRET                               
042366,001110: 14,3533           45145                           DLOAD    CALL                                  
042367,001111: 14,3534           03562                                    TSIGHT                                
042368,001112: 14,3535           32472                                    PLANET                                
042369,001113: 14,3536           24015                           STOVL    12D                                   
042370,001114: 14,3537           03554                                    PLANVEC                               
042371,001115: 14,3540           24007                           STOVL    6D                                    
042372,001116: 14,3541           02761                                    STARSAV1                              
042373,001117: 14,3542           26707                           STOVL    STARAD                                
042374,001118: 14,3543           02767                                    STARSAV2                              
042375,001119: 14,3544           36715                           STCALL   STARAD     +6                         
042376,001120: 14,3545           31256                                    CHKSDATA                              #  CHECK STAR ANGLES IN STARAD AND
042377,001121: 14,3546           77414                           BON      EXIT                                  
042378,001122: 14,3547           00314                                    FREEFLAG                              
042379,001123: 14,3550           31552                                    P51G                                  
042380,001124: 14,3551           03431                           TC       P51        +2                         
042381,001125: 14,3552           77624        P51G               CALL                                           
042382,001126: 14,3553           47441                                    AXISGEN                               #  COME BACK WITH REFSMMAT IN XDC
042383,001127: 14,3554           75160                           AXC,1    AXC,2                                 
042384,001128: 14,3555           02664                                    XDC                                   
042385,001129: 14,3556           01733                                    REFSMMAT                              
042386,001130: 14,3557           77624                           CALL                                           
042387,001131: 14,3560           31377                                    MATMOVE                               
042388,001132: 14,3561           77414                           SET      EXIT                                  
042389,001133: 14,3562           01462                                    REFSMFLG                              
042390,001134: 14,3563           06001                           TC       GOTOPOOH                              #  FINIS

Page 952

042392,001136: 14,3564           12200        V41K               VN       4100                                  
042393,001137: 14,3565           77776        COARSE             EXIT                                           
042394,001138: 14,3566           04616                           TC       BANKCALL                              
042395,001139: 14,3567           17000                           CADR     IMUCOARS                              
042396,001140: 14,3570           04616                           TC       BANKCALL                              
042397,001141: 14,3571           17716                           CADR     IMUSTALL                              
042398,001142: 14,3572           05711                           TC       CURTAINS                              
042399,001143: 14,3573           04616                           TC       BANKCALL                              
042400,001144: 14,3574           17210                           CADR     IMUFINE                               
042401,001145: 14,3575           04616                           TC       BANKCALL                              
042402,001146: 14,3576           17716                           CADR     IMUSTALL                              
042403,001147: 14,3577           05711                           TC       CURTAINS                              
042404,001148: 14,3600           06037                           TC       INTPRET                               
042405,001149: 14,3601           77616                           RVQ                                            
042406,001150: 14,3602           77776        NCOARSE            EXIT                                           
042407,001151: 14,3603           30025                           CA       TIME1                                 
042408,001152: 14,3604           55075                           TS       1/PIPADT                              
042409,001153: 14,3605           44755                           CS       ZERO                                  
042410,001154: 14,3606           54037                           TS       PIPAX                                 
042411,001155: 14,3607           54040                           TS       PIPAY                                 
042412,001156: 14,3610           54041                           TS       PIPAZ                                 
042413,001157: 14,3611           06037                           TC       INTPRET                               
042414,001158: 14,3612           77775                           VLOAD                                          
042415,001159: 14,3613           24007                                    ZEROVEC                               
042416,001160: 14,3614           01472                           STORE    GCOMP                                 
042417,001161: 14,3615           43414                           SET      RVQ                                   
042418,001162: 14,3616           01060                                    DRIFTFLG                              
042419,001163: 

Page 953

042421,001165:                                                                                                  #  NAME - S52.2
042422,001166:                                                                                                  #  FUNCTION - COMPUTE GIMBAL ANGLES FOR DESIRED SM AND PRESENT VEHICLE
042423,001167:                                                                                                  #  CALL - CALL S52.2
042424,001168:                                                                                                  #  INPUT - X,Y,ZSMD
042425,001169:                                                                                                  #  OUTPUT - OGC,IGC,MGC,THETAD,+1,+2
042426,001170:                                                                                                  #  SUBROUTINES - CDUTRIG, CALCSMSC, MATMOVE, CALCGA
042427,001171: 
042428,001172: 14,3617                                           COUNT*   $$/S52.1                              
042429,001173: 14,3617           45020        S52.2              STQ      CALL                                  
042430,001174: 14,3620           02746                                    QMAJ                                  
042431,001175: 14,3621           47537                                    CDUTRIG                               
042432,001176: 14,3622           77624                           CALL                                           
042433,001177: 14,3623           20030                                    CALCSMSC                              
042434,001178: 14,3624           66370                           AXT,1    SSP                                   
042435,001179: 14,3625           00022                                    18D                                   
042436,001180: 14,3626           00051                                    S1                                    
042437,001181: 14,3627           00006                                    6D                                    
042438,001182: 14,3630           61373        S52.2A             VLOAD*   VXM                                   
042439,001183: 14,3631           02707                                    XNB        +18D,1                     
042440,001184: 14,3632           01734                                    REFSMMAT                              
042441,001185: 14,3633           77656                           UNIT                                           
042442,001186: 14,3634           06707                           STORE    XNB        +18D,1                     
042443,001187: 14,3635           77700                           TIX,1                                          
042444,001188: 14,3636           31630                                    S52.2A                                
042445,001189: 14,3637           75160        S52.2.1            AXC,1    AXC,2                                 
042446,001190: 14,3640           03606                                    XSMD                                  
042447,001191: 14,3641           02642                                    XSM                                   
042448,001192: 14,3642           77624                           CALL                                           
042449,001193: 14,3643           31377                                    MATMOVE                               
042450,001194: 14,3644           77624                           CALL                                           
042451,001195: 14,3645           47353                                    CALCGA                                
042452,001196: 14,3646           77650                           GOTO                                           
042453,001197: 14,3647           02746                                    QMAJ                                  
042454,001198: 

Page 954

042456,001200:                                                                                                  #  NAME - S52.3
042457,001201:                                                                                                  #  FUNCTION      XSMD= UNIT R
042458,001202:                                                                                                  #                YSMD= UNIT(V X R)
042459,001203:                                                                                                  #                ZSMD= UNIT(XSMD X YSMD)
042460,001204:                                                                                                  #  CALL          DLOAD   CALL
042461,001205:                                                                                                  #                        TALIGN
042462,001206:                                                                                                  #                        S52.3
042463,001207:                                                                                                  #  INPUT -       TIME OF ALIGNMENT IN MPAC
042464,001208:                                                                                                  #  OUTPUT -      X,Y,ZSMD
042465,001209:                                                                                                  #  SUBROUTINES - CSMCONIC
042466,001210: 
042467,001211: 14,3650                                           COUNT*   $$/S52.3                              
042468,001212: 14,3650           77620        S52.3              STQ                                            
042469,001213: 14,3651           02746                                    QMAJ                                  
042470,001214: 14,3652           34041                           STCALL   TDEC1                                 
042471,001215: 14,3653           27100                                    LEMCONIC                              
042472,001216: 14,3654           53575                           VLOAD    UNIT                                  
042473,001217: 14,3655           00001                                    RATT                                  
042474,001218: 14,3656           27607                           STOVL    XSMD                                  
042475,001219: 14,3657           00007                                    VATT                                  
042476,001220: 14,3660           53435                           VXV      UNIT                                  
042477,001221: 14,3661           00001                                    RATT                                  
042478,001222: 14,3662           27615                           STOVL    YSMD                                  
042479,001223: 14,3663           03607                                    XSMD                                  
042480,001224: 14,3664           53435                           VXV      UNIT                                  
042481,001225: 14,3665           03615                                    YSMD                                  
042482,001226: 14,3666           37623                           STCALL   ZSMD                                  
042483,001227: 14,3667           02746                                    QMAJ                                  
042484,001228: 

Page 955

042486,001230:                                                                                                  #  NAME - R52 (AUTOMATIC OPTICS POSITIONING ROUTINE)
042487,001231: 
042488,001232:                                                                                                  #  FUNCTION - POINT THE AOT OPTIC AXIS BY MANEUVERING THE LEM TO A NAVIGATION
042489,001233:                                                                                                  #  STAR SELECTED BY ALIGNMENT PROGRAMS OR DSKY INPUT
042490,001234: 
042491,001235:                                                                                                  #  CALLING - CALL R52
042492,001236: 
042493,001237:                                                                                                  #  INPUT - BESTI AND BESTJ (STAR CODES TIMES 6)
042494,001238: 
042495,001239:                                                                                                  #  OUTPUT - STAR CODE IN BITS 1-6, DETENT CODE IN BITS 7-9
042496,001240:                                                                                                  #  (NO CHECK IS MADE TO INSURE THE DETENT CODE TO BE VALID)
042497,001241:                                                                                                  #  POINTVSM-1/2 UNIT NAV STAR VEC IN SM
042498,001242:                                                                                                  #  SCAXIS-AOT OPTIC AXIS VEC IN NB X-Z PLANE
042499,001243: 
042500,001244:                                                                                                  #  SUBROUT - R60LEM
042501,001245: 
042502,001246: 14,3670                                           COUNT*   $$/R52                                
042503,001247: 14,3670           77420        R52                STQ      EXIT                                  
042504,001248: 14,3671           03665                                    SAVQR52                               
042505,001249: 14,3672           51757                           INDEX    STARIND                               
042506,001250: 14,3673           31755                           CA       BESTI                                 #  PICK UP STARCODE DETERMINED BY R56
042507,001251: 14,3674           00006                           EXTEND                                         
042508,001252: 14,3675           73771                           MP       1/6TH                                 
042509,001253: 14,3676           64744                           AD       BIT8                                  #  SET DETENT POSITION 2
042510,001254: 14,3677           54735                           TS       STARCODE                              #  SCALE AND STORE IN STARCODE
042511,001255: 
042512,001256: 14,3700           33772        R52A               CAF      V01N70                                
042513,001257: 14,3701           04616                           TC       BANKCALL                              
042514,001258: 14,3702           20476                           CADR     GOFLASH                               #  DISPLAY STARCODE AND WAIT FOR RESPONSE
042515,001259: 14,3703           06001                           TC       GOTOPOOH                              #  V34 - TERMINATE
042516,001260: 14,3704           13706                           TCF      R52B                                  #  V33 - PROCEED TO ORIENT LEM
042517,001261: 14,3705           13700                           TCF      R52A                                  #  ENTER - SELECT NEW STARCODE - RECYCLE
042518,001262: 
042519,001263: 14,3706           05516        R52B               TC       DOWNFLAG                              
042520,001264: 14,3707           00124                           ADRES    3AXISFLG                              #  BIT6 OF FLAGWRD5 ZERO TO ALLOW VECPOINT
042521,001265: 14,3710           30735                           CA       STARCODE                              #  GRAB DETENT CODE
042522,001266: 14,3711           77744                           MASK     HIGH9                                 
042523,001267: 14,3712           00006                           EXTEND                                         
042524,001268: 14,3713           74743                           MP       BIT9                                  
042525,001269: 14,3714           54001                           TS       L                                     #  TEMP STORE DETENT
042526,001270: 
042527,001271: 14,3715           00006                           EXTEND                                         
042528,001272: 14,3716           63734                           BZMF     GETAZEL                               #  CODE 0, COAS CALIBRATION
042529,001273: 
042530,001274: 14,3717           65660                           AD       NEG7                                  
042531,001275: 14,3720           00006                           EXTEND                                         
042532,001276: 14,3721           13734                           BZF      GETAZEL                               #  CODE 7, COAS SIGHTING
042533,001277: 
042534,001278: 14,3722  E7,1551                                  EBANK=   XYMARK                                
042535,001279: 14,3722           35016                           CA       EBANK7                                
042536,001280: 14,3723           54003                           TS       EBANK                                 

Page 956

042538,001282: 14,3724           50001                           INDEX    L                                     
042539,001283: 14,3725           31403                           CA       AOTAZ      -1                         #  PICK UP AZ CORRESPONDING TO DETENT
042540,001284: 14,3726           54001                           TS       L                                     
042541,001285: 14,3727  E5,1642                                  EBANK=   XSM                                   
042542,001286: 14,3727           35014                           CA       EBANK5                                #  CHANGE TO EBANK5 BUT DONT DISTURB L
042543,001287: 14,3730           54003                           TS       EBANK                                 
042544,001288: 14,3731           34737                           CA       BIT13                                 #  SET ELV TO 45 DEG
042545,001289: 14,3732           56001                           XCH      L                                     #  SET C(A)=AZ, C(L)=45 DEG
042546,001290: 14,3733           13744                           TCF      AZEL                                  #  GO COMP OPTIC AXIS
042547,001291: 
042548,001292: 14,3734           33773        GETAZEL            CAF      V06N87                                #  CODE 0 OR 7, GET AZ AND EL KEY IN
042549,001293: 14,3735           04616                           TC       BANKCALL                              
042550,001294: 14,3736           20476                           CADR     GOFLASH                               
042551,001295: 14,3737           06001                           TC       GOTOPOOH                              #  V34 - TERMINATE
042552,001296: 14,3740           13742                           TCF      +2                                    #  PROCEED - CALC OPTIC AXIS
042553,001297: 14,3741           13734                           TCF      GETAZEL                               #  ENTER - RECYCLE
042554,001298: 
042555,001299: 14,3742           00006                           EXTEND                                         
042556,001300: 14,3743           31350                           DCA      AZ                                    #  PICK UP AZ AND EL IN SP 2S COMP
042557,001301: 14,3744           50120        AZEL               INDEX    FIXLOC                                #  JAM AZ AND EL IN 8 AND 9 OF VAC
042558,001302: 14,3745           52011                           DXCH     8D                                    
042559,001303: 14,3746           06037                           TC       INTPRET                               
042560,001304: 14,3747           77624                           CALL                                           #  GO COMPUTE OPTIC AXIS AND STORE IN
042561,001305: 14,3750           10536                                    OANB                                  #  SCAXIS IN NB COORDS
042562,001306: 14,3751           45034                           RTB      CALL                                  
042563,001307: 14,3752           21573                                    LOADTIME                              
042564,001308: 14,3753           32472                                    PLANET                                
042565,001309: 14,3754           53521                           MXV      UNIT                                  
042566,001310: 14,3755           01734                                    REFSMMAT                              
042567,001311: 14,3756           03773                           STORE    POINTVSM                              #  STORE FOR VECPOINT
042568,001312: 
042569,001313: 14,3757           77776                           EXIT                                           
042570,001314: 14,3760           04616                           TC       BANKCALL                              
042571,001315: 14,3761           54123                           CADR     R60LEM                                #  GO TORQUE LEM OPTIC AXIS TO STAR LOS
042572,001316: 
042573,001317: 14,3762           37744                           CAF      HIGH9                                 #  IF COAS CALIBRATION CODE 0, RECYCLE
042574,001318: 14,3763           70735                           MASK     STARCODE                              
042575,001319: 14,3764           00006                           EXTEND                                         
042576,001320: 14,3765           13700                           BZF      R52A                                  
042577,001321: 
042578,001322: 14,3766           06037                           TC       INTPRET                               #  RETURN FROM KALCMANU
042579,001323: 14,3767           77650                           GOTO                                           
042580,001324: 14,3770           03665                                    SAVQR52                               #  RETURN TO CALLER
042581,001325: 
042582,001326: 14,3771           05253        1/6TH              DEC      .1666667                              
042583,001327: 14,3772           00306        V01N70             VN       0170                                  
042584,001328: 14,3773           01527        V06N87             VN       687                                   
042585,001329: 

Page 957

042587,001331:                                                                                                  #  LUNAR SURFACE STAR AQUISITION
042588,001332: 
042589,001333: 15,2245                                           BANK     15                                    
042590,001334: 15,2000                                           SETLOC   P50S                                  
042591,001335: 15,2000                                           BANK                                           
042592,001336: 15,2245                                           COUNT*   $$/R59                                
042593,001337: 
042594,001338: 15,2245           40077        R59                CS       FLAGWRD3                              
042595,001339: 15,2246           74737                           MASK     REFSMBIT                              #  IF REFSMMAT FLAG CLEAR BYPASS STAR AQUIR
042596,001340: 15,2247           10000                           CCS      A                                     
042597,001341: 15,2250           12455                           TCF      R59OUT                                #  NO REFSMMAT GO TO AOTMARK
042598,001342: 
042599,001343: 15,2251           32463                           CAF      V01N70*                               #  SELECT STAR CODE FOR ACQUISITION
042600,001344: 15,2252           04616                           TC       BANKCALL                              
042601,001345: 15,2253           20476                           CADR     GOFLASH                               
042602,001346: 15,2254           06001                           TC       GOTOPOOH                              #  V34 - TERMINATE
042603,001347: 15,2255           12257                           TCF      R59A                                  #  V33 - PROCEED
042604,001348: 15,2256           12245                           TCF      R59                                   #  V32 - RECYCLE
042605,001349: 
042606,001350: 15,2257           47744        R59A               CS       HIGH9                                 #  GRAB STARCODE FOR INDEX
042607,001351: 15,2260           70735                           MASK     AOTCODE                               
042608,001352: 15,2261           00006                           EXTEND                                         
042609,001353: 15,2262           76242                           MP       REVCNT                                #  JUST 6
042610,001354: 15,2263           56001                           XCH      L                                     
042611,001355: 15,2264           51757                           INDEX    STARIND                               
042612,001356: 15,2265           55755                           TS       BESTI                                 
042613,001357: 15,2266           50120                           INDEX    FIXLOC                                
042614,001358: 15,2267           54046                           TS       X1                                    #  CODE X 6 FOR CATLOG STAR INDEX
042615,001359: 15,2270           00006                           EXTEND                                         
042616,001360: 15,2271           12455                           BZF      R59OUT                                #  BYPASS AQUISITION IF NOT CATLOG STAR
042617,001361: 15,2272           40000                           COM                                            
042618,001362: 15,2273           62561                           AD       DEC227                                
042619,001363: 15,2274           00006                           EXTEND                                         
042620,001364: 15,2275           62455                           BZMF     R59OUT                                
042621,001365: 
042622,001366: 15,2276           06037                           TC       INTPRET                               
042623,001367: 15,2277           64373                           VLOAD*   MXV                                   
042624,001368: 15,2300           30347                                    CATLOG,1                              #  GRAB STAR VECTOR
042625,001369: 15,2301           01734                                    REFSMMAT                              #  TRANSFORM TO SM
042626,001370: 15,2302           45056                           UNIT     CALL                                  
042627,001371: 15,2303           47646                                    CDU*SMNB                              
042628,001372: 15,2304           02731                           STORE    STAR                                  #  TEMP STORE STAR VEC(NB)
042629,001373: 15,2305           77776                           EXIT                                           
042630,001374: 
042631,001375: 15,2306           34753                           CAF      BIT1                                  #  INITIALIZE AZ POSITION CODE TO 1 (-60)
042632,001376: 15,2307           55242                           TS       POSCODE                               
042633,001377: 
042634,001378: 15,2310  E7,1551                                  EBANK=   XYMARK                                
042635,001379: 15,2310           35016        INCAZ              CA       EBANK7                                
042636,001380: 15,2311           54003                           TS       EBANK                                 
042637,001381: 

Page 958

042639,001383: 15,2312           51242                           INDEX    POSCODE                               
042640,001384: 15,2313           31403                           CA       AOTAZ      -1                         #  PICK UP AZ CORRESPONDING TO POSCODE
042641,001385: 15,2314           54001                           TS       L                                     
042642,001386: 
042643,001387: 15,2315  E5,1642                                  EBANK=   XSM                                   
042644,001388: 15,2315           35014                           CA       EBANK5                                
042645,001389: 15,2316           54003                           TS       EBANK                                 
042646,001390: 
042647,001391: 15,2317           34737                           CA       BIT13                                 #  SET ELV TO 45 DEG
042648,001392: 15,2320           56001                           XCH      L                                     #  SET C(A)=AZ, C(L)=45 DEG
042649,001393: 15,2321           55745                           TS       QMIN                                  #  STORE QMIN=AZ FOR LATER
042650,001394: 15,2322           50120                           INDEX    FIXLOC                                
042651,001395: 15,2323           52011                           DXCH     8D                                    #  JAM AZ IN 8D, 45 DEG IN 9D FOR OANB
042652,001396: 
042653,001397: 15,2324           06037                           TC       INTPRET                               
042654,001398: 15,2325           77624                           CALL                                           
042655,001399: 15,2326           10536                                    OANB                                  #  GO CALC OPTIC AXIS WRT NB
042656,001400: 15,2327           50375                           VLOAD    DOT                                   
042657,001401: 15,2330           02731                                    STAR                                  #  DOT STAR WITH OA
042658,001402: 15,2331           03765                                    SCAXIS                                
042659,001403: 15,2332           65552                           SL1      ARCCOS                                
042660,001404: 15,2333           00031                           STORE    24D                                   #  TEMP STORE ARCCOS(STAR.OPTAXIS)
042661,001405: 
042662,001406: 15,2334           51025                           DSU      BPL                                   
042663,001407: 15,2335           32466                                    DEG30                                 #  SEE IF STAR IN AOT FIELD-OF-VIEW
042664,001408: 15,2336           32420                                    NXAX                                  #  NOT IN FIELD - TRY NEXT POSITION
042665,001409: 15,2337           45345                           DLOAD    DSU                                   #  SEE IF STAR AT FIELD CENTER
042666,001410: 15,2340           00031                                    24D                                   
042667,001411: 15,2341           32470                                    DEG.5                                 
042668,001412: 15,2342           71240                           BMN      DLOAD                                 #  CALC SPIRAL AND CURSOR
042669,001413: 15,2343           32413                                    ZSPCR                                 #  GO ZERO CURSOR AND SPIRAL
042670,001414: 15,2344           00031                                    24D                                   #  GET SPIRAL
042671,001415: 15,2345           42405                           DMP      SL4                                   
042672,001416: 15,2346           25764                                    3/4                                   #  12 SCALED AT 16
042673,001417: 15,2347           24031                           STOVL    24D                                   #  12(ARCCOS(AO.STAR)) SCALED IN REVS
042674,001418: 
042675,001419: 15,2350           03765                                    SCAXIS                                #  OA
042676,001420: 15,2351           53435                           VXV      UNIT                                  
042677,001421: 15,2352           24005                                    XUNIT                                 
042678,001422: 15,2353           47206                           PUSH     VXV                                   #  OA X UNITX    PD 0-5
042679,001423: 15,2354           03765                                    SCAXIS                                
042680,001424: 15,2355           77676                           VCOMP                                          
042681,001425: 15,2356           63256                           UNIT     PDVL                                  #  UNIT(OA X (OA X UNITX))       PD 6-11
042682,001426: 15,2357           03765                                    SCAXIS                                
042683,001427: 15,2360           53435                           VXV      UNIT                                  
042684,001428: 15,2361           02731                                    STAR                                  
042685,001429: 15,2362           50206                           PUSH     DOT                                   #  1/2(OA X STAR)        PD 12-17
042686,001430: 15,2363           00001                                    0                                     #  DOT WITH 1/2(OA X UNITX) FOR YROT
042687,001431: 15,2364           65552                           SL1      ARCCOS                                
042688,001432: 15,2365           24033                           STOVL    26D                                   #  STORE THET SCALED IN REVS

Page 959

042690,001434: 15,2366           77641                           DOT                                            #  UP 12-17, UP 6-11 FOR C2
042691,001435: 15,2367           71244                           BPL      DLOAD                                 #  IF THET NEG - GET 360-THET
042692,001436: 15,2370           32375                                    R59D                                  
042693,001437: 15,2371           32047                                    ABOUTONE                              
042694,001438: 15,2372           77625                           DSU                                            
042695,001439: 15,2373           00033                                    26D                                   
042696,001440: 15,2374           00033                           STORE    26D                                   #  360-THET SCALED IN REVS
042697,001441: 
042698,001442: 15,2375           70535        R59D               SLOAD    SR1                                   
042699,001443: 15,2376           02746                                    QMIN                                  #  RESCALE AZ(N) TO REVS
042700,001444: 15,2377           41415                           DAD      PUSH                                  #  PUSH YROT + AZ(N) REVS
042701,001445: 15,2400           00033                                    26D                                   
042702,001446: 15,2401           77634                           RTB                                            
042703,001447: 15,2402           21614                                    1STO2S                                
042704,001448: 15,2403           15237                           STODL    CURSOR                                #  YROT IN 1/2 REVS
042705,001449: 15,2404           00031                                    24D                                   #  LOAD SROT IN REVS
042706,001450: 15,2405           77615                           DAD                                            #  12(SEP) + YROT
042707,001451: 15,2406           77634                           RTB                                            
042708,001452: 15,2407           21614                                    1STO2S                                
042709,001453: 15,2410           01241                           STORE    SPIRAL                                #  SROT IN 1/2 REVS
042710,001454: 15,2411           77776                           EXIT                                           
042711,001455: 15,2412           12437                           TCF      79DISP                                #  GO DISPLAY CURSOR-SPIRAL-POS CODE
042712,001456: 
042713,001457: 15,2413           77776        ZSPCR              EXIT                                           
042714,001458: 15,2414           34755                           CAF      ZERO                                  #  STAR ALMOST OPTIC AXIS, ZERO CURSOR
042715,001459: 15,2415           55236                           TS       CURSOR                                #  AND SPIRAL ANGLES
042716,001460: 15,2416           55240                           TS       SPIRAL                                
042717,001461: 15,2417           12437                           TCF      79DISP                                
042718,001462: 
042719,001463: 15,2420           77776        NXAX               EXIT                                           
042720,001464: 15,2421           25242                           INCR     POSCODE                               
042721,001465: 15,2422           41242                           CS       POSCODE                               
042722,001466: 15,2423           64757                           AD       SEVEN                                 
042723,001467: 15,2424           00006                           EXTEND                                         
042724,001468: 15,2425           62427                           BZMF     R59ALM                                #  THIS STAR NOT AT ANY POSITION
042725,001469: 15,2426           12310                           TCF      INCAZ                                 
042726,001470: 
042727,001471: 15,2427           05567        R59ALM             TC       ALARM                                 #  THIS STAR CANT BE LOCATED IN AOT FIELD
042728,001472: 15,2430           00404                           OCT      404                                   
042729,001473: 15,2431           35006                           CAF      VB05N09                               #  DISPLAY ALARM
042730,001474: 15,2432           04616                           TC       BANKCALL                              
042731,001475: 15,2433           20476                           CADR     GOFLASH                               
042732,001476: 15,2434           16001                           TCF      GOTOPOOH                              #  VB34 - TERMINATE
042733,001477: 15,2435           12455                           TCF      R59OUT                                #  VB33 - PROCEED, GO WITHOUT AQUIRE
042734,001478: 15,2436           12245                           TCF      R59                                   #  VB32 - RECYCLE AND TRY ANOTHER STAR
042735,001479: 
042736,001480: 15,2437           32464        79DISP             CAF      V06N79                                #  DISPLAY CURSOR, SPIRAL AND POS CODE
042737,001481: 15,2440           04616                           TC       BANKCALL                              
042738,001482: 15,2441           20476                           CADR     GOFLASH                               
042739,001483: 15,2442           16001                           TCF      GOTOPOOH                              #  V34 - TERMINATE

Page 960

042741,001485: 15,2443           12445                           TCF      R59E                                  #  V33 - PROCEED TO MARK ROUTINE
042742,001486: 15,2444           12245                           TCF      R59                                   #  V32 - RECYCLE TO TOP OF R59 AGAIN
042743,001487: 
042744,001488: 15,2445           34757        R59E               CAF      SEVEN                                 #  GET DETENT CODE CORRESPONDING TO POSCODE
042745,001489: 15,2446           71242                           MASK     POSCODE                               
042746,001490: 15,2447           00006                           EXTEND                                         
042747,001491: 15,2450           74745                           MP       BIT7                                  #  DETENT CODE NOW IN L
042748,001492: 15,2451           47744                           CS       HIGH9                                 
042749,001493: 15,2452           70735                           MASK     AOTCODE                               #  ISOLATE STAR NO IN BIT 1-6
042750,001494: 15,2453           60001                           AD       L                                     
042751,001495: 15,2454           54735                           TS       AOTCODE                               #  STORE DETENT 7-9
042752,001496: 
042753,001497: 15,2455           04616        R59OUT             TC       BANKCALL                              #  GO TO AOTMARK FOR SIGHTING
042754,001498: 15,2456           16000                           CADR     AOTMARK                               
042755,001499: 15,2457           04616                           TC       BANKCALL                              
042756,001500: 15,2460           17712                           CADR     AOTSTALL                              #  SLEEP TILL SIGHTING DONE
042757,001501: 15,2461           05711                           TC       CURTAINS                              #  BADEND RETURN FROM AOTMARK
042758,001502: 15,2462           13054                           TCF      R59RET                                #  RETURN TO 1 STAR OR 2STAR
042759,001503: 
042760,001504: 15,2463           00306        V01N70*            VN       170                                   
042761,001505: 15,2464           01517        V06N79             VN       679                                   
042762,001506: 15,2465           02525 12525  DEG30              2DEC     .083333333                            #  30 DEGRESS
042763,001507: 15,2467           00026 30131  DEG.5              2DEC     .00138888                             #  .5 DEGRESS SCALED IN REVS
042764,001508: 15,2471           12525        DEG60              OCT      12525                                 #  60 DEG CDU SCALING
042765,001509: 15,2472     1236               CURSOR             EQUALS   GDT/2                                 
042766,001510: 15,2472     1240               SPIRAL             EQUALS   GDT/2      +2                         
042767,001511: 15,2472     1242               POSCODE            EQUALS   GDT/2      +4                         
042768,001512: 

Page 961

042770,001514:                                                                                                  #  NAME -        PLANET
042771,001515:                                                                                                  #  FUNCTION -    TO PROVIDE THE REFERENCE VECTOR FOR THE SIGHTED CELESTIAL
042772,001516:                                                                                                  #                BODY.  STARS ARE FETCHED FROM THE CATALOG, SUN, EARTH AND
042773,001517:                                                                                                  #                MOON ARE COMPUTED BY LOCSAM, PLANET VECTORS ARE ENTERED
042774,001518:                                                                                                  #                BY DSDY INPUT
042775,001519:                                                                                                  #  CALL -        CALL
042776,001520:                                                                                                  #                        PLANET
042777,001521:                                                                                                  #  INPUT -       TIME IN MPAC
042778,001522:                                                                                                  #  OUTPUT -      VECTOR IN MPAC
042779,001523:                                                                                                  #  SUBROUTINES - LOCSAM
042780,001524:                                                                                                  #  DEBRIS -      VAC, STARAD - STARAD +17
042781,001525: 
042782,001526: 15,2000                                           SETLOC   P50S                                  
042783,001527: 15,2000                                           BANK                                           
042784,001528: 15,2472                                           COUNT*   $$/P51                                
042785,001529: 
042786,001530: 15,2472           27562        PLANET             STOVL    TSIGHT                                
042787,001531: 15,2473           24007                                    ZEROVEC                               #  ZERO N88 DISPLAY VEC
042788,001532: 15,2474           02707                           STORE    STARAD                                
042789,001533: 15,2475           77420                           STQ      EXIT                                  
042790,001534: 15,2476           02736                                    GCTR                                  
042791,001535: 15,2477           47744                           CS       HIGH9                                 
042792,001536: 15,2500           70735                           MASK     AOTCODE                               
042793,001537: 15,2501           00006                           EXTEND                                         
042794,001538: 15,2502           76242                           MP       REVCNT                                
042795,001539: 15,2503           56001                           XCH      L                                     
042796,001540: 15,2504           51757                           INDEX    STARIND                               
042797,001541: 15,2505           55755                           TS       BESTI                                 
042798,001542: 15,2506           10000                           CCS      A                                     
042799,001543: 15,2507           12523                           TCF      NOTPLAN                               
042800,001544: 15,2510           32562                           CAF      VNPLANV                               
042801,001545: 15,2511           04616                           TC       BANKCALL                              
042802,001546: 15,2512           20476                           CADR     GOFLASH                               
042803,001547: 15,2513           02510                           TC       -3                                    
042804,001548: 15,2514           02516                           TC       +2                                    
042805,001549: 15,2515           02510                           TC       -5                                    
042806,001550: 15,2516           06037                           TC       INTPRET                               
042807,001551: 15,2517           53575                           VLOAD    UNIT                                  
042808,001552: 15,2520           02707                                    STARAD                                
042809,001553: 15,2521           77650                           GOTO                                           
042810,001554: 15,2522           02736                                    GCTR                                  
042811,001555: 15,2523           40000        NOTPLAN            CS       A                                     
042812,001556: 15,2524           62561                           AD       DEC227                                
042813,001557: 15,2525           00006                           EXTEND                                         
042814,001558: 15,2526           62537                           BZMF     CALSAM1                               
042815,001559: 15,2527           51757                           INDEX    STARIND                               
042816,001560: 15,2530           31755                           CA       BESTI                                 
042817,001561: 15,2531           50120                           INDEX    FIXLOC                                
042818,001562: 15,2532           54046                           TS       X1                                    
042819,001563: 15,2533           06037                           TC       INTPRET                               

Page 962

042821,001565: 15,2534           52173                           VLOAD*   GOTO                                  
042822,001566: 15,2535           30347                                    CATLOG,1                              
042823,001567: 15,2536           02736                                    GCTR                                  
042824,001568: 15,2537           06037        CALSAM1            TC       INTPRET                               
042825,001569: 15,2540           45145        CALSAM             DLOAD    CALL                                  
042826,001570: 15,2541           03562                                    TSIGHT                                
042827,001571: 15,2542           30506                                    LOCSAM                                
042828,001572: 15,2543           77340                           LXC,1    VLOAD                                 
042829,001573: 15,2544           02757                                    STARIND                               
042830,001574: 15,2545           02707                                    VEARTH                                
042831,001575: 15,2546           24001                           STOVL    0D                                    
042832,001576: 15,2547           02715                                    VSUN                                  
042833,001577: 15,2550           26707                           STOVL    VEARTH                                
042834,001578: 15,2551           00001                                    0D                                    
042835,001579: 15,2552           02715                           STORE    VSUN                                  
042836,001580: 15,2553           70143                           DLOAD*   LXC,1                                 
042837,001581: 15,2554           02756                                    BESTI,1                               
042838,001582: 15,2555           00154                                    MPAC                                  
042839,001583: 15,2556           52173                           VLOAD*   GOTO                                  
042840,001584: 15,2557           02343                                    STARAD     -228D,1                    
042841,001585: 15,2560           02736                                    GCTR                                  
042842,001586: 15,2561           00343        DEC227             DEC      227        B-14                       
042843,001587: 15,2562           01530        VNPLANV            VN       0688                                  
042844,001588: 15,2563  37,3544               PIPSRINE           =        PIPASR     +3                         #  EBANK NOT 4 SO DONT LOAD PIPTIME1
042845,001589: 

Page 963

042847,001591:                                                                                                  #  GRAVITY VECTOR DETERMINATION ROUTINE
042848,001592:                                                                                                  #  BY KEN VINCENT
042849,001593: 
042850,001594:                                                                                                  #  FOR DETAILED DESCRIPTION SEE 504GSOP 5.6.3.2.5
042851,001595: 
042852,001596:                                                                                                  #  THIS PROGRAM FINDS THE DIRECTION OF THE MOONS GRAVITY
042853,001597:                                                                                                  #  WHILE THE LM IS ON THE MOONS SURFACE.  IT WILL BE USED
042854,001598:                                                                                                  #  FOR LUNAR SURFACE ALIGNMENT.  THE GRAVITY VECTOR IS
042855,001599:                                                                                                  #  DETERMINED BY READING THE PIPAS WITH THE IMU AT TWO
042856,001600:                                                                                                  #  PARTICULAR ORIONTATIONS.  THE TWO READINGS ARE AVERAGED
042857,001601:                                                                                                  #  AND UNITIZED AND TRANSFORMED TO NB COORDINATES.  THE TWO
042858,001602:                                                                                                  #  ORIENTATION WERE CHOSEN TO REDUCE BIAS ERRORS IN THE
042859,001603:                                                                                                  #  READINGS.
042860,001604: 
042861,001605:                                                                                                  #  CALL -
042862,001606:                                                                                                  #        TC      BANKCALL
042863,001607:                                                                                                  #        CADR    GVDETER
042864,001608: 
042865,001609:                                                                                                  #  INPUTS -
042866,001610:                                                                                                  #        PIPAS, CDUS
042867,001611: 
042868,001612:                                                                                                  #  OUTPUTS -
042869,001613:                                                                                                  #        STARSAV1 = UNIT GRAVITY
042870,001614:                                                                                                  #        GSAV     = DITTO
042871,001615:                                                                                                  #        GRAVBIT  = 1
042872,001616: 
042873,001617:                                                                                                  #  SUBROUTINES -
042874,001618:                                                                                                  #        PIPASR, IMUCOARS, IMUFINE, IMUSTALL, 1/PIPA, DELAYJOB, CDUTRIG,
042875,001619:                                                                                                  #        *NBSM*, *SNMB*, CALCGA, FOFLASH
042876,001620: 
042877,001621:                                                                                                  #  DEBRIS -
042878,001622:                                                                                                  #        VAC, SAC, STARAD, XSM, XNB, THETAD, DELV, COSCDU, SINCDU
042879,001623: 
042880,001624: 15,2563           32772        GVDETER            CAF      42DEG                                 
042881,001625: 15,2564           54321                           TS       THETAD                                
042882,001626: 15,2565           40000                           COM                                            
042883,001627: 15,2566           54322                           TS       THETAD     +1                         
042884,001628: 15,2567           32773                           CAF      35DEG                                 
042885,001629: 15,2570           54323                           TS       THETAD     +2                         
042886,001630: 15,2571           06037                           TC       INTPRET                               
042887,001631: 15,2572           45014                           CLEAR    CALL                                  
042888,001632: 15,2573           01662                                    REFSMFLG                              
042889,001633: 15,2574           32670                                    LUNG                                  
042890,001634: 
042891,001635:                                                                                                  #  FIND GIMBAL ANGLES WHICH ROTATE SM 180 DEG ABOUT G VEC
042892,001636: 
042893,001637:                                                                                                  #        DEFINE G COOR SYS
042894,001638:                                                                                                  #                      -
042895,001639:                                                                                                  #                      X          UNIT G     
042896,001640:                                                                                                  #                *     -                  - 
042897,001641:                                                                                                  #                M =   Y   =   UNITEZSM * X )
042898,001642:                                                                                                  #                      -            -     -   
042899,001643:                                                                                                  #                      Z       UNIT(X   * Y )
042900,001644: 
042901,001645:                                                                                                  #        THEN ROTATED SM WRT PRESENT IS
042902,001646: 
042903,001647:                                                                                                  #                             1,  0,  0  
042904,001648:                                                                                                  #                 *      *T               *             *      *

Page 964

042906,001650:                                                                                                  #                XSM =   M    0, -1,  0   M  =  2 (X X ) - 1/2 I  *
042907,001651:                                                                                                  #                                                   I J
042908,001652:                                                                                                  #                             0,  0, -1 
042909,001653: 
042910,001654:                                                                                                  #        ALSO NB WRT PRES SM IS
042911,001655: 
042912,001656:                                                                                                  #                 *      *  *
042913,001657:                                                                                                  #                XNB = NBSM I
042914,001658:                                                                                                  #                                 *    *
042915,001659:                                                                                                  #        GIMBAL ANGLES = CALCGA( XSM, XNB )
042916,001660: 
042917,001661: 15,2000                                           SETLOC   P50S                                  
042918,001662: 15,2000                                           BANK                                           
042919,001663: 15,2575                                           COUNT*   $$/P57                                
042920,001664: 15,2575           66370                           AXT,1    SSP                                   #  X1=18
042921,001665: 15,2576           00022                                    18D                                   #  S1=6
042922,001666: 15,2577           00051                                    S1                                    #  X2, -2
042923,001667: 15,2600           00006                                    6D                                    
042924,001668: 15,2601           77744                           LXC,2                                          
042925,001669: 15,2602           00050                                    S1                                    
042926,001670: 15,2603           45173        GRAVEL             VLOAD*   CALL                                  
042927,001671: 15,2604           54000                                    XUNIT      -6,2                       
042928,001672: 15,2605           47673                                    *NBSM*                                #  SIN AND COS COMPUTED IN LUNG
042929,001673: 15,2606           06707                           STORE    XNB        +18D,1                     
042930,001674: 15,2607           77775                           VLOAD                                          
042931,001675: 15,2610           02731                                    STAR                                  
042932,001676: 15,2611           73744                           LXC,2    VXSC*                                 #  COMPLEMENT - UNITX ARE BACKWARD -
042933,001677: 15,2612           00047                                    X2                                    
042934,001678: 15,2613           75040                                    STAR       +6,2                       #  OUTER PRODUCT
042935,001679: 15,2614           71152                           VSL2     LXC,2                                 
042936,001680: 15,2615           00047                                    X2                                    
042937,001681: 15,2616           63047                           VSU*     INCR,2                                
042938,001682: 15,2617           54000                                    XUNIT      -6,2                       
042939,001683: 15,2620           00002                                    2D                                    
042940,001684: 15,2621           06665                           STORE    XSM        +18D,1                     
042941,001685: 15,2622           45100                           TIX,1    CALL                                  
042942,001686: 15,2623           32603                                    GRAVEL                                
042943,001687: 15,2624           47353                                    CALCGA                                
042944,001688: 15,2625           74575                           VLOAD    VSR1                                  
042945,001689: 15,2626           02715                                    GOUT                                  
042946,001690: 15,2627           36723                           STCALL   STARAD     +12D                       
042947,001691: 15,2630           32670                                    LUNG                                  
042948,001692: 15,2631           74575                           VLOAD    VSR1                                  
042949,001693: 15,2632           02715                                    GOUT                                  
042950,001694: 15,2633           53455                           VAD      UNIT                                  
042951,001695: 15,2634           02723                                    STARAD     +12D                       
042952,001696: 15,2635           02761                           STORE    STARSAV1                              
042953,001697: 15,2636           77641                           DOT                                            
042954,001698: 15,2637           02231                                    GSAV                                  
042955,001699: 15,2640           65552                           SL1      ACOS                                  

Page 965

042957,001701: 15,2641           01046                           STORE    DSPTEM1                               
042958,001702: 15,2642           77776                           EXIT                                           
042959,001703: 15,2643           05516                           TC       DOWNFLAG                              #  CLEAR FREEFLAG IN CASE OF RECYCLE
042960,001704: 15,2644           00014                           ADRES    FREEFLAG                              
042961,001705: 
042962,001706: 15,2645           32771                           CA       DISGRVER                              
042963,001707: 15,2646           04616                           TC       BANKCALL                              
042964,001708: 15,2647           20476                           CADR     GOFLASH                               
042965,001709: 15,2650           06001                           TC       GOTOPOOH                              
042966,001710: 15,2651           12654                           TCF      PROGRAV                               #  VB33 - PROCEED
042967,001711: 15,2652           05504                           TC       UPFLAG                                #  VB32 - RECYCLE - STORE GRAV AND DO IT AGAIN
042968,001712: 15,2653           00014                           ADRES    FREEFLAG                              #  AND SET FREEFLAG TO SHOW RECYCLE
042969,001713: 
042970,001714: 15,2654           05353        PROGRAV            TC       PHASCHNG                              
042971,001715: 15,2655           04024                           OCT      04024                                 
042972,001716: 
042973,001717: 15,2656           06037                           TC       INTPRET                               
042974,001718: 15,2657           77775                           VLOAD                                          
042975,001719: 15,2660           02761                                    STARSAV1                              
042976,001720: 15,2661           02231                           STORE    GSAV                                  
042977,001721: 15,2662           77776                           EXIT                                           
042978,001722: 15,2663           34751                           CAF      FREEFBIT                              #  IF FREEFLAG SET, RE-COMPUTE GRAVITY.
042979,001723: 15,2664           70074                           MASK     FLAGWRD0                              
042980,001724: 15,2665           10000                           CCS      A                                     
042981,001725: 15,2666           12563                           TCF      GVDETER                               #  SET
042982,001726: 15,2667           13553                           TCF      ATTCHK                                #  EXIT FROM GVDETER
042983,001727: 
042984,001728: 15,2670           77220        LUNG               STQ      VLOAD                                 
042985,001729: 15,2671           02745                                    QMIN                                  
042986,001730: 15,2672           24007                                    ZEROVEC                               
042987,001731: 15,2673           02707                           STORE    GACC                                  
042988,001732: 15,2674           77776                           EXIT                                           
042989,001733: 15,2675           05353                           TC       PHASCHNG                              
042990,001734: 15,2676           04024                           OCT      04024                                 
042991,001735: 
042992,001736: 15,2677           04616                           TC       BANKCALL                              
042993,001737: 15,2700           17000                           CADR     IMUCOARS                              
042994,001738: 15,2701           04616                           TC       BANKCALL                              
042995,001739: 15,2702           17716                           CADR     IMUSTALL                              
042996,001740: 15,2703           05711                           TC       CURTAINS                              
042997,001741: 15,2704           04616                           TC       BANKCALL                              
042998,001742: 15,2705           17210                           CADR     IMUFINE                               
042999,001743: 15,2706           04616                           TC       BANKCALL                              
043000,001744: 15,2707           17716                           CADR     IMUSTALL                              
043001,001745: 15,2710           05711                           TC       CURTAINS                              
043002,001746: 15,2711           32770                           CA       T/2SEC                                
043003,001747: 15,2712           55736                           TS       GCTR                                  
043004,001748: 15,2713           37716                           CA       PRIO31                                
043005,001749: 15,2714           55075                           TS       1/PIPADT                              
043006,001750: 15,2715           04616                           TC       BANKCALL                              

Page 966

043008,001752: 15,2716           15701                           CADR     GCOMPZER                              #  INITIALIZE COMPENSATION
043009,001753: 15,2717           05353                           TC       PHASCHNG                              
043010,001754: 15,2720           04024                           OCT      04024                                 
043011,001755: 
043012,001756: 15,2721           04616                           TC       BANKCALL                              #  DONT NEED TO INHINY   THIS USED TO
043013,001757: 15,2722           77544                           CADR     PIPSRINE                              #  INITIALIZE PIPAS  DONT USE DATA
043014,001758: 15,2723           06037                           TC       INTPRET                               
043015,001759: 15,2724           77776        GREED              EXIT                                           #  = MASK 7776 IN BASIC SO DONT CARE
043016,001760: 15,2725           35000                           CAF      2SECS                                 
043017,001761: 15,2726           05173                           TC       TWIDDLE                               #  SET UP 2 SEC TASK TO READ PIPAS
043018,001762: 15,2727           02731                           ADRES    GRABGRAV                              
043019,001763: 
043020,001764: 15,2730           05155                           TC       ENDOFJOB                              
043021,001765: 
043022,001766: 15,2731           04674        GRABGRAV           TC       IBNKCALL                              
043023,001767: 15,2732           77544                           CADR     PIPSRINE                              
043024,001768: 15,2733           35023                           CAF      PRIO13                                #  RE-ESTABLISH MAINLINE JOB
043025,001769: 15,2734           05105                           TC       FINDVAC                               
043026,001770: 15,2735  E5,1706                                  EBANK=   STARAD                                
043027,001771: 15,2735           02740 32065                     2CADR    ADDGRAV                               
043028,001772: 
043029,001773: 15,2737           05261                           TC       TASKOVER                              
043030,001774: 
043031,001775: 15,2740           04616        ADDGRAV            TC       BANKCALL                              
043032,001776: 15,2741           15263                           CADR     1/PIPA                                
043033,001777: 15,2742           25736                           INCR     GCTR                                  
043034,001778: 15,2743           06037                           TC       INTPRET                               
043035,001779: 15,2744           53375                           VLOAD    VAD                                   
043036,001780: 15,2745           00325                                    DELV                                  
043037,001781: 15,2746           02707                                    GACC                                  
043038,001782: 15,2747           02707                           STORE    GACC                                  #  ACCUMULATE G VECTOR
043039,001783: 15,2750           50135                           SLOAD    BMN                                   
043040,001784: 15,2751           02737                                    GCTR                                  
043041,001785: 15,2752           32724                                    GREED                                 
043042,001786: 15,2753           53575                           VLOAD    UNIT                                  
043043,001787: 15,2754           02707                                    GACC                                  
043044,001788: 15,2755           36731                           STCALL   STAR                                  
043045,001789: 15,2756           47537                                    CDUTRIG                               #  TRANSFORM IN NB COOR AND STORE
043046,001790: 15,2757           77624                           CALL                                           #        IN OUTPUT
043047,001791: 15,2760           47671                                    *SMNB*                                
043048,001792: 15,2761           02715                           STORE    GOUT                                  
043049,001793: 15,2762           77776                           EXIT                                           
043050,001794: 15,2763           05353                           TC       PHASCHNG                              
043051,001795: 15,2764           04024                           OCT      04024                                 
043052,001796: 
043053,001797: 15,2765           06037        QMINEXIT           TC       INTPRET                               
043054,001798: 15,2766           77650                           GOTO                                           
043055,001799: 15,2767           02745                                    QMIN                                  
043056,001800: 15,2770           77753        T/2SEC             DEC      -20        B-14                       

Page 967

043058,001802: 15,2771           01404        DISGRVER           VN       0604                                  
043059,001803: 15,2772           07357        42DEG              OCT      07357                                 
043060,001804: 15,2773           06211        35DEG              OCT      06211                                 
043061,001805: 

Page 968

043063,001807:                                                                                                  #  NAME  GYROTRIM
043064,001808: 
043065,001809:                                                                                                  #  THIS PROGRAM COMPUTES AND SENDS GYRO COMMANDS WHICH CAUSE THE CDUS
043066,001810:                                                                                                  #  TO ATTAIN A PRESCRIBED SET OF ANGLES.  THIS ROUTINE ASSUMES THE
043067,001811:                                                                                                  #  VEHICLES ATTITUDE REMAINS STATIONARY DURING ITS OPERATION.
043068,001812: 
043069,001813:                                                                                                  #  CALL          CALL
043070,001814:                                                                                                  #                        GYROTRIM
043071,001815: 
043072,001816:                                                                                                  #  INPUT         THETAD,+1,+2 = DESIRED CDU ANGLES
043073,001817:                                                                                                  #                CDUX,CDUY,CDUZ
043074,001818: 
043075,001819:                                                                                                  #  OUTPUT -      GYRO TORQUE PULSES
043076,001820: 
043077,001821:                                                                                                  #  SUBROUTINES - TRG*NBSM, *NBSM*, CDUTRIG, AXISGEN, CALCGTA, IMUFINE
043078,001822:                                                                                                  #                IMPULSE, IMUSTALL
043079,001823:                                                                                                  #                -        -       -          *          *   -
043080,001824:                                                                                                  #  DEBRIS -      CDUSPOT, SINCDU, COSCDU, STARAD, VAC, XDC, OGC
043081,001825: 
043082,001826: 15,2774                                           COUNT*   $$/P57                                
043083,001827: 15,2774           71220        GYROTRIM           STQ      DLOAD                                 
043084,001828: 15,2775           02745                                    QMIN                                  
043085,001829: 15,2776           00322                                    THETAD                                
043086,001830: 15,2777           65325                           PDDL     PDDL                                  
043087,001831: 15,3000           00324                                    THETAD     +2                         
043088,001832: 15,3001           00323                                    THETAD     +1                         
043089,001833: 15,3002           77666                           VDEF                                           
043090,001834: 15,3003           24767                           STOVL    CDUSPOT                               
043091,001835: 15,3004           24005                                    XUNIT                                 
043092,001836: 15,3005           77624                           CALL                                           
043093,001837: 15,3006           47664                                    TRG*NBSM                              
043094,001838: 15,3007           26707                           STOVL    STARAD                                
043095,001839: 15,3010           24003                                    YUNIT                                 
043096,001840: 15,3011           77624                           CALL                                           
043097,001841: 15,3012           47673                                    *NBSM*                                
043098,001842: 15,3013           36715                           STCALL   STARAD     +6                         
043099,001843: 15,3014           47537                                    CDUTRIG                               
043100,001844: 15,3015           77624                           CALL                                           
043101,001845: 15,3016           20030                                    CALCSMSC                              
043102,001846: 15,3017           77775                           VLOAD                                          
043103,001847: 15,3020           02665                                    XNB                                   
043104,001848: 15,3021           24007                           STOVL    6D                                    
043105,001849: 15,3022           02673                                    YNB                                   
043106,001850: 15,3023           34015                           STCALL   12D                                   
043107,001851: 15,3024           47441                                    AXISGEN                               
043108,001852: 15,3025           77624                           CALL                                           
043109,001853: 15,3026           47247                                    CALCGTA                               
043110,001854: 15,3027           77776        JUSTTRIM           EXIT                                           
043111,001855: 15,3030           04616                           TC       BANKCALL                              
043112,001856: 15,3031           17210                           CADR     IMUFINE                               
043113,001857: 15,3032           04616                           TC       BANKCALL                              

Page 969

043115,001859: 15,3033           17716                           CADR     IMUSTALL                              
043116,001860: 15,3034           05711                           TC       CURTAINS                              
043117,001861: 15,3035           33044                           CA       GYRCDR                                
043118,001862: 15,3036           04616                           TC       BANKCALL                              
043119,001863: 15,3037           17323                           CADR     IMUPULSE                              
043120,001864: 15,3040           04616                           TC       BANKCALL                              
043121,001865: 15,3041           17716                           CADR     IMUSTALL                              
043122,001866: 15,3042           05711                           TC       CURTAINS                              
043123,001867: 15,3043           12765                           TCF      QMINEXIT                              
043124,001868: 
043125,001869: 15,3044           02737        GYRCDR             ECADR    OGC                                   
043126,001870: 

Page 970

043128,001872:                                                                                                  #  PERFORM STAR AQUISITION AND STAR SIGHTINGS
043129,001873: 
043130,001874: 15,3045           34755        2STARS             CAF      ZERO                                  #  INITALIZE STARIND
043131,001875: 15,3046           13050                           TCF      +2                                    #  ZERO FOR 1ST STAR, ONE FOR 2ND STAR
043132,001876: 15,3047           34753        1STAR              CAF      BIT1                                  
043133,001877: 15,3050           55757                           TS       STARIND                               
043134,001878: 
043135,001879: 15,3051           05353                           TC       PHASCHNG                              
043136,001880: 15,3052           04024                           OCT      04024                                 
043137,001881: 
043138,001882: 15,3053           12245                           TCF      R59                                   #  GO DO STAR AQUIRE AND AOTMARK
043139,001883: 
043140,001884: 15,3054           31757        R59RET             CA       STARIND                               #  BACK FROM SURFACE MARKING
043141,001885: 15,3055           00006                           EXTEND                                         
043142,001886: 15,3056           13067                           BZF      ASTAR                                 #  1ST STAR MARKED
043143,001887: 
043144,001888: 15,3057           05353                           TC       PHASCHNG                              
043145,001889: 15,3060           04024                           OCT      04024                                 
043146,001890: 
043147,001891: 15,3061           06037                           TC       INTPRET                               
043148,001892: 15,3062           45145                           DLOAD    CALL                                  
043149,001893: 15,3063           03562                                    TSIGHT                                #  TIME OF 2ND MARK
043150,001894: 15,3064           32472                                    PLANET                                
043151,001895: 15,3065           36731                           STCALL   VEC2                                  #  STORE 2ND CATALOG VEC (REF)
043152,001896: 15,3066           33101                                    SURFLINE                              
043153,001897: 
043154,001898: 15,3067           06037        ASTAR              TC       INTPRET                               
043155,001899: 15,3070           77775                           VLOAD                                          
043156,001900: 15,3071           02715                                    STARAD     +6                         
043157,001901: 15,3072           02761                           STORE    STARSAV1                              #  1ST OBSERVED STAR (SM)
043158,001902: 15,3073           45145                           DLOAD    CALL                                  
043159,001903: 15,3074           03562                                    TSIGHT                                #  TIME OF 1ST MARK
043160,001904: 15,3075           32472                                    PLANET                                
043161,001905: 15,3076           02723                           STORE    VEC1                                  #  STORE 1ST CATALOG VEC (REF)
043162,001906: 15,3077           77776                           EXIT                                           
043163,001907: 15,3100           13047                           TCF      1STAR                                 #  GO GET 2ND STAR SIGHTING
043164,001908: 

Page 971

043166,001910:                                                                                                  #  DO FINE OR COARSE ALIGNMENT OF IMU
043167,001911: 
043168,001912: 15,3101           77131        SURFLINE           SSP      AXT,2                                 
043169,001913: 15,3102           00052                                    S2                                    
043170,001914: 15,3103           00006                                    6                                     
043171,001915: 15,3104           00014                                    12D                                   
043172,001916: 15,3105           64373        WRTDESIR           VLOAD*   MXV                                   
043173,001917: 15,3106           75040                                    VEC1       +12D,2                     #  PICK UP VEC IN REF, TRANS TO DESIRED SH
043174,001918: 15,3107           03607                                    XSMD                                  
043175,001919: 15,3110           77656                           UNIT                                           
043176,001920: 15,3111           12723                           STORE    STARAD     +12D,2                     #  VEC IN SM
043177,001921: 15,3112           77773                           VLOAD*                                         
043178,001922: 15,3113           75002                                    STARSAV1   +12D,2                     #  PICK UP VEC IN PRESENT SM
043179,001923: 15,3114           10023                           STORE    18D,2                                 
043180,001924: 15,3115           43104                           TIX,2    BON                                   
043181,001925: 15,3116           33105                                    WRTDESIR                              
043182,001926: 15,3117           04315                                    INITALGN                              #  IF INITIAL PASS (OPTION 0) BYPASS R54
043183,001927: 15,3120           33126                                    INITBY                                
043184,001928: 15,3121           77624        DOALIGN            CALL                                           
043185,001929: 15,3122           31256                                    R54                                   #  DO CHKSDATA
043186,001930: 15,3123           77614                           BOFF                                           
043187,001931: 15,3124           00354                                    FREEFLAG                              
043188,001932: 15,3125           33206                                    P57POST                               #  ASTRO DOES NOT LIKE DATA TEST RESULTS
043189,001933: 15,3126           77624        INITBY             CALL                                           
043190,001934: 15,3127           47441                                    AXISGEN                               #  GET DESIRED ORIENT WRT PRES. XDC,YDC,ZDC
043191,001935: 15,3130           77624                           CALL                                           
043192,001936: 15,3131           47247                                    CALCGTA                               #  GET GYRO TORQ ANGLES, OGC,IGC,MGC
043193,001937: 15,3132           77776                           EXIT                                           
043194,001938: 15,3133           34752                           CAF      INITABIT                              #  IF INITIAL PASS BYPASS NOUN 93 DISPLAY
043195,001939: 15,3134           70104                           MASK     FLAGWRD8                              
043196,001940: 15,3135           10000                           CCS      A                                     
043197,001941: 15,3136           13145                           TCF      5DEGTEST                              
043198,001942: 15,3137           33313                           CAF      DISPGYRO                              #  DISPLAY GYRO TORQ ANGLES V 06N93
043199,001943: 15,3140           04616                           TC       BANKCALL                              
043200,001944: 15,3141           20476                           CADR     GOFLASH                               
043201,001945: 15,3142           06001                           TC       GOTOPOOH                              #  V34 - TERMINATE
043202,001946: 15,3143           13145                           TCF      5DEGTEST                              #  VB33 - PROCEED TO COARSE OR FINE
043203,001947: 15,3144           13207                           TCF      P57POST    +1                         #  VB32 - RECYCLE, MAYBE RE-ALIGN
043204,001948: 
043205,001949: 15,3145           06037        5DEGTEST           TC       INTPRET                               #  IF ANGLES GREATER THAN 5 DEGS, DO COARSE
043206,001950: 15,3146           40175                           VLOAD    BOV                                   
043207,001951: 15,3147           02740                                    OGC                                   
043208,001952: 15,3150           33151                                    SURFSUP                               
043209,001953: 15,3151           02750        SURFSUP            STORE    OGCT                                  
043210,001954: 15,3152           40141                           V/SC     BOV                                   
043211,001955: 15,3153           30610                                    5DEGREES                              
043212,001956: 15,3154           33254                                    COATRIM                               
043213,001957: 15,3155           52131                           SSP      GOTO                                  
043214,001958: 15,3156           02746                                    QMIN                                  
043215,001959: 15,3157           33161                                    SURFDISP                              

Page 972

043217,001961: 15,3160           33027                                    JUSTTRIM                              #  ANGLES LESS THAN 5 DEG, DO GYRO TORQ
043218,001962: 
043219,001963: 15,3161           77776        SURFDISP           EXIT                                           
043220,001964: 15,3162           05353                           TC       PHASCHNG                              
043221,001965: 15,3163           04024                           OCT      04024                                 
043222,001966: 
043223,001967: 15,3164           06037                           TC       INTPRET                               
043224,001968: 15,3165           75160                           AXC,1    AXC,2                                 
043225,001969: 15,3166           03606                                    XSMD                                  
043226,001970: 15,3167           01733                                    REFSMMAT                              
043227,001971: 15,3170           45014                           SET      CALL                                  
043228,001972: 15,3171           01462                                    REFSMFLG                              
043229,001973: 15,3172           31377                                    MATMOVE                               
043230,001974: 15,3173           77776                           EXIT                                           
043231,001975: 15,3174           11145                           CCS      OPTION2                               #  IF OPTION ZERO DO FINISH
043232,001976: 15,3175           13177                           TCF      B2F8                                  
043233,001977: 15,3176           13207                           TCF      P57POST    +1                         
043234,001978: 
043235,001979: 15,3177           34752        B2F8               CAF      INITABIT                              #  IF INITIAL FLAG SET, RE-CYCLE.
043236,001980: 15,3200           70104                           MASK     FLAGWRD8                              
043237,001981: 15,3201           10000                           CCS      A                                     
043238,001982: 15,3202           13561                           TCF      P57JUMP                               #  ITS SET
043239,001983: 15,3203           06037                           TC       INTPRET                               
043240,001984: 15,3204           77624                           CALL                                           
043241,001985: 15,3205           33506                                    REFMF                                 #  GO GET ATTITUDE VEC IN MF(YNBSAV,XNBSAV)
043242,001986: 15,3206           77776        P57POST            EXIT                                           
043243,001987: 15,3207           35751                           CAF      OCT14                                 #  DISPLAY V50N25 CHK CODE 14
043244,001988: 15,3210           04616                           TC       BANKCALL                              
043245,001989: 15,3211           20623                           CADR     GOPERF1                               
043246,001990: 15,3212           16001                           TCF      GOTOPOOH                              #  VB34 - TERMINATE
043247,001991: 15,3213           13561                           TCF      P57JUMP                               #  VB33 - PROCEED TO RE-ALIGN
043248,001992: 15,3214           44752                           CS       BIT2                                  #  TEST TO SE IF ALIGNED BY OPTION 2
043249,001993: 15,3215           61145                           AD       OPTION2                               
043250,001994: 15,3216           00006                           EXTEND                                         
043251,001995: 15,3217           13221                           BZF      +2                                    #  YES - GO CALCULATE LANDING SITE
043252,001996: 15,3220           16001                           TCF      GOTOPOOH                              #  NO - EXIT P57
043253,001997: 15,3221           05353                           TC       PHASCHNG                              #  RESTART PLACE
043254,001998: 15,3222           04024                           OCT      04024                                 
043255,001999: 15,3223           06037                           TC       INTPRET                               
043256,002000: 15,3224           45175                           VLOAD    CALL                                  #  USE GNB
043257,002001: 15,3225           02231                                    GSAV                                  
043258,002002: 15,3226           47661                                    CDU*NBSM                              #  GO TO SM COORDS
043259,002003: 15,3227           43105                           VXM      SET                                   #        ON MOON SO SET LUNAFLAG
043260,002004: 15,3230           01734                                    REFSMMAT                              #        G(REF) = (REFSMMAT)T (NBSM)GNB
043261,002005: 15,3231           01463                                    LUNAFLAG                              
043262,002006: 15,3232           51515                           PDVL     ABVAL                                 
043263,002007: 15,3233           02023                                    RLS                                   
043264,002008: 15,3234           45561                           VXSC     STADR                                 
043265,002009: 15,3235           75745                           STORE    ALPHAV                                #  ALPHAV = RLSMAG * G(REF)
043266,002010: 15,3236           47014                           CLEAR    RTB                                   

Page 973

043268,002012: 15,3237           00662                                    ERADFLAG                              
043269,002013: 15,3240           21573                                    LOADTIME                              
043270,002014: 15,3241           77624                           CALL                                           
043271,002015: 15,3242           30446                                    N89DISP                               #  SUBROUTINE TO CALC LS AND GIVE RLS BACK
043272,002016: 15,3243           01221                           STORE    RN                                    #  RN=RLS B-29 = LM POSITION
043273,002017: 15,3244           65352                           VSL2     PDDL                                  #  R-TO-RP GETS RLS B-27 AT 0-5D IN PDLIST
043274,002018: 15,3245           01243                                    GDT/2      +4                         #  TIME TEMP STORED IN N89DISP
043275,002019: 15,3246           77606                           PUSH                                           #  TIME AT 6-7 IN PDLIST
043276,002020: 15,3247           35235                           STCALL   PIPTIME                               #  PIPTIME = LM STATE TIME
043277,002021: 15,3250           51670                                    R-TO-RP                               
043278,002022: 15,3251           02023                           STORE    RLS                                   #  RLS IN MOON-FIXED COORDS
043279,002023: 15,3252           77776                           EXIT                                           
043280,002024: 15,3253           16001                           TCF      GOTOPOOH                              #  EXIT P57
043281,002025: 

Page 974

043283,002027:                                                                                                  #  COARSE AND FINE ALIGN IMU
043284,002028: 
043285,002029: 15,3254           75160        COATRIM            AXC,1    AXC,2                                 
043286,002030: 15,3255           02664                                    XDC                                   
043287,002031: 15,3256           02642                                    XSM                                   
043288,002032: 15,3257           77624                           CALL                                           
043289,002033: 15,3260           31377                                    MATMOVE                               
043290,002034: 15,3261           77624                           CALL                                           
043291,002035: 15,3262           47537                                    CDUTRIG                               
043292,002036: 15,3263           77624                           CALL                                           
043293,002037: 15,3264           20030                                    CALCSMSC                              
043294,002038: 15,3265           77624                           CALL                                           
043295,002039: 15,3266           47353                                    CALCGA                                
043296,002040: 15,3267           77414                           BOFF     EXIT                                  
043297,002041: 15,3270           04355                                    INITALGN                              #  IF INITIAL ALGNMENT DISPLAY FINAL
043298,002042: 15,3271           33303                                    CORSIT                                #  GIMBAL ANGLES IF COARSE ANGLES GREATER
043299,002043: 15,3272           35010                           CAF      V06N22                                #  THAN 5 DEGREES
043300,002044: 15,3273           04616                           TC       BANKCALL                              
043301,002045: 15,3274           20476                           CADR     GOFLASH                               
043302,002046: 15,3275           06001                           TC       GOTOPOOH                              
043303,002047: 15,3276           13300                           TCF      +2                                    
043304,002048: 15,3277           13272                           TCF      -5                                    
043305,002049: 15,3300           05353                           TC       PHASCHNG                              
043306,002050: 15,3301           04024                           OCT      04024                                 
043307,002051: 
043308,002052: 15,3302           06037                           TC       INTPRET                               
043309,002053: 15,3303           77624        CORSIT             CALL                                           
043310,002054: 15,3304           31565                                    COARSE                                
043311,002055: 15,3305           77624                           CALL                                           
043312,002056: 15,3306           31602                                    NCOARSE                               
043313,002057: 15,3307           77624                           CALL                                           
043314,002058: 15,3310           32774                                    GYROTRIM                              
043315,002059: 15,3311           77650                           GOTO                                           
043316,002060: 15,3312           33161                                    SURFDISP                              
043317,002061: 15,3313           01535        DISPGYRO           VN       0693                                  
043318,002062: 

Page 975

043320,002064:                                                                                                  #  LUNAR SURFACE IMU ALIGNMENT PROGRAM
043321,002065: 
043322,002066: 15,3314           04616        P57                TC       BANKCALL                              #  IS ISS ON - IF NOT, IMUCHK WILL SEND
043323,002067: 15,3315           33652                           CADR     IMUCHK                                #  ALARM CODE 210 AND EXIT VIA GOTOPOOH
043324,002068: 
043325,002069: 15,3316           36245                           CAF      THREE                                 #  JAM REFSMMAT OPTION 3 FOR INITIAL DISP.
043326,002070: 15,3317           55145                           TS       OPTION2                               
043327,002071: 15,3320           34753        P57OPT             CAF      BIT1                                  
043328,002072: 15,3321           04616                           TC       BANKCALL                              
043329,002073: 15,3322           20713                           CADR     GOPERF4R                              #  FLASH V04N06 FOR ALIGNMENT CODE
043330,002074: 15,3323           06001                           TC       GOTOPOOH                              #  V34 TERMINATE
043331,002075: 15,3324           13331                           TCF      ALIGNOPT                              #  V33 PROCEED
043332,002076: 15,3325           13320                           TCF      P57OPT                                #  V32 RECYCLE
043333,002077: 
043334,002078: 15,3326           05353                           TC       PHASCHNG                              
043335,002079: 15,3327           00014                           OCT      00014                                 
043336,002080: 15,3330           05155                           TC       ENDOFJOB                              
043337,002081: 
043338,002082: 15,3331           31145        ALIGNOPT           CA       OPTION2                               
043339,002083: 15,3332           76245                           MASK     THREE                                 
043340,002084: 15,3333           50000                           INDEX    A                                     
043341,002085: 15,3334           13335                           TCF      +1                                    
043342,002086: 15,3335           13350                           TCF      TDISP                                 #  OPTION 4 LS ORIENTATION
043343,002087: 15,3336           13411                           TCF      PACKOPTN                              #  OPTION 1 PREFERRED
043344,002088: 15,3337           13320                           TCF      P57OPT                                #  OPTION 2 INVALID IN P57, RECYCLE
043345,002089: 15,3340           06037                           TC       INTPRET                               #  OPTION 3 REFSMMAT
043346,002090: 15,3341           75160                           AXC,1    AXC,2                                 #  JAM REFSMMAT IN XSMD LOC
043347,002091: 15,3342           01733                                    REFSMMAT                              
043348,002092: 15,3343           03606                                    XSMD                                  
043349,002093: 15,3344           77624                           CALL                                           
043350,002094: 15,3345           31377                                    MATMOVE                               
043351,002095: 15,3346           77650                           GOTO                                           
043352,002096: 15,3347           33410                                    PACKOPTN   -1                         
043353,002097: 
043354,002098: 15,3350           06037        TDISP              TC       INTPRET                               
043355,002099: 15,3351           77745                           DLOAD                                          
043356,002100: 15,3352           03442                                    TIG                                   #  LOAD ASCENT TIME FOR DISPLAY
043357,002101: 15,3353           01046        P57A               STORE    DSPTEM1                               
043358,002102: 15,3354           77776                           EXIT                                           
043359,002103: 15,3355           32170        P57AA              CAF      V06N34*                               #  DISPLAY TALIGN, TALIGN : DSPTEM1
043360,002104: 15,3356           04616                           TC       BANKCALL                              
043361,002105: 15,3357           20476                           CADR     GOFLASH                               
043362,002106: 15,3360           16001                           TCF      GOTOPOOH                              #  V34 - TERMINATE
043363,002107: 15,3361           13363                           TCF      +2                                    
043364,002108: 15,3362           13355                           TCF      P57AA                                 #  VB32 - RECYCLE
043365,002109: 
043366,002110: 15,3363           06037                           TC       INTPRET                               
043367,002111: 15,3364           65234                           RTB      PDDL                                  
043368,002112: 15,3365           21573                                    LOADTIME                              #  PUSH CURRENT TIME AND PICK UP KEY IN
043369,002113: 15,3366           01046                                    DSPTEM1                               

Page 976

043371,002115: 15,3367           65254                           BZE      PDDL                                  
043372,002116: 15,3370           33400                                    P57C                                  #  IF KEY IN TIME ZERO - TALIGN=CURRENT TIME
043373,002117: 15,3371           51025                           DSU      BPL                                   #  NOT ZERO SO EXCHANGE PD WITH DSPTEM1
043374,002118: 15,3372           01046                                    DSPTEM1                               
043375,002119: 15,3373           33400                                    P57C                                  
043376,002120: 15,3374           45545                           DLOAD    STADR                                 #  IF KEYIN TIME GREATER THAN CURRENT TIME
043377,002121: 15,3375           74335                           STORE    TIG                                   #  STORE IT IN TIG
043378,002122: 15,3376           36775                           STCALL   TALIGN                                
043379,002123: 15,3377           33402                                    P57D                                  
043380,002124: 15,3400           45545        P57C               DLOAD    STADR                                 
043381,002125: 15,3401           75002                           STORE    TALIGN                                
043382,002126: 15,3402           34041        P57D               STCALL   TDEC1                                 
043383,002127: 15,3403           27057                                    LEMPREC                               #  COMPUTE DESIRED IMU ORIENTATION STORE
043384,002128: 15,3404           53575                           VLOAD    UNIT                                  #  IN X,Y,ZSMD
043385,002129: 15,3405           00001                                    RATT                                  
043386,002130: 15,3406           37607                           STCALL   XSMD                                  
043387,002131: 15,3407           11013                                    LSORIENT                              
043388,002132: 15,3410           77776                           EXIT                                           
043389,002133: 15,3411           34755        PACKOPTN           CAF      ZERO                                  #  PACK FLAG BITS FOR OPTION DISPLAY
043390,002134: 15,3412           55145                           TS       OPTION1    +1                         #  JAM ZERO IN ALIGNMENT OPTION
043391,002135: 15,3413           55146                           TS       OPTION1    +2                         #  INITIALIZE FLAG BIT CONFIGURATION
043392,002136: 15,3414           34737                           CAF      REFSMBIT                              
043393,002137: 15,3415           70077                           MASK     FLAGWRD3                              #  REFSMFLG
043394,002138: 15,3416           10000                           CCS      A                                     
043395,002139: 15,3417           34745                           CAF      BIT7                                  #  SET
043396,002140: 15,3420           27146                           ADS      OPTION1    +2                         #  CLEAR - JUST ZERO
043397,002141: 15,3421           34753                           CAF      ATTFLBIT                              
043398,002142: 15,3422           70102                           MASK     FLAGWRD6                              #  ATTFLG
043399,002143: 15,3423           10000                           CCS      A                                     
043400,002144: 15,3424           34750                           CAF      BIT4                                  #  SET
043401,002145: 15,3425           27146                           ADS      OPTION1    +2                         #  CLEAR - ZERO IN A
043402,002146: 15,3426           34750                           CAF      BIT4                                  
043403,002147: 15,3427           55144                           TS       OPTION1                               #  JAM 00010 IN OPTION1 FOR CHECK LIST
043404,002148: 
043405,002149: 15,3430           33651        DSPOPTN            CAF      VB05N06                               #  DISPLAY OPTION CODE AND FLAG BITS
043406,002150: 15,3431           04616                           TC       BANKCALL                              
043407,002151: 15,3432           20476                           CADR     GOFLASH                               
043408,002152: 15,3433           16001                           TCF      GOTOPOOH                              #  VB34 - TERMINATE
043409,002153: 15,3434           13436                           TCF      +2                                    #  V33 - PROCEED
043410,002154: 15,3435           13430                           TCF      DSPOPTN                               #  V32 - RECYCLE
043411,002155: 
043412,002156: 15,3436           34737                           CAF      REFSMBIT                              
043413,002157: 15,3437           70077                           MASK     FLAGWRD3                              
043414,002158: 15,3440           10000                           CCS      A                                     
043415,002159: 15,3441           13541                           TCF      GETLMATT                              #  SET, GO COMPUTE LM ATTITUDE
043416,002160: 15,3442           34753                           CAF      ATTFLBIT                              #  CLEAR - CHECK ATTFLAG FOR STORED ATTITUDE.
043417,002161: 15,3443           70102                           MASK     FLAGWRD6                              
043418,002162: 15,3444           10000                           CCS      A                                     
043419,002163: 15,3445           13545                           TCF      BYLMATT                               #  ALLFLG SET, CHK OPTION FOR GRAVITY COMP
043420,002164: 15,3446           34752                           CAF      BIT2                                  #  SEE IF OPTION 2 OR 3

Page 977

043422,002166: 15,3447           71145                           MASK     OPTION2                               
043423,002167: 15,3450           10000                           CCS      A                                     
043424,002168: 15,3451           13545                           TCF      BYLMATT                               #  OPTION 2 OR 3 BUT DONT HAVE ATTITUDE
043425,002169: 15,3452           05567                           TC       ALARM                                 #  OPTION INCONSISTANT WITH FLAGS - ALARM 701
043426,002170: 15,3453           00701                           OCT      701                                   
043427,002171: 15,3454           35006                           CAF      VB05N09                               #  DISPLAY ALARM FOR ACTION
043428,002172: 15,3455           04616                           TC       BANKCALL                              
043429,002173: 15,3456           20476                           CADR     GOFLASH                               
043430,002174: 15,3457           16001                           TCF      GOTOPOOH                              #  VB34 - TERMINATE
043431,002175: 15,3460           13430                           TCF      DSPOPTN                               #  V33 - PROCEED ********TEMPORARY
043432,002176: 15,3461           13430                           TCF      DSPOPTN                               #  VB32 - RECYCLE TO OPTION DISPLAY V 05N06
043433,002177: 

Page 978

043435,002179:                                                                                                  #  TRANSFORM VEC1,2 FROM MOON FIXED TO REF AND JAM BACK IN VEC1,2
043436,002180: 
043437,002181: 15,3462           40220        MFREF              STQ      SETPD                                 
043438,002182: 15,3463           02746                                    QMAJ                                  
043439,002183: 15,3464           00001                                    0                                     
043440,002184: 15,3465           77634                           RTB                                            
043441,002185: 15,3466           21573                                    LOADTIME                              
043442,002186: 15,3467           27562                           STOVL    TSIGHT                                
043443,002187: 15,3470           02723                                    VEC1                                  
043444,002188: 15,3471           41525                           PDDL     PUSH                                  
043445,002189: 15,3472           03562                                    TSIGHT                                
043446,002190: 15,3473           77624                           CALL                                           
043447,002191: 15,3474           55716                                    RP-TO-R                               
043448,002192: 15,3475           26723                           STOVL    VEC1                                  
043449,002193: 15,3476           02731                                    VEC2                                  
043450,002194: 15,3477           65201                           SETPD    PDDL                                  
043451,002195: 15,3500           00001                                    0                                     
043452,002196: 15,3501           03562                                    TSIGHT                                
043453,002197: 15,3502           45006                           PUSH     CALL                                  
043454,002198: 15,3503           55716                                    RP-TO-R                               
043455,002199: 15,3504           36731                           STCALL   VEC2                                  
043456,002200: 15,3505           02746                                    QMAJ                                  
043457,002201: 

Page 979

043459,002203:                                                                                                  #  COMPUTE LM ATTITUDE IN MOON FIXED COORDINATES USING REFSMMAT AND
043460,002204:                                                                                                  #  STORE IN YNBSAV AND ZNBSAV
043461,002205: 
043462,002206: 15,3506           45020        REFMF              STQ      CALL                                  
043463,002207: 15,3507           02746                                    QMAJ                                  
043464,002208: 15,3510           47537                                    CDUTRIG                               #  GET SIN AND COS OF CDUS
043465,002209: 15,3511           40234                           RTB      SETPD                                 
043466,002210: 15,3512           21573                                    LOADTIME                              
043467,002211: 15,3513           00001                                    0                                     
043468,002212: 15,3514           37562                           STCALL   TSIGHT                                
043469,002213: 15,3515           20030                                    CALCSMSC                              #  GET YNB IN SM
043470,002214: 15,3516           61375                           VLOAD    VXM                                   
043471,002215: 15,3517           02673                                    YNB                                   
043472,002216: 15,3520           01734                                    REFSMMAT                              #  YNB TO REF
043473,002217: 15,3521           65256                           UNIT     PDDL                                  
043474,002218: 15,3522           03562                                    TSIGHT                                
043475,002219: 15,3523           45006                           PUSH     CALL                                  
043476,002220: 15,3524           51670                                    R-TO-RP                               
043477,002221: 15,3525           26237                           STOVL    YNBSAV                                #  YNB TO MF
043478,002222: 15,3526           02701                                    ZNB                                   
043479,002223: 15,3527           53505                           VXM      UNIT                                  
043480,002224: 15,3530           01734                                    REFSMMAT                              #  ZNB TO REF
043481,002225: 15,3531           41525                           PDDL     PUSH                                  
043482,002226: 15,3532           03562                                    TSIGHT                                
043483,002227: 15,3533           77624                           CALL                                           
043484,002228: 15,3534           51670                                    R-TO-RP                               #  ZNB TO MF
043485,002229: 15,3535           02245                           STORE    ZNBSAV                                
043486,002230: 15,3536           77614                           SETGO                                          
043487,002231: 15,3537           03036                                    ATTFLAG                               
043488,002232: 15,3540           02746                                    QMAJ                                  
043489,002233: 

Page 980

043491,002235:                                                                                                  #  BRANCH TO ALIGNMENT OPTION
043492,002236: 
043493,002237: 15,3541           06037        GETLMATT           TC       INTPRET                               
043494,002238: 15,3542           77624                           CALL                                           
043495,002239: 15,3543           33506                                    REFMF                                 #  GO TRANSFORM TO MF IN YNBSAV, ZNBSAV
043496,002240: 15,3544           77776                           EXIT                                           
043497,002241: 
043498,002242: 15,3545           05504        BYLMATT            TC       UPFLAG                                #  SET INITIAL ALIGN FLAG
043499,002243: 15,3546           00205                           ADRES    INITALGN                              
043500,002244: 15,3547           34753                           CAF      BIT1                                  
043501,002245: 15,3550           71145                           MASK     OPTION2                               #  SEE IF OPTION 1 OR 3
043502,002246: 15,3551           10000                           CCS      A                                     
043503,002247: 15,3552           12563                           TCF      GVDETER                               #  OPTION 1 OR 2, GET GRAVITY
043504,002248: 
043505,002249: 15,3553           05353        ATTCHK             TC       PHASCHNG                              
043506,002250: 15,3554           04024                           OCT      04024                                 
043507,002251: 
043508,002252: 15,3555           34753                           CAF      ATTFLBIT                              #  NOT 1 OR 3, CHECK ATTFLAG
043509,002253: 15,3556           70102                           MASK     FLAGWRD6                              
043510,002254: 15,3557           10000                           CCS      A                                     
043511,002255: 15,3560           13575                           TCF      P57OPT0                               #  GET ALIGNMENT VECS FOR OPTION 0
043512,002256: 15,3561           05353        P57JUMP            TC       PHASCHNG                              
043513,002257: 15,3562           04024                           OCT      04024                                 
043514,002258: 
043515,002259: 15,3563           05516                           TC       DOWNFLAG                              #  ATTFLG CLEAR - RESET INTALIGN FLAG
043516,002260: 15,3564           00205                           ADRES    INITALGN                              
043517,002261: 15,3565           36245                           CAF      THREE                                 
043518,002262: 15,3566           71145                           MASK     OPTION2                               #  BRANCH ON OPTION CODE
043519,002263: 15,3567           50000                           INDEX    A                                     
043520,002264: 15,3570           13571                           TCF      +1                                    
043521,002265: 15,3571           13575                           TCF      P57OPT0                               #  OPTION IS 0
043522,002266: 15,3572           13616                           TCF      P57OPT1                               #  OPTION IS 1
043523,002267: 15,3573           13634                           TCF      P57OPT2                               #  OPTION IS 2
043524,002268: 15,3574           13635                           TCF      P57OPT3                               #  OPTION IS 3
043525,002269: 

Page 981

043527,002271:                                                                                                  #  OPTION 0, GET TWO ATTITUDE VECS
043528,002272: 
043529,002273: 15,3575           06037        P57OPT0            TC       INTPRET                               
043530,002274: 15,3576           77775                           VLOAD                                          
043531,002275: 15,3577           02237                                    YNBSAV                                #  Y AND Z ATTITUDE WILL BE PUT IN REF
043532,002276: 15,3600           26723                           STOVL    VEC1                                  
043533,002277: 15,3601           02245                                    ZNBSAV                                
043534,002278: 15,3602           36731                           STCALL   VEC2                                  
043535,002279: 15,3603           47537                                    CDUTRIG                               
043536,002280: 15,3604           77624                           CALL                                           
043537,002281: 15,3605           20030                                    CALCSMSC                              #  COMPUTE SC AXIS WRT PRESENT SM
043538,002282: 15,3606           77775                           VLOAD                                          
043539,002283: 15,3607           02673                                    YNB                                   
043540,002284: 15,3610           26761        SAMETYP            STOVL    STARSAV1                              #  Y SC AXIS WRT PRESENT SM
043541,002285: 15,3611           02701                                    ZNB                                   
043542,002286: 15,3612           36767                           STCALL   STARSAV2                              #  Z SC AXIS WRT PRESENT SM
043543,002287: 15,3613           33462                                    MFREF                                 #  TRANSFORM VEC1,2 FROM MF TO REF
043544,002288: 15,3614           77650                           GOTO                                           
043545,002289: 15,3615           33101                                    SURFLINE                              
043546,002290: 
043547,002291:                                                                                                  #  OPTION 1, GET LANDING SITE AND Z-ATTITUDE VEC
043548,002292: 
043549,002293: 15,3616           06037        P57OPT1            TC       INTPRET                               
043550,002294: 15,3617           53575                           VLOAD    UNIT                                  
043551,002295: 15,3620           02023                                    RLS                                   #  LANDING SITE VEC
043552,002296: 15,3621           26723                           STOVL    VEC1                                  
043553,002297: 15,3622           02245                                    ZNBSAV                                #  Z ATTITUDE VEC
043554,002298: 15,3623           36731                           STCALL   VEC2                                  
043555,002299: 15,3624           47537                                    CDUTRIG                               
043556,002300: 15,3625           77624                           CALL                                           
043557,002301: 15,3626           20030                                    CALCSMSC                              #  GET ZNB AXIS WRT PRES SM FOR STARSAV2
043558,002302: 15,3627           45175                           VLOAD    CALL                                  
043559,002303: 15,3630           02231                                    GSAV                                  #  TRANS GSAV FROM NB TO SM FOR STARSAV1
043560,002304: 15,3631           47661                                    CDU*NBSM                              
043561,002305: 15,3632           77650                           GOTO                                           
043562,002306: 15,3633           33610                                    SAMETYP                               #  NOW DO SAME AS OPTION 0
043563,002307: 

Page 982

043565,002309:                                                                                                  #  OPTION 2, GET TWO STAR SIGHTINGS
043566,002310: 
043567,002311: 15,3634           13045        P57OPT2            TCF      2STARS                                #  DO SIGHTING ON 2 STARS
043568,002312: 
043569,002313:                                                                                                  #  OPTION 3, GET LANDING SITE VEC AND ONE STAR SIGHTING
043570,002314: 
043571,002315: 15,3635           06037        P57OPT3            TC       INTPRET                               
043572,002316: 15,3636           53575                           VLOAD    UNIT                                  
043573,002317: 15,3637           02023                                    RLS                                   #  LANDING SITE VEC
043574,002318: 15,3640           02723                           STORE    VEC1                                  
043575,002319: 15,3641           26731                           STOVL    VEC2                                  #  DUMMY VEC2 FOR 2ND CATALOG STAR
043576,002320: 15,3642           02231                                    GSAV                                  #  GRAVITY VEC NB
043577,002321: 15,3643           77624                           CALL                                           
043578,002322: 15,3644           47661                                    CDU*NBSM                              #  TRANS GSAV FROM NB TO SM FOR STARSAV1
043579,002323: 15,3645           36761                           STCALL   STARSAV1                              
043580,002324: 15,3646           33462                                    MFREF                                 #  STARSAV2 IS STORED AS 2ND OBSERVED STAR
043581,002325: 15,3647           77776                           EXIT                                           
043582,002326: 15,3650           13047                           TCF      1STAR                                 #  1STAR GET VEC2, STARSAV2, GOES TO SURFLINE
043583,002327: 
043584,002328: 15,3651           01206        VB05N06            VN       506                                   
043585,002329: 

Page 983

043587,002331:                                                                                                  #  CHECK IMODES30 TO VARIFY IMU IS ON
043588,002332: 
043589,002333: 15,3652           41302        IMUCHK             CS       IMODES30                              
043590,002334: 15,3653           74743                           MASK     BIT9                                  
043591,002335: 15,3654           10000                           CCS      A                                     #  IS IMU ON
043592,002336: 15,3655           13661                           TCF      +4                                    #  YES
043593,002337: 
043594,002338: 15,3656           05567                           TC       ALARM                                 #  NO, SEND ALARM AND EXIT
043595,002339: 15,3657           00210                           OCT      210                                   
043596,002340: 15,3660           06001                           TC       GOTOPOOH                              
043597,002341: 
043598,002342: 15,3661           05504                           TC       UPFLAG                                
043599,002343: 15,3662           00007                           ADRES    IMUSE                                 #  SET IMUSE FLAG
043600,002344: 
043601,002345: 15,3663           04631                           TC       SWRETURN                              
043602,002346: 
043603,002347: 04,3013                                           BANK     04                                    
043604,002348: 04,2000                                           SETLOC   AOTMARK2                              
043605,002349: 04,2000                                           BANK                                           
043606,002350: 04,3013                                           COUNT*   $$/P57                                
043607,002351: 
043608,002352: 04,3013           77220        LSORIENT           STQ      VLOAD                                 
043609,002353: 04,3014           02746                                    QMAJ                                  
043610,002354: 04,3015           01555                                    RRECTCSM                              
043611,002355: 04,3016           47235                           VXV      VXV                                   
043612,002356: 04,3017           01563                                    VRECTCSM                              
043613,002357: 04,3020           03607                                    XSMD                                  
043614,002358: 04,3021           77656                           UNIT                                           
043615,002359: 04,3022           03623                           STORE    ZSMD                                  
043616,002360: 04,3023           53435                           VXV      UNIT                                  
043617,002361: 04,3024           03607                                    XSMD                                  
043618,002362: 04,3025           37615                           STCALL   YSMD                                  
043619,002363: 04,3026           02746                                    QMAJ                                  
043620,002364: 

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