Source Code

These source code files are a reconstruction of Sundance, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
This means that source code does not represent a specific historical revision of Sundance, but rather a mixture of the three released versions. Nonetheless, it is capable of flying the whole Apollo 9 mission. This source code matches the binary dumps, as closely as feasible, but 100% match is not possible, due mostly to changes in memory addresses at which code and variables were allocated in different revisions of Sundance. Refer to this list of explanations for each binary mismatch.

Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

036390,000002:                                                                                                  ## Copyright:   Public domain.
036391,000003:                                                                                                  ## Filename:    P51-P53.agc
036392,000004:                                                                                                  ## Purpose:     A section of a reconstructed, mixed version of Sundance
036393,000005:                                                                                                  ##              It is part of the reconstructed source code for the Lunar
036394,000006:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 9.
036395,000007:                                                                                                  ##              No original listings of this program are available;
036396,000008:                                                                                                  ##              instead, this file was created via disassembly of dumps
036397,000009:                                                                                                  ##              of various revisions of Sundance core rope modules.
036398,000010:                                                                                                  ## Assembler:   yaYUL
036399,000011:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
036400,000012:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
036401,000013:                                                                                                  ## Mod history: 2020-06-17 MAS  Created from Luminary 69.
036402,000014: 
036403,000015:                                                                                                  ## Sundance 302
036404,000016: 
036405,000017:                                                                                                  #  PROGRAM NAME- PROG52                                                                   DATE- JAN 9, 1967
036406,000018:                                                                                                  #  MOD NO- 0                                                                              LOG SECTION- P51-P53
036407,000019:                                                                                                  #  MODIFICATION BY- LONSKE                                                                ASSEMBLY- SUNDANCE REV 46
036408,000020: 
036409,000021:                                                                                                  #  FUNCTIONAL DESCRIPTION-
036410,000022: 
036411,000023:                                                                                                  #       ALIGNS THE IMU TO ONE OF THREE ORIENTATIONS SELECTED BY THE ASTRONAUT. THE PRESENT IMU ORIENTATION IS KNOWN
036412,000024:                                                                                                  #  AND IS STORED IN REFSMMAT. THE THREE POSSIBLE ORIENTATIONS MAY BE_
036413,000025: 
036414,000026:                                                                                                  #       (A) PREFERRED ORIENTATION
036415,000027: 
036416,000028:                                                                                                  #        AN OPTIMUM ORIENTATION FOR A PREVIOUSLY CALCULATED MANUEVER. THIS ORIENTATION MUST BE CALCULATED AND
036417,000029:                                                                                                  #       STORED BY A PREVIOUSLY SELECTED PROGRAM.
036418,000030: 
036419,000031:                                                                                                  #       (B) NOMINAL ORIENTATION
036420,000032: 
036421,000033:                                                                                                  #           X   =  UNIT ( R )
036422,000034:                                                                                                  #           -SM
036423,000035: 
036424,000036:                                                                                                  #           Y  =  UNIT (V X R)
036425,000037:                                                                                                  #            SM
036426,000038: 
036427,000039:                                                                                                  #           Z   =  UNIT (X   X  Y  )
036428,000040:                                                                                                  #            SM           SM     SM
036429,000041: 
036430,000042:                                                                                                  #           WHERE_
036431,000043:                                                                                                  #            R = THE GEOCENTRIC RADIUS VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
036432,000044:                                                                                                  #            -
036433,000045: 
036434,000046:                                                                                                  #            V = THE INERTIAL VELOCITY VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
036435,000047:                                                                                                  #            -
036436,000048: 
036437,000049:                                                                                                  #       (C) REFSMMAT ORIENTATION
036438,000050: 
036439,000051:                                                                                                  #           (D)  LANDING SITE - THIS IS NOT AVAILIBLE IN SUNDANCE
036440,000052: 
036441,000053:                                                                                                  #        THIS SELECTION CORRECTS THE PRESENT IMU ORIENTATION. THE PRESENT ORIENTATION DIFFERS FROM THAT TO WHICH IT
036442,000054:                                                                                                  #       WAS LAST ALIGNED ONLY DUE TO GYRO DRIFT(I.E. NEITHER GIMBAL LOCK NOR IMU POWER INTERRUPTION HAS OCCURED
036443,000055:                                                                                                  #       SINCE THE LAST ALIGNMENT).
036444,000056: 
036445,000057:                                                                                                  #       AFTER A IMU ORIENTATION HAS BEEN SELECTED ROUTINE S52.2 IS OPERATED TO COMPUTE THE GIMBAL ANGLES USING THE
036446,000058:                                                                                                  #  NEW ORIENTATION AND THE PRESENT VEHICLE ATTITUDE. CAL52A THEN USES THESE ANGLES, STORED IN THETAD,+1,+2, TO
036447,000059:                                                                                                  #  COARSE ALIGN THE IMU. THE STAR SELECTION ROUTINE, R56, IS THEN OPERATED. IF 2 STARS ARE NOT AVAILABLE AN ALARM
036448,000060:                                                                                                  #  IS FLASHED TO NOTIFY THE ASTRONAUT. AT THIS POINT THE ASTRONAUT WILL MANUEVER THE VEHICLE AND SELECT 2 STARS
036449,000061:                                                                                                  #  EITHER MANUALLY OR AUTOMATICALLY. AFTER 2 STARS HAVE BEEN SELECTED THE IMU IS FINE ALIGNED USING ROUTINE R51. IF
036450,000062:                                                                                                  #  THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING(INDICATED BY RNDVZFLG) P20 IS DISPLAYED. OTHERWISE P00 IS
036451,000063:                                                                                                  #  REQUESTED.
036452,000064: 
036453,000065:                                                                                                  #  CALLING SEQUENCE-
036454,000066: 
036455,000067:                                                                                                  #       THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
036456,000068: 
036457,000069:                                                                                                  #  SUBROUTINES CALLED-
036458,000070: 
036459,000071:                                                                                                  #      1. FLAGDOWN      7. S52.2           13. NEWMODEX
036460,000072:                                                                                                  #      2. R02BOTH       8. CAL53A          14. PRIOLARM
036461,000073:                                                                                                  #      3. GOPERF4       9. FLAGUP
036462,000074:                                                                                                  #      4. MATMOVE      10. R56
036463,000075:                                                                                                  #      5. GOFLASH      11. R51
036464,000076:                                                                                                  #      6. S52.3        12. GOPERF3
036465,000077: 
036466,000078:                                                                                                  #  NORMAL EXIT MODES-
036467,000079: 
036468,000080:                                                                                                  #      EXITS TO ENDOFJOB
036469,000081: 
036470,000082:                                                                                                  #  ALARM OR ABORT EXIT MODES-
036471,000083: 
036472,000084:                                                                                                  #      NONE
036473,000085: 
036474,000086:                                                                                                  #  OUTPUT-
036475,000087: 
036476,000088:                                                                                                  #      THE FOLLOWING MAY BE FLASHED ON THE DSKY
036477,000089:                                                                                                  #         1. IMU ORIENTATION CODE
036478,000090:                                                                                                  #         2. ALARM CODE 215 -PREFERRED IMU ORIENTATION NOT SPECIFIED
036479,000091:                                                                                                  #         3. TIME OF NEXT IGNITION
036480,000092:                                                                                                  #         4. GIMBAL ANGLES
036481,000093:                                                                                                  #         5. ALARM CODE 405 -TWO STARS NOT AVAILABLE
036482,000094:                                                                                                  #         6. PLEASE PERFORM P00
036483,000095:                                                                                                  #      THE MODE DISPLAY MAY BE CHANGED TO 20
036484,000096: 
036485,000097:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
036486,000098: 
036487,000099:                                                                                                  #      PFRATFLG SHOULD BE SET IF A PREFERRED ORIENTATION HAS BEEN COMPUTED.IF IT HAS BEEN COMPUTED IT IS STORED IN
036488,000100:                                                                                                  #      XSMD,YSMD,ZSMD.
036489,000101:                                                                                                  #      RNDVZFLG INDICATES WHETHER THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING.
036490,000102: 
036491,000103:                                                                                                  #  DEBRIS-
036492,000104: 
036493,000105:                                                                                                  #      WORK AREA
036494,000106: 33,3736                                           BANK     33                                    
036495,000107: 15,2000                                           SETLOC   P50S                                  
036496,000108: 15,2000                                           BANK                                           
036497,000109: 
036498,000110: 15,2000  E5,1755                                  EBANK=   BESTI                                 
036499,000111: 15,2000                                           COUNT*   $$/P52                                
036500,000112: 15,2000           04655        PROG52             TC       BANKCALL                              
036501,000113: 15,2001           11064                           CADR     R02BOTH                               #  IMU STATUS CHECK
036502,000114: 15,2002           35023                           CAF      PFRATBIT                              
036503,000115: 15,2003           70076                           MASK     FLAGWRD2                              #  IS PFRATFLG SET?
036504,000116: 15,2004           10000                           CCS      A                                     
036505,000117: 
036506,000118: 15,2005           02010                           TC       P52A                                  #  YES
036507,000119: 15,2006           35025                           CAF      BIT2                                  #  NO
036508,000120: 15,2007           02011                           TC       P52A       +1                         
036509,000121: 15,2010           35026        P52A               CAF      BIT1                                  
036510,000122: 15,2011           55156                           TS       OPTION2                               
036511,000123: 15,2012           35026        P52B               CAF      BIT1                                  
036512,000124: 15,2013           04655                           TC       BANKCALL                              #  FLASH OPTION CODE AND ORIENTATION CODE
036513,000125: 15,2014           20611                           CADR     GOPERF4R                              #  FLASH V04N06
036514,000126: 15,2015           04106                           TC       GOTOPOOH                              
036515,000127: 15,2016           12023                           TCF      +5                                    #  V33-PROCEED
036516,000128: 15,2017           02012                           TC       P52B                                  #  NEW CODE - NEW ORIENTATION CODE INPUT
036517,000129: 15,2020           05413                           TC       PHASCHNG                              #  DISPLAY RETURN
036518,000130: 15,2021           00014                           OCT      00014                                 
036519,000131: 15,2022           05225                           TC       ENDOFJOB                              
036520,000132: 
036521,000133: 15,2023           31156                           CA       OPTION2                               
036522,000134: 15,2024           76221                           MASK     THREE                                 
036523,000135: 15,2025           50000                           INDEX    A                                     
036524,000136: 15,2026           02027                           TC       +1                                    
036525,000137: 15,2027           02035                           TC       P52T                                  
036526,000138: 15,2030           02136                           TC       P52J                                  
036527,000139: 15,2031           02035                           TC       P52T                                  
036528,000140: 15,2032           06014        P52E               TC       INTPRET                               
036529,000141: 15,2033           77650                           GOTO                                           
036530,000142: 15,2034           32132                                    P52F                                  
036531,000143: 15,2035           00006        P52T               EXTEND                                         
036532,000144: 15,2036           35030                           DCA      NEG0                                  
036533,000145: 15,2037           53047                           DXCH     DSPTEM1                               
036534,000146: 15,2040           32156                           CAF      V06N34*                               
036535,000147: 15,2041           04655                           TC       BANKCALL                              
036536,000148: 15,2042           20406                           CADR     GOFLASH                               
036537,000149: 15,2043           04106                           TC       GOTOPOOH                              
036538,000150: 15,2044           02046                           TC       +2                                    
036539,000151: 15,2045           02040                           TC       -5                                    
036540,000152: 15,2046           11046                           CCS      DSPTEM1                               
036541,000153: 15,2047           12055                           TCF      P52V                                  
036542,000154: 15,2050           12052                           TCF      +2                                    #  IF TIME ZERO OR NEG USE TIME2
036543,000155: 15,2051           12052                           TCF      +1                                    
036544,000156: 15,2052           00006                           EXTEND                                         
036545,000157: 15,2053           30025                           DCA      TIME2                                 
036546,000158: 15,2054           53047                           DXCH     DSPTEM1                               
036547,000159: 15,2055           31156        P52V               CA       OPTION2                               
036548,000160: 15,2056           75025                           MASK     BIT2                                  
036549,000161: 15,2057           10000                           CCS      A                                     
036550,000162: 15,2060           02104                           TC       P52W                                  
036551,000163: 
036552,000164: 15,2061           32157        LSDISP             CAF      V06N89*                               #  DISPLAY LAT,LONG/2, ALT
036553,000165: 15,2062           04655                           TC       BANKCALL                              
036554,000166: 15,2063           20406                           CADR     GOFLASH                               
036555,000167: 15,2064           04106                           TC       GOTOPOOH                              #  VB34 TERMINATE
036556,000168: 15,2065           02067                           TC       +2                                    #  VB33 PROCEED
036557,000169: 15,2066           02061                           TC       LSDISP                                #  VB32 RECYCLE
036558,000170: 
036559,000171: 15,2067           06014                           TC       INTPRET                               #  OPTION 4 - GET LS ORIENTATION
036560,000172: 15,2070           43014                           SET      SET                                   
036561,000173: 15,2071           00462                                    ERADFLAG                              
036562,000174: 15,2072           01463                                    LUNAFLAG                              
036563,000175: 15,2073           45145                           DLOAD    CALL                                  
036564,000176: 15,2074           01047                                    DSPTEM1                               
036565,000177: 15,2075           26374                                    LALOTORV                              
036566,000178: 15,2076           53575                           VLOAD    UNIT                                  #  COMPUTE LANDING SITE ORIENT (XSMD)
036567,000179: 15,2077           02034                                    ALPHAV                                
036568,000180: 15,2100           37574                           STCALL   XSMD                                  
036569,000181: 15,2101           33217                                    LSORIENT                              
036570,000182: 15,2102           77650                           GOTO                                           
036571,000183: 15,2103           32111                                    P52D                                  
036572,000184: 
036573,000185:                                                                                                  #  START ALIGNMENT
036574,000186: 
036575,000187: 15,2104           06014        P52W               TC       INTPRET                               
036576,000188: 15,2105           77745                           DLOAD                                          
036577,000189: 15,2106           01047                                    DSPTEM1                               #  PICK UP ALIGN TIME
036578,000190: 15,2107           77624                           CALL                                           #  COMPUTE NOMINAL IMU
036579,000191: 15,2110           31166                                    S52.3                                 #   ORIENTATION
036580,000192: 15,2111           77624        P52D               CALL                                           #  READ VEHICLE ATTITUDE AND
036581,000193: 15,2112           31134                                    S52.2                                 #   COMPUTE GIMBAL ANGLES
036582,000194: 15,2113           77776                           EXIT                                           
036583,000195: 15,2114           32155                           CAF      V06N22*                               
036584,000196: 15,2115           04655                           TC       BANKCALL                              #  DISPLAY GIMBAL ANGLES
036585,000197: 15,2116           20406                           CADR     GOFLASH                               
036586,000198: 15,2117           04106                           TC       GOTOPOOH                              
036587,000199: 15,2120           02124                           TC       REGCOARS                              #  V33-PROCEED, SEE IF GYRO TORQUE COARSE
036588,000200: 15,2121           06014                           TC       INTPRET                               #  RECYCLE - VEHICLE HAS BEEN MANUEVERED
036589,000201: 15,2122           77650                           GOTO                                           
036590,000202: 15,2123           32111                                    P52D                                  
036591,000203: 15,2124           06014        REGCOARS           TC       INTPRET                               
036592,000204: 15,2125           77624                           CALL                                           #  DO COARSE ALIGN
036593,000205: 15,2126           30572                                    CAL53A                                #   ROUTINE
036594,000206: 15,2127           43014                           SET      CLEAR                                 
036595,000207: 15,2130           01462                                    REFSMFLG                              
036596,000208: 15,2131           01273                                    PFRATFLG                              
036597,000209: 15,2132           77624        P52F               CALL                                           
036598,000210: 15,2133           30317                                    R51                                   
036599,000211: 15,2134           77776        P52OUT             EXIT                                           
036600,000212: 15,2135           04106                           TC       GOTOPOOH                              
036601,000213: 15,2136           35023        P52J               CAF      PFRATBIT                              
036602,000214: 15,2137           70076                           MASK     FLAGWRD2                              
036603,000215: 15,2140           10000                           CCS      A                                     
036604,000216: 15,2141           02152                           TC       P52H                                  
036605,000217: 
036606,000218: 15,2142           05646                           TC       ALARM                                 
036607,000219: 15,2143           00215                           OCT      215                                   
036608,000220: 15,2144           35056                           CAF      VB05N09                               
036609,000221: 15,2145           04655                           TC       BANKCALL                              
036610,000222: 15,2146           20406                           CADR     GOFLASH                               
036611,000223: 15,2147           04106                           TC       GOTOPOOH                              
036612,000224: 15,2150           02144                           TC       -4                                    
036613,000225: 15,2151           02012                           TC       P52B                                  
036614,000226: 
036615,000227: 15,2152           06014        P52H               TC       INTPRET                               #  PREFERRED OPTION, GO COMPUTE GIMBALS
036616,000228: 15,2153           77650                           GOTO                                           
036617,000229: 15,2154           32111                                    P52D                                  
036618,000230: 
036619,000231: 15,2155     5056               VB05N09            =        V05N09                                
036620,000232: 15,2155           01426        V06N22*            VN       00622                                 
036621,000233: 15,2156           01442        V06N34*            VN       634                                   
036622,000234: 
036623,000235: 15,2157           01531        V06N89*            VN       0689                                  
036624,000236: 
036625,000237:                                                                                                  #  NAME -S50 ALIAS  LOCSAM
036626,000238:                                                                                                  #  BY
036627,000239:                                                                                                  #  VINCENT
036628,000240:                                                                                                  #  FUNCTION - COMPUTE INPUTS FOR PICAPAR  AND PLANET
036629,000241: 
036630,000242:                                                                                                  #           DEFINE
036631,000243: 
036632,000244: 
036633,000245:                                                                                                  #           U    = UNIT( SUN WRT EARTH)
036634,000246:                                                                                                  #            ES
036635,000247: 
036636,000248:                                                                                                  #           U    =UNIT( MOON WRT EARTH)
036637,000249:                                                                                                  #            EM
036638,000250: 
036639,000251:                                                                                                  #           R    =POSITION VECTOR OF LEM
036640,000252:                                                                                                  #            L
036641,000253: 
036642,000254:                                                                                                  #           R    =MEAN DISTANCE (384402KM) BETWEEN EARTH AND MOON
036643,000255:                                                                                                  #            EM
036644,000256: 
036645,000257:                                                                                                  #           P    =RATIO   R   /(DISTANCE SUN TO EARTH)    >.00257125
036646,000258:                                                                                                  #                           EM
036647,000259: 
036648,000260:                                                                                                  #           R    =EQUATORIAL RADIUSS (6378.166KM) OF EARTH
036649,000261:                                                                                                  #            E
036650,000262: 
036651,000263:                                                                                                  #           LOCSAM  COMPUTES IN EARTH INFLUENCE
036652,000264: 
036653,000265: 
036654,000266:                                                                                                  #       VSUN   =   U
036655,000267:                                                                                                  #                   ES
036656,000268: 
036657,000269:                                                                                                  #      VEARTH  =   -UNIT( R  )
036658,000270:                                                                                                  #                          L
036659,000271: 
036660,000272:                                                                                                  #      VMOON   =    UNIT(R  .U   - R  )
036661,000273:                                                                                                  #                         EM  EM    L
036662,000274: 
036663,000275:                                                                                                  #      CSUN    =   COS 90
036664,000276: 
036665,000277:                                                                                                  #      CEARTH  =    COS(5 + ARCSIN(R /MAG(R )))
036666,000278:                                                                                                  #                                   E      L
036667,000279: 
036668,000280:                                                                                                  #      CMOON   =    COS 5
036669,000281: 
036670,000282: 
036671,000283:                                                                                                  #  INPUT -  TIME IN MPAC
036672,000284:                                                                                                  #  OUTPUT - LISTED ABOVE
036673,000285:                                                                                                  #  SUBROUTINES -LSPOS,LEMPREC
036674,000286:                                                                                                  #  DEBRIS - VAC AREA ,TSIGHT
036675,000287: 
036676,000288: 14,2000                                           SETLOC   P50S1                                 
036677,000289: 14,2000                                           BANK                                           
036678,000290: 14,2000  E5,1642                                  EBANK=   XSM                                   
036679,000291: 
036680,000292: 14,2000                                           COUNT*   $$/LOSAM                              
036681,000293: 
036682,000294: 14,2000  14,2000               S50                =        LOCSAM                                
036683,000295: 14,2000           77620        LOCSAM             STQ                                            
036684,000296: 14,2001           02745                                    QMIN                                  
036685,000297: 14,2002           37547                           STCALL   TSIGHT                                
036686,000298: 14,2003           33236                                    LSPOS                                 
036687,000299: 14,2004           77745                           DLOAD                                          
036688,000300: 14,2005           03547                                    TSIGHT                                
036689,000301: 14,2006           34041                           STCALL   TDEC1                                 
036690,000302: 14,2007           27030                                    LEMPREC                               
036691,000303: 14,2010           61131                           SSP      TIX,2                                 
036692,000304: 14,2011           00052                                    S2                                    
036693,000305: 14,2012           00000                                    0                                     
036694,000306: 14,2013           30035                                    MOONCNTR                              
036695,000307: 14,2014           74375        EARTCNTR           VLOAD    VXSC                                  
036696,000308: 14,2015           02723                                    VMOON                                 
036697,000309: 14,2016           30106                                    RSUBEM                                
036698,000310: 14,2017           52372                           VSL1     VSU                                   
036699,000311: 14,2020           00001                                    RATT                                  
036700,000312: 14,2021           77656                           UNIT                                           
036701,000313: 14,2022           26723                           STOVL    VMOON                                 
036702,000314: 14,2023           00001                                    RATT                                  
036703,000315: 14,2024           57456                           UNIT     VCOMP                                 
036704,000316: 14,2025           16707                           STODL    VEARTH                                
036705,000317: 14,2026           30112                                    RSUBE                                 
036706,000318: 14,2027           77624                           CALL                                           
036707,000319: 14,2030           30067                                    OCCOS                                 
036708,000320: 14,2031           14017                           STODL    CEARTH                                
036709,000321: 14,2032           30076                                    CSS5                                  
036710,000322: 14,2033           34023                           STCALL   CMOON                                 
036711,000323: 14,2034           30062                                    ENDSAM                                
036712,000324: 14,2035           74375        MOONCNTR           VLOAD    VXSC                                  
036713,000325: 14,2036           02723                                    VMOON                                 
036714,000326: 14,2037           30104                                    ROE                                   
036715,000327: 14,2040           53445                           BVSU     UNIT                                  
036716,000328: 14,2041           02715                                    VSUN                                  
036717,000329: 14,2042           26715                           STOVL    VSUN                                  
036718,000330: 14,2043           02723                                    VMOON                                 
036719,000331: 14,2044           53361                           VXSC     VAD                                   
036720,000332: 14,2045           30106                                    RSUBEM                                
036721,000333: 14,2046           00001                                    RATT                                  
036722,000334: 14,2047           57456                           UNIT     VCOMP                                 
036723,000335: 14,2050           26707                           STOVL    VEARTH                                
036724,000336: 14,2051           00001                                    RATT                                  
036725,000337: 14,2052           57456                           UNIT     VCOMP                                 
036726,000338: 
036727,000339: 14,2053           16723                           STODL    VMOON                                 
036728,000340: 14,2054           30110                                    RSUBM                                 
036729,000341: 14,2055           77624                           CALL                                           
036730,000342: 14,2056           30067                                    OCCOS                                 
036731,000343: 14,2057           14023                           STODL    CMOON                                 
036732,000344: 14,2060           30076                                    CSS5                                  
036733,000345: 14,2061           00017                           STORE    CEARTH                                
036734,000346: 14,2062           77745        ENDSAM             DLOAD                                          
036735,000347: 14,2063           30100                                    CSSUN                                 
036736,000348: 14,2064           00021                           STORE    CSUN                                  
036737,000349: 14,2065           77650                           GOTO                                           
036738,000350: 14,2066           02745                                    QMIN                                  
036739,000351: 14,2067           70471        OCCOS              DDV      SR1                                   
036740,000352: 14,2070           00045                                    36D                                   
036741,000353: 14,2071           43336                           ASIN     DAD                                   
036742,000354: 14,2072           30102                                    5DEGREES                              
036743,000355: 14,2073           70546                           COS      SR1                                   
036744,000356: 14,2074           77616                           RVQ                                            
036745,000357: 14,2075                        CEARTH             =        14D                                   
036746,000358: 14,2075                        CSUN               =        16D                                   
036747,000359: 14,2075                        CMOON              =        18D                                   
036748,000360: 14,2075           07760 14473  CSS5               2DEC     .2490475                              #  (COS 5)/4
036749,000361: 14,2077           04000 00000  CSSUN              2DEC     .125                                  #  (COS 60)/4
036750,000362: 14,2101           00343 21616  5DEGREES           2DEC     .013888889                            #     SCALED IN REVS
036751,000363: 
036752,000364: 14,2103           00052 04047  ROE                2DEC     .00257125                             
036753,000365: 14,2105           26723 00450  RSUBEM             2DEC     384402000  B-29                       
036754,000366: 14,2107           00065 01265  RSUBM              2DEC     1738090    B-29                       
036755,000367: 14,2111           00302 24533  RSUBE              2DEC     6378166    B-29                       
036756,000368: 
036757,000369:                                                                                                  #  PROGRAM NAME - R56              DATE  DEC 20 66
036758,000370:                                                                                                  #  MOD 1                           LOG SECTION P51-P53
036759,000371:                                                                                                  #                                  ASSEMBLY  SUNDISK  REV40
036760,000372:                                                                                                  #  BY KEN VINCENT
036761,000373: 
036762,000374:                                                                                                  #  FUNCTION
036763,000375:                                                                                                  #    THIS PROGRAM READ THE IMU-CDUS AND COMPUTES THE VEHICLE ORIENTATION
036764,000376:                                                                                                  #  WITH RESPECT TO INERTIAL SPACE. IT THEN COMPUTES THE SHAFT AXIS (SAX)
036765,000377:                                                                                                  #  WITH RESPECT TO REFERENCE INERTIAL. EACH STAR IN THE CATALOG IS TESTED
036766,000378:                                                                                                  #  TO DETERMINE IF IT IS OCCULTED BY EITHER THE EARTH,SUN OR MOON. IF A
036767,000379:                                                                                                  #  STAR IS NOT OCCULTED  THEN IT IS PAIRED WITH ALL STAR OF LOWER INDEX.
036768,000380:                                                                                                  #  THE PAIRED STAR  IS TESTED FOR OCCULTATION. PAIRS OF STARS THAT PASS
036769,000381:                                                                                                  #  THE OCCULTATION TESTS ARE TESTED FOR GOOD SEPARATION.A PAIR OF STARS
036770,000382:                                                                                                  #  HAVE GOOD SEPERATION IF THE ANGLE BETWEEN THEM IS LESS THAN 100 DEGREES
036771,000383:                                                                                                  #  AND MORE THAN 50 DEGREES. THOSE PAIRS WITH GOOD SEPARATION
036772,000384:                                                                                                  #  ARE THEN TESTED TO SEE IF THEY LIE IN CURRENT FIELD OF VIEW.(WITHIN
036773,000385:                                                                                                  #  50 DEGREESOF SAX).THE PAIR WITH MAX SEPARATION IS CHOSEN FROM
036774,000386:                                                                                                  #  THOSE WITH GOOD SEPARATION,AND     IN FIELD OF VIEW.
036775,000387: 
036776,000388:                                                                                                  #  CALLING SEQUENCE
036777,000389:                                                                                                  #  L        TC     BANKCALL
036778,000390:                                                                                                  #  L+1      CADR   R56
036779,000391:                                                                                                  #  L+2      ERROR RETURN - NO STARS IN FIELD OF VIEW
036780,000392:                                                                                                  #  L+3      NORMAL RETURN
036781,000393: 
036782,000394:                                                                                                  #  OUTPUT
036783,000395:                                                                                                  #  BESTI,BESTJ -SINGLE PREC,INTEGERS,STAR NUMBERS TIMES 6
036784,000396:                                                                                                  #  VFLAG - FLAG BIT  SET IMPLIES NO STARS IN FIELD OF VIEW
036785,000397: 
036786,000398:                                                                                                  #  INITIALIZATION
036787,000399:                                                                                                  #  1)A CALL TO LOCSAM MUST BE MADE
036788,000400: 
036789,000401:                                                                                                  #  DEBRIS
036790,000402:                                                                                                  #  WORK AREA
036791,000403:                                                                                                  #  X,Y,ZNB
036792,000404:                                                                                                  #  SINCDU,COSCDU
036793,000405:                                                                                                  #  STARAD - STAR +5
036794,000406: 14,2113  14,2113               R56                =        PICAPAR                               
036795,000407: 14,2113                                           COUNT*   $$/R56                                
036796,000408: 14,2113           04704        PICAPAR            TC       MAKECADR                              
036797,000409: 14,2114           55745                           TS       QMIN                                  
036798,000410: 14,2115           06014                           TC       INTPRET                               
036799,000411: 14,2116           77624                           CALL                                           
036800,000412: 14,2117           47251                                    CDUTRIG                               
036801,000413: 14,2120           77624                           CALL                                           
036802,000414: 14,2121           30667                                    CALCSMSC                              
036803,000415: 14,2122           77601                           SETPD                                          
036804,000416: 14,2123           00001                                    0                                     
036805,000417: 14,2124           71214                           SET      DLOAD                                 #  VFLAG = 1
036806,000418: 14,2125           01465                                    VFLAG                                 
036807,000419: 
036808,000420: 14,2126           22276                                    DPZERO                                
036809,000421: 14,2127           26756                           STOVL    BESTI                                 
036810,000422: 14,2130           02665                                    XNB                                   
036811,000423: 14,2131           63361                           VXSC     PDVL                                  
036812,000424: 14,2132           22274                                    HALFDP                                
036813,000425: 14,2133           02701                                    ZNB                                   
036814,000426: 14,2134           74370                           AXT,1    VXSC                                  
036815,000427: 14,2135           00344                                    228D                                  #  X1 = 37 X 6 + 6
036816,000428: 14,2136           22274                                    HALFDP                                
036817,000429: 14,2137           77655                           VAD                                            
036818,000430: 14,2140           53505                           VXM      UNIT                                  
036819,000431: 14,2141           01736                                    REFSMMAT                              
036820,000432: 14,2142           02731                           STORE    SAX                                   #  SAX = SHAFT AXIS
036821,000433: 14,2143           66331                           SSP      SSP                                   #  S1=S2=6
036822,000434: 14,2144           00051                                    S1                                    
036823,000435: 14,2145           00006                                    6                                     
036824,000436: 14,2146           00052                                    S2                                    
036825,000437: 14,2147           00006                                    6                                     
036826,000438: 14,2150           52100        PIC1               TIX,1    GOTO                                  #  MAJOR STAR
036827,000439: 14,2151           30153                                    PIC2                                  
036828,000440: 14,2152           30270                                    PICEND                                
036829,000441: 14,2153           50373        PIC2               VLOAD*   DOT                                   
036830,000442: 14,2154           31734                                    CATLOG,1                              
036831,000443: 14,2155           02731                                    SAX                                   
036832,000444: 14,2156           50025                           DSU      BMN                                   
036833,000445: 14,2157           30267                                    CSS33                                 
036834,000446: 14,2160           30150                                    PIC1                                  
036835,000447: 14,2161           77754                           LXA,2                                          
036836,000448: 14,2162           00046                                    X1                                    
036837,000449: 14,2163           52104        PIC3               TIX,2    GOTO                                  
036838,000450: 14,2164           30166                                    PIC4                                  
036839,000451: 14,2165           30150                                    PIC1                                  
036840,000452: 14,2166           50373        PIC4               VLOAD*   DOT                                   
036841,000453: 14,2167           46043                                    CATLOG,2                              
036842,000454: 14,2170           02731                                    SAX                                   
036843,000455: 14,2171           50025                           DSU      BMN                                   
036844,000456: 14,2172           30267                                    CSS33                                 
036845,000457: 14,2173           30163                                    PIC3                                  
036846,000458: 14,2174           47773                           VLOAD*   DOT*                                  
036847,000459: 14,2175           31734                                    CATLOG,1                              
036848,000460: 14,2176           46043                                    CATLOG,2                              
036849,000461: 14,2177           51025                           DSU      BPL                                   
036850,000462: 14,2200           30265                                    CSS40                                 
036851,000463: 14,2201           30163                                    PIC3                                  
036852,000464: 14,2202           45173                           VLOAD*   CALL                                  
036853,000465: 14,2203           31734                                    CATLOG,1                              
036854,000466: 14,2204           30242                                    OCCULT                                
036855,000467: 14,2205           77614                           BON                                            
036856,000468: 14,2206           01710                                    CULTFLAG                              
036857,000469: 14,2207           30150                                    PIC1                                  
036858,000470: 
036859,000471: 14,2210           45173                           VLOAD*   CALL                                  
036860,000472: 14,2211           46043                                    CATLOG,2                              
036861,000473: 14,2212           30242                                    OCCULT                                
036862,000474: 14,2213           77614                           BON                                            
036863,000475: 14,2214           01710                                    CULTFLAG                              
036864,000476: 14,2215           30163                                    PIC3                                  
036865,000477: 14,2216           77614        STRATGY            BONCLR                                         
036866,000478: 14,2217           01605                                    VFLAG                                 
036867,000479: 14,2220           30235                                    NEWPAR                                
036868,000480: 14,2221           65120                           XCHX,1   XCHX,2                                
036869,000481: 14,2222           02755                                    BESTI                                 
036870,000482: 14,2223           02756                                    BESTJ                                 
036871,000483: 14,2224           47773        STRAT              VLOAD*   DOT*                                  
036872,000484: 14,2225           31734                                    CATLOG,1                              
036873,000485: 14,2226           46043                                    CATLOG,2                              
036874,000486: 14,2227           43006                           PUSH     BOFINV                                
036875,000487: 14,2230           01545                                    VFLAG                                 
036876,000488: 14,2231           30221                                    STRAT      -3                         
036877,000489: 14,2232           45345                           DLOAD    DSU                                   
036878,000490: 14,2233           77644                           BPL                                            
036879,000491: 14,2234           30163                                    PIC3                                  
036880,000492: 14,2235           67130        NEWPAR             SXA,1    SXA,2                                 
036881,000493: 14,2236           02755                                    BESTI                                 
036882,000494: 14,2237           02756                                    BESTJ                                 
036883,000495: 14,2240           77650                           GOTO                                           
036884,000496: 14,2241           30163                                    PIC3                                  
036885,000497: 14,2242           51321        OCCULT             MXV      BVSU                                  
036886,000498: 14,2243           02707                                    CULTRIX                               
036887,000499: 14,2244           00017                                    CSS                                   
036888,000500: 14,2245           77654                           BZE                                            
036889,000501: 14,2246           30261                                    CULTED                                
036890,000502: 14,2247           75240                           BMN      SIGN                                  
036891,000503: 14,2250           30261                                    CULTED                                
036892,000504: 14,2251           00160                                    MPAC       +3                         
036893,000505: 14,2252           75240                           BMN      SIGN                                  
036894,000506: 14,2253           30261                                    CULTED                                
036895,000507: 14,2254           00162                                    MPAC       +5                         
036896,000508: 14,2255           43040                           BMN      CLRGO                                 
036897,000509: 14,2256           30261                                    CULTED                                
036898,000510: 14,2257           01630                                    CULTFLAG                              
036899,000511: 14,2260           00052                                    QPRET                                 
036900,000512: 14,2261           77614        CULTED             SETGO                                          
036901,000513: 14,2262           01430                                    CULTFLAG                              
036902,000514: 14,2263           00052                                    QPRET                                 
036903,000515: 14,2264  0000016               CSS                =        CEARTH                                
036904,000516: 14,2264           05110 35052  CSS40              2DEC     .16070                                #  COS 50 / 4
036905,000517: 14,2266           05110 35052  CSS33              2DEC     .16070                                #   COS 50 / 4
036906,000518: 14,2270           77414        PICEND             BOFF     EXIT                                  
036907,000519: 
036908,000520: 14,2271           01745                                    VFLAG                                 
036909,000521: 14,2272           30274                                    PICGXT                                
036910,000522: 14,2273           02315                           TC       PICBXT                                
036911,000523: 14,2274           73150        PICGXT             LXA,1    LXA,2                                 
036912,000524: 14,2275           02755                                    BESTI                                 
036913,000525: 14,2276           02756                                    BESTJ                                 
036914,000526: 14,2277           47775                           VLOAD    DOT*                                  
036915,000527: 14,2300           02731                                    SAX                                   
036916,000528: 14,2301           31734                                    CATLOG,1                              
036917,000529: 14,2302           47715                           PDVL     DOT*                                  
036918,000530: 14,2303           02731                                    SAX                                   
036919,000531: 14,2304           46043                                    CATLOG,2                              
036920,000532: 14,2305           77625                           DSU                                            
036921,000533: 14,2306           66044                           BPL      SXA,1                                 
036922,000534: 14,2307           30313                                    PICNSWP                               
036923,000535: 14,2310           02756                                    BESTJ                                 
036924,000536: 14,2311           77734                           SXA,2                                          
036925,000537: 14,2312           02755                                    BESTI                                 
036926,000538: 14,2313           77776        PICNSWP            EXIT                                           
036927,000539: 14,2314           25745                           INCR     QMIN                                  
036928,000540: 14,2315           31745        PICBXT             CA       QMIN                                  
036929,000541: 14,2316           04661                           TC       SWCALL                                
036930,000542: 14,2317                        VPD                =        0D                                    
036931,000543: 14,2317                        V0                 =        6D                                    
036932,000544: 14,2317                        V1                 =        12D                                   
036933,000545: 14,2317                        V2                 =        18D                                   
036934,000546: 14,2317                        V3                 =        24D                                   
036935,000547: 14,2317                        DP0                =        30D                                   
036936,000548: 14,2317                        DP1                =        32D                                   
036937,000549: 
036938,000550:                                                                                                  #  NAME-R51  FINE ALIGN
036939,000551:                                                                                                  #  FUNCTION-TO ALIGN THE STABLE MEMBER TO REFSMMAT
036940,000552:                                                                                                  #  CALLING SEQ- CALL  R51
036941,000553:                                                                                                  #  INPUT -  REFSMMAT
036942,000554:                                                                                                  #  OUTPUT- GYRO TORQUE PULSES
036943,000555:                                                                                                  #  SUBROUTINES -LOCSAM,PICAPAR,R52,R53,R54,R55
036944,000556: 14,2317                                           COUNT*   $$/R51                                
036945,000557: 14,2317           77620        R51                STQ                                            
036946,000558: 14,2320           02746                                    QMAJ                                  
036947,000559: 14,2321           77776        R51.1              EXIT                                           
036948,000560: 14,2322           35034        R51C               CAF      OCT15                                 
036949,000561: 14,2323           04655                           TC       BANKCALL                              
036950,000562: 14,2324           20532                           CADR     GOPERF1                               
036951,000563: 14,2325           04106                           TC       GOTOPOOH                              
036952,000564: 14,2326           02330                           TC       +2                                    #  V33E
036953,000565: 14,2327           02353                           TC       R51E                                  #  ENTER
036954,000566: 14,2330           06014                           TC       INTPRET                               
036955,000567: 14,2331           43234                           RTB      DAD                                   
036956,000568: 14,2332           21454                                    LOADTIME                              
036957,000569: 14,2333           30465                                    TSIGHT1                               
036958,000570: 14,2334           77624                           CALL                                           
036959,000571: 14,2335           30000                                    LOCSAM                                
036960,000572: 14,2336           77776                           EXIT                                           
036961,000573: 14,2337           04655                           TC       BANKCALL                              
036962,000574: 14,2340           30113                           CADR     R56                                   
036963,000575: 14,2341           02343                           TC       R51I                                  
036964,000576: 14,2342           02353        R51F               TC       R51E                                  
036965,000577: 14,2343           05646        R51I               TC       ALARM                                 
036966,000578: 14,2344           00405                           OCT      405                                   
036967,000579: 14,2345           35056                           CAF      VB05N09                               
036968,000580: 14,2346           04655                           TC       BANKCALL                              
036969,000581: 14,2347           20406                           CADR     GOFLASH                               
036970,000582: 14,2350           04106                           TC       GOTOPOOH                              
036971,000583: 14,2351           02353                           TC       R51E                                  
036972,000584: 14,2352           02322                           TC       R51C                                  
036973,000585: 14,2353           35030        R51E               CAF      ZERO                                  
036974,000586: 14,2354           55757                           TS       STARIND                               
036975,000587: 14,2355           06014        R51.2              TC       INTPRET                               
036976,000588: 14,2356           77776        R51.3              EXIT                                           
036977,000589: 14,2357           05413                           TC       PHASCHNG                              
036978,000590: 14,2360           05024                           OCT      05024                                 
036979,000591: 14,2361           13000                           OCT      13000                                 
036980,000592: 14,2362           06014                           TC       INTPRET                               
036981,000593: 14,2363           77624                           CALL                                           
036982,000594: 14,2364           31210                                    R52                                   #  AOP WILL MAKE CALLS TO SIGHTING
036983,000595: 14,2365           77776                           EXIT                                           
036984,000596: 14,2366           04655                           TC       BANKCALL                              
036985,000597: 14,2367           16000                           CADR     AOTMARK                               
036986,000598: 14,2370           04655                           TC       BANKCALL                              
036987,000599: 14,2371           17621                           CADR     OPTSTALL                              
036988,000600: 
036989,000601: 14,2372           05730                           TC       CURTAINS                              
036990,000602: 14,2373           11757                           CCS      STARIND                               
036991,000603: 14,2374           12376                           TCF      +2                                    
036992,000604: 14,2375           02447                           TC       R51.4                                 
036993,000605: 14,2376           06014                           TC       INTPRET                               
036994,000606: 14,2377           77775                           VLOAD                                          
036995,000607: 14,2400           02715                                    STARAD     +6                         
036996,000608: 14,2401           02767                           STORE    STARSAV2                              
036997,000609: 14,2402           77776                           EXIT                                           
036998,000610: 14,2403           05413                           TC       PHASCHNG                              
036999,000611: 14,2404           05024                           OCT      05024                                 
037000,000612: 14,2405           13000                           OCT      13000                                 
037001,000613: 14,2406           06014                           TC       INTPRET                               
037002,000614: 14,2407           45145                           DLOAD    CALL                                  
037003,000615: 14,2410           03547                                    TSIGHT                                
037004,000616: 14,2411           32160                                    PLANET                                
037005,000617: 14,2412           53521                           MXV      UNIT                                  
037006,000618: 14,2413           01736                                    REFSMMAT                              
037007,000619: 14,2414           26715                           STOVL    STARAD     +6                         
037008,000620: 14,2415           03541                                    PLANVEC                               
037009,000621: 14,2416           53521                           MXV      UNIT                                  
037010,000622: 14,2417           01736                                    REFSMMAT                              
037011,000623: 14,2420           26707                           STOVL    STARAD                                
037012,000624: 14,2421           02761                                    STARSAV1                              
037013,000625: 14,2422           24007                           STOVL    6D                                    
037014,000626: 14,2423           02767                                    STARSAV2                              
037015,000627: 14,2424           34015                           STCALL   12D                                   
037016,000628: 14,2425           30521                                    R54                                   #  STAR DATA TEST
037017,000629: 14,2426           45014                           BOFF     CALL                                  
037018,000630: 14,2427           00354                                    FREEFLAG                              
037019,000631: 14,2430           30436                                    R51K                                  
037020,000632: 14,2431           47153                                    AXISGEN                               
037021,000633: 14,2432           77624                           CALL                                           
037022,000634: 14,2433           30466                                    R55                                   #  GYRO TORQUE
037023,000635: 14,2434           77614                           CLEAR                                          
037024,000636: 14,2435           01273                                    PFRATFLG                              
037025,000637: 14,2436           77776        R51K               EXIT                                           
037026,000638: 14,2437           35743        R51P63             CAF      OCT14                                 
037027,000639: 14,2440           04655                           TC       BANKCALL                              
037028,000640: 14,2441           20532                           CADR     GOPERF1                               
037029,000641: 14,2442           04106                           TC       GOTOPOOH                              
037030,000642: 14,2443           02322                           TC       R51C                                  
037031,000643: 14,2444           06014                           TC       INTPRET                               
037032,000644: 14,2445           77650                           GOTO                                           
037033,000645: 14,2446           02746                                    QMAJ                                  
037034,000646: 14,2447           06014        R51.4              TC       INTPRET                               
037035,000647: 14,2450           77775                           VLOAD                                          
037036,000648: 14,2451           02715                                    STARAD     +6                         
037037,000649: 14,2452           02761                           STORE    STARSAV1                              
037038,000650: 14,2453           45145                           DLOAD    CALL                                  
037039,000651: 
037040,000652: 14,2454           03547                                    TSIGHT                                
037041,000653: 14,2455           32160                                    PLANET                                
037042,000654: 14,2456           03541                           STORE    PLANVEC                               
037043,000655: 14,2457           77731                           SSP                                            
037044,000656: 14,2460           02760                                    STARIND                               
037045,000657: 14,2461           00001                                    1                                     
037046,000658: 14,2462           77650                           GOTO                                           
037047,000659: 14,2463           30356                                    R51.3                                 
037048,000660: 14,2464           00002 06240  TSIGHT1            2DEC     36000      B-28                       #  6 MIN TO MARKING
037049,000661: 
037050,000662:                                                                                                  #  R55  GYRO TORQUE
037051,000663:                                                                                                  #  FUNCTION-COMPUTE AND SEND GYRO PULSES
037052,000664:                                                                                                  #  CALLING SEQ- CALL R55
037053,000665:                                                                                                  #  INPUT- X,Y,ZDC- REFSMMAT WRT PRESENT STABLE MEMBER
037054,000666:                                                                                                  #  OUTPUT- GYRO PULSES
037055,000667:                                                                                                  #  SUBROUTINES- CALCGTA,GOFLASH,GODSPR,IMUFINE, IMUPULSE,GOPERF1
037056,000668: 14,2466                                           COUNT*   $$/R55                                
037057,000669: 14,2466           77620        R55                STQ                                            
037058,000670: 14,2467           02745                                    QMIN                                  
037059,000671: 14,2470           77624                           CALL                                           
037060,000672: 14,2471           46757                                    CALCGTA                               
037061,000673: 14,2472           77776        PULSEM             EXIT                                           
037062,000674: 14,2473           32517        R55.1              CAF      V06N93                                
037063,000675: 14,2474           04655                           TC       BANKCALL                              
037064,000676: 14,2475           20406                           CADR     GOFLASH                               
037065,000677: 14,2476           04106                           TC       GOTOPOOH                              
037066,000678: 14,2477           02501                           TC       R55.2                                 
037067,000679: 14,2500           02514                           TC       R55RET                                
037068,000680: 14,2501           05413        R55.2              TC       PHASCHNG                              
037069,000681: 14,2502           00214                           OCT      00214                                 
037070,000682: 14,2503           32520                           CA       R55CDR                                
037071,000683: 14,2504           04655                           TC       BANKCALL                              
037072,000684: 14,2505           17234                           CADR     IMUPULSE                              
037073,000685: 14,2506           04655                           TC       BANKCALL                              
037074,000686: 14,2507           17625                           CADR     IMUSTALL                              
037075,000687: 14,2510           05730                           TC       CURTAINS                              
037076,000688: 14,2511           05413                           TC       PHASCHNG                              
037077,000689: 14,2512           05024                           OCT      05024                                 
037078,000690: 14,2513           13000                           OCT      13000                                 
037079,000691: 14,2514           06014        R55RET             TC       INTPRET                               
037080,000692: 14,2515           77650                           GOTO                                           
037081,000693: 14,2516           02745                                    QMIN                                  
037082,000694: 14,2517           01535        V06N93             VN       0693                                  
037083,000695: 14,2520           02737        R55CDR             ECADR    OGC                                   
037084,000696: 14,2521  14,2521               R54                =        CHKSDATA                              
037085,000697:                                                                                                  #  ROUTINE NAME- CHKSDATA                                                                 DATE- JAN 9, 1967
037086,000698:                                                                                                  #  MOD NO- 0                                                                              LOG SECTION- P51-P53
037087,000699:                                                                                                  #  MODIFICATION BY- LONSKE                                                                ASSEMBLY-
037088,000700: 
037089,000701:                                                                                                  #  FUNCTIONAL DESCRIPTION - CHECKS THE VALIDITY OF A PAIR OF STAR SIGHTINGS. WHEN A PAIR OF STAR SIGHTINGS ARE MADE
037090,000702:                                                                                                  #  BY THE ASTRONAUT THIS ROUTINE OPERATES AND CHECKS THE OBSERVED SIGHTINGS AGAINST STORED STAR VECTORS IN THE
037091,000703:                                                                                                  #  COMPUTER TO INSURE A PROPER SIGHTING WAS MADE. THE FOLLOWING COMPUTATIONS ARE PERFORMED_
037092,000704: 
037093,000705:                                                                                                  #                  OS1 = OBSERVED STAR 1 VECTOR
037094,000706:                                                                                                  #                  OS2 = OBSERVED STAR 2 VECTOR
037095,000707:                                                                                                  #                  SS1 = STORED STAR 1 VECTOR
037096,000708:                                                                                                  #                  SS2 = STORED STAR 2 VECTOR
037097,000709:                                                                                                  #                  A1  = ARCCOS(OS1 - OS2)
037098,000710:                                                                                                  #                  A2  = ARCCOS(SS1 - SS2)
037099,000711:                                                                                                  #                  A   = ABS(2(A1 - A2))
037100,000712: 
037101,000713:                                                                                                  #  THE ANGULAR DIFFERENCE IS DISPLAYED FOR ASTRONAUT ACCEPTENCE
037102,000714:                                                                                                  #  EXIT MODE 1. FREEFLAG SET  IMPLIES  ASTRONAUT WANTS TO PROCEED
037103,000715:                                                                                                  #            2. FREEFLAG RESET IMPLIES ASTRONAUT WANTS TO RECYCLE          ERANCE)
037104,000716:                                                                                                  #  OUTPUT - 1.VERB 6,NOUN 3- DISPLAYS ANGULAR DIFFERENCE BETWEEN 2 SETS OF STARS.
037105,000717:                                                                                                  #           2.STAR VECTORS FROM STAR CATALOG ARE LEFT IN 6D AND 12D.
037106,000718: 
037107,000719:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
037108,000720:                                                                                                  #           1.MARK VECTORS ARE STORED IN STARAD AND STARAD +6.
037109,000721:                                                                                                  #           2.CATALOG VECTORS ARE STORED IN 6D AND 12D.
037110,000722:                                                                                                  #  DEBRIS -
037111,000723: 14,2521                                           COUNT*   $$/R54                                
037112,000724: 14,2521           43020        CHKSDATA           STQ      SET                                   
037113,000725: 14,2522           02745                                    QMIN                                  
037114,000726: 14,2523           00074                                    FREEFLAG                              
037115,000727: 14,2524           77760        CHKSAB             AXC,1                                          #  SET X1 TO STORE EPHEMERIS DATA
037116,000728: 14,2525           02706                                    STARAD                                
037117,000729: 
037118,000730: 14,2526           47773        CHKSB              VLOAD*   DOT*                                  #  CAL. ANGLE THETA
037119,000731: 14,2527           00001                                    0,1                                   
037120,000732: 14,2530           00007                                    6,1                                   
037121,000733: 14,2531           65552                           SL1      ACOS                                  
037122,000734: 14,2532           00025                           STORE    THETA                                 
037123,000735: 14,2533           43014                           BOFF     INVERT                                #  BRANCH TO CHKSD IF THIS IS 2ND PASS
037124,000736: 14,2534           00354                                    FREEFLAG                              
037125,000737: 14,2535           30545                                    CHKSD                                 
037126,000738: 14,2536           00174                                    FREEFLAG                              #  CLEAR FREEFLAG
037127,000739: 14,2537           71360                           AXC,1    DLOAD                                 #  SET X1 TO MARK ANGLES
037128,000740: 14,2540           00006                                    6D                                    
037129,000741: 14,2541           00025                                    THETA                                 
037130,000742: 14,2542           00023                           STORE    18D                                   
037131,000743: 14,2543           77650                           GOTO                                           
037132,000744: 14,2544           30526                                    CHKSB                                 #  RETURN TO CAL. 2ND ANGLE
037133,000745: 14,2545           45345        CHKSD              DLOAD    DSU                                   
037134,000746: 14,2546           00025                                    THETA                                 
037135,000747: 14,2547           00023                                    18D                                   
037136,000748: 14,2550           47046                           ABS      RTB                                   #  COMPUTE POS DIFF
037137,000749: 14,2551           21510                                    SGNAGREE                              
037138,000750: 14,2552           01047                           STORE    NORMTEM1                              
037139,000751: 14,2553           77414                           SET      EXIT                                  
037140,000752: 14,2554           00074                                    FREEFLAG                              
037141,000753: 14,2555           32571                           CAF      VB6N5                                 
037142,000754: 14,2556           04655                           TC       BANKCALL                              
037143,000755: 14,2557           20406                           CADR     GOFLASH                               
037144,000756: 14,2560           14106                           TCF      GOTOPOOH                              
037145,000757: 14,2561           02566                           TC       CHKSDA                                #  PROCEED
037146,000758: 14,2562           06014                           TC       INTPRET                               
037147,000759: 14,2563           52014                           CLEAR    GOTO                                  
037148,000760: 14,2564           00274                                    FREEFLAG                              
037149,000761: 14,2565           02745                                    QMIN                                  
037150,000762: 14,2566           06014        CHKSDA             TC       INTPRET                               
037151,000763: 
037152,000764: 14,2567           77650                           GOTO                                           
037153,000765: 14,2570           02745                                    QMIN                                  
037154,000766: 14,2571           01405        VB6N5              VN       605                                   
037155,000767:                                                                                                  #  NAME - CAL53A
037156,000768:                                                                                                  #  FUNCTION -COMPUTE DESIRED GIMBAL ANGLES AND COARSE ALIGN IF NECESSARY
037157,000769:                                                                                                  #  CALLING SEQUENCE - CALL CAL53A
037158,000770:                                                                                                  #  INPUT - X,Y,ZSMD ,CDUX,Y,Z
037159,000771:                                                                                                  #          DESIRED GIMBAL ANGLES - THETAD,+1,+2
037160,000772:                                                                                                  #  OUTPUT - THE IMU COORDINATES ARE STORED IN REFSMMAT
037161,000773:                                                                                                  #  SUBROUTINES - S52.2, IMUCOARSE , IMUFINE
037162,000774: 14,2572                                           COUNT*   $$/R50                                
037163,000775: 14,2572           45020        CAL53A             STQ      CALL                                  
037164,000776: 14,2573           00035                                    29D                                   
037165,000777: 14,2574           31134                                    S52.2                                 #  MAKE ONE FINAL COMP OF GIMBLE ANGLES
037166,000778: 14,2575           66234                           RTB      SSP                                   
037167,000779: 14,2576           30653                                    RDCDUS                                #  READ CDUS
037168,000780: 14,2577           00051                                    S1                                    
037169,000781: 14,2600           00001                                    1                                     
037170,000782: 14,2601           40370                           AXT,1    SETPD                                 
037171,000783: 14,2602           00003                                    3                                     
037172,000784: 14,2603           00005                                    4                                     
037173,000785: 14,2604           70543        CALOOP             DLOAD*   SR1                                   
037174,000786: 14,2605           01212                                    THETAD     +3D,1                      
037175,000787: 14,2606           70523                           PDDL*    SR1                                   
037176,000788: 14,2607           00005                                    4,1                                   
037177,000789: 14,2610           51425                           DSU      ABS                                   
037178,000790: 14,2611           45206                           PUSH     DSU                                   
037179,000791: 14,2612           30652                                    DEGREE1                               
037180,000792: 14,2613           71240                           BMN      DLOAD                                 
037181,000793: 14,2614           30626                                    CALOOP1                               
037182,000794: 14,2615           51025                           DSU      BPL                                   
037183,000795: 14,2616           30653                                    DEG359                                
037184,000796: 14,2617           30626                                    CALOOP1                               
037185,000797: 14,2620           77624        COARFINE           CALL                                           
037186,000798: 14,2621           31106                                    COARSE                                
037187,000799: 14,2622           77624                           CALL                                           
037188,000800: 14,2623           31123                                    NCOARSE                               
037189,000801: 14,2624           77650                           GOTO                                           
037190,000802: 14,2625           30630                                    FINEONLY                              
037191,000803: 14,2626           77700        CALOOP1            TIX,1                                          
037192,000804: 14,2627           30604                                    CALOOP                                
037193,000805: 14,2630           75160        FINEONLY           AXC,1    AXC,2                                 
037194,000806: 14,2631           02642                                    XSM                                   
037195,000807: 14,2632           01735                                    REFSMMAT                              
037196,000808: 14,2633           77624                           CALL                                           
037197,000809: 14,2634           30637                                    MATMOVE                               
037198,000810: 14,2635           77650                           GOTO                                           
037199,000811: 14,2636           00035                                    29D                                   
037200,000812: 14,2637           77773        MATMOVE            VLOAD*                                         #  TRANSFER MATRIX
037201,000813: 14,2640           00001                                    0,1                                   
037202,000814: 
037203,000815: 14,2641           10001                           STORE    0,2                                   
037204,000816: 14,2642           77773                           VLOAD*                                         
037205,000817: 14,2643           00007                                    6D,1                                  
037206,000818: 14,2644           10007                           STORE    6D,2                                  
037207,000819: 14,2645           77773                           VLOAD*                                         
037208,000820: 14,2646           00015                                    12D,1                                 
037209,000821: 14,2647           10015                           STORE    12D,2                                 
037210,000822: 14,2650           77616                           RVQ                                            
037211,000823: 14,2651           00056        DEGREE1            DEC      46         B-14                       #  1 DEG SCALED CDU/2
037212,000824: 14,2652           37722        DEG359             DEC      16338      B-14                       #  359 DEG SCALED CDU/2
037213,000825: 14,2653           00004        RDCDUS             INHINT                                         #  READ CDUS
037214,000826: 14,2654           30032                           CA       CDUX                                  
037215,000827: 14,2655           50120                           INDEX    FIXLOC                                
037216,000828: 14,2656           54001                           TS       1                                     
037217,000829: 14,2657           30033                           CA       CDUY                                  
037218,000830: 14,2660           50120                           INDEX    FIXLOC                                
037219,000831: 14,2661           54002                           TS       2                                     
037220,000832: 14,2662           30034                           CA       CDUZ                                  
037221,000833: 14,2663           50120                           INDEX    FIXLOC                                
037222,000834: 14,2664           54003                           TS       3                                     
037223,000835: 14,2665           00003                           RELINT                                         
037224,000836: 14,2666           06035                           TC       DANZIG                                #                                        +
037225,000837: 14,2667                                           COUNT*   $$/INFLT                              
037226,000838: 14,2667           77760        CALCSMSC           AXC,1                                          
037227,000839: 14,2670           02664                                    XNB                                   
037228,000840: 
037229,000841: 14,2671           41345        XNBNDX             DLOAD    DMP                                   
037230,000842: 14,2672           00737                                    SINCDUY                               
037231,000843: 14,2673           00747                                    COSCDUZ                               
037232,000844: 14,2674           77676                           DCOMP                                          
037233,000845: 14,2675           70525                           PDDL     SR1                                   
037234,000846: 14,2676           00741                                    SINCDUZ                               
037235,000847: 14,2677           41325                           PDDL     DMP                                   
037236,000848: 14,2700           00745                                    COSCDUY                               
037237,000849: 14,2701           00747                                    COSCDUZ                               
037238,000850: 14,2702           76466                           VDEF     VSL1                                  
037239,000851: 14,2703           04001                           STORE    0,1                                   
037240,000852: 14,2704           41345                           DLOAD    DMP                                   
037241,000853: 14,2705           00743                                    SINCDUX                               
037242,000854: 14,2706           00741                                    SINCDUZ                               
037243,000855: 14,2707           77752                           SL1                                            
037244,000856: 14,2710           00033                           STORE    26D                                   
037245,000857: 14,2711           77605                           DMP                                            
037246,000858: 14,2712           00737                                    SINCDUY                               
037247,000859: 14,2713           41325                           PDDL     DMP                                   
037248,000860: 14,2714           00751                                    COSCDUX                               
037249,000861: 14,2715           00745                                    COSCDUY                               
037250,000862: 14,2716           77625                           DSU                                            
037251,000863: 14,2717           41325                           PDDL     DMP                                   
037252,000864: 14,2720           00743                                    SINCDUX                               
037253,000865: 
037254,000866: 14,2721           00747                                    COSCDUZ                               
037255,000867: 14,2722           77676                           DCOMP                                          
037256,000868: 14,2723           41325                           PDDL     DMP                                   
037257,000869: 14,2724           00751                                    COSCDUX                               
037258,000870: 14,2725           00737                                    SINCDUY                               
037259,000871: 14,2726           41325                           PDDL     DMP                                   
037260,000872: 14,2727           00745                                    COSCDUY                               
037261,000873: 14,2730           00033                                    26D                                   
037262,000874: 14,2731           55415                           DAD      VDEF                                  
037263,000875: 14,2732           77772                           VSL1                                           
037264,000876: 14,2733           04015                           STORE    14,1                                  
037265,000877: 14,2734           76433                           VXV*     VSL1                                  
037266,000878: 14,2735           00001                                    0,1                                   
037267,000879: 14,2736           04007                           STORE    6,1                                   
037268,000880: 14,2737           77616                           RVQ                                            
037269,000881: 
037270,000882:                                                                                                  #  NAME - P51 - IMU ORIENTATION DETERMINATION
037271,000883:                                                                                                  #           MOD.NO.1  23 JAN 67                                                             LOG SECTION - P51-P53
037272,000884:                                                                                                  #  MOD BY STURLAUGSON                                                                      ASSEMBLY SUNDANCE REV56
037273,000885: 
037274,000886:                                                                                                  #  FUNCTIONAL DESCRIPTION
037275,000887: 
037276,000888:                                                                                                  #       DETERMINES THE INERTIAL ORIENTATION OF THE IMU. THE PROGRAM IS SELECTED BY DSKY ENTRY. THE SIGHTING
037277,000889:                                                                                                  #  (AOTMARK)ROUTINE IS CALLED TO COLLECT AND PROCESS MARKED-STAR DATA. AOTMARK(R53) RETURNS THE STAR NUMBER AND THE
037278,000890:                                                                                                  #  STAR LOS VECTOR IN STARAD+6. TWO STARS ARE THUS SIGHTED. THE ANGLE BETWEEN THE TWO STARS IS THEN CHECKED AT
037279,000891:                                                                                                  #  CHKSDATA(R54). REFSMMAT IS THEN COMPUTED AT AXISGEN.
037280,000892: 
037281,000893:                                                                                                  #  CALLING SEQUENCE
037282,000894: 
037283,000895:                                                                                                  #    THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
037284,000896: 
037285,000897:                                                                                                  #  SUBROUTINES CALLED.
037286,000898: 
037287,000899:                                                                                                  #       GOPERF3
037288,000900:                                                                                                  #       GOPERF1
037289,000901:                                                                                                  #       GODSPR
037290,000902:                                                                                                  #       IMUCOARS
037291,000903:                                                                                                  #       IMUFIN20
037292,000904:                                                                                                  #       AOTMARK(R53)
037293,000905:                                                                                                  #       CHKSDATA(R54)
037294,000906:                                                                                                  #       MKRELEAS
037295,000907:                                                                                                  #       AXISGEN
037296,000908:                                                                                                  #       MATMOVE
037297,000909: 
037298,000910:                                                                                                  #  ALARMS
037299,000911: 
037300,000912:                                                                                                  #       NONE.
037301,000913: 
037302,000914:                                                                                                  #  ERASABLE INITIALIZATION
037303,000915: 
037304,000916:                                                                                                  #       IMU ZERO FLAG SHOULD BE SET.
037305,000917: 
037306,000918:                                                                                                  #  OUTPUT
037307,000919: 
037308,000920:                                                                                                  #       REFSMMAT
037309,000921:                                                                                                  #       REFSMFLG
037310,000922: 
037311,000923:                                                                                                  #  DEBRIS
037312,000924: 
037313,000925:                                                                                                  #       WORK AREA
037314,000926:                                                                                                  #       STARAD
037315,000927:                                                                                                  #       STARIND
037316,000928:                                                                                                  #       BESTI
037317,000929:                                                                                                  #       BESTJ
037318,000930: 
037319,000931: 14,2740                                           COUNT*   $$/P51                                
037320,000932: 14,2740           04655        P51                TC       BANKCALL                              #  IS ISS ON - IF NOT, IMUCHK WILL SEND
037321,000933: 14,2741           33205                           CADR     IMUCHK                                #  ALARM CODE 210 AND EXIT VIA GOTOPOOH.
037322,000934: 
037323,000935: 14,2742           35034                           CAF      PRFMSTAQ                              
037324,000936: 14,2743           04655                           TC       BANKCALL                              
037325,000937: 14,2744           20532                           CADR     GOPERF1                               
037326,000938: 14,2745           04106                           TC       GOTOPOOH                              #  TERM.
037327,000939: 14,2746           12774                           TCF      P51B                                  #  V33
037328,000940: 14,2747           05413                           TC       PHASCHNG                              
037329,000941: 14,2750           05024                           OCT      05024                                 
037330,000942: 14,2751           13000                           OCT      13000                                 
037331,000943: 14,2752           35030                           CAF      P51ZERO                               
037332,000944: 14,2753           55206                           TS       THETAD                                #  ZERO THE GIMBALS
037333,000945: 14,2754           55207                           TS       THETAD     +1                         
037334,000946: 14,2755           55210                           TS       THETAD     +2                         
037335,000947: 14,2756           33104                           CAF      V6N22                                 
037336,000948: 14,2757           04655                           TC       BANKCALL                              
037337,000949: 14,2760           20361                           CADR     GODSPRET                              
037338,000950: 14,2761           33105                           CAF      V41K                                  #  NOW DISPLAY COARSE ALIGN VERB 41
037339,000951: 14,2762           04655                           TC       BANKCALL                              
037340,000952: 14,2763           20361                           CADR     GODSPRET                              
037341,000953: 14,2764           06014                           TC       INTPRET                               
037342,000954: 14,2765           77624                           CALL                                           
037343,000955: 14,2766           31106                                    COARSE                                
037344,000956: 14,2767           77776                           EXIT                                           
037345,000957: 14,2770           05413                           TC       PHASCHNG                              
037346,000958: 14,2771           05024                           OCT      05024                                 
037347,000959: 14,2772           13000                           OCT      13000                                 
037348,000960: 14,2773           12742                           TCF      P51        +2                         
037349,000961: 
037350,000962: 14,2774           05413        P51B               TC       PHASCHNG                              
037351,000963: 14,2775           00014                           OCT      00014                                 
037352,000964: 14,2776           06014                           TC       INTPRET                               
037353,000965: 14,2777           77624                           CALL                                           
037354,000966: 14,3000           31123                                    NCOARSE                               
037355,000967: 14,3001           40331                           SSP      SETPD                                 
037356,000968: 14,3002           02760                                    STARIND                               #  INDEX-STAR 1 OR 2
037357,000969: 14,3003           00000                                    0                                     
037358,000970: 14,3004           00001                                    0                                     
037359,000971: 14,3005           77776        P51C               EXIT                                           
037360,000972: 14,3006           05413                           TC       PHASCHNG                              
037361,000973: 14,3007           05024                           OCT      05024                                 
037362,000974: 14,3010           13000                           OCT      13000                                 
037363,000975: 14,3011           04655                           TC       BANKCALL                              
037364,000976: 14,3012           16000                           CADR     AOTMARK                               #  R53
037365,000977: 14,3013           04655                           TC       BANKCALL                              
037366,000978: 14,3014           17621                           CADR     AOTSTALL                              
037367,000979: 14,3015           05730                           TC       CURTAINS                              
037368,000980: 14,3016           11757                           CCS      STARIND                               
037369,000981: 14,3017           13025                           TCF      P51D       +1                         
037370,000982: 
037371,000983: 14,3020           06014                           TC       INTPRET                               
037372,000984: 14,3021           77775                           VLOAD                                          
037373,000985: 14,3022           02715                                    STARAD     +6                         
037374,000986: 14,3023           02761                           STORE    STARSAV1                              
037375,000987: 14,3024           77776        P51D               EXIT                                           
037376,000988: 14,3025           05413                           TC       PHASCHNG                              
037377,000989: 14,3026           05024                           OCT      05024                                 
037378,000990: 14,3027           13000                           OCT      13000                                 
037379,000991: 14,3030           11757                           CCS      STARIND                               
037380,000992: 14,3031           13046                           TCF      P51E                                  
037381,000993: 14,3032           05413                           TC       PHASCHNG                              
037382,000994: 14,3033           05024                           OCT      05024                                 
037383,000995: 14,3034           13000                           OCT      13000                                 
037384,000996: 14,3035           06014                           TC       INTPRET                               
037385,000997: 14,3036           45145                           DLOAD    CALL                                  
037386,000998: 14,3037           03547                                    TSIGHT                                
037387,000999: 14,3040           32160                                    PLANET                                
037388,001000: 14,3041           03541                           STORE    PLANVEC                               
037389,001001: 14,3042           77776                           EXIT                                           
037390,001002: 14,3043           35026                           CAF      BIT1                                  
037391,001003: 14,3044           55757                           TS       STARIND                               
037392,001004: 14,3045           13006                           TCF      P51C       +1                         #  DO SECOND STAR
037393,001005: 14,3046           05413        P51E               TC       PHASCHNG                              
037394,001006: 14,3047           05024                           OCT      05024                                 
037395,001007: 14,3050           13000                           OCT      13000                                 
037396,001008: 14,3051           06014                           TC       INTPRET                               
037397,001009: 14,3052           45145                           DLOAD    CALL                                  
037398,001010: 14,3053           03547                                    TSIGHT                                
037399,001011: 14,3054           32160                                    PLANET                                
037400,001012: 14,3055           24015                           STOVL    12D                                   
037401,001013: 14,3056           03541                                    PLANVEC                               
037402,001014: 14,3057           24007                           STOVL    6D                                    
037403,001015: 14,3060           02761                                    STARSAV1                              
037404,001016: 14,3061           26707                           STOVL    STARAD                                
037405,001017: 14,3062           02767                                    STARSAV2                              
037406,001018: 14,3063           36715                           STCALL   STARAD     +6                         
037407,001019: 14,3064           30521                                    CHKSDATA                              #  CHECK STAR ANGLES IN STARAD AND
037408,001020: 14,3065           77414                           BON      EXIT                                  
037409,001021: 14,3066           00314                                    FREEFLAG                              
037410,001022: 14,3067           31071                                    P51G                                  
037411,001023: 14,3070           02742                           TC       P51        +2                         
037412,001024: 14,3071           77624        P51G               CALL                                           
037413,001025: 14,3072           47153                                    AXISGEN                               #  COME BACK WITH REFSMMAT IN XDC
037414,001026: 14,3073           75160                           AXC,1    AXC,2                                 
037415,001027: 14,3074           02664                                    XDC                                   
037416,001028: 14,3075           01735                                    REFSMMAT                              
037417,001029: 14,3076           77624                           CALL                                           
037418,001030: 14,3077           30637                                    MATMOVE                               
037419,001031: 14,3100           77614                           SET                                            
037420,001032: 14,3101           01462                                    REFSMFLG                              
037421,001033: 
037422,001034: 14,3102           77776                           EXIT                                           
037423,001035: 14,3103           04106                           TC       GOTOPOOH                              #  FINIS
037424,001036: 14,3104     5034               PRFMSTAQ           =        OCT15                                 
037425,001037: 14,3104     5030               P51ZERO            =        ZERO                                  
037426,001038: 14,3104     5031               P51FIVE            =        FIVE                                  
037427,001039: 14,3104           01426        V6N22              VN       0622                                  
037428,001040: 14,3105           12200        V41K               VN       4100                                  
037429,001041: 14,3106           77776        COARSE             EXIT                                           
037430,001042: 14,3107           04655                           TC       BANKCALL                              
037431,001043: 14,3110           16711                           CADR     IMUCOARS                              
037432,001044: 14,3111           04655                           TC       BANKCALL                              
037433,001045: 14,3112           17625                           CADR     IMUSTALL                              
037434,001046: 14,3113           05730                           TC       CURTAINS                              
037435,001047: 14,3114           04655                           TC       BANKCALL                              
037436,001048: 14,3115           17121                           CADR     IMUFINE                               
037437,001049: 14,3116           04655                           TC       BANKCALL                              
037438,001050: 14,3117           17625                           CADR     IMUSTALL                              
037439,001051: 14,3120           05730                           TC       CURTAINS                              
037440,001052: 14,3121           06014                           TC       INTPRET                               
037441,001053: 14,3122           77616                           RVQ                                            
037442,001054: 14,3123           77776        NCOARSE            EXIT                                           
037443,001055: 14,3124           30025                           CA       TIME1                                 
037444,001056: 14,3125           55075                           TS       1/PIPADT                              
037445,001057: 14,3126           06014                           TC       INTPRET                               
037446,001058: 14,3127           77775                           VLOAD                                          
037447,001059: 14,3130           22276                                    ZEROVEC                               
037448,001060: 14,3131           01472                           STORE    GCOMP                                 
037449,001061: 14,3132           43414                           SET      RVQ                                   
037450,001062: 14,3133           01060                                    DRIFTFLG                              
037451,001063: 
037452,001064:                                                                                                  #  NAME-S52.2
037453,001065:                                                                                                  #  FUNCTION-COMPUTE GIMBAL ANGLES FOR DESIRED SM AND PRESENT VEHICLE
037454,001066:                                                                                                  #  CALL-  CALL  S52.2
037455,001067:                                                                                                  #  INPUT- X,Y,ZSMD
037456,001068:                                                                                                  #  OUTPUT- OGC,IGC,MGC,THETAD,+1,+2
037457,001069:                                                                                                  #  SUBROUTINES-CDUTRIG,CALCSMSC,MATMOVE,CALCGA
037458,001070: 14,3134                                           COUNT*   $$/S52.1                              
037459,001071: 14,3134           77620        S52.2              STQ                                            
037460,001072: 14,3135           02746                                    QMAJ                                  
037461,001073: 14,3136           77624                           CALL                                           
037462,001074: 14,3137           47251                                    CDUTRIG                               
037463,001075: 14,3140           77624                           CALL                                           
037464,001076: 14,3141           30667                                    CALCSMSC                              
037465,001077: 14,3142           66370                           AXT,1    SSP                                   
037466,001078: 14,3143           00022                                    18D                                   
037467,001079: 14,3144           00051                                    S1                                    
037468,001080: 14,3145           00006                                    6D                                    
037469,001081: 14,3146           61373        S52.2A             VLOAD*   VXM                                   
037470,001082: 14,3147           02707                                    XNB        +18D,1                     
037471,001083: 14,3150           01736                                    REFSMMAT                              
037472,001084: 14,3151           77656                           UNIT                                           
037473,001085: 14,3152           06707                           STORE    XNB        +18D,1                     
037474,001086: 14,3153           77700                           TIX,1                                          
037475,001087: 14,3154           31146                                    S52.2A                                
037476,001088: 14,3155           75160        S52.2.1            AXC,1    AXC,2                                 
037477,001089: 14,3156           03573                                    XSMD                                  
037478,001090: 14,3157           02642                                    XSM                                   
037479,001091: 14,3160           77624                           CALL                                           
037480,001092: 14,3161           30637                                    MATMOVE                               
037481,001093: 14,3162           77624                           CALL                                           
037482,001094: 14,3163           47063                                    CALCGA                                
037483,001095: 14,3164           77650                           GOTO                                           
037484,001096: 14,3165           02746                                    QMAJ                                  
037485,001097: 
037486,001098:                                                                                                  #  NAME-S52.3
037487,001099:                                                                                                  #  FUNCTION  XSMD= UNIT R
037488,001100:                                                                                                  #            YSMD= UNIT(V X R)
037489,001101:                                                                                                  #            ZSMD= UNIT(XSMD X YSMD)
037490,001102:                                                                                                  #  CALL     DLOAD  CALL
037491,001103:                                                                                                  #                  TALIGN
037492,001104:                                                                                                  #                  S52.3
037493,001105:                                                                                                  #  INPUT-   TIME OF ALIGNMENT IN MPAC
037494,001106:                                                                                                  #  OUTPUT-  X,Y,ZSMD
037495,001107:                                                                                                  #  SUBROUTINES- CSMCONIC
037496,001108: 14,3166                                           COUNT*   $$/S52.3                              
037497,001109: 14,3166           77620        S52.3              STQ                                            
037498,001110: 14,3167           02746                                    QMAJ                                  
037499,001111: 14,3170           34041                           STCALL   TDEC1                                 
037500,001112: 14,3171           27051                                    LEMCONIC                              
037501,001113: 14,3172           77601                           SETPD                                          
037502,001114: 14,3173           00001                                    0                                     
037503,001115: 14,3174           53575                           VLOAD    UNIT                                  
037504,001116: 14,3175           00001                                    RATT                                  
037505,001117: 14,3176           27574                           STOVL    XSMD                                  
037506,001118: 14,3177           00007                                    VATT                                  
037507,001119: 14,3200           53435                           VXV      UNIT                                  
037508,001120: 14,3201           00001                                    RATT                                  
037509,001121: 14,3202           27602                           STOVL    YSMD                                  
037510,001122: 14,3203           03574                                    XSMD                                  
037511,001123: 14,3204           53435                           VXV      UNIT                                  
037512,001124: 14,3205           03602                                    YSMD                                  
037513,001125: 14,3206           37610                           STCALL   ZSMD                                  
037514,001126: 14,3207           02746                                    QMAJ                                  
037515,001127: 
037516,001128:                                                                                                  #  NAME    -R52 (AUTOMATIC OPTICS POSITIONING ROUTINE)
037517,001129: 
037518,001130:                                                                                                  #  FUNCTION-POINT THE AOT OPTIC AXIS BY MANEUVERING THE LEM TO A NAVIGATION
037519,001131:                                                                                                  #           STAR SELECTED BY ALIGNMENT PROGRAMS OR DSKY INPUT
037520,001132: 
037521,001133:                                                                                                  #  CALLING -CALL R52
037522,001134: 
037523,001135:                                                                                                  #  INPUT   -BESTI AND BESTJ (STAR CODES TIMES 6)
037524,001136:                                                                                                  #  OUTPUT  -STAR CODE IN BITS1-6, DETENT CODE IN BITS 7-9
037525,001137:                                                                                                  #           (NO CHECK IS MADE TO INSURE THE DETENT  CODE TO BE VALID)
037526,001138:                                                                                                  #           POINTVSM-1/2 UNIT NAV STAR VEC IN SM
037527,001139:                                                                                                  #           SCAXIS-AOT OPTIC AXIS VEC IN NB X-Z PLANE
037528,001140: 
037529,001141:                                                                                                  #  SUBROUT -R60LEM
037530,001142: 
037531,001143: 14,3210                                           COUNT*   $$/R52                                
037532,001144: 14,3210           77420        R52                STQ      EXIT                                  
037533,001145: 14,3211           03652                                    SAVQR52                               
037534,001146: 14,3212           51757                           INDEX    STARIND                               
037535,001147: 14,3213           31755                           CA       BESTI                                 #  PICK UP STARCODE DETERMINED BY R56
037536,001148: 14,3214           00006                           EXTEND                                         
037537,001149: 14,3215           73306                           MP       1/6TH                                 
037538,001150: 14,3216           65017                           AD       BIT8                                  #  SET DETENT POSITION 2
037539,001151: 14,3217           54735                           TS       STARCODE                              #  SCALE AND STORE IN STARCODE
037540,001152: 
037541,001153: 14,3220           33307        R52A               CAF      V01N70                                
037542,001154: 14,3221           04655                           TC       BANKCALL                              
037543,001155: 14,3222           20406                           CADR     GOFLASH                               #  DISPLAY STARCODE AND WAIT FOR RESPONSE
037544,001156: 14,3223           04106                           TC       GOTOPOOH                              #  V34-TERMINATE
037545,001157: 14,3224           13226                           TCF      R52B                                  #  V33-PROCEED TO ORIENT LEM
037546,001158: 14,3225           13220                           TCF      R52A                                  #  ENTER-SELECT NEW STARCODE-RECYCLE
037547,001159: 
037548,001160: 14,3226           05575        R52B               TC       DOWNFLAG                              
037549,001161: 14,3227           00124                           ADRES    3AXISFLG                              #  BIT6 OF FLAGWRD5 ZERO TO ALLOW VECPOINT
037550,001162: 14,3230           30735                           CA       STARCODE                              #  GRAB DETENT CODE
037551,001163: 14,3231           77715                           MASK     HIGH9                                 
037552,001164: 14,3232           00006                           EXTEND                                         
037553,001165: 14,3233           63220                           BZMF     R52A                                  #  DONT ALLOW ZERO CODE-RECYCLE
037554,001166: 14,3234           75016                           MASK     BIT9                                  #  SEE IF CODE 4 OR 5
037555,001167: 14,3235           10000                           CCS      A                                     
037556,001168: 14,3236           13255                           TCF      GETAZEL                               #  CODE 4 OR 5-GET CALIBRATION AZ EL
037557,001169: 14,3237  E7,1536                                  EBANK=   XYMARK                                
037558,001170: 14,3237           35066                           CA       EBANK7                                
037559,001171: 14,3240           54003                           TS       EBANK                                 
037560,001172: 14,3241           37715                           CAF      HIGH9                                 #  FORWARD DETENT, INDEX DETENT AND GRAB
037561,001173: 14,3242           70735                           MASK     STARCODE                              #  AZIMUTH  ANGLE AND ELV = 45 DEG
037562,001174: 14,3243           00006                           EXTEND                                         
037563,001175: 14,3244           75016                           MP       BIT9                                  #  SHIFT DETENT TO BITS1-2 FOR INDEX
037564,001176: 14,3245           50000                           INDEX    A                                     
037565,001177: 14,3246           31403                           CA       AOTAZ      -1                         #  PICK UP AZ CORRESPONDING TO DETENT
037566,001178: 
037567,001179: 14,3247           54001                           TS       L                                     
037568,001180: 14,3250  E5,1642                                  EBANK=   XSM                                   
037569,001181: 14,3250           35064                           CA       EBANK5                                #  CHANGE TO EBANK5 BUT DONT DISTURB L
037570,001182: 14,3251           54003                           TS       EBANK                                 
037571,001183: 14,3252           35012                           CA       BIT13                                 #  SET ELV TO 45 DEG
037572,001184: 14,3253           56001                           XCH      L                                     #  SET C(A)=AZ, C(L)=45 DEG
037573,001185: 14,3254           13265                           TCF      AZEL                                  #  GO COMP OPTIC AXIS
037574,001186: 
037575,001187: 14,3255           33310        GETAZEL            CAF      V06N87                                #  CODE 4 OR 5-GET AZ AND EL FROM ASTRO
037576,001188: 14,3256           04655                           TC       BANKCALL                              
037577,001189: 14,3257           20406                           CADR     GOFLASH                               
037578,001190: 14,3260           04106                           TC       GOTOPOOH                              #  V34-TERMINATE
037579,001191: 14,3261           13263                           TCF      +2                                    #  PROCEED-CALC OPTIC AXIS
037580,001192: 14,3262           13255                           TCF      GETAZEL                               #  ENTER-RECYCLE
037581,001193: 
037582,001194: 14,3263           00006                           EXTEND                                         
037583,001195: 14,3264           31350                           DCA      AZ                                    #  PICK UP AZ AND EL IN SP 2S COMP
037584,001196: 14,3265           50120        AZEL               INDEX    FIXLOC                                #  JAM AZ AND EL IN 8 AND 9 OF VAC
037585,001197: 14,3266           52011                           DXCH     8D                                    
037586,001198: 14,3267           06014                           TC       INTPRET                               
037587,001199: 14,3270           77624                           CALL                                           #  GO COMPUTE OPTIC AXIS AND STORE IN
037588,001200: 14,3271           16170                                    OANB                                  #  SCAXIS IN NB COORDS
037589,001201: 14,3272           45034                           RTB      CALL                                  
037590,001202: 14,3273           21454                                    LOADTIME                              
037591,001203: 14,3274           32160                                    PLANET                                
037592,001204: 14,3275           53521                           MXV      UNIT                                  
037593,001205: 14,3276           01736                                    REFSMMAT                              
037594,001206: 14,3277           01256                           STORE    POINTVSM                              #  STORE FOR VECPOINT
037595,001207: 
037596,001208: 14,3300           77776                           EXIT                                           
037597,001209: 14,3301           04655                           TC       BANKCALL                              
037598,001210: 14,3302           54103                           CADR     R60LEM                                #  GO TORQUE LEM OPTIC AXIS TO STAR LOS
037599,001211: 
037600,001212: 14,3303           06014                           TC       INTPRET                               #  RETURN FROM KALCMANU
037601,001213: 14,3304           77650                           GOTO                                           
037602,001214: 14,3305           03652                                    SAVQR52                               #  RETURN TO CALLER
037603,001215: 
037604,001216: 14,3306           05253        1/6TH              DEC      .1666667                              
037605,001217: 14,3307           00306        V01N70             VN       0170                                  
037606,001218: 14,3310           01527        V06N87             VN       687                                   
037607,001219: 
037608,001220:                                                                                                  #  NAME -    PLANET
037609,001221:                                                                                                  #  FUNCTION -TO PROVIDE THE REFERENCE VECTOR FOR THE SIGHTED CELESTIAL
037610,001222:                                                                                                  #            BODY. STARS ARE FETCHED FROM THE CATALOG,SUN,EARTH AND
037611,001223:                                                                                                  #            MOON ARE COMPUTED BY LOCSAM,PLANET VECTORS ARE ENTERED
037612,001224:                                                                                                  #            BY DSDY INPUT
037613,001225:                                                                                                  #  CALL  -  CALL
037614,001226:                                                                                                  #                  PLANET
037615,001227:                                                                                                  #  INPUT -  TIME IN MPAC
037616,001228:                                                                                                  #  OUTPUT - VECTOR  IN MPAC
037617,001229:                                                                                                  #  SUBROUTINES - LOCSAM
037618,001230:                                                                                                  #  DEBRIS - VAC ,STARAD - STARAD +17
037619,001231: 
037620,001232: 15,2000                                           SETLOC   P50S                                  
037621,001233: 15,2000                                           BANK                                           
037622,001234: 15,2160                                           COUNT*   $$/P51                                
037623,001235: 
037624,001236: 15,2160           03547        PLANET             STORE    TSIGHT                                
037625,001237: 15,2161           77420                           STQ      EXIT                                  
037626,001238: 15,2162           02736                                    GCTR                                  
037627,001239: 15,2163           47715                           CS       HIGH9                                 
037628,001240: 15,2164           70735                           MASK     AOTCODE                               
037629,001241: 15,2165           00006                           EXTEND                                         
037630,001242: 15,2166           76216                           MP       REVCNT                                
037631,001243: 15,2167           56001                           XCH      L                                     
037632,001244: 15,2170           51757                           INDEX    STARIND                               
037633,001245: 15,2171           55755                           TS       BESTI                                 
037634,001246: 15,2172           10000                           CCS      A                                     
037635,001247: 15,2173           12207                           TCF      NOTPLAN                               
037636,001248: 15,2174           32246                           CAF      VNPLANV                               
037637,001249: 15,2175           04655                           TC       BANKCALL                              
037638,001250: 15,2176           20406                           CADR     GOFLASH                               
037639,001251: 15,2177           02174                           TC       -3                                    
037640,001252: 15,2200           02202                           TC       +2                                    
037641,001253: 15,2201           02174                           TC       -5                                    
037642,001254: 15,2202           06014                           TC       INTPRET                               
037643,001255: 15,2203           53575                           VLOAD    UNIT                                  
037644,001256: 15,2204           02707                                    STARAD                                
037645,001257: 15,2205           77650                           GOTO                                           
037646,001258: 15,2206           02736                                    GCTR                                  
037647,001259: 15,2207           40000        NOTPLAN            CS       A                                     
037648,001260: 15,2210           62245                           AD       DEC227                                
037649,001261: 15,2211           00006                           EXTEND                                         
037650,001262: 15,2212           62223                           BZMF     CALSAM1                               
037651,001263: 15,2213           51757                           INDEX    STARIND                               
037652,001264: 15,2214           31755                           CA       BESTI                                 
037653,001265: 15,2215           50120                           INDEX    FIXLOC                                
037654,001266: 15,2216           54046                           TS       X1                                    
037655,001267: 15,2217           06014                           TC       INTPRET                               
037656,001268: 15,2220           52173                           VLOAD*   GOTO                                  
037657,001269: 15,2221           31734                                    CATLOG,1                              
037658,001270: 
037659,001271: 15,2222           02736                                    GCTR                                  
037660,001272: 15,2223           06014        CALSAM1            TC       INTPRET                               
037661,001273: 15,2224           45145        CALSAM             DLOAD    CALL                                  
037662,001274: 15,2225           03547                                    TSIGHT                                
037663,001275: 15,2226           30000                                    LOCSAM                                
037664,001276: 15,2227           77340                           LXC,1    VLOAD                                 
037665,001277: 15,2230           02757                                    STARIND                               
037666,001278: 15,2231           02707                                    VEARTH                                
037667,001279: 15,2232           24001                           STOVL    0D                                    
037668,001280: 15,2233           02715                                    VSUN                                  
037669,001281: 15,2234           26707                           STOVL    VEARTH                                
037670,001282: 15,2235           00001                                    0D                                    
037671,001283: 15,2236           02715                           STORE    VSUN                                  
037672,001284: 15,2237           70143                           DLOAD*   LXC,1                                 
037673,001285: 15,2240           02756                                    BESTI,1                               
037674,001286: 15,2241           00154                                    MPAC                                  
037675,001287: 15,2242           52173                           VLOAD*   GOTO                                  
037676,001288: 15,2243           02343                                    STARAD     -228D,1                    
037677,001289: 15,2244           02736                                    GCTR                                  
037678,001290: 15,2245           00343        DEC227             DEC      227        B-14                       
037679,001291: 15,2246           01530        VNPLANV            VN       0688                                  
037680,001292: 15,2247  33,2430               PIPSRINE           =        PIPASR     +3                         #  EBANK NOT 4 SO DONT LOAD PIPTIME1
037681,001293: 
037682,001294:                                                                                                  #  GRAVITY VECTOR DETERMINATION ROUTINE
037683,001295:                                                                                                  #  BY KEN VINCENT
037684,001296:                                                                                                  #  FOR DETAILED DESCRIPTION SEE 504GSOP 5.6.3.2.5
037685,001297:                                                                                                  #  THIS PROGRAM FINDS THE DIRECTION OF THE MOONS GRAVITY
037686,001298:                                                                                                  #  WHILE THE LM IS ON THE MOONS SURFACE. IT WILL BE USED
037687,001299:                                                                                                  #  FOR LUNAR SURFACE ALIGNMENT. THE GRAVITY VECTOR IS
037688,001300:                                                                                                  #  DETERMINED BY READING THE PIPAS WITH THE IMU AT TWO
037689,001301:                                                                                                  #  PARTICULAR ORIONTATIONS. THE TWO READINGS ARE AVERAGED
037690,001302:                                                                                                  #  AND UNITIZED AND TRANSFORMED TO NB COORDINATES. THE TWO
037691,001303:                                                                                                  #  ORIENTATION WERE CHOSEN TO REDUCE BIAS ERRORS IN THE
037692,001304:                                                                                                  #  READINGS.
037693,001305: 
037694,001306:                                                                                                  #  CALL-
037695,001307:                                                                                                  #           TC     BANKCALL
037696,001308:                                                                                                  #           CADR   GVDETER
037697,001309:                                                                                                  #  INPUTS-
037698,001310:                                                                                                  #           PIPAS,CDUS
037699,001311:                                                                                                  #  OUTPUTS-
037700,001312:                                                                                                  #           STARSAV1 = UNIT GRAVITY
037701,001313:                                                                                                  #           GSAV     =   DITTO
037702,001314:                                                                                                  #           GRAVBIT  = 1
037703,001315:                                                                                                  #  SUBROUTINES-
037704,001316:                                                                                                  #           PIPASR,IMUCOARS,IMUFINE,IMUSTALL,1/PIPA,DELAYJOB,CDUTRIG,
037705,001317:                                                                                                  #           *NBSM* ,*SNMB*, CALCGA,FOFLASH
037706,001318:                                                                                                  #  DEBRIS-
037707,001319:                                                                                                  #           VAC,SAC,STARAD,XSM,XNB,THETAD,DELV,COSCDU,SINCDU
037708,001320: 15,2247           45024        GVDETER            CS       BIT3                                  #  JAM 45 DEG IN DESIRED GIMBAL ANGLES
037709,001321: 15,2250           55207                           TS       THETAD     +1                         
037710,001322: 15,2251           40000                           COM                                            
037711,001323: 15,2252           55210                           TS       THETAD     +2                         
037712,001324: 15,2253           55206                           TS       THETAD                                
037713,001325: 15,2254           06014                           TC       INTPRET                               
037714,001326: 15,2255           45014                           CLEAR    CALL                                  
037715,001327: 15,2256           01662                                    REFSMFLG                              
037716,001328: 15,2257           32345                                    LUNG                                  
037717,001329:                                                                                                  #  FIND  GIMBAL ANGLES WHICH ROTATE SM 180DEG  ABOUT  G VEC
037718,001330: 
037719,001331:                                                                                                  #   DEFINE G COOR SYS
037720,001332:                                                                                                  #                       -
037721,001333:                                                                                                  #                       X    UNIT G
037722,001334:                                                                                                  #                   *   -               -
037723,001335:                                                                                                  #                   M=  Y =  UNITEZSM * X )
037724,001336:                                                                                                  #                       -         -     -
037725,001337:                                                                                                  #                       Z    UNIT(X   * Y )
037726,001338:                                                                                                  #   THEN   ROTATED  SM WRT  PRESENT IS
037727,001339: 
037728,001340: 
037729,001341:                                                                                                  #                      1,  0 , 0
037730,001342:                                                                                                  #            *      *T            *          *         *
037731,001343:                                                                                                  #           XSM =   M  0, -1 , 0  M  = 2  (X X ) - 1/2 I  *
037732,001344: 
037733,001345:                                                                                                  #                                           I J
037734,001346:                                                                                                  #                      0,  0 ,-1
037735,001347: 
037736,001348:                                                                                                  #   ALSO   NB WRT PRES SM  IS
037737,001349: 
037738,001350:                                                                                                  #                 *      *   *
037739,001351:                                                                                                  #                XNB = NBSM  I
037740,001352:                                                                                                  #                             *     *
037741,001353:                                                                                                  #   GIMBAL ANGLES  = CALCGA( XSM , XNB )
037742,001354: 
037743,001355: 15,2000                                           SETLOC   P50S                                  
037744,001356: 15,2000                                           BANK                                           
037745,001357: 15,2260                                           COUNT*   $$/P57                                
037746,001358: 15,2260           66370                           AXT,1    SSP                                   #  X1=18
037747,001359: 15,2261           00022                                    18D                                   #  S1= 6
037748,001360: 15,2262           00051                                    S1                                    #  X2, -2
037749,001361: 15,2263           00006                                    6D                                    
037750,001362: 15,2264           77744                           LXC,2                                          
037751,001363: 15,2265           00050                                    S1                                    
037752,001364: 15,2266           45173        GRAVEL             VLOAD*   CALL                                  
037753,001365: 15,2267           55511                                    XUNIT      -6,2                       
037754,001366: 15,2270           47415                                    *NBSM*                                #  SIN AND COS COMPUTED IN LUNG
037755,001367: 15,2271           06707                           STORE    XNB        +18D,1                     
037756,001368: 15,2272           77775                           VLOAD                                          
037757,001369: 15,2273           02731                                    STAR                                  
037758,001370: 15,2274           73744                           LXC,2    VXSC*                                 #  COMPLEMENT- UNITX  ARE BACKWARD -
037759,001371: 15,2275           00047                                    X2                                    
037760,001372: 15,2276           75040                                    STAR       +6,2                       #  OUTER PRODUCT
037761,001373: 15,2277           71152                           VSL2     LXC,2                                 
037762,001374: 15,2300           00047                                    X2                                    
037763,001375: 15,2301           63047                           VSU*     INCR,2                                
037764,001376: 15,2302           55511                                    XUNIT      -6,2                       
037765,001377: 15,2303           00002                                    2D                                    
037766,001378: 15,2304           06665                           STORE    XSM        +18D,1                     
037767,001379: 15,2305           45100                           TIX,1    CALL                                  
037768,001380: 15,2306           32266                                    GRAVEL                                
037769,001381: 15,2307           47063                                    CALCGA                                
037770,001382: 15,2310           74575                           VLOAD    VSR1                                  
037771,001383: 15,2311           02715                                    GOUT                                  
037772,001384: 15,2312           36723                           STCALL   STARAD     +12D                       
037773,001385: 15,2313           32345                                    LUNG                                  
037774,001386: 15,2314           74575                           VLOAD    VSR1                                  
037775,001387: 15,2315           02715                                    GOUT                                  
037776,001388: 15,2316           53455                           VAD      UNIT                                  
037777,001389: 15,2317           02723                                    STARAD     +12D                       
037778,001390: 15,2320           02761                           STORE    STARSAV1                              
037779,001391: 15,2321           77641                           DOT                                            
037780,001392: 15,2322           02237                                    GSAV                                  
037781,001393: 15,2323           65552                           SL1      ACOS                                  
037782,001394: 15,2324           01047                           STORE    DSPTEM1                               
037783,001395: 
037784,001396: 15,2325           77776                           EXIT                                           
037785,001397: 
037786,001398: 15,2326           32444                           CA       DISGRVER                              
037787,001399: 15,2327           04655                           TC       BANKCALL                              
037788,001400: 15,2330           20406                           CADR     GOFLASH                               
037789,001401: 15,2331           04106                           TC       GOTOPOOH                              
037790,001402: 15,2332           02334                           TC       PROGRAV                               #  VB33-PROCEED
037791,001403: 15,2333           02326                           TC       -5                                    #  VB32-RECYCLE
037792,001404: 
037793,001405: 15,2334           05413        PROGRAV            TC       PHASCHNG                              
037794,001406: 15,2335           05024                           OCT      05024                                 
037795,001407: 15,2336           13000                           OCT      13000                                 
037796,001408: 15,2337           06014                           TC       INTPRET                               
037797,001409: 15,2340           77775                           VLOAD                                          
037798,001410: 15,2341           02761                                    STARSAV1                              
037799,001411: 15,2342           02237                           STORE    GSAV                                  
037800,001412: 15,2343           77776                           EXIT                                           
037801,001413: 15,2344           03170                           TC       P57OPT3                               
037802,001414: 
037803,001415: 15,2345           77220        LUNG               STQ      VLOAD                                 
037804,001416: 15,2346           02745                                    QMIN                                  
037805,001417: 15,2347           22276                                    ZEROVEC                               
037806,001418: 15,2350           02707                           STORE    GACC                                  
037807,001419: 15,2351           77776                           EXIT                                           
037808,001420: 15,2352           05413                           TC       PHASCHNG                              
037809,001421: 15,2353           05024                           OCT      05024                                 
037810,001422: 15,2354           13000                           OCT      13000                                 
037811,001423: 15,2355           04655                           TC       BANKCALL                              
037812,001424: 15,2356           16711                           CADR     IMUCOARS                              
037813,001425: 15,2357           04655                           TC       BANKCALL                              
037814,001426: 15,2360           17625                           CADR     IMUSTALL                              
037815,001427: 15,2361           05730                           TC       CURTAINS                              
037816,001428: 15,2362           04655                           TC       BANKCALL                              
037817,001429: 15,2363           17121                           CADR     IMUFINE                               
037818,001430: 15,2364           04655                           TC       BANKCALL                              
037819,001431: 15,2365           17625                           CADR     IMUSTALL                              
037820,001432: 15,2366           05730                           TC       CURTAINS                              
037821,001433: 15,2367           32443                           CA       T/2SEC                                
037822,001434: 15,2370           55736                           TS       GCTR                                  
037823,001435: 15,2371           37670                           CA       PRIO31                                
037824,001436: 15,2372           55075                           TS       1/PIPADT                              
037825,001437: 15,2373           04655                           TC       BANKCALL                              
037826,001438: 15,2374           15674                           CADR     GCOMPZER                              #  INITIALIZE COMPENSATION
037827,001439: 
037828,001440: 15,2375           05413                           TC       PHASCHNG                              
037829,001441: 15,2376           05024                           OCT      05024                                 
037830,001442: 15,2377           13000                           OCT      13000                                 
037831,001443: 15,2400           04655                           TC       BANKCALL                              #   DONT NEED TO INHINY  THIS USED TO
037832,001444: 15,2401           66430                           CADR     PIPSRINE                              #  INITIALIZE PIPAS  DONT USE DATA
037833,001445: 
037834,001446: 15,2402           77776        GREED              EXIT                                           #  = MASK 7776 IN BASIC SO DONT CARE
037835,001447: 15,2403           35050                           CAF      2SECS                                 
037836,001448: 15,2404           04655                           TC       BANKCALL                              #  SET UP 2 SEC TASK TO READ PIPAS
037837,001449: 15,2405           01730                           CADR     DELAYJOB                              
037838,001450: 
037839,001451: 15,2406           25736                           INCR     GCTR                                  
037840,001452: 15,2407           00004                           INHINT                                         
037841,001453: 15,2410           04655                           TC       BANKCALL                              
037842,001454: 15,2411           66430                           CADR     PIPSRINE                              
037843,001455: 15,2412           00003                           RELINT                                         
037844,001456: 15,2413           04655                           TC       BANKCALL                              
037845,001457: 15,2414           15277                           CADR     1/PIPA                                
037846,001458: 15,2415           06014                           TC       INTPRET                               
037847,001459: 15,2416           53375                           VLOAD    VAD                                   
037848,001460: 15,2417           01212                                    DELV                                  
037849,001461: 15,2420           02707                                    GACC                                  
037850,001462: 15,2421           02707                           STORE    GACC                                  #  ACCUMULATE G VECTOR
037851,001463: 15,2422           50135                           SLOAD    BMN                                   
037852,001464: 15,2423           02737                                    GCTR                                  
037853,001465: 15,2424           32402                                    GREED                                 
037854,001466: 15,2425           53575                           VLOAD    UNIT                                  
037855,001467: 15,2426           02707                                    GACC                                  
037856,001468: 15,2427           36731                           STCALL   STAR                                  
037857,001469: 15,2430           47251                                    CDUTRIG                               #  TRANSFORM IN NB COOR  AND  STORE
037858,001470: 15,2431           77624                           CALL                                           #   IN OUTPUT
037859,001471: 15,2432           47413                                    *SMNB*                                
037860,001472: 15,2433           02715                           STORE    GOUT                                  
037861,001473: 15,2434           77776                           EXIT                                           
037862,001474: 15,2435           05413                           TC       PHASCHNG                              
037863,001475: 15,2436           05024                           OCT      05024                                 
037864,001476: 15,2437           13000                           OCT      13000                                 
037865,001477: 15,2440           06014                           TC       INTPRET                               
037866,001478: 15,2441           77650                           GOTO                                           
037867,001479: 15,2442           02745                                    QMIN                                  
037868,001480: 15,2443           77751        T/2SEC             DEC      -22        B-14                       
037869,001481: 15,2444           01405        DISGRVER           VN       0605                                  
037870,001482: 
037871,001483:                                                                                                  #  NAME  GYROTRIM
037872,001484: 
037873,001485:                                                                                                  #  THIS PROGRAM COMPUTES AND SENDS GYRO COMMANDS WHICH CAUSE THE CDUS
037874,001486:                                                                                                  #    TO ATTAIN A PRESCRIBED SET OF ANGLES. THIS ROUTINE ASSUMES THE
037875,001487:                                                                                                  #    VEHICLES ATTITUDE REMAINS STATIONARY DURING ITS OPERATION.
037876,001488: 
037877,001489:                                                                                                  #  CALL     CALL
037878,001490:                                                                                                  #                  GYROTRIM
037879,001491: 
037880,001492:                                                                                                  #  INPUT    THETAD,+1,+2 = DESIRED CDU ANGLES
037881,001493:                                                                                                  #           CDUX,CDUY,CDUZ
037882,001494: 
037883,001495:                                                                                                  #  OUTPUT - GYRO TORQUE PULSES
037884,001496: 
037885,001497:                                                                                                  #  SUBROUTINES- TRG*NBSM,*NBSM*,CDUTRIG,AXISGEN,CALCGTA,IMUFINE
037886,001498:                                                                                                  #               IMPULSE,IMUSTALL
037887,001499:                                                                                                  #             -         -        -        *           *     -
037888,001500:                                                                                                  #  DEBRIS -  CDUSPOT ,SINCDU ,COSCDU , STARAD ,VAC , XDC , OGC
037889,001501: 15,2445                                           COUNT*   $$/P57                                
037890,001502: 15,2445           71220        GYROTRIM           STQ      DLOAD                                 
037891,001503: 15,2446           02745                                    QMIN                                  
037892,001504: 15,2447           01207                                    THETAD                                
037893,001505: 15,2450           65325                           PDDL     PDDL                                  
037894,001506: 15,2451           01211                                    THETAD     +2                         
037895,001507: 15,2452           01210                                    THETAD     +1                         
037896,001508: 15,2453           77666                           VDEF                                           
037897,001509: 15,2454           24767                           STOVL    CDUSPOT                               
037898,001510: 15,2455           22274                                    XUNIT                                 
037899,001511: 15,2456           77624                           CALL                                           
037900,001512: 15,2457           47406                                    TRG*NBSM                              
037901,001513: 15,2460           26707                           STOVL    STARAD                                
037902,001514: 15,2461           22272                                    YUNIT                                 
037903,001515: 15,2462           77624                           CALL                                           
037904,001516: 15,2463           47415                                    *NBSM*                                
037905,001517: 15,2464           36715                           STCALL   STARAD     +6                         
037906,001518: 15,2465           47251                                    CDUTRIG                               
037907,001519: 15,2466           77624                           CALL                                           
037908,001520: 15,2467           30667                                    CALCSMSC                              
037909,001521: 15,2470           77775                           VLOAD                                          
037910,001522: 15,2471           02665                                    XNB                                   
037911,001523: 15,2472           24007                           STOVL    6D                                    
037912,001524: 15,2473           02673                                    YNB                                   
037913,001525: 15,2474           34015                           STCALL   12D                                   
037914,001526: 15,2475           47153                                    AXISGEN                               
037915,001527: 15,2476           77624                           CALL                                           
037916,001528: 15,2477           46757                                    CALCGTA                               
037917,001529: 15,2500           77776                           EXIT                                           
037918,001530: 15,2501           04655        JUSTTRIM           TC       BANKCALL                              
037919,001531: 15,2502           17121                           CADR     IMUFINE                               
037920,001532: 15,2503           04655                           TC       BANKCALL                              
037921,001533: 
037922,001534: 15,2504           17625                           CADR     IMUSTALL                              
037923,001535: 15,2505           05730                           TC       CURTAINS                              
037924,001536: 15,2506           32517                           CA       GYRCDR                                
037925,001537: 15,2507           04655                           TC       BANKCALL                              
037926,001538: 15,2510           17234                           CADR     IMUPULSE                              
037927,001539: 15,2511           04655                           TC       BANKCALL                              
037928,001540: 15,2512           17625                           CADR     IMUSTALL                              
037929,001541: 15,2513           05730                           TC       CURTAINS                              
037930,001542: 15,2514           06014                           TC       INTPRET                               
037931,001543: 15,2515           77650                           GOTO                                           
037932,001544: 15,2516           02745                                    QMIN                                  
037933,001545: 15,2517           02737        GYRCDR             ECADR    OGC                                   
037934,001546: 
037935,001547: 15,2520           04024        V16N20             VN       1620                                  
037936,001548: 15,2521           01405        V06N05*            VN       0605                                  
037937,001549: 15,2522           01427        V06N23             VN       0623                                  
037938,001550: 15,2523           01424        V06N20             VN       0620                                  
037939,001551: 
037940,001552:                                                                                                  #  PERFORM STAR AQUISITION AND STAR SIGHTINGS
037941,001553: 
037942,001554: 15,2524           35026        2STARS             CAF      BIT1                                  #  INITALIZE STARIND
037943,001555: 15,2525           02527                           TC       +2                                    #  ONE FOR 1ST STAR, ZERO FOR 2ND STAR
037944,001556: 15,2526           35030        1STAR              CAF      ZERO                                  
037945,001557: 15,2527           55757                           TS       STARIND                               
037946,001558: 
037947,001559: 15,2530           04655                           TC       BANKCALL                              #  GO TO AOTMARK FOR SIGHTING
037948,001560: 15,2531           16000                           CADR     AOTMARK                               
037949,001561: 15,2532           04655                           TC       BANKCALL                              
037950,001562: 15,2533           17621                           CADR     AOTSTALL                              #  SLEEP TILL SIGHTING DONE
037951,001563: 15,2534           05730                           TC       CURTAINS                              #  BADEND RETURN FROM AOTMARK
037952,001564: 
037953,001565: 15,2535           47715                           CS       HIGH9                                 #  GRAB STARCODE FOR INDEX
037954,001566: 15,2536           70735                           MASK     AOTCODE                               
037955,001567: 15,2537           00006                           EXTEND                                         
037956,001568: 15,2540           76216                           MP       REVCNT                                #  JUST 6
037957,001569: 15,2541           50120                           INDEX    FIXLOC                                
037958,001570: 15,2542           54046                           TS       X1                                    #  CODE X 6 FOR CATLOG STAR INDEX
037959,001571: 15,2543           51757                           INDEX    STARIND                               
037960,001572: 15,2544           55755                           TS       BESTI                                 
037961,001573: 
037962,001574: 15,2545           11757                           CCS      STARIND                               
037963,001575: 15,2546           02557                           TC       ASTAR                                 
037964,001576: 15,2547           06014                           TC       INTPRET                               
037965,001577: 15,2550           77773                           VLOAD*                                         
037966,001578: 15,2551           31734                                    CATLOG,1                              
037967,001579: 15,2552           26731                           STOVL    VEC2                                  #  STORE 2ND CATALOG VEC (REF)
037968,001580: 15,2553           02715                                    STARAD     +6                         
037969,001581: 15,2554           02767                           STORE    STARSAV2                              #  2ND STAR IN SM
037970,001582: 15,2555           77776                           EXIT                                           
037971,001583: 
037972,001584: 15,2556           02567                           TC       SURFLINE                              
037973,001585: 
037974,001586: 15,2557           06014        ASTAR              TC       INTPRET                               
037975,001587: 15,2560           77773                           VLOAD*                                         
037976,001588: 15,2561           31734                                    CATLOG,1                              
037977,001589: 15,2562           26723                           STOVL    VEC1                                  
037978,001590: 15,2563           02715                                    STARAD     +6                         
037979,001591: 15,2564           02761                           STORE    STARSAV1                              #  1ST OBSERVED STAR (SM)
037980,001592: 15,2565           77776                           EXIT                                           
037981,001593: 15,2566           02526                           TC       1STAR                                 #  GO GET 2ND STAR SIGHTING
037982,001594: 
037983,001595:                                                                                                  #  DO FINE OR COARSE ALIGNMENT OF IMU
037984,001596: 
037985,001597: 15,2567           35030        SURFLINE           CAF      ZERO                                  
037986,001598: 15,2570           55757                           TS       STARIND                               
037987,001599: 15,2571           06014                           TC       INTPRET                               
037988,001600: 15,2572           77131                           SSP      AXT,2                                 
037989,001601: 15,2573           00052                                    S2                                    
037990,001602: 15,2574           00006                                    6                                     
037991,001603: 15,2575           00014                                    12D                                   
037992,001604: 15,2576           47173        WRTDESIR           VLOAD*   RTB                                   
037993,001605: 15,2577           75040                                    VEC1       +12D,2                     #  PICK UP VEC IN REF, TRANS TO DESIRED SH
037994,001606: 15,2600           32745                                    UPDATFRF                              
037995,001607: 15,2601           77614                           BON                                            
037996,001608: 15,2602           00314                                    FREEFLAG                              
037997,001609: 15,2603           32774                                    MFREF                                 
037998,001610: 15,2604           53521        WRTDSBAK           MXV      UNIT                                  
037999,001611: 15,2605           03574                                    XSMD                                  
038000,001612: 15,2606           12723                           STORE    STARAD     +12D,2                     #  VEC IN SM
038001,001613: 15,2607           77704                           TIX,2                                          
038002,001614: 15,2610           32576                                    WRTDESIR                              
038003,001615: 15,2611           77774                           AXT,2                                          
038004,001616: 15,2612           00014                                    12D                                   
038005,001617: 15,2613           47173        WRTDESR2           VLOAD*   RTB                                   
038006,001618: 15,2614           75002                                    STARSAV1   +12D,2                     
038007,001619: 15,2615           32745                                    UPDATFRF                              
038008,001620: 15,2616           77614                           BON                                            
038009,001621: 15,2617           00314                                    FREEFLAG                              
038010,001622: 15,2620           33004                                    CALCANG                               
038011,001623: 15,2621           10023        DOALIGN            STORE    18D,2                                 
038012,001624: 15,2622           45104                           TIX,2    CALL                                  
038013,001625: 15,2623           32613                                    WRTDESR2                              
038014,001626: 15,2624           30521                                    R54                                   #  DO CHKSDATA
038015,001627: 15,2625           77624                           CALL                                           
038016,001628: 15,2626           47153                                    AXISGEN                               
038017,001629: 15,2627           77624                           CALL                                           
038018,001630: 15,2630           46757                                    CALCGTA                               
038019,001631: 15,2631           40175        5DEGTEST           VLOAD    BOV                                   #  IF ANGLES GREATER THAN 5 DEGS, DO COARSE
038020,001632: 15,2632           02740                                    OGC                                   
038021,001633: 15,2633           32634                                    SURFSUP                               
038022,001634: 15,2634           02750        SURFSUP            STORE    OGCT                                  
038023,001635: 15,2635           40141                           V/SC     BOV                                   
038024,001636: 15,2636           30102                                    5DEGREES                              
038025,001637: 15,2637           32724                                    COATRIM                               
038026,001638: 15,2640           52131                           SSP      GOTO                                  
038027,001639: 15,2641           02746                                    QMIN                                  
038028,001640: 15,2642           32644                                    SURFDISP                              
038029,001641: 15,2643           32501                                    JUSTTRIM                              #  ANGLES LESS THAN 5 DEG, DO GYRO TORQ
038030,001642: 
038031,001643: 15,2644           77776        SURFDISP           EXIT                                           
038032,001644: 15,2645           05413                           TC       PHASCHNG                              
038033,001645: 15,2646           05024                           OCT      05024                                 #  STORE REFSMMAT ,SET REFSMFLG   AND
038034,001646: 15,2647           13000                           OCT      13000                                 #  DISPLAY ORIGINAL  TORQ ANGLES
038035,001647: 15,2650           06014                           TC       INTPRET                               
038036,001648: 15,2651           75160                           AXC,1    AXC,2                                 
038037,001649: 15,2652           03573                                    XSMD                                  
038038,001650: 15,2653           01735                                    REFSMMAT                              
038039,001651: 15,2654           45014                           SET      CALL                                  
038040,001652: 15,2655           01462                                    REFSMFLG                              
038041,001653: 15,2656           30637                                    MATMOVE                               
038042,001654: 15,2657           45001                           SETPD    CALL                                  
038043,001655: 15,2660           00001                                    0D                                    
038044,001656: 15,2661           47251                                    CDUTRIG                               
038045,001657: 15,2662           45174                           AXT,2    CALL                                  
038046,001658: 15,2663           00014                                    12D                                   
038047,001659: 15,2664           30667                                    CALCSMSC                              
038048,001660: 15,2665           61373        REFMF              VLOAD*   VXM                                   
038049,001661: 15,2666           75070                                    STARAD,2                              
038050,001662: 15,2667           01736                                    REFSMMAT                              
038051,001663: 15,2670           77656                           UNIT                                           
038052,001664: 15,2671           47006                           PUSH     RTB                                   
038053,001665: 15,2672           21454                                    LOADTIME                              
038054,001666: 15,2673           45006                           PUSH     CALL                                  
038055,001667: 15,2674           51245                                    R-TO-RP                               
038056,001668: 15,2675           77731                           SSP                                            
038057,001669: 15,2676           00052                                    S2                                    
038058,001670: 15,2677           00006                                    6                                     
038059,001671: 15,2700           12261                           STORE    STARVSAV,2                            
038060,001672: 15,2701           77304                           TIX,2    VLOAD                                 
038061,001673: 15,2702           32665                                    REFMF                                 
038062,001674: 15,2703           02750                                    OGCT                                  
038063,001675: 15,2704           02740                           STORE    OGC                                   
038064,001676: 15,2705           77776                           EXIT                                           
038065,001677: 
038066,001678: 15,2706           33012                           CAF      DISPGYRO                              #  DISPLAY GYRO TORQ ANGLES V 06N93
038067,001679: 15,2707           04655                           TC       BANKCALL                              
038068,001680: 15,2710           20406                           CADR     GOFLASH                               
038069,001681: 15,2711           04106                           TC       GOTOPOOH                              #  V34-TERMINATE
038070,001682: 15,2712           04106                           TC       GOTOPOOH                              #  VB33-PROCEED TO COARSE OR FINE
038071,001683: 15,2713           41155                           CS       OPTION1                               #  VB32-RECYCLE, MAYBE RE-ALIGN
038072,001684: 15,2714           75025                           MASK     BIT2                                  
038073,001685: 15,2715           10000                           CCS      A                                     
038074,001686: 15,2716           04106                           TC       GOTOPOOH                              #  IF OPTION ZERO DO FINISHH
038075,001687: 15,2717           31155                           CA       OPTION1                               
038076,001688: 15,2720           75026                           MASK     BIT1                                  
038077,001689: 15,2721           10000                           CCS      A                                     
038078,001690: 15,2722           02526                           TC       1STAR                                 
038079,001691: 15,2723           02524                           TC       2STARS                                
038080,001692: 
038081,001693:                                                                                                  #  COARSE AND FINE ALIGN IMU
038082,001694: 15,2724           75160        COATRIM            AXC,1    AXC,2                                 
038083,001695: 15,2725           02664                                    XDC                                   
038084,001696: 15,2726           02642                                    XSM                                   
038085,001697: 15,2727           77624                           CALL                                           
038086,001698: 15,2730           30637                                    MATMOVE                               
038087,001699: 15,2731           77624                           CALL                                           
038088,001700: 15,2732           47251                                    CDUTRIG                               
038089,001701: 15,2733           77624                           CALL                                           
038090,001702: 15,2734           30667                                    CALCSMSC                              
038091,001703: 15,2735           77624                           CALL                                           
038092,001704: 15,2736           47063                                    CALCGA                                
038093,001705: 15,2737           77624                           CALL                                           
038094,001706: 15,2740           31106                                    COARSE                                
038095,001707: 15,2741           77624                           CALL                                           
038096,001708: 15,2742           32445                                    GYROTRIM                              
038097,001709: 15,2743           77650                           GOTO                                           
038098,001710: 15,2744           32644                                    SURFDISP                              
038099,001711: 
038100,001712: 15,2745           45024        UPDATFRF           CS       FREEFBIT                              
038101,001713: 15,2746           70074                           MASK     FLAGWRD0                              
038102,001714: 15,2747           54074                           TS       FLAGWRD0                              
038103,001715: 
038104,001716: 15,2750           35012                           CAF      REFSMBIT                              
038105,001717: 15,2751           70077                           MASK     FLAGWRD3                              
038106,001718: 15,2752           10000                           CCS      A                                     
038107,001719: 15,2753           35024                           CAF      BIT3                                  
038108,001720: 15,2754           61155                           AD       OPTION1                               
038109,001721: 15,2755           50000                           INDEX    A                                     
038110,001722: 15,2756           35017                           CAF      BIT8                                  
038111,001723: 15,2757           51757                           INDEX    STARIND                               
038112,001724: 15,2760           72770                           MASK     FREEFTAB                              
038113,001725: 15,2761           10000                           CCS      A                                     
038114,001726: 15,2762           02766                           TC       +4                                    
038115,001727: 15,2763           35024                           CAF      FREEFBIT                              
038116,001728: 15,2764           60074                           AD       FLAGWRD0                              
038117,001729: 15,2765           54074                           TS       FLAGWRD0                              
038118,001730: 
038119,001731: 15,2766           25757                           INCR     STARIND                               
038120,001732: 15,2767           16035                           TCF      DANZIG                                
038121,001733: 
038122,001734: 15,2770           00052        FREEFTAB           OCT      00052                                 
038123,001735: 15,2771           00077                           OCT      00077                                 
038124,001736: 15,2772           00042                           OCT      00042                                 
038125,001737: 15,2773           00063                           OCT      00063                                 
038126,001738: 
038127,001739: 15,2774           41401        MFREF              SETPD    PUSH                                  
038128,001740: 15,2775           00001                                    0                                     
038129,001741: 15,2776           41434                           RTB      PUSH                                  
038130,001742: 15,2777           21454                                    LOADTIME                              
038131,001743: 15,3000           77624                           CALL                                           
038132,001744: 15,3001           51220                                    RP-TO-R                               
038133,001745: 15,3002           77650                           GOTO                                           
038134,001746: 15,3003           32604                                    WRTDSBAK                              
038135,001747: 
038136,001748: 15,3004           77624        CALCANG            CALL                                           
038137,001749: 15,3005           47251                                    CDUTRIG                               
038138,001750: 15,3006           77624                           CALL                                           
038139,001751: 15,3007           47415                                    *NBSM*                                
038140,001752: 15,3010           77650                           GOTO                                           
038141,001753: 15,3011           32621                                    DOALIGN                               
038142,001754: 
038143,001755: 15,3012           01535        DISPGYRO           VN       0693                                  
038144,001756: 
038145,001757:                                                                                                  #  LUNAR SURFACE IMU ALIGNMENT PROGRAM
038146,001758: 
038147,001759: 15,3013           04655        P57                TC       BANKCALL                              #  IS ISS ON - IF NOT, IMUCHK WILL SEND
038148,001760: 15,3014           33205                           CADR     IMUCHK                                #  ALARM CODE 210 AND EXIT VIA GOTOPOOH.
038149,001761: 
038150,001762: 15,3015           06014                           TC       INTPRET                               
038151,001763: 15,3016           43145                           DLOAD    BOFF                                  
038152,001764: 15,3017           22276                                    ZEROVEC                               #  LOAD ZERO FOR DISPLAY IF ASCNTFLG IS
038153,001765: 15,3020           03355                                    ASCNTFLG                              #  NOT SET
038154,001766: 15,3021           33024                                    P57A                                  
038155,001767: 15,3022           77745                           DLOAD                                          
038156,001768: 15,3023           03425                                    TIG                                   #  LOAD ASCENT TIME FOR DISPLAY
038157,001769: 15,3024           01047        P57A               STORE    DSPTEM1                               
038158,001770: 15,3025           77776                           EXIT                                           
038159,001771: 15,3026           33204        P57AA              CAF      V06N34                                #  DISPLAY TALIGN, TALIGN : DSPTEM1
038160,001772: 15,3027           04655                           TC       BANKCALL                              
038161,001773: 15,3030           20406                           CADR     GOFLASH                               
038162,001774: 15,3031           03026                           TC       P57AA                                 #  V34-TERMINATE
038163,001775: 15,3032           03034                           TC       +2                                    #  V33-PROCEED
038164,001776: 15,3033           03026                           TC       P57AA                                 #  VB32-RECYCLE
038165,001777: 
038166,001778: 15,3034           06014                           TC       INTPRET                               
038167,001779: 15,3035           46145                           DLOAD    BHIZ                                  
038168,001780: 15,3036           01047                                    DSPTEM1                               
038169,001781: 15,3037           33042                                    P57B                                  
038170,001782: 15,3040           77650                           GOTO                                           
038171,001783: 15,3041           33045                                    P57D                                  
038172,001784: 15,3042           77634        P57B               RTB                                            
038173,001785: 15,3043           21454                                    LOADTIME                              #  LOAD CURRENT TIME
038174,001786: 15,3044           01047                           STORE    DSPTEM1                               
038175,001787: 15,3045           34041        P57D               STCALL   TDEC1                                 
038176,001788: 15,3046           27030                                    LEMPREC                               #  COMPUTE DESIRED IMU ORIENTATION STORE
038177,001789: 15,3047           53575                           VLOAD    UNIT                                  #  IN  X,Y,ZSMD
038178,001790: 15,3050           00001                                    RATT                                  
038179,001791: 15,3051           37574                           STCALL   XSMD                                  
038180,001792: 15,3052           33217                                    LSORIENT                              
038181,001793: 15,3053           43170        PACKOPTN           AXT,1    BOFF                                  #  PACK FLAG BITS FOR OPTION DISPLAY
038182,001794: 15,3054           00000                                    0                                     
038183,001795: 15,3055           01742                                    REFSMFLG                              #  REFSMFLG
038184,001796: 15,3056           33061                                    +3                                    #  CLEAR-JUST ZERO
038185,001797: 15,3057           77710                           INCR,1                                         #  SET
038186,001798: 15,3060           00100                                    100                                   
038187,001799: 15,3061           62014                           BOFF     INCR,1                                
038188,001800: 15,3062           03356                                    ATTFLAG                               #  ATTFLG
038189,001801: 15,3063           33065                                    +2                                    #  CLEAR-JUST ZERO
038190,001802: 15,3064           00010                                    10                                    #  SET
038191,001803: 15,3065           62014                           BOFF     INCR,1                                
038192,001804: 15,3066           03355                                    ASCNTFLG                              #  ASCNTFLG
038193,001805: 15,3067           33071                                    +2                                    #  CLEAR-JUST ZERO
038194,001806: 15,3070           00001                                    1                                     #  SET
038195,001807: 15,3071           77530                           SXA,1    EXIT                                  
038196,001808: 15,3072           01156                                    OPTION1    +1                         
038197,001809: 
038198,001810: 15,3073           35030                           CAF      ZERO                                  
038199,001811: 15,3074           55155                           TS       OPTION1                               #  JAM 00000 IN OPTION1 FOR CHECK LIST
038200,001812: 
038201,001813: 15,3075           33203        DSPOPTN            CAF      VB04N06                               #  DISPLAY OPTION CODE AND FLAG BITS
038202,001814: 15,3076           04655                           TC       BANKCALL                              
038203,001815: 15,3077           20406                           CADR     GOFLASH                               
038204,001816: 15,3100           03075                           TC       DSPOPTN                               #  VB34-TERMINATE
038205,001817: 15,3101           03103                           TC       +2                                    #  V33-PROCEED
038206,001818: 15,3102           03075                           TC       DSPOPTN                               #  V32-RECYCLE
038207,001819: 
038208,001820: 15,3103           05413                           TC       PHASCHNG                              
038209,001821: 15,3104           05024                           OCT      05024                                 
038210,001822: 15,3105           13000                           OCT      13000                                 
038211,001823: 15,3106           31155                           CA       OPTION1                               #  SEE IF OPTION 2 OR 3
038212,001824: 15,3107           75025                           MASK     BIT2                                  
038213,001825: 15,3110           10000                           CCS      A                                     
038214,001826: 15,3111           03163                           TC       BYLMATT                               
038215,001827: 
038216,001828: 15,3112           06014                           TC       INTPRET                               
038217,001829: 15,3113           43014                           BON      BON                                   
038218,001830: 15,3114           01702                                    REFSMFLG                              
038219,001831: 15,3115           33130                                    GETLMATT                              #  SET, GO COMPUTE LM ATTITUDE
038220,001832: 15,3116           03316                                    ATTFLAG                               #  CLEAR-CHECK ATTFLAG FOR STORED ATTITUDE.
038221,001833: 15,3117           33145                                    P57OPT0                               #  ALLFLG SET
038222,001834: 15,3120           77776                           EXIT                                           
038223,001835: 15,3121           33202        BADOPTN            CAF      BADOPT                                
038224,001836: 15,3122           04655                           TC       BANKCALL                              
038225,001837: 15,3123           21443                           CADR     PRIOLARM                              
038226,001838: 15,3124           03121                           TC       BADOPTN                               
038227,001839: 15,3125           03121                           TC       BADOPTN                               
038228,001840: 15,3126           03075                           TC       DSPOPTN                               
038229,001841: 15,3127           05225                           TC       ENDOFJOB                              
038230,001842: 
038231,001843:                                                                                                  #  BRANCH TO ALIGNMENT OPTION
038232,001844: 
038233,001845: 15,3130           77624        GETLMATT           CALL                                           
038234,001846: 15,3131           47251                                    CDUTRIG                               #  GET SIN AND COS OF CDUS
038235,001847: 15,3132           77624                           CALL                                           
038236,001848: 15,3133           30667                                    CALCSMSC                              #  GET YNB IN SM
038237,001849: 15,3134           61375                           VLOAD    VXM                                   
038238,001850: 15,3135           02673                                    YNB                                   
038239,001851: 15,3136           01736                                    REFSMMAT                              #   YNB TO REF
038240,001852: 15,3137           77656                           UNIT                                           
038241,001853: 15,3140           26245                           STOVL    YNBSAV                                
038242,001854: 15,3141           02701                                    ZNB                                   
038243,001855: 15,3142           53505                           VXM      UNIT                                  
038244,001856: 15,3143           01736                                    REFSMMAT                              #  ZNB TO REF
038245,001857: 15,3144           02253                           STORE    ZNBSAV                                
038246,001858: 
038247,001859: 15,3145           77775        P57OPT0            VLOAD                                          
038248,001860: 15,3146           02245                                    YNBSAV                                #  Y ATTITUDE VEC
038249,001861: 15,3147           26723                           STOVL    VEC1                                  
038250,001862: 15,3150           02253                                    ZNBSAV                                #  Z ATTITUDE VEC
038251,001863: 15,3151           26731                           STOVL    VEC2                                  
038252,001864: 15,3152           22272                                    YUNIT                                 
038253,001865: 15,3153           26761                           STOVL    STARSAV1                              
038254,001866: 15,3154           22270                                    ZUNIT                                 
038255,001867: 15,3155           02767                           STORE    STARSAV2                              
038256,001868: 15,3156           77776                           EXIT                                           
038257,001869: 15,3157           41155                           CS       OPTION1                               
038258,001870: 15,3160           75026                           MASK     BIT1                                  #  SEE IF OPTION 1 OR 3
038259,001871: 15,3161           10000                           CCS      A                                     
038260,001872: 15,3162           02567                           TC       SURFLINE                              
038261,001873: 
038262,001874: 15,3163           41155        BYLMATT            CS       OPTION1                               #  SEE IF OPTION 1 OR 3
038263,001875: 15,3164           75026                           MASK     BIT1                                  
038264,001876: 15,3165           10000                           CCS      A                                     
038265,001877: 15,3166           02524                           TC       2STARS                                
038266,001878: 15,3167           02247                           TC       GVDETER                               
038267,001879: 
038268,001880:                                                                                                  #  OPTION 3, GET LANDING SITE VEC AND ONE STAR SIGHTING
038269,001881: 
038270,001882: 15,3170           06014        P57OPT3            TC       INTPRET                               
038271,001883: 15,3171           57575                           VLOAD    VCOMP                                 
038272,001884: 15,3172           02025                                    RLS                                   #  LANDING SITE VEC
038273,001885: 15,3173           77656                           UNIT                                           
038274,001886: 15,3174           02723                           STORE    VEC1                                  
038275,001887: 15,3175           77776                           EXIT                                           
038276,001888: 15,3176           31155                           CA       OPTION1                               
038277,001889: 15,3177           75025                           MASK     BIT2                                  
038278,001890: 15,3200           02526                           TC       1STAR                                 
038279,001891: 15,3201           02567                           TC       SURFLINE                              
038280,001892: 
038281,001893: 15,3202           00701        BADOPT             OCT      00701                                 #  **** TEMP ****
038282,001894: 15,3203           01006        VB04N06            VN       406                                   
038283,001895: 15,3204           01442        V06N34             VN       634                                   
038284,001896: 
038285,001897:                                                                                                  #  CHECK IMODES30 TO VARIFY IMU IS ON
038286,001898: 
038287,001899: 15,3205           41304        IMUCHK             CS       IMODES30                              
038288,001900: 15,3206           75016                           MASK     BIT9                                  
038289,001901: 15,3207           10000                           CCS      A                                     #  IS IMU ON
038290,001902: 15,3210           13214                           TCF      +4                                    #  YES
038291,001903: 
038292,001904: 15,3211           05646                           TC       ALARM                                 #  NO, SEND ALARM AND EXIT
038293,001905: 15,3212           00210                           OCT      210                                   
038294,001906: 15,3213           04106                           TC       GOTOPOOH                              
038295,001907: 
038296,001908: 15,3214           05563                           TC       UPFLAG                                
038297,001909: 15,3215           00007                           ADRES    IMUSE                                 #  SET IMUSE FLAG
038298,001910: 
038299,001911: 15,3216           04670                           TC       SWRETURN                              
038300,001912: 
038301,001913: 15,3217           71220        LSORIENT           STQ      DLOAD                                 
038302,001914: 15,3220           02746                                    QMAJ                                  
038303,001915: 15,3221           01047                                    DSPTEM1                               
038304,001916: 15,3222           34041                           STCALL   TDEC1                                 
038305,001917: 15,3223           27014                                    CSMPREC                               
038306,001918: 15,3224           47375                           VLOAD    VXV                                   
038307,001919: 15,3225           00001                                    0D                                    
038308,001920: 15,3226           00007                                    6D                                    
038309,001921: 15,3227           53435                           VXV      UNIT                                  
038310,001922: 15,3230           03574                                    XSMD                                  
038311,001923: 15,3231           03610                           STORE    ZSMD                                  
038312,001924: 15,3232           53435                           VXV      UNIT                                  
038313,001925: 15,3233           03574                                    XSMD                                  
038314,001926: 15,3234           37602                           STCALL   YSMD                                  
038315,001927: 15,3235           02746                                    QMAJ                                  

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