Source Code

These source-code files are part of a reconstructed copy of Aurora 88, the final release of the Lunar Module (LM) Apollo Guidance Computer (AGC) system test software.

They have been created via disassembly of binary dumps of original core rope memory modules, part numbers 2003972-011, 2003972-091, and 2003972-111, belonging to Steve Jurvetson.

Since only binary dumps (rather than listings) of Aurora 88 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.

015368,000002:                                                                                                  ## Copyright:   Public domain.
015369,000003:                                                                                                  ## Filename:    INFLIGHT_ALIGNMENT_ROUTINES.agc
015370,000004:                                                                                                  ## Purpose:     A section of Aurora 88.
015371,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
015372,000006:                                                                                                  ##              release of the Lunar Module system test software. No original
015373,000007:                                                                                                  ##              listings of this program are available; instead, this file
015374,000008:                                                                                                  ##              was created via disassembly of dumps of Aurora 88 core rope
015375,000009:                                                                                                  ##              modules and comparison with other AGC programs.
015376,000010:                                                                                                  ## Assembler:   yaYUL
015377,000011:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
015378,000012:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
015379,000013:                                                                                                  ## Mod history: 2023-06-30 MAS  Created from Aurora 12.
015380,000014:                                                                                                  ##              2023-07-12 MAS  Updated for Aurora 88.
015381,000015: 
015382,000016: 
015383,000017: 15,2367                                           SETLOC   ENDDNTMS                              
015384,000018: 15,2367  E5,1400                                  EBANK=   XSM                                   
015385,000019: 
015386,000020: 
015387,000021: 
015388,000022:                                                                                                  #  CALCGTA COMPUTES THE GYRO TORQUE ANGLES REQUIRED TO BRING THE STABLE MEMBER INTO THE DESIRED ORIENTATION.
015389,000023: 
015390,000024:                                                                                                  #  THE INPUT IS THE DESIRED STABLE MEMBER COORDINATES REFERRED TO PRESENT STABLE MEMBER COORDINATES. THE THREE
015391,000025:                                                                                                  #  HALF-UNIT VECTORS ARE STORED AT XDC, YDC, AND ZDC.
015392,000026: 
015393,000027:                                                                                                  #  THE OUTPUTS ARE THE THREE GYRO TORQUING ANGLES TO BE APPLIED TO THE Y, Z, AND X GYROS AND ARE STORED DP AT IGC,
015394,000028:                                                                                                  #  MGC, AND OGC RESPECTIVELY. ANGLES ARE SCALED PROPERLY FOR IMUPULSE.
015395,000029: 
015396,000030: 
015397,000031: 
015398,000032: 15,2367           71230        CALCGTA            ITA      DLOAD                                 #  PUSHDOWN 00,02,16D,18D,22D-26D,32D-36D
015399,000033: 15,2370           00051                                    S2                                    #  XDC = (XD1 XD2 XD3)
015400,000034: 15,2371           01423                                    XDC                                   #  YDC = (YD1 YD2 YD3)
015401,000035: 15,2372           65325                           PDDL     PDDL                                  #  ZDC = (ZD1 ZD2 ZD3)
015402,000036: 15,2373           33160                                    ZERODP                                
015403,000037: 15,2374           01427                                    XDC        +4                         
015404,000038: 15,2375           55476                           DCOMP    VDEF                                  
015405,000039: 15,2376           77656                           UNIT                                           
015406,000040: 15,2377           06027                           STODL    ZPRIME                                #  ZP = UNIT(-XD3 O XD1) = (ZP1 ZP2 ZP3)
015407,000041: 15,2400           00027                                    ZPRIME                                
015408,000042: 
015409,000043: 15,2401           77742                           SR1                                            
015410,000044: 15,2402           06023                           STODL    SINTH                                 #  SIN(IGC) = ZP1
015411,000045: 15,2403           00033                                    ZPRIME     +4                         
015412,000046: 15,2404           77742                           SR1                                            
015413,000047: 15,2405           36021                           STCALL   COSTH                                 #  COS(IGC) = ZP3
015414,000048: 15,2406           32440                                    ARCTRIG                               
015415,000049: 
015416,000050: 15,2407           07503                           STODL    IGC                                   #  Y GYRO TORQUING ANGLE  FRACTION OF REV.
015417,000051: 15,2410           01425                                    XDC        +2                         
015418,000052: 15,2411           77742                           SR1                                            
015419,000053: 15,2412           06023                           STODL    SINTH                                 #  SIN(MGC) = XD2
015420,000054: 15,2413           00027                                    ZPRIME                                
015421,000055: 
015422,000056: 15,2414           65205                           DMP      PDDL                                  
015423,000057: 15,2415           01427                                    XDC        +4                         #  PD00 = (ZP1)(XD3)
015424,000058: 15,2416           00033                                    ZPRIME     +4                         
015425,000059: 
015426,000060: 15,2417           45205                           DMP      DSU                                   
015427,000061: 15,2420           01423                                    XDC                                   #  MPAC = (ZP3)(XD1)
015428,000062: 15,2421           77626                           STADR                                          
015429,000063: 15,2422           41756                           STCALL   COSTH                                 #  COS(MGC) = MPAC - PD00
015430,000064: 15,2423           32440                                    ARCTRIG                               
015431,000065: 
015432,000066: 15,2424           23505                           STOVL    MGC                                   #  Z GYRO TORQUING ANGLE  FRACTION OF REV.
015433,000067: 15,2425           00027                                    ZPRIME                                
015434,000068: 15,2426           77641                           DOT                                            
015435,000069: 15,2427           01437                                    ZDC                                   
015436,000070: 15,2430           22021                           STOVL    COSTH                                 #  COS(OGC) = ZP . ZDC
015437,000071: 15,2431           00027                                    ZPRIME                                
015438,000072: 15,2432           77641                           DOT                                            
015439,000073: 15,2433           01431                                    YDC                                   
015440,000074: 15,2434           36023                           STCALL   SINTH                                 #  SIN(OGC) = ZP . YDC
015441,000075: 15,2435           32440                                    ARCTRIG                               
015442,000076: 
015443,000077: 15,2436           37501                           STCALL   OGC                                   #  X GYRO TORQUING ANGLE  FRACTION OF REV.
015444,000078: 15,2437           00051                                    S2                                    
015445,000079: 
015446,000080:                                                                                                  #  ARCTRIG COMPUTES AN ANGLE GIVEN THE SINE AND COSINE OF THIS ANGLE.
015447,000081: 
015448,000082:                                                                                                  #  THE INPUTS ARE SIN/4 AND COS/4 STORED DP AT SINTH AND COSTH.
015449,000083: 
015450,000084:                                                                                                  #  THE OUTPUT IS THE CALCULATED ANGLE BETWEEN +.5 AND -.5 REVOLUTIONS AND STORED AT THETA. THE OUTPUT IS ALSO
015451,000085:                                                                                                  #  AVAILABLE AT MPAC.
015452,000086: 
015453,000087: 
015454,000088: 
015455,000089: 15,2440           51545        ARCTRIG            DLOAD    ABS                                   #  PUSHDOWN 16D,18D,20D,22D-26D
015456,000090: 15,2441           00023                                    SINTH                                 
015457,000091: 15,2442           50025                           DSU      BMN                                   
015458,000092: 15,2443           33146                                    QTSN45                                #  ABS(SIN/4) - SIN(45)/4
015459,000093: 15,2444           32453                                    TRIG1                                 #  IF (-45,45) OR (135,-135)
015460,000094: 
015461,000095: 
015462,000096: 
015463,000097: 15,2445           72545                           DLOAD    SL1                                   #  (45,135) OR (-135,-45)
015464,000098: 15,2446           00021                                    COSTH                                 
015465,000099: 15,2447           75326                           ACOS     SIGN                                  
015466,000100: 15,2450           00023                                    SINTH                                 
015467,000101: 15,2451           00025                           STORE    THETA                                 #  X = ARCCOS(COS) WITH SIGN(SIN)
015468,000102: 15,2452           77616                           RVQ                                            
015469,000103: 
015470,000104: 
015471,000105: 
015472,000106: 15,2453           72545        TRIG1              DLOAD    SL1                                   #  (-45,45) OR (135,-135)
015473,000107: 15,2454           00023                                    SINTH                                 
015474,000108: 15,2455           77736                           ASIN                                           
015475,000109: 15,2456           06025                           STODL    THETA                                 #  X = ARCSIN(SIN) WITH SIGN(SIN)
015476,000110: 15,2457           00021                                    COSTH                                 
015477,000111: 15,2460           77640                           BMN                                            
015478,000112: 15,2461           32464                                    TRIG2                                 #  IF (135,-135)
015479,000113: 
015480,000114: 15,2462           43545                           DLOAD    RVQ                                   
015481,000115: 15,2463           00025                                    THETA                                 #  X = ARCSIN(SIN)   (-45,45)
015482,000116: 
015483,000117: 
015484,000118: 
015485,000119: 15,2464           75345        TRIG2              DLOAD    SIGN                                  #  (135,-135)
015486,000120: 15,2465           33150                                    HALFDP                                
015487,000121: 15,2466           00023                                    SINTH                                 
015488,000122: 15,2467           77625                           DSU                                            
015489,000123: 15,2470           00025                                    THETA                                 
015490,000124: 15,2471           00025                           STORE    THETA                                 #  X = .5 WITH SIGN(SIN) - ARCSIN(SIN)
015491,000125: 15,2472           77616                           RVQ                                            #                   (+) - (+) OR (-) - (-)
015492,000126: 
015493,000127:                                                                                                  #  SMNB TRANSFORMS A STAR DIRECTION FROM STABLE MEMBER TO NAVIGATION BASE COORDINATES.
015494,000128: 
015495,000129:                                                                                                  #  THE INPUTS ARE 1) THE STAR VECTOR REFERRED TO PRESENT STABLE MEMBER COORDINATES STORED AT LOCATION 32D OF THE
015496,000130:                                                                                                  #  VAC AREA. 2) THE GIMBAL ANGLES (CDUY,CDUZ,CDUX) STORED AT ALTERNATING LOCATIONS RESPECTIVELY. THE ANGLES ARE
015497,000131:                                                                                                  #  USUALLY STORED AT LOCATIONS 2,4, AND 6 OF THE MARK VAC AREA. THEY CAN BE STORED AT LOCATIONS 20,22, AND 24 OF
015498,000132:                                                                                                  #  YOUR JOB VAC AREA. 3) THE BASE ADDRESS OF THE GIMBAL ANGLES STORED SP AT LOCATION S1 OF yOUR JOB VAC AREA.
015499,000133: 
015500,000134:                                                                                                  #  THE OUTPUT IS THE STAR VECTOR REFERRED TO NAVIGATION BASE COORDINATES STORED AT 32D OF THE VAC AREA. THE OUTPUT
015501,000135:                                                                                                  #  IS ALSO AVAILABLE AT MPAC.
015502,000136: 
015503,000137: 
015504,000138: 
015505,000139: 15,2473           43030        SMNB               ITA      CLEAR                                 #  PUSHDOWN 00,02,04-10D,30D,32D-36D
015506,000140: 15,2474           00051                                    S2                                    
015507,000141: 15,2475           00264                                    NBSMBIT                               #  SET NBSMBIT = 0
015508,000142: 
015509,000143: 15,2476           77170        SMNB1              AXT,1    AXT,2                                 #  ROTATE X,Z, ABOUT Y
015510,000144: 15,2477           00004                                    4                                     
015511,000145: 15,2500           00000                                    0                                     
015512,000146: 15,2501           77634                           CALL                                           
015513,000147: 15,2502           32543                                    AXISROT                               
015514,000148: 
015515,000149: 15,2503           77170                           AXT,1    AXT,2                                 #  ROTATE Y,X ABOUT Z
015516,000150: 15,2504           00002                                    2                                     
015517,000151: 15,2505           00004                                    4                                     
015518,000152: 15,2506           77634                           CALL                                           
015519,000153: 15,2507           32543                                    AXISROT                               
015520,000154: 
015521,000155: 15,2510           77170                           AXT,1    AXT,2                                 #  ROTATE Z,Y ABOUT X
015522,000156: 15,2511           00000                                    0                                     
015523,000157: 15,2512           00002                                    2                                     
015524,000158: 15,2513           77634                           CALL                                           
015525,000159: 15,2514           32543                                    AXISROT                               
015526,000160: 
015527,000161: 15,2515           77650                           GOTO                                           
015528,000162: 15,2516           00051                                    S2                                    
015529,000163: 
015530,000164:                                                                                                  #  NBSM TRANSFORMS A STAR DIRECTION FROM NAVIGATION BASE TO STABLE MEMBER COORDINATES.
015531,000165: 
015532,000166:                                                                                                  #  THE INPUTS ARE  1) THE STAR VECTOR REFERRED TO NAVIGATION BASE COORDINATES STORED AT LOCATION 32D OF THE VAC
015533,000167:                                                                                                  #  AREA.  2) THE GIMBAL ANGLES (CDUY,CDUZ,CDUX) STORED AT ALTERNATING LOCATIONS RESPECTIVELY. THE ANGLES ARE
015534,000168:                                                                                                  #  USUALLY STORED AT LOCATIONS 2,4, AND 6 OF THE MARK VAC AREA. THEY CAN BE STORED AT LOCATIONS 20,22, AND 24 OF
015535,000169:                                                                                                  #  YOUR JOB VAC AREA.  3) THE BASE ADDRESS OF THE GIMBAL ANGLES STORED SP AT LOCATION S1 OF YOUR JOB VAC AREA.
015536,000170: 
015537,000171:                                                                                                  #  THE OUTPUT IS THE STAR VECTOR REFERRED TO PRESENT STABLE MEMBER COORDINATES STORED AT LOCATION 32D OF THE VAC
015538,000172:                                                                                                  #  AREA. THE OUTPUT IS ALSO AVAILABLE AT MPAC.
015539,000173: 
015540,000174: 
015541,000175: 15,2517           43030        NBSM               ITA      SET                                   #  PUSHDOWN 00,02,04-10D,30D,32D-36D
015542,000176: 15,2520           00051                                    S2                                    
015543,000177: 15,2521           00064                                    NBSMBIT                               #  SET NBSMBIT = 1
015544,000178: 
015545,000179: 15,2522           77170        NBSM2              AXT,1    AXT,2                                 #  ROTATE Z,Y ABOUT X
015546,000180: 15,2523           00000                                    0                                     
015547,000181: 15,2524           00002                                    2                                     
015548,000182: 15,2525           77634                           CALL                                           
015549,000183: 15,2526           32543                                    AXISROT                               
015550,000184: 
015551,000185: 15,2527           77170                           AXT,1    AXT,2                                 #  ROTATE Y,X ABOUT Z
015552,000186: 15,2530           00002                                    2                                     
015553,000187: 15,2531           00004                                    4                                     
015554,000188: 15,2532           77634                           CALL                                           
015555,000189: 15,2533           32543                                    AXISROT                               
015556,000190: 
015557,000191: 15,2534           77170                           AXT,1    AXT,2                                 #  ROTATE X,Z, ABOUT Y
015558,000192: 15,2535           00004                                    4                                     
015559,000193: 15,2536           00000                                    0                                     
015560,000194: 15,2537           77634                           CALL                                           
015561,000195: 15,2540           32543                                    AXISROT                               
015562,000196: 
015563,000197: 15,2541           77650                           GOTO                                           
015564,000198: 15,2542           00051                                    S2                                    
015565,000199: 
015566,000200:                                                                                                  #  AXISROT IS UTILIZED BY THE SMNB AND NBSM ROUTINES. SEE REMARKS ON THESE ROUTINES FOR INPUTS AND OUTPUTS.
015567,000201: 
015568,000202: 
015569,000203: 
015570,000204: 15,2543           66660        AXISROT            XSU,1    SLOAD*                                
015571,000205: 15,2544           00050                                    S1                                    #       SMNB         .       NBSM
015572,000206: 15,2545           00005                                    4,1                                   #  IG    MG    OG    .  OG    MG    IG
015573,000207: 15,2546           56024                           RTB      XAD,1                                 
015574,000208: 15,2547           33463                                    CDULOGIC                              
015575,000209: 15,2550           00050                                    S1                                    
015576,000210: 15,2551           00037                           STORE    30D                                   
015577,000211: 
015578,000212: 15,2552           77746        ACCUROT            COS                                            
015579,000213: 15,2553           10011                           STODL    8D,1                                  #               COS(ANGLE)
015580,000214: 15,2554           00037                                    30D                                   
015581,000215: 15,2555           77756                           SIN                                            
015582,000216: 15,2556           02013                           STORE    10D,1                                 #               SIN(ANGLE)
015583,000217: 
015584,000218: 15,2557           72403                           DMP*     SL1                                   
015585,000219: 15,2560           77732                                    32D        +4,2                       
015586,000220: 15,2561           40723                           PDDL*    DMP*                                  #                   PD0
015587,000221: 15,2562           00011                                    8D,1                                  #  S3SIN S1SIN S2SIN . S2SIN S1SIN S3SIN
015588,000222: 15,2563           77732                                    32D        +4,2                       
015589,000223: 
015590,000224: 15,2564           64752                           SL1      PDDL*                                 #                   PD2
015591,000225: 15,2565           00013                                    10D,1                                 #  S3COS S1COS S2COS . S2COS S1COS S3COS
015592,000226: 
015593,000227: 15,2566           72403                           DMP*     SL1                                   #                  MPAC
015594,000228: 15,2567           00045                                    32D        +4,1                       #  S1SIN S2SIN S3SIN . S3SIN S2SIN S1SIN
015595,000229: 
015596,000230: 15,2570           77614                           BOFF                                           
015597,000231: 15,2571           00344                                    NBSMBIT                               
015598,000232: 15,2572           32604                                    AXISROT1                              
015599,000233: 
015600,000234: 15,2573           45421                           BDSU     STADR                                 #                    .   PD2 - MPAC
015601,000235: 15,2574           57732                           STODL*   32D        +4,2                       #                    . S2    S1    S3
015602,000236: 15,2575           00011                                    8D,1                                  
015603,000237: 
015604,000238: 15,2576           72403                           DMP*     SL1                                   #                    .      MPAC
015605,000239: 15,2577           00045                                    32D        +4,1                       #                    . S3COS S2COS S1COS
015606,000240: 
015607,000241: 15,2600           45415                           DAD      STADR                                 #                    .   PD0 + MPAC
015608,000242: 15,2601           53732                           STOVL    32D        +4,1                       #                    . S3    S2    S1
015609,000243: 15,2602           00041                                    32D                                   
015610,000244: 15,2603           77616                           RVQ                                            
015611,000245: 
015612,000246: 15,2604           45415        AXISROT1           DAD      STADR                                 #    MPAC + PD2      .
015613,000247: 15,2605           57732                           STODL*   32D        +4,2                       #  S3    S1    S2    .
015614,000248: 15,2606           00011                                    8D,1                                  
015615,000249: 15,2607           72403                           DMP*     SL1                                   #       MPAC         .
015616,000250: 15,2610           00045                                    32D        +4,1                       #  S1COS S2COS S3COS .
015617,000251: 
015618,000252: 15,2611           45425                           DSU      STADR                                 #    MPAC - PD0      .
015619,000253: 15,2612           53732                           STOVL    32D        +4,1                       #  S1    S2    S3    .
015620,000254: 15,2613           00041                                    32D                                   
015621,000255: 15,2614           77616                           RVQ                                            
015622,000256: 
015623,000257:                                                                                                  #  CALCGA COMPUTES THE CDU DRIVING ANGLES REQUIRED TO BRING THE STABLE MEMBER INTO THE DESIRED ORIENTATION.
015624,000258: 
015625,000259:                                                                                                  #  THE INPUTS ARE  1) THE NAVIGATION BASE COORDINATES REFERRED TO ANY COORDINATE SYSTEM.  THE THREE HALF-UNIT
015626,000260:                                                                                                  #  VECTORS ARE STORED AT XNB, YNB, AND ZNB.  2) THE DESIRED STABLE MEMBER COORDINATES REFERRED TO THE SAME
015627,000261:                                                                                                  #  COORDINATE SYSTEM ARE STORED AT XSM, YSM, AND ZSM.
015628,000262: 
015629,000263:                                                                                                  #  THE OUTPUTS ARE THE THREE CDU DRIVING ANGLES AND ARE STORED SP AT THETAD, THETAD +1, AND THETAD +2.
015630,000264: 
015631,000265: 15,2615           47375        CALCGA             VLOAD    VXV                                   #  PUSHDOWN 00-04,16D,18D
015632,000266: 15,2616           01423                                    XNB                                   #  XNB = OGA (OUTER GIMBAL AXIS)
015633,000267: 15,2617           01407                                    YSM                                   #  YSM = IGA (INNER GIMBAL AXIS)
015634,000268: 15,2620           41456                           UNIT     PUSH                                  #  PD0 = UNIT(OGA X IGA) = MGA
015635,000269: 
015636,000270: 15,2621           46041                           DOT      ITA                                   
015637,000271: 15,2622           01437                                    ZNB                                   
015638,000272: 15,2623           00051                                    S2                                    
015639,000273: 15,2624           22021                           STOVL    COSTH                                 #  COS(OG) = MGA . ZNB
015640,000274: 15,2625           00001                                    0                                     
015641,000275: 15,2626           77641                           DOT                                            
015642,000276: 15,2627           01431                                    YNB                                   
015643,000277: 15,2630           36023                           STCALL   SINTH                                 #  SIN(OG) = MGA . YNB
015644,000278: 15,2631           32440                                    ARCTRIG                               
015645,000279: 15,2632           23501                           STOVL    OGC                                   
015646,000280: 15,2633           00001                                    0                                     
015647,000281: 
015648,000282: 15,2634           50235                           VXV      DOT                                   #  PROVISION FOR MG ANGLE OF 90 DEGREES
015649,000283: 15,2635           01423                                    XNB                                   
015650,000284: 15,2636           01407                                    YSM                                   
015651,000285: 15,2637           77752                           SL1                                            
015652,000286: 15,2640           22021                           STOVL    COSTH                                 #  COS(MG) = IGA . (MGA X OGA)
015653,000287: 15,2641           01407                                    YSM                                   
015654,000288: 15,2642           77641                           DOT                                            
015655,000289: 15,2643           01423                                    XNB                                   
015656,000290: 15,2644           36023                           STCALL   SINTH                                 #  SIN(MG) = IGA . OGA
015657,000291: 15,2645           32440                                    ARCTRIG                               
015658,000292: 15,2646           01505                           STORE    MGC                                   
015659,000293: 
015660,000294: 15,2647           45246                           ABS      DSU                                   
015661,000295: 15,2650           33166                                    .166...                               
015662,000296: 15,2651           77644                           BPL                                            
015663,000297: 15,2652           32671                                    GIMLOCK1                              #  IF ANGLE GREATER THAN 60 DEGREES
015664,000298: 
015665,000299: 15,2653           50375        CALCGA1            VLOAD    DOT                                   
015666,000300: 15,2654           01415                                    ZSM                                   
015667,000301: 15,2655           00001                                    0                                     
015668,000302: 15,2656           22021                           STOVL    COSTH                                 #  COS(IG) = ZSM . MGA
015669,000303: 15,2657           01401                                    XSM                                   
015670,000304: 15,2660           45441                           DOT      STADR                                 
015671,000305: 15,2661           41754                           STCALL   SINTH                                 #  SIN(IG) = XSM . MGA
015672,000306: 15,2662           32440                                    ARCTRIG                               
015673,000307: 
015674,000308: 15,2663           23503                           STOVL    IGC                                   
015675,000309: 15,2664           01501                                    OGC                                   
015676,000310: 15,2665           77624                           RTB                                            
015677,000311: 15,2666           33532                                    V1STO2S                               
015678,000312: 15,2667           36401                           STCALL   THETAD                                
015679,000313: 15,2670           00051                                    S2                                    
015680,000314: 
015681,000315: 15,2671           77776        GIMLOCK1           EXIT                                           
015682,000316: 15,2672           05315                           TC       ALARM                                 
015683,000317: 15,2673           00401                           OCT      00401                                 
015684,000318: 15,2674           06000                           TC       INTPRET                               
015685,000319: 15,2675           77650                           GOTO                                           
015686,000320: 15,2676           32653                                    CALCGA1                               
015687,000321: 
015688,000322:                                                                                                  #  AXISGEN COMPUTES THE COORDINATES OF ONE COORDINATE SYSTEM REFERRED TO ANOTHER COORDINATE SYSTEM.
015689,000323: 
015690,000324:                                                                                                  #  THE INPUTS ARE  1) THE STAR1 VECTOR REFERRED TO COORDINATE SYSTEM A STORED AT STARAD.  2) THE STAR2 VECTOR
015691,000325:                                                                                                  #  REFERRED TO COORDINATE SYSTEM A STORED AT STARAD +6.  3) THE STAR1 VECTOR REFERRED TO COORDINATE SYSTEM B STORED
015692,000326:                                                                                                  #  AT LOCATION 6 OF THE VAC AREA.  4) THE STAR2 VECTOR REFERRED TO COORDINATE SYSTEM B STORED AT LOCATION 12D OF
015693,000327:                                                                                                  #  THE VAC AREA.
015694,000328: 
015695,000329:                                                                                                  #  THE OUTPUT DEFINES COORDINATE SYSTEM A REFERRED TO COORDINATE SYSTEM B.  THE THREE HALF-UNIT VECTORS ARE STORED
015696,000330:                                                                                                  #  AT LOCATIONS XDC, XDC +6, XDC +12D, AND STARAD, STARAD +6, STARAD +12D.
015697,000331: 
015698,000332: 15,2677           66370        AXISGEN            AXT,1    SSP                                   #  PUSHDOWN 00-22D,24D-28D,30D
015699,000333: 15,2700           01452                                    STARAD     +6                         
015700,000334: 15,2701           00051                                    S1                                    
015701,000335: 15,2702           01436                                    STARAD     -6                         
015702,000336: 
015703,000337: 15,2703           46773        AXISGEN1           VLOAD*   VXV*                                  #  06D   UA = S1
015704,000338: 15,2704           01461                                    STARAD     +12D,1                     #        STARAD +00D     UB = S1
015705,000339: 15,2705           01467                                    STARAD     +18D,1                     
015706,000340: 15,2706           77656                           UNIT                                           #  12D   VA = UNIT(S1 X S2)
015707,000341: 15,2707           33467                           STOVL*   STARAD     +18D,1                     #        STARAD +06D     VB = UNIT(S1 X S2)
015708,000342: 15,2710           01461                                    STARAD     +12D,1                     
015709,000343: 
015710,000344: 15,2711           76433                           VXV*     VSL1                                  
015711,000345: 15,2712           01467                                    STARAD     +18D,1                     #  18D   WA = UA X VA
015712,000346: 15,2713           03475                           STORE    STARAD     +24D,1                     #        STARAD +12D     WB = UB X VB
015713,000347: 
015714,000348: 15,2714           77700                           TIX,1                                          
015715,000349: 15,2715           32703                                    AXISGEN1                              
015716,000350: 
015717,000351: 15,2716           66160                           AXC,1    SXA,1                                 
015718,000352: 15,2717           00006                                    6                                     
015719,000353: 15,2720           00036                                    30D                                   
015720,000354: 
015721,000355: 15,2721           66370                           AXT,1    SSP                                   
015722,000356: 15,2722           00022                                    18D                                   
015723,000357: 15,2723           00051                                    S1                                    
015724,000358: 15,2724           00006                                    6                                     
015725,000359: 
015726,000360: 15,2725           66374                           AXT,2    SSP                                   
015727,000361: 15,2726           00006                                    6                                     
015728,000362: 15,2727           00052                                    S2                                    
015729,000363: 15,2730           00002                                    2                                     
015730,000364: 
015731,000365: 15,2731           76720        AXISGEN2           XCHX,1   VLOAD*                                
015732,000366: 15,2732           00036                                    30D                                   #  X1=-6 X2=+6   X1=-6 X2=+4     X1=-6 X2=+2
015733,000367: 15,2733           00001                                    0,1                                   
015734,000368: 15,2734           62757                           VXSC*    PDVL*                                 #  J=(UA)(UB1)   J=(UA)(UB2)     J=(UA)(UB3)
015735,000369: 15,2735           76324                                    STARAD     +6,2                       
015736,000370: 15,2736           00007                                    6,1                                   
015737,000371: 15,2737           77757                           VXSC*                                          
015738,000372: 15,2740           76316                                    STARAD     +12D,2                     
015739,000373: 15,2741           30031                           STOVL*   24D                                   #  K=(VA)(VB1)   J=(VA)(VB2)     J=(VA)(VB3)
015740,000374: 15,2742           00015                                    12D,1                                 
015741,000375: 
015742,000376: 15,2743           53357                           VXSC*    VAD                                   
015743,000377: 15,2744           76310                                    STARAD     +18D,2                     #  L=(WA)(WB1)   J=(WA)(WB2)     J=(WA)(WB3)
015744,000378: 15,2745           76455                           VAD      VSL1                                  
015745,000379: 15,2746           00031                                    24D                                   
015746,000380: 15,2747           77720                           XCHX,1                                         
015747,000381: 15,2750           00036                                    30D                                   
015748,000382: 15,2751           03445                           STORE    XDC        +18D,1                     #  XDC = L+J+K   YDC = L+J+K     ZDC = L+J+K
015749,000383: 
015750,000384: 15,2752           77700                           TIX,1                                          
015751,000385: 15,2753           32754                                    AXISGEN3                              
015752,000386: 
015753,000387: 15,2754           77704        AXISGEN3           TIX,2                                          
015754,000388: 15,2755           32731                                    AXISGEN2                              
015755,000389: 
015756,000390: 15,2756           77775                           VLOAD                                          
015757,000391: 15,2757           01423                                    XDC                                   
015758,000392: 15,2760           23445                           STOVL    STARAD                                
015759,000393: 15,2761           01431                                    YDC                                   
015760,000394: 15,2762           23453                           STOVL    STARAD     +6                         
015761,000395: 15,2763           01437                                    ZDC                                   
015762,000396: 15,2764           01461                           STORE    STARAD     +12D                       
015763,000397: 
015764,000398: 15,2765           77616                           RVQ                                            
015765,000399: 
015766,000400: 
015767,000401:                                                                                                  #  CALCOTA COMPUTES THE TRACKER AZIMUTH AND ELEVATION ANGLES REQUIRED TO POSITION THE LOTS SUCH THAT A STAR LINE-
015768,000402:                                                                                                  #  OF-SIGHT LIES ALONG THE STAR VECTOR. THE ROUTINE TAKES THE GIVEN STAR VECTOR AND EXPRESSES IT AS A VECTOR REF-
015769,000403:                                                                                                  #  ERENCED TO THE LOTS COORDINATE SYSTEM. IN ADDITION IT SETS UP THREE UNIT VECTORS DEFINING THE X, Y, AND Z AXES
015770,000404:                                                                                                  #  REFERENCED TO THE LOTS COORDINATE SYSTEM.
015771,000405: 
015772,000406:                                                                                                  #  THE INPUTS ARE  1) THE STAR VECTOR REFERRED TO PRESENT STABLE MEMBER COORDINATES STORED AT STAR.   2) SAME ANGLE
015773,000407:                                                                                                  #  INPUT AS *SMNB*, I.E. SINES AND COSINES OF THE CDU ANGLES, IN THE ORDER Y Z X, AT SINCDU AND COSCDU.   A CALL
015774,000408:                                                                                                  #  TO CDUTRIG WILL PROVIDE THIS INPUT.
015775,000409: 
015776,000410:                                                                                                  #  THE OUTPUTS ARE THE TRACKER AZIMUTH AND ELEVATION ANGLES STORED DP AT SAC AND PAC RESPECTIVELY.  (LOW ORDER PART
015777,000411:                                                                                                  #  EQUAL TO ZERO).
015778,000412: 
015779,000413: 15,2766           46175        CALCOTA            VLOAD    ITA                                   #  PUSHDOWN  00-26D,28D,30D,32D-36D
015780,000414: 15,2767           01467                                    STAR                                  
015781,000415: 15,2770           00036                                    30D                                   
015782,000416: 15,2771           36041                           STCALL   32D                                   
015783,000417: 15,2772           32473                                    SMNB                                  
015784,000418: 15,2773           06007                           STODL    6                                     #  STORE (STARM0,STARM1,STARM2)
015785,000419: 15,2774           33160                                    ZERODP                                
015786,000420: 15,2775           00146                           STORE    MPAC       +5                         #  SET MPAC TO (STARM0,STARM1,0)
015787,000421: 15,2776           77624                           RTB                                            
015788,000422: 15,2777           33522                                    VECMODE                               
015789,000423: 15,3000           40056                           UNIT     BOV                                   
015790,000424: 15,3001           33076                                    ZNB=S1                                
015791,000425: 15,3002           06001                           STODL    0                                     #  STORE  COS/4 =S0/4 , SIN/4 = S1/4 ,0
015792,000426: 15,3003           00001                                    0                                     
015793,000427: 15,3004           06021                           STODL    COSTH                                 
015794,000428: 15,3005           00003                                    2                                     
015795,000429: 15,3006           36023                           STCALL   SINTH                                 
015796,000430: 15,3007           32440                                    ARCTRIG                               #  USES THE COS/SIN STORED ABOVE
015797,000431: 15,3010           77624                           RTB                                            
015798,000432: 15,3011           33526                                    1STO2S                                
015799,000433: 15,3012           23475                           STOVL    SAC                                   
015800,000434: 15,3013           00001                                    0                                     
015801,000435: 15,3014           72441                           DOT      SL1                                   
015802,000436: 15,3015           00007                                    6                                     
015803,000437: 15,3016           50136                           ASIN     BMN                                   
015804,000438: 15,3017           33026                                    CALCOTA1                              #  ELEVATION ANGLE NEGATIVE
015805,000439: 15,3020           40112                           SL2      BOV                                   
015806,000440: 15,3021           33026                                    CALCOTA1                              #  ELEVATION ANGLE GREATER THAN 90 DEGREES
015807,000441: 15,3022           45102                           SR2      RTB                                   
015808,000442: 15,3023           33526                                    1STO2S                                
015809,000443: 15,3024           37477                           STCALL   PAC                                   
015810,000444: 15,3025           00036                                    30D                                   
015811,000445: 
015812,000446: 15,3026           77776        CALCOTA1           EXIT                                           #  PROGRAM ERROR,STAR OUT OF FIELD OF VIEW
015813,000447: 15,3027           05315                           TC       ALARM                                 
015814,000448: 15,3030           00402                           OCT      00402                                 
015815,000449: 15,3031           04353                           TC       ENDOFJOB                              
015816,000450: 
015817,000451: 
015818,000452:                                                                                                  #  LOTANG COMPUTES THE TRACKER AZIMUTH AND ELEVATION ANGLES REQUIRED TO POSITION THE LOTS SUCH THAT A STAR LINE-OF-
015819,000453:                                                                                                  #  SIGHT LIES ALONG THE STAR VECTOR.
015820,000454: 
015821,000455:                                                                                                  #  THE INPUTS ARE  1) THE STAR VECTOR REFERRED TO ANY COORDINATE SYSTEM STORED AT STAR.  2) THE NAVIGATION BASE
015822,000456:                                                                                                  #  COORDINATES REFERRED TO THE SAME COORDINATE SYSTEM. THESE THREE HALF-UNIT VECTORS ARE STORED AT XNB, YNB, AND
015823,000457:                                                                                                  #  ZNB.
015824,000458: 
015825,000459:                                                                                                  #  THE OUTPUTS ARE THE TRACKER AZIMUTH AND ELEVATION ANGLES STORED DP AT SAC AND PAC RESPECTIVELY.  (LOW ORDER PART
015826,000460:                                                                                                  #  EQUAL TO ZERO).
015827,000461: 
015828,000462: 
015829,000463: 15,3032           47375        LOTANG             VLOAD    VXV                                   
015830,000464: 15,3033           01437                                    ZNB                                   
015831,000465: 15,3034           01467                                    STAR                                  
015832,000466: 15,3035           77630                           ITA                                            
015833,000467: 15,3036           00036                                    30D                                   
015834,000468: 15,3037           40056                           UNIT     BOV                                   
015835,000469: 15,3040           33076                                    ZNB=S1                                
015836,000470: 15,3041           00027                           STORE    PDA                                   #  PDA = UNIT(ZNB X S)
015837,000471: 
015838,000472: 15,3042           57441                           DOT      DCOMP                                 
015839,000473: 15,3043           01423                                    XNB                                   
015840,000474: 15,3044           22023                           STOVL    SINTH                                 #  SIN(SA) = PDA . -XNB
015841,000475: 15,3045           00027                                    PDA                                   
015842,000476: 
015843,000477: 15,3046           77641                           DOT                                            
015844,000478: 15,3047           01431                                    YNB                                   
015845,000479: 15,3050           36021                           STCALL   COSTH                                 #  COS(SA) = PDA . YNB
015846,000480: 15,3051           32440                                    ARCTRIG                               
015847,000481: 15,3052           77624                           RTB                                            
015848,000482: 15,3053           33526                                    1STO2S                                
015849,000483: 15,3054           23475                           STOVL    SAC                                   
015850,000484: 15,3055           00027                                    22D                                   
015851,000485: 15,3056           50235                           VXV      DOT                                   
015852,000486: 15,3057           01437                                    ZNB                                   
015853,000487: 15,3060           01467                                    STAR                                  
015854,000488: 15,3061           67512                           SL2      ASIN                                  
015855,000489: 15,3062           62440                           BMN      SL2                                   
015856,000490: 15,3063           33072                                    LOTALARM                              #  ELEVATION ANGLE NEGATIVE
015857,000491: 15,3064           60400                           BOV      SR2                                   
015858,000492: 15,3065           33072                                    LOTALARM                              #  ELEVATION ANGLE GREATER THAN 90 DEGREES
015859,000493: 15,3066           77624                           RTB                                            
015860,000494: 15,3067           33526                                    1STO2S                                
015861,000495: 15,3070           37477                           STCALL   PAC                                   
015862,000496: 15,3071           00036                                    30D                                   
015863,000497: 
015864,000498: 15,3072           77776        LOTALARM           EXIT                                           #  PROGRAM ERROR,STAR OUT OF FIELD OF VIEW
015865,000499: 15,3073           05315                           TC       ALARM                                 
015866,000500: 15,3074           00403                           OCT      00403                                 
015867,000501: 15,3075           04353                           TC       ENDOFJOB                              
015868,000502: 15,3076           77745        ZNB=S1             DLOAD                                          
015869,000503: 15,3077           33144                                    270DEG                                
015870,000504: 15,3100           07475                           STODL    SAC                                   
015871,000505: 15,3101           33160                                    ZERODP                                
015872,000506: 15,3102           37477                           STCALL   PAC                                   
015873,000507: 15,3103           00036                                    30D                                   
015874,000508: 
015875,000509:                                                                                                  #  TRANSPSE COMPUTES THE TRANSPOSE OF A MATRIX (TRANSPOSE = INVERSE OF ORTHOGONAL TRANSFORMATION).
015876,000510: 
015877,000511:                                                                                                  #  THE INPUT IS A MATRIX DEFINING COORDINATE SYSTEM A WITH RESPECT TO COORDINATE SYSTEM B STORED IN STARAD THRU
015878,000512:                                                                                                  #  STARAD +17D.
015879,000513: 
015880,000514:                                                                                                  #  THE OUTPUT IS A MATRIX DEFINING COORDINATE SYSTEM B WITH RESPECT TO COORDINATE SYSTEM A STORED IN STARAD THRU
015881,000515:                                                                                                  #  STARAD +17D.
015882,000516: 
015883,000517: 15,3104           53447        TRANSPSE           DXCH     STARAD     +2                         #  PUSHDOWN NONE
015884,000518: 15,3105           53453                           DXCH     STARAD     +6                         
015885,000519: 15,3106           53447                           DXCH     STARAD     +2                         
015886,000520: 
015887,000521: 15,3107           53451                           DXCH     STARAD     +4                         
015888,000522: 15,3110           53461                           DXCH     STARAD     +12D                       
015889,000523: 15,3111           53451                           DXCH     STARAD     +4                         
015890,000524: 
015891,000525: 15,3112           53457                           DXCH     STARAD     +10D                       
015892,000526: 15,3113           53463                           DXCH     STARAD     +14D                       
015893,000527: 15,3114           53457                           DXCH     STARAD     +10D                       
015894,000528: 15,3115           16014                           TCF      DANZIG                                
015895,000529: 
015896,000530: 
015897,000531: 
015898,000532:                                                                                                  #  SMD/EREF TRANSFORMS STABLE MEMBER DESIRED COORDINATES FROM STABLE MEMBER DESIRED (DESIRED = PRESENT HERE) TO
015899,000533:                                                                                                  #  EARTH REFERENCE COORDINATES TO ALIGN THE STABLE MEMBER TO SPECIFIED GIMBAL ANGLES.
015900,000534: 
015901,000535:                                                                                                  #  THE INPUTS ARE 1) THE MATRIX DEFINING THE EARTH REFERENCE COORDINATE FRAME WITH RESPECT TO THE NAVIGATION BASE
015902,000536:                                                                                                  #  COORDINATE FRAME. 2) SAME AS 2) AND 3) OF SMNB.
015903,000537: 
015904,000538:                                                                                                  #  THE OUTPUT IS THE DESIRED STABLE MEMBER COORDINATES WITH RESPECT TO THE EARTH REFERENCE COORDINATE FRAME. THE
015905,000539:                                                                                                  #  THREE UNIT VECTORS ARE STORED AT XSM, YSM, AND ZSM.
015906,000540: 
015907,000541: 15,3116           77230        SMD/EREF           ITA      VLOAD                                 #  PUSHDOWN 00,02,04-10D,30D,32D-36D
015908,000542: 15,3117           00014                                    12D                                   
015909,000543: 15,3120           33156                                    XUNIT                                 
015910,000544: 15,3121           36041                           STCALL   32D                                   
015911,000545: 15,3122           32473                                    SMNB                                  #  STABLE MEMBER TO NAVIGATION BASE
015912,000546: 15,3123           76521                           MXV      VSL1                                  
015913,000547: 15,3124           01445                                    STARAD                                #  THEN TO EARTH REFERENCE
015914,000548: 15,3125           23401                           STOVL    XSM                                   
015915,000549: 15,3126           33154                                    YUNIT                                 
015916,000550: 
015917,000551: 15,3127           36041                           STCALL   32D                                   
015918,000552: 15,3130           32473                                    SMNB                                  #  STABLE MEMBER TO NAVIGATION BASE
015919,000553: 15,3131           76521                           MXV      VSL1                                  
015920,000554: 15,3132           01445                                    STARAD                                #  THEN TO EARTH REFERENCE
015921,000555: 15,3133           23407                           STOVL    YSM                                   
015922,000556: 15,3134           33152                                    ZUNIT                                 
015923,000557: 
015924,000558: 15,3135           36041                           STCALL   32D                                   
015925,000559: 15,3136           32473                                    SMNB                                  #  STABLE MEMBER TO NAVIGATION BASE
015926,000560: 15,3137           76521                           MXV      VSL1                                  
015927,000561: 15,3140           01445                                    STARAD                                #  THEN TO EARTH REFERENCE
015928,000562: 15,3141           37415                           STCALL   ZSM                                   
015929,000563: 15,3142           00014                                    12D                                   
015930,000564: 
015931,000565: 15,3143           67777 77777  270DEG             2DEC     -.25                                  
015932,000566: 
015933,000567: 15,3145           05520 26075  QTSN45             2DEC     .1768                                 
015934,000568: 
015935,000569: 15,3147           20000 00000  HALFDP             2DEC     .5                                    
015936,000570: 
015937,000571: 15,3151           00000 00000  ZUNIT              2DEC     0          B-28                       
015938,000572: 
015939,000573: 15,3153           00000 00000  YUNIT              2DEC     0          B-28                       
015940,000574: 
015941,000575: 15,3155           20000 00000  XUNIT              2DEC     0.5                                   
015942,000576: 
015943,000577: 15,3157           00000 00000  ZERODP             2DEC     0          B-28                       
015944,000578: 
015945,000579: 15,3161           00000 00000                     2DEC     0          B-28                       
015946,000580: 
015947,000581: 15,3163           00000 00000                     2DEC     0          B-28                       
015948,000582: 
015949,000583: 15,3165           05252 25253  .166...            2DEC     .1666666667                            
015950,000584: 
015951,000585: 
015952,000586:                                                                                                  #  AOTNB CONVERTS THE TWO RETICLE ROTATION ANGLES (YROT AND SROT) AND
015953,000587:                                                                                                  #  THE DETENT SETTING TO A HALF UNIT STAR VECTOR REFERRED TO THE
015954,000588:                                                                                                  #  NAVIGATION BASE.
015955,000589: 
015956,000590:                                                                                                  #  THE INPUTS ARE
015957,000591: 
015958,000592:                                                                                                  #     Y RET. LINE RATATION S(YROT) STORED IN LOC 3 OF THE MARK VAC AREA
015959,000593:                                                                                                  #     SPIRAL ROTATION ANGLE S(SROT) STORED IN LOC 5 OF MARC VAC AREA
015960,000594:                                                                                                  #     ANGLE OF CENTER OF FIELD OF VIEW S(ELV) STORED IN LOC 9 OF MARK VAC
015961,000595:                                                                                                  #     AOT ASZIMUTH ANGLE S(DET) STORED IN LOC 8 OF MARK VAC AREA
015962,000596:                                                                                                  #     THE COMPLEMENT OF BASE ADDRESS OF MARK VAC IS STORED AT X1
015963,000597:                                                                                                  #     COMPENSATION FOR FIELD OF VIEW TILT IN LOC 10D
015964,000598:                                                                                                  #  THE ABOVE STORAGE IS DONE BY AOTMARK
015965,000599: 
015966,000600:                                                                                                  #  THE OUTPUT IS A HALF UNIT STAR VECTOR IN NB COORDINATES STORED
015967,000601:                                                                                                  #  AT 32D AND AVAILABLE IN VAC ON RETURN TO THE CALLING PROGRAM
015968,000602: 
015969,000603: 15,3167           70533        AOTNB              SLOAD*   SR1                                   #  RESCALE TILT TO 2PI
015970,000604: 15,3170           00013                                    10D,1                                 #  AOT FOV TILT COMPENSATION ANGLE
015971,000605: 15,3171           52006                           PUSH     GOTO                                  
015972,000606: 15,3172           33711                                    AOTNB1                                
015973,000607: 15,3173           00017                           STORE    14D                                   #  STORE UNCOMPENSATED YROT FOR S COMP
015974,000608: 15,3174           41415                           DAD      PUSH                                  #  YROT NOW CORRECTED FOR TILT
015975,000609: 15,3175           65346                           COS      PDDL                                  #  1/2 COS(YROT) PD 0-1
015976,000610: 15,3176           41556                           SIN      PUSH                                  #  1/2 SIN(YROT) PD 2-3
015977,000611: 15,3177           45133                           SLOAD*   RTB                                   
015978,000612: 15,3200           00006                                    5,1                                   
015979,000613: 15,3201           33463                                    CDULOGIC                              
015980,000614: 15,3202           00021                           STORE    16D                                   #  STORE S IF S AND Y ARE ZERO, S=0
015981,000615: 15,3203           52054                           BZE      GOTO                                  #  S NOT ZERO
015982,000616: 15,3204           33206                                    SISZ                                  #  S=0
015983,000617: 15,3205           33216                                    SCOMP                                 
015984,000618: 15,3206           53145        SISZ               DLOAD    BZE                                   #  IS Y ZERO
015985,000619: 15,3207           00017                                    14D                                   
015986,000620: 15,3210           33213                                    YISZ                                  #  Y=0
015987,000621: 15,3211           77650                           GOTO                                           
015988,000622: 15,3212           33216                                    SCOMP                                 
015989,000623: 15,3213           52145        YISZ               DLOAD    GOTO                                  
015990,000624: 15,3214           33160                                    ZERODP                                
015991,000625: 15,3215           33223                                    SGOT                                  
015992,000626: 15,3216           45345        SCOMP              DLOAD    DSU                                   
015993,000627: 15,3217           00017                                    14D                                   
015994,000628: 15,3220           00021                                    16D                                   #  Y=S
015995,000629: 15,3221           77621                           BDSU                                           
015996,000630: 15,3222           33310                                    NEARONE                               #  S=360-(Y-S)
015997,000631: 15,3223           41405        SGOT               DMP      PUSH                                  
015998,000632: 15,3224           33306                                    DP1/12                                
015999,000633: 15,3225           65346                           COS      PDDL                                  
016000,000634: 15,3226           41556                           SIN      PUSH                                  
016001,000635: 15,3227           72405                           DMP      SL1                                   
016002,000636: 15,3230           00001                                    0                                     
016003,000637: 15,3231           06001                           STODL    0                                     
016004,000638: 15,3232           00003                                    2                                     
016005,000639: 15,3233           45405                           DMP      STADR                                 
016006,000640: 15,3234           77774                           STORE    2                                     
016007,000641: 
016008,000642: 15,3235           45133                           SLOAD*   RTB                                   
016009,000643: 15,3236           00012                                    9D,1                                  
016010,000644: 15,3237           33463                                    CDULOGIC                              
016011,000645: 15,3240           73406                           PUSH     SIN                                   
016012,000646: 15,3241           71525                           PDDL     COS                                   
016013,000647: 15,3242           41206                           PUSH     DMP                                   
016014,000648: 15,3243           00001                                    0                                     
016015,000649: 15,3244           41325                           PDDL     DMP                                   
016016,000650: 15,3245           00005                                    4                                     
016017,000651: 15,3246           00007                                    6                                     
016018,000652: 15,3247           72415                           DAD      SL1                                   
016019,000653: 15,3250           77626                           STADR                                          
016020,000654: 15,3251           71736                           STODL    32D                                   
016021,000655: 
016022,000656: 15,3252           77605                           DMP                                            
016023,000657: 15,3253           00005                                    4                                     
016024,000658: 15,3254           06005                           STODL    4                                     
016025,000659: 
016026,000660: 15,3255           44205                           DMP      BDSU                                  
016027,000661: 15,3256           00001                                    0                                     
016028,000662: 15,3257           66606                           PUSH     SLOAD*                                
016029,000663: 15,3260           00011                                    8D,1                                  
016030,000664: 15,3261           41424                           RTB      PUSH                                  
016031,000665: 15,3262           33463                                    CDULOGIC                              
016032,000666: 15,3263           65346                           COS      PDDL                                  
016033,000667: 15,3264           77756                           SIN                                            
016034,000668: 15,3265           00001                           STORE    0                                     
016035,000669: 
016036,000670: 15,3266           65205                           DMP      PDDL                                  
016037,000671: 15,3267           00005                                    4                                     
016038,000672: 15,3270           00007                                    6                                     
016039,000673: 15,3271           43205                           DMP      DAD                                   
016040,000674: 15,3272           00003                                    2                                     
016041,000675: 15,3273           77712                           SL2                                            
016042,000676: 15,3274           06043                           STODL    34D                                   
016043,000677: 
016044,000678: 15,3275           45405                           DMP      STADR                                 
016045,000679: 15,3276           71732                           STODL    36D                                   
016046,000680: 
016047,000681: 15,3277           77605                           DMP                                            
016048,000682: 15,3300           62421                           BDSU     SL2                                   
016049,000683: 15,3301           00045                                    36D                                   
016050,000684: 15,3302           22045                           STOVL    36D                                   
016051,000685: 15,3303           00041                                    32D                                   
016052,000686: 15,3304           77616                           RVQ                                            
016053,000687: 15,3305           02525 12525  DP1/12             2DEC     .0833333333                            
016054,000688: 
016055,000689: 15,3307           37777 37777  NEARONE            2DEC     .999999999                            
016056,000690: 
016057,000691: 
016058,000692:                                                                                                  #  AOTSM CALCULATES A HALF UNIT STAR VECTOR IN STABLE MEMBER COORDINATES
016059,000693:                                                                                                  #  FROM TWO PLANES CONTAINING THE STAR REFERRED TO NB
016060,000694: 
016061,000695:                                                                                                  #  THE INPUTS ARE
016062,000696: 
016063,000697:                                                                                                  #     AOT AZIMUTH AND ELEVATION STORED IN 8D AND 9D RESP. OF VAC AREA
016064,000698:                                                                                                  #     CDUY, CDUZ AND CDUX FROM A YMARK STORED AT 3, 5, AND 7 OF VAC AREA
016065,000699:                                                                                                  #     CDUY, CDUZ AND CDUX FROM A XMARK STORED AT 2, 4, AND 6 OF VAC AREA
016066,000700:                                                                                                  #  THE BASE ADDRESS OF THE CDUS IS STORED AT LOCATION S1
016067,000701: 
016068,000702:                                                                                                  #  THE OUTPUT IS A STAR VECTOR REFERRED TO STABLE MEMBER AT LOC 32D
016069,000703:                                                                                                  #  AND AVAILBLE IN MPAC
016070,000704: 
016071,000705: 
016072,000706: 15,3311           77630        AOTSM              ITA                                            
016073,000707: 15,3312           00035                                    29D                                   
016074,000708: 15,3313           70001                           SETPD    LXC,1                                 #  PUT BASE ADR OF VAC AREA IN X1
016075,000709: 15,3314           00021                                    16D                                   
016076,000710: 15,3315           00050                                    S1                                    
016077,000711: 15,3316           41545                           DLOAD    PUSH                                  #  ZERO 12 - 13
016078,000712: 15,3317           33160                                    ZERODP                                
016079,000713: 15,3320           45133                           SLOAD*   RTB                                   #  LOAD AZIMUTH ANGLE (D)
016080,000714: 15,3321           00007                                    6,1                                   
016081,000715: 15,3322           33463                                    CDULOGIC                              
016082,000716: 15,3323           71406                           PUSH     COS                                   
016083,000717: 15,3324           73525                           PDDL     SIN                                   #  1/2 COSD 14-15
016084,000718: 15,3325           41476                           DCOMP    PUSH                                  #  -1/2 SIND 16-17
016085,000719: 15,3326           45133                           SLOAD*   RTB                                   #  LOAD ELEVATION ANGLE (E)
016086,000720: 15,3327           00010                                    7,1                                   
016087,000721: 15,3330           33463                                    CDULOGIC                              
016088,000722: 15,3331           71406                           PUSH     COS                                   
016089,000723: 15,3332           06041                           STODL    32D                                   #  1/2COSE
016090,000724: 15,3333           41556                           SIN      PUSH                                  #  1/2 SINE 18-19
016091,000725: 15,3334           72405                           DMP      SL1                                   
016092,000726: 15,3335           00025                                    20D                                   
016093,000727: 15,3336           06043                           STODL    34D                                   #  -1/2 SINE SIND UP 18-19
016094,000728: 15,3337           57405                           DMP      DCOMP                                 
016095,000729: 15,3340           00023                                    18D                                   
016096,000730: 15,3341           77752                           SL1                                            
016097,000731: 15,3342           36045                           STCALL   36D                                   #  -1/2SINE COSD
016098,000732: 15,3343           32517                                    NBSM                                  #  GET X PLANE IN SM
016099,000733: 15,3344           45515                           PDVL     STADR                                 #  X PLANE IN SM IN 12-17
016100,000734: 15,3345           77736                           STORE    32D                                   #  Y PLANE IN NB
016101,000735: 15,3346           62120                           XCHX,1   INCR,1                                
016102,000736: 15,3347           00050                                    S1                                    #  ADD ONE TO BASE ADR OF VAC AREA
016103,000737: 15,3350           00001                                    1                                     
016104,000738: 15,3351           47120                           XCHX,1   CALL                                  
016105,000739: 15,3352           00050                                    S1                                    #  PUT NEW BASE ADR BACK IN S1
016106,000740: 15,3353           32517                                    NBSM                                  #  GET Y PLANE IN SM
016107,000741: 15,3354           76435                           VXV      VSL1                                  
016108,000742: 15,3355           77676                           VCOMP                                          
016109,000743: 15,3356           00041                           STORE    32D                                   #  STORE STAR VEC REFERRED TO SM
016110,000744: 15,3357           77650                           GOTO                                           
016111,000745: 15,3360           00035                                    29D                                   
016112,000746: 
016113,000747: 
016114,000748:                                                                                                  #           GIVEN RR TRUNION AND SHAFT (T,S) IN TANG,+1, FIND THE ASSOCIATED LINE OF SIGNT IN NAV BASE AXES.
016115,000749:                                                                                                  #  THE HALF UNIT VECTOR, .5( SIN(S)COS(T),-SIN(T),COS(S)COS(T) ) IS LEFT IN MPAC AND 32D.
016116,000750: 
016117,000751: 15,3361           45135        RRNB               SLOAD    RTB                                   
016118,000752: 15,3362           00424                                    TANG                                  
016119,000753: 15,3363           33463                                    CDULOGIC                              
016120,000754: 15,3364           41401                           SETPD    PUSH                                  #  TRUNNION ANGLE TO 0.
016121,000755: 15,3365           00001                                    0                                     
016122,000756: 15,3366           57556                           SIN      DCOMP                                 
016123,000757: 15,3367           06043                           STODL    34D                                   #  Y COMPONENT.
016124,000758: 
016125,000759: 15,3370           41546                           COS      PUSH                                  #  .5 COS(T) TO 0.
016126,000760: 15,3371           45135                           SLOAD    RTB                                   
016127,000761: 15,3372           00425                                    TANG       +1                         
016128,000762: 15,3373           33463                                    CDULOGIC                              
016129,000763: 15,3374           71406                           PUSH     COS                                   #  SHAFT ANGLE TO 2.
016130,000764: 15,3375           72405                           DMP      SL1                                   
016131,000765: 15,3376           00001                                    0                                     
016132,000766: 15,3377           06045                           STODL    36D                                   #  Z COMPONENT
016133,000767: 
016134,000768: 15,3400           41356                           SIN      DMP                                   
016135,000769: 15,3401           77752                           SL1                                            
016136,000770: 15,3402           22041                           STOVL    32D                                   
016137,000771: 15,3403           00041                                    32D                                   
016138,000772: 15,3404           77616                           RVQ                                            
016139,000773: 
016140,000774: 
016141,000775:                                                                                                  #            THE FOLLOWING ROUTINE TAKES A HALF UNIT TARGET VECTOR REFERRED TO NAV BASE COORDINATES AND FINDS BOTH
016142,000776:                                                                                                  #  GIMBAL ORIENTATIONS AT WHICH THE RR MIGHT SIGHT THE TARGET. THE GIMBAL ANGLES CORRESPONDING TO THE PRESENT MODE
016143,000777:                                                                                                  #  ARE LEFT IN MODEA AND THOSE WHICH WOULD BE USED AFTER A REMODE IN MODEB. THIS ROUTINE ASSUMES MODE 1 IS TRUNNION
016144,000778:                                                                                                  #  ANGLE LESS THAN 90 DEGS IN ABS VALUE WITH ARBITRARY SHAFT, WITH A CORRESPONDING DEFINITION FOR MODE 2. MODE
016145,000779:                                                                                                  #  SELECTION AND LIMIT CHECKING ARE DONE ELSEWHERE.
016146,000780: 
016147,000781:                                                                                                  #            THE MODE 1 CONFIGURATION IS CALCULATED FROM THE VECTOR AND THEN MODE 2 IS FOUND USING THE RELATIONS
016148,000782: 
016149,000783:                                                                                                  #            S(2) = 180 + S(1)
016150,000784:                                                                                                  #            T(2) = 180 - T(1)
016151,000785: 
016152,000786: 15,3405           57545        RRANGLES           DLOAD    DCOMP                                 #  SINCE WE WILL FIND THE MODE 1 SHAFT
016153,000787: 15,3406           00043                                    34D                                   #  ANGLE LATER, WE CAN FIND THE MODE 1
016154,000788: 15,3407           67401                           SETPD    ASIN                                  #  TRUNNION BY SIMPLY TAKING THE ARCSIN OF
016155,000789: 15,3410           00001                                    0                                     #  THE Y COMPONENT, THE ASIN GIVING AN
016156,000790: 15,3411           44206                           PUSH     BDSU                                  #  ANSWER WHOSE ABS VAL IS LESS THAN 90 DEG
016157,000791: 15,3412           33150                                    HALFDP                                
016158,000792: 15,3413           06005                           STODL    4                                     #  MODE 2 TRUNNION TO 4.
016159,000793: 
016160,000794: 15,3414           33160                                    ZERODP                                
016161,000795: 15,3415           22043                           STOVL    34D                                   #  UNIT THE PROJECTION OF THE VECTOR IN THE
016162,000796: 15,3416           00041                                    32D                                   #  X-Z PLANE.
016163,000797: 15,3417           41056                           UNIT     BOVB                                  #  CALL FOR S/C MANEUVER ON GIMBAL LOCK.
016164,000798: 15,3420           20345                                    DESRETRN   +1                         
016165,000799: 15,3421           06041                           STODL    32D                                   #  PROJECTION VECTOR.
016166,000800: 15,3422           00041                                    32D                                   
016167,000801: 15,3423           46142                           SR1      STQ                                   
016168,000802: 15,3424           00051                                    S2                                    
016169,000803: 15,3425           06023                           STODL    SINTH                                 #  USE ARCTRIG SINCE SHAFT COULD BE ARB.
016170,000804: 15,3426           00045                                    36D                                   
016171,000805: 15,3427           77742                           SR1                                            
016172,000806: 15,3430           36021                           STCALL   COSTH                                 
016173,000807: 15,3431           32440                                    ARCTRIG                               
016174,000808: 15,3432           43206                           PUSH     DAD                                   #  MODE 1 SHAFT TO 2.
016175,000809: 15,3433           33150                                    HALFDP                                #  (OVERFLOW DOESNT MATTER SINCE SCALED REV
016176,000810: 15,3434           22007                           STOVL    6                                     
016177,000811: 15,3435           00005                                    4                                     
016178,000812: 15,3436           77624                           RTB                                            #  FIND MODE 2 CDU ANGLES.
016179,000813: 15,3437           33547                                    2V1STO2S                              
016180,000814: 15,3440           22426                           STOVL    MODEB                                 
016181,000815: 15,3441           00001                                    0                                     
016182,000816: 15,3442           77624                           RTB                                            #  MODE 1 ANGLES TO MODE A.
016183,000817: 15,3443           33547                                    2V1STO2S                              
016184,000818: 15,3444           00424                           STORE    MODEA                                 
016185,000819: 15,3445           77776                           EXIT                                           
016186,000820: 
016187,000821: 15,3446           40413                           CS       RADMODES                              #  SWAP MODEA AND MODEB IF RR IN MODE2.
016188,000822: 15,3447           77637                           MASK     BIT12                                 
016189,000823: 15,3450           10000                           CCS      A                                     
016190,000824: 15,3451           13455                           TCF      +4                                    
016191,000825: 
016192,000826: 15,3452           52424                           DXCH     MODEA                                 
016193,000827: 15,3453           52426                           DXCH     MODEB                                 
016194,000828: 15,3454           52424                           DXCH     MODEA                                 
016195,000829: 
016196,000830: 15,3455           06000                           TC       INTPRET                               
016197,000831: 15,3456           77650                           GOTO                                           
016198,000832: 15,3457           00051                                    S2                                    
016199,000833: 
016200,000834: 15,3460                        ENDINFSS           EQUALS                                         

End of include-file INFLIGHT_ALIGNMENT_ROUTINES.agc.  Parent file is MAIN.agc