Source Code

These source code files are an attempted reconstruction of Sundance revision 306, 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
These dumps were then modified using memos, checklists, observed address changes, and the Sundance GSOPs to get the entire program to match Sundance revision 306 as closely as possible. Without more information, it is not possible to say how close it actually is; however, this code should be quite close. It is capable of flying the whole Apollo 9 mission using the original checklists and padload. 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.

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

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