Source Code

These source-code files were transcribed from a printout in Don Eyles's personal collection, scanned by archive.org, and financially sponsored by Peter McDermott. A team of volunteers performed the transcription and proof-reading. The scanned page images are available at the Virtual AGC Project website, as well as higher-quality (but much larger) images at the Virtual AGC Project's collection in the Internet Archive. Report any problems by creating "issues" at the Virtual AGC Project's GitHub Repository.

Notations on the program listing read, in part:

	YUL SYSTEM FOR AGC: NEW PROGRAM SHEPATIN BY EYLES
	DEC 13, 1966

	THIS PROGRAM WAS ASSEMBLED AS A VERSION OF REVISION 37 
        OF PROGRAM SUNBURST BY LEM GROUP
Note that the date is the date of the printout, not the date of the program revision.

013765,000002:                                                                                                  ## Copyright:   Public domain.
013766,000003:                                                                                                  ## Filename:    INFLIGHT_ALIGNMENT_ROUTINES.agc
013767,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
013768,000005:                                                                                                  ##              It is part of an early development version of the software
013769,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
013770,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
013771,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
013772,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
013773,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
013774,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
013775,000012:                                                                                                  ##              that the code format has been changed to conform to the
013776,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
013777,000014:                                                                                                  ##              original YUL assembler.
013778,000015:                                                                                                  ## Reference:   pp. 322-341
013779,000016:                                                                                                  ## Assembler:   yaYUL
013780,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
013781,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
013782,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
013783,000020:                                                                                                  ##              2017-06-06 HG   Transcribed
013784,000021:                                                                                                  ##              2017-06-22 RSB  Proofed comment text with
013785,000022:                                                                                                  ##                              octopus/ProoferComments.
013786,000023:                                                                                                  ##              2021-05-30 ABS  Aligned IAW to field boundary.
013787,000024: 

Page 322

013789,000026: 15,2472                                           BANK     15                                    
013790,000027: 15,2472  E5,1400                                  EBANK=   XSM                                   
013791,000028: 
013792,000029: 
013793,000030:                                                                                                  #  CALCGTA COMPUTES THE GYRO TORQUE ANGLES REQUIRED TO BRING THE STABLE MEMBER INTO THE DESIRED ORIENTATION.
013794,000031: 
013795,000032:                                                                                                  #  THE INPUT IS THE DESIRED STABLE MEMBER COORDINATES REFERRED TO PRESENT STABLE MEMBER COORDINATES. THE THREE
013796,000033:                                                                                                  #  HALF-UNIT VECTORS ARE STORED AT XDC, YDC, AND ZDC.
013797,000034: 
013798,000035:                                                                                                  #  THE OUTPUTS ARE THE THREE GYRO TORQUING ANGLES TO BE APPLIED TO THE Y, Z, AND X GYROS AND ARE STORED DP AT IGC,
013799,000036:                                                                                                  #  MGC, AND OGC RESPECTIVELY. ANGLES ARE SCALED PROPERLY FOR IMUPULSE.
013800,000037: 
013801,000038: 
013802,000039: 15,2472           71220        CALCGTA            ITA      DLOAD                                 #  PUSHDOWN 00,02,16D,18D,22D-26D,32D-36D
013803,000040: 15,2473           00051                                    S2                                    #  XDC = (XD1 XD2 XD3)
013804,000041: 15,2474           02423                                    XDC                                   #  YDC = (YD1 YD2 YD3)
013805,000042: 15,2475           65325                           PDDL     PDDL                                  #  ZDC = (ZD1 ZD2 ZD3)
013806,000043: 15,2476           33152                                    ZERODP                                
013807,000044: 15,2477           02427                                    XDC        +4                         
013808,000045: 15,2500           55476                           DCOMP    VDEF                                  
013809,000046: 15,2501           77656                           UNIT                                           
013810,000047: 15,2502           14027                           STODL    ZPRIME                                #  ZP = UNIT(-XD3 0 XD1) = (ZP1 ZP2 ZP3)
013811,000048: 15,2503           00027                                    ZPRIME                                
013812,000049: 
013813,000050: 15,2504           77742                           SR1                                            
013814,000051: 15,2505           14023                           STODL    SINTH                                 #  SIN(IGC) = ZP1
013815,000052: 15,2506           00033                                    ZPRIME     +4                         
013816,000053: 15,2507           77742                           SR1                                            
013817,000054: 15,2510           34021                           STCALL   COSTH                                 #  COS(IGC) = ZP3
013818,000055: 15,2511           32543                                    ARCTRIG                               
013819,000056: 
013820,000057: 15,2512           16503                           STODL    IGC                                   #  Y GYRO TORQUING ANGLE   FRACTION OF REV.
013821,000058: 15,2513           02425                                    XDC        +2                         
013822,000059: 15,2514           77742                           SR1                                            
013823,000060: 15,2515           14023                           STODL    SINTH                                 #  SIN(MGC) = XD2
013824,000061: 15,2516           00027                                    ZPRIME                                
013825,000062: 
013826,000063: 15,2517           65205                           DMP      PDDL                                  
013827,000064: 15,2520           02427                                    XDC        +4                         #  PD00 = (ZP1)(XD3)
013828,000065: 15,2521           00033                                    ZPRIME     +4                         
013829,000066: 
013830,000067: 15,2522           45205                           DMP      DSU                                   
013831,000068: 15,2523           02423                                    XDC                                   #  MPAC = (ZP3)(XD1)
013832,000069: 15,2524           77626                           STADR                                          
013833,000070: 15,2525           43756                           STCALL   COSTH                                 #  COS(MGC) = MPAC - PD00
013834,000071: 15,2526           32543                                    ARCTRIG                               
013835,000072: 
013836,000073: 15,2527           26505                           STOVL    MGC                                   #  Z GYRO TORQUING ANGLE   FRACTION OF REV.
013837,000074: 

Page 323

013839,000076: 15,2530           00027                                    ZPRIME                                
013840,000077: 15,2531           77641                           DOT                                            
013841,000078: 15,2532           02437                                    ZDC                                   
013842,000079: 15,2533           24021                           STOVL    COSTH                                 #  COS(OGC) = ZP . ZDC
013843,000080: 15,2534           00027                                    ZPRIME                                
013844,000081: 15,2535           77641                           DOT                                            
013845,000082: 15,2536           02431                                    YDC                                   
013846,000083: 15,2537           34023                           STCALL   SINTH                                 #  SIN(OGC) = ZP . YDC
013847,000084: 15,2540           32543                                    ARCTRIG                               
013848,000085: 
013849,000086: 15,2541           36501                           STCALL   OGC                                   #  X GYRO TORQUING ANGLE   FRACTION OF REV.
013850,000087: 15,2542           00051                                    S2                                    
013851,000088: 

Page 324

013853,000090:                                                                                                  #  ARCTRIG COMPUTES AN ANGLE GIVEN THE SINE AND COSINE OF THIS ANGLE.
013854,000091: 
013855,000092:                                                                                                  #  THE INPUTS ARE SIN/4 AND COS/4 STORED DP AT SINTH AND COSTH.
013856,000093: 
013857,000094:                                                                                                  #  THE OUTPUT IS THE CALCULATED ANGLE BETWEEN +.5 AND -.5 REVOLUTIONS AND STORED AT THETA. THE OUTPUT IS ALSO
013858,000095:                                                                                                  #  AVAILABLE AT MPAC.
013859,000096: 
013860,000097: 15,2543           51545        ARCTRIG            DLOAD    ABS                                   #  PUSHDOWN  16D,18D,20D,22D-26D
013861,000098: 15,2544           00023                                    SINTH                                 
013862,000099: 15,2545           50025                           DSU      BMN                                   
013863,000100: 15,2546           33140                                    QTSN45                                #  ABS(SIN/4) - SIN(45)/4
013864,000101: 15,2547           32556                                    TRIG1                                 #  IF (-45,45) OR (135,-135)
013865,000102: 
013866,000103: 
013867,000104: 
013868,000105: 15,2550           72545                           DLOAD    SL1                                   #  (45,135) OR (-135,-45)
013869,000106: 15,2551           00021                                    COSTH                                 
013870,000107: 15,2552           75326                           ACOS     SIGN                                  
013871,000108: 15,2553           00023                                    SINTH                                 
013872,000109: 15,2554           00025                           STORE    THETA                                 #  X = ARCCOS(COS) WITH SIGN(SIN)
013873,000110: 15,2555           77616                           RVQ                                            
013874,000111: 
013875,000112: 
013876,000113: 
013877,000114: 15,2556           72545        TRIG1              DLOAD    SL1                                   #  (-45,45) OR (135,-135)
013878,000115: 15,2557           00023                                    SINTH                                 
013879,000116: 15,2560           77736                           ASIN                                           
013880,000117: 15,2561           14025                           STODL    THETA                                 #  X = ARCSIN(SIN) WITH SIGN(SIN)
013881,000118: 15,2562           00021                                    COSTH                                 
013882,000119: 15,2563           77640                           BMN                                            
013883,000120: 15,2564           32567                                    TRIG2                                 #  IF (135,-135)
013884,000121: 
013885,000122: 15,2565           43545                           DLOAD    RVQ                                   
013886,000123: 15,2566           00025                                    THETA                                 #  X = ARCSIN(SIN)   (-45,45)
013887,000124: 
013888,000125: 
013889,000126: 
013890,000127: 15,2567           75345        TRIG2              DLOAD    SIGN                                  #  (135,-135)
013891,000128: 15,2570           33142                                    HALFDP                                
013892,000129: 15,2571           00023                                    SINTH                                 
013893,000130: 15,2572           77625                           DSU                                            
013894,000131: 15,2573           00025                                    THETA                                 
013895,000132: 15,2574           00025                           STORE    THETA                                 #  X = .5 WITH SIGN(SIN) - ARCSIN(SIN)
013896,000133: 15,2575           77616                           RVQ                                            #                   (+) - (+) OR (-) - (-)
013897,000134: 

Page 325

013899,000136:                                                                                                  #  SMNB TRANSFORMS A STAR DIRECTION FROM STABLE MEMBER TO NAVIGATION BASE COORDINATES.
013900,000137: 
013901,000138:                                                                                                  #  THE INPUTS ARE  1) THE STAR VECTOR REFERRED TO PRESENT STABLE MEMBER COORDINATES STORED AT LOCATION 32D OF THE
013902,000139:                                                                                                  #  VAC AREA.  2) THE GIMBAL ANGLES (CDUY,CDUZ,CDUX) STORED AT ALTERNATING LOCATIONS RESPECTIVELY. THE ANGLES ARE
013903,000140:                                                                                                  #  USUALLY STORED AT LOCATIONS 2,4, AND 6 OF THE MARK VAC AREA. THEY CAN BE STORED AT LOCATIONS 20,22, AND 24 OF
013904,000141:                                                                                                  #  YOUR JOB VAC AREA.  3) THE BASE ADDRESS OF THE GIMBAL ANGLES STORED SP AT LOCATION S1 OF YOUR JOB VAC AREA.
013905,000142: 
013906,000143:                                                                                                  #  THE OUTPUT IS THE STAR VECTOR REFERRED TO NAVIGATION BASE COORDINATES STORED AT 32D OF THE VAC AREA. THE OUTPUT
013907,000144: 
013908,000145:                                                                                                  #  IS ALSO AVAILABLE AT MPAC.
013909,000146: 
013910,000147: 
013911,000148: 
013912,000149: 15,2576           43020        SMNB               ITA      CLEAR                                 #  PUSHDOWN 00,02,04-10D,30D,32D-36D
013913,000150: 15,2577           00051                                    S2                                    
013914,000151: 15,2600           00264                                    NBSMBIT                               #  SET NBSMBIT = 0
013915,000152: 
013916,000153: 15,2601           77170        SMNB1              AXT,1    AXT,2                                 #  ROTATE X,Z, ABOUT Y
013917,000154: 15,2602           00004                                    4                                     
013918,000155: 15,2603           00000                                    0                                     
013919,000156: 15,2604           77624                           CALL                                           
013920,000157: 15,2605           32646                                    AXISROT                               
013921,000158: 
013922,000159: 15,2606           77170                           AXT,1    AXT,2                                 #  ROTATE Y,X ABOUT Z
013923,000160: 15,2607           00002                                    2                                     
013924,000161: 15,2610           00004                                    4                                     
013925,000162: 15,2611           77624                           CALL                                           
013926,000163: 15,2612           32646                                    AXISROT                               
013927,000164: 
013928,000165: 15,2613           77170                           AXT,1    AXT,2                                 #  ROTATE Z,Y ABOUT X
013929,000166: 15,2614           00000                                    0                                     
013930,000167: 15,2615           00002                                    2                                     
013931,000168: 15,2616           77624                           CALL                                           
013932,000169: 15,2617           32646                                    AXISROT                               
013933,000170: 
013934,000171: 15,2620           77650                           GOTO                                           
013935,000172: 15,2621           00051                                    S2                                    
013936,000173: 

Page 326

013938,000175: 
013939,000176:                                                                                                  #  NBSM TRANSFORMS A STAR DIRECTION FROM NAVIGATION BASE TO STABLE MEMBER COORDINATES.
013940,000177: 
013941,000178:                                                                                                  #  THE INPUTS ARE  1) THE STAR VECTOR REFERRED TO NAVIGATION BASE COORDINATES STORED AT LOCATION 32D OF THE VAC
013942,000179:                                                                                                  #  AREA.  2) THE GIMBAL ANGLES (CDUY,CDUZ,CDUX) STORED AT ALTERNATING LOCATIONS RESPECTIVELY. THE ANGLES ARE
013943,000180:                                                                                                  #  USUALLY STORED AT LOCATIONS 2,4, AND 6 OF THE MARK VAC AREA. THEY CAN BE STORED AT LOCATIONS 20,22, AND 24 OF
013944,000181:                                                                                                  #  YOUR JOB VAC AREA.  3) THE BASE ADDRESS OF THE GIMBAL ANGLES STORED SP AT LOCATION S1 OF YOUR JOB VAC AREA.
013945,000182: 
013946,000183:                                                                                                  #  THE OUTPUT IS THE STAR VECTOR REFERRED TO PRESENT STABLE MEMBER COORDINATES STORED AT LOCATION 32D OF THE VAC
013947,000184:                                                                                                  #  AREA. THE OUTPUT IS ALSO AVAILABLE AT MPAC.
013948,000185: 
013949,000186: 
013950,000187: 
013951,000188: 15,2622           43020        NBSM               ITA      SET                                   #  PUSHDOWN 00,02,04-10D,30D,32D-36D
013952,000189: 15,2623           00051                                    S2                                    
013953,000190: 
013954,000191: 15,2624           00064                                    NBSMBIT                               #  SET NBSMBIT = 1
013955,000192: 
013956,000193: 15,2625           77170        NBSM2              AXT,1    AXT,2                                 #  ROTATE Z,Y ABOUT X
013957,000194: 15,2626           00000                                    0                                     
013958,000195: 15,2627           00002                                    2                                     
013959,000196: 15,2630           77624                           CALL                                           
013960,000197: 15,2631           32646                                    AXISROT                               
013961,000198: 
013962,000199: 15,2632           77170                           AXT,1    AXT,2                                 #  ROTATE Y,X ABOUT Z
013963,000200: 15,2633           00002                                    2                                     
013964,000201: 15,2634           00004                                    4                                     
013965,000202: 15,2635           77624                           CALL                                           
013966,000203: 15,2636           32646                                    AXISROT                               
013967,000204: 
013968,000205: 15,2637           77170                           AXT,1    AXT,2                                 #  ROTATE X,Z, ABOUT Y
013969,000206: 15,2640           00004                                    4                                     
013970,000207: 15,2641           00000                                    0                                     
013971,000208: 15,2642           77624                           CALL                                           
013972,000209: 15,2643           32646                                    AXISROT                               
013973,000210: 
013974,000211: 15,2644           77650                           GOTO                                           
013975,000212: 15,2645           00051                                    S2                                    
013976,000213: 

Page 327

013978,000215: 
013979,000216:                                                                                                  #  AXISROT IS UTILIZED BY THE SMNB AND NBSM ROUTINES. SEE REMARKS ON THESE ROUTINES FOR INPUTS AND OUTPUTS.
013980,000217: 
013981,000218: 
013982,000219: 
013983,000220: 15,2646           66660        AXISROT            XSU,1    SLOAD*                                
013984,000221: 15,2647           00050                                    S1                                    #       SMNB         .       NBSM
013985,000222: 15,2650           00005                                    4,1                                   #  IG    MG    OG    .  OG    MG    IG
013986,000223: 15,2651           56034                           RTB      XAD,1                                 
013987,000224: 15,2652           33524                                    CDULOGIC                              
013988,000225: 15,2653           00050                                    S1                                    
013989,000226: 15,2654           00037                           STORE    30D                                   
013990,000227: 
013991,000228: 15,2655           77746        ACCUROT            COS                                            
013992,000229: 15,2656           04011                           STORE    8D,1                                  #               COS(ANGLE)
013993,000230: 15,2657           73545                           DLOAD    SIN                                   
013994,000231: 15,2660           00037                                    30D                                   
013995,000232: 15,2661           04013                           STORE    10D,1                                 #               SIN(ANGLE)
013996,000233: 
013997,000234: 15,2662           72403                           DMP*     SL1                                   
013998,000235: 
013999,000236: 15,2663           77732                                    32D        +4,2                       
014000,000237: 15,2664           40723                           PDDL*    DMP*                                  #                   PD0
014001,000238: 15,2665           00011                                    8D,1                                  #  S3SIN S1SIN S2SIN . S2SIN S1SIN S3SIN
014002,000239: 15,2666           77732                                    32D        +4,2                       
014003,000240: 
014004,000241: 15,2667           64752                           SL1      PDDL*                                 #                   PD2
014005,000242: 15,2670           00013                                    10D,1                                 #  S3COS S1COS S2COS . S2COS S1COS S3COS
014006,000243: 
014007,000244: 15,2671           72403                           DMP*     SL1                                   #                  MPAC
014008,000245: 15,2672           00045                                    32D        +4,1                       #  S1SIN S2SIN S3SIN . S3SIN S2SIN S1SIN
014009,000246: 
014010,000247: 15,2673           77614                           BOFF                                           
014011,000248: 15,2674           00344                                    NBSMBIT                               
014012,000249: 15,2675           32710                                    AXISROT1                              
014013,000250: 
014014,000251: 15,2676           45421                           BDSU     STADR                                 #                    .   PD2 - MPAC
014015,000252: 15,2677           67732                           STORE    32D        +4,2                       #                    . S2    S1    S3
014016,000253: 15,2700           77743                           DLOAD*                                         
014017,000254: 15,2701           00011                                    8D,1                                  
014018,000255: 
014019,000256: 15,2702           72403                           DMP*     SL1                                   #                    .      MPAC
014020,000257: 15,2703           00045                                    32D        +4,1                       #                    . S3COS S2COS S1COS
014021,000258: 
014022,000259: 15,2704           45415                           DAD      STADR                                 #                    .   PD0 + MPAC
014023,000260: 15,2705           73732                           STORE    32D        +4,1                       #                    . S3    S2    S1
014024,000261: 15,2706           43575                           VLOAD    RVQ                                   
014025,000262: 15,2707           00041                                    32D                                   
014026,000263: 15,2710           45415        AXISROT1           DAD      STADR                                 #    MPAC + PD2      .
014027,000264: 15,2711           67732                           STORE    32D        +4,2                       #  S3    S1    S2
014028,000265: 15,2712           77743                           DLOAD*                                         
014029,000266: 15,2713           00011                                    8D,1                                  
014030,000267: 

Page 328

014032,000269: 15,2714           72403                           DMP*     SL1                                   #       MPAC         .
014033,000270: 15,2715           00045                                    32D        +4,1                       #  S1COS S2COS S3COS .
014034,000271: 
014035,000272: 15,2716           45425                           DSU      STADR                                 #    MPAC - PD0      .
014036,000273: 15,2717           73732                           STORE    32D        +4,1                       #  S1    S2    S3
014037,000274: 15,2720           43575                           VLOAD    RVQ                                   
014038,000275: 15,2721           00041                                    32D                                   
014039,000276:                                                                                                  #  CALCGA COMPUTES THE CDU DRIVING ANGLES REQUIRED TO BRING THE STABLE MEMBER INTO THE DESIRED ORIENTATION.
014040,000277: 
014041,000278:                                                                                                  #  THE INPUTS ARE  1) THE NAVIGATION BASE COORDINATES REFERRED TO ANY COORDINATE SYSTEM. THE THREE HALF-UNIT
014042,000279:                                                                                                  #  VECTORS ARE STORED AT XNB,YNB, AND ZNB.  2) THE DESIRED STABLE MEMBER COORDINATES REFERRED TO THE SAME
014043,000280:                                                                                                  #  COORDINATE SYSTEM ARE STORED AT XSM, YSM, AND ZSM.
014044,000281: 
014045,000282:                                                                                                  #  THE OUTPUTS ARE THE THREE CDU DRIVING ANGLES AND ARE STORED SP AT THETAD, THETAD +1, AND THETAD +2.
014046,000283: 
014047,000284: 
014048,000285: 15,2722           47375        CALCGA             VLOAD    VXV                                   #  PUSHDONW 00-04,16D,18D
014049,000286: 15,2723           02423                                    XNB                                   #  XNB = OGA (OUTER GIMBAL AXIS)
014050,000287: 15,2724           02407                                    YSM                                   #  YSM = IGA (INNER GIMBAL AXIS)
014051,000288: 15,2725           41456                           UNIT     PUSH                                  #  PD0 = UNIT(OGA X IGA) = MGA
014052,000289: 
014053,000290: 15,2726           44041                           DOT      ITA                                   
014054,000291: 15,2727           02437                                    ZNB                                   
014055,000292: 15,2730           00051                                    S2                                    
014056,000293: 15,2731           24021                           STOVL    COSTH                                 #  COS(OG) = MGA . ZNB
014057,000294: 
014058,000295: 15,2732           00001                                    0                                     
014059,000296: 15,2733           77641                           DOT                                            
014060,000297: 15,2734           02431                                    YNB                                   
014061,000298: 15,2735           34023                           STCALL   SINTH                                 #  SIN(OG) = MGA . YNB
014062,000299: 15,2736           32543                                    ARCTRIG                               
014063,000300: 15,2737           26501                           STOVL    OGC                                   
014064,000301: 15,2740           00001                                    0                                     
014065,000302: 
014066,000303: 15,2741           50235                           VXV      DOT                                   #  PROVISION FOR MG ANGLE OF 90 DEGREES
014067,000304: 15,2742           02423                                    XNB                                   
014068,000305: 15,2743           02407                                    YSM                                   
014069,000306: 15,2744           77752                           SL1                                            
014070,000307: 15,2745           24021                           STOVL    COSTH                                 #  COS(MG) = IGA . (MGA X OGA)
014071,000308: 15,2746           02407                                    YSM                                   
014072,000309: 15,2747           77641                           DOT                                            
014073,000310: 15,2750           02423                                    XNB                                   
014074,000311: 15,2751           34023                           STCALL   SINTH                                 #  SIN(MG) = IGA . OGA
014075,000312: 15,2752           32543                                    ARCTRIG                               
014076,000313: 15,2753           02505                           STORE    MGC                                   
014077,000314: 
014078,000315: 15,2754           45246                           ABS      DSU                                   
014079,000316: 15,2755           33160                                    .166...                               
014080,000317: 15,2756           77644                           BPL                                            
014081,000318: 
014082,000319: 15,2757           32776                                    GIMLOCK1                              #  IF ANGLE GREATER THAN 60 DEGREES
014083,000320: 

Page 329

014085,000322: 
014086,000323: 15,2760           50375        CALCGA1            VLOAD    DOT                                   
014087,000324: 15,2761           02415                                    ZSM                                   
014088,000325: 15,2762           00001                                    0                                     
014089,000326: 15,2763           24021                           STOVL    COSTH                                 #  COS(IG) = ZSM . MGA
014090,000327: 15,2764           02401                                    XSM                                   
014091,000328: 
014092,000329: 15,2765           45441                           DOT      STADR                                 
014093,000330: 15,2766           43754                           STCALL   SINTH                                 #  SIN(IG) = XSM . MGA
014094,000331: 
014095,000332: 15,2767           32543                                    ARCTRIG                               
014096,000333: 
014097,000334: 15,2770           26503                           STOVL    IGC                                   
014098,000335: 15,2771           02501                                    OGC                                   
014099,000336: 15,2772           77634                           RTB                                            
014100,000337: 15,2773           33573                                    V1STO2S                               
014101,000338: 15,2774           34401                           STCALL   THETAD                                
014102,000339: 15,2775           00051                                    S2                                    
014103,000340: 
014104,000341: 15,2776           77776        GIMLOCK1           EXIT                                           
014105,000342: 15,2777           06020                           TC       FLAG1UP                               #  SET GIMBAL LOCK FLAG
014106,000343: 15,3000           00200                           OCT      200                                   
014107,000344: 15,3001           04744                           TC       ALARM                                 
014108,000345: 15,3002           00401                           OCT      00401                                 
014109,000346: 15,3003           06103                           TC       INTPRET                               
014110,000347: 15,3004           77650                           GOTO                                           
014111,000348: 15,3005           32760                                    CALCGA1                               
014112,000349: 

Page 330

014114,000351: 
014115,000352:                                                                                                  #  AXISGEN COMPUTES THE COORDINATES OF ONE COORDINATE SYSTEM REFERRED TO ANOTHER COORDINATE SYSTEM.
014116,000353: 
014117,000354:                                                                                                  #  THE INPUTS ARE  1) THE STAR1 VECTOR REFERRED TO COORDINATE SYSTEM A STORED AT STARAD.  2) THE STAR2 VECTOR
014118,000355:                                                                                                  #  REFERRED TO COORDINATE SYSTEM A STORED AT STARAD +6.  3) THE STAR1 VECTOR REFERRED TO COORDINATE SYSTEM B STORED
014119,000356:                                                                                                  #  AT LOCATION 6 OF THE VAC AREA.  4) THE STAR2 VECTOR REFERRED TO COORDINATE SYSTEM B STORED AT LOCATION 12D OF
014120,000357:                                                                                                  #  THE VAC AREA.
014121,000358: 
014122,000359:                                                                                                  #  THE OUTPUT DEFINES COORDINATE SYSTEM A REFERRED TO COORDINATE SYSTEM B. THE THREE HALF-UNIT VECTORS ARE STORED
014123,000360:                                                                                                  #  AT LOCATIONS XDC, XDC +6, XDC +12D, AND STARAD, STARAD +6, STARAD +12D.
014124,000361: 
014125,000362: 
014126,000363: 15,3006           66370        AXISGEN            AXT,1    SSP                                   #  PUSHDOWN 00-22D,24D-28D,30D
014127,000364: 15,3007           02452                                    STARAD     +6                         
014128,000365: 
014129,000366: 15,3010           00051                                    S1                                    
014130,000367: 15,3011           02436                                    STARAD     -6                         
014131,000368: 
014132,000369: 15,3012           46773        AXISGEN1           VLOAD*   VXV*                                  #  06D   UA = S1
014133,000370: 15,3013           02461                                    STARAD     +12D,1                     #         STARAD +00D   UB = S1
014134,000371: 15,3014           02467                                    STARAD     +18D,1                     
014135,000372: 15,3015           77656                           UNIT                                           #  12D   VA = UNIT(S1 X S2)
014136,000373: 15,3016           06467                           STORE    STARAD     +18D,1                     #         STARAD +06D   VB = UNIT(S1 X S2)
014137,000374: 15,3017           77773                           VLOAD*                                         
014138,000375: 15,3020           02461                                    STARAD     +12D,1                     
014139,000376: 
014140,000377: 15,3021           76433                           VXV*     VSL1                                  
014141,000378: 15,3022           02467                                    STARAD     +18D,1                     #  18D   WA = UA X VA
014142,000379: 15,3023           06475                           STORE    STARAD     +24D,1                     #         STARAD +12D   WB = UB X VB
014143,000380: 
014144,000381: 15,3024           77700                           TIX,1                                          
014145,000382: 15,3025           33012                                    AXISGEN1                              
014146,000383: 
014147,000384: 15,3026           66160                           AXC,1    SXA,1                                 
014148,000385: 15,3027           00006                                    6                                     
014149,000386: 15,3030           00036                                    30D                                   
014150,000387: 
014151,000388: 15,3031           66370                           AXT,1    SSP                                   
014152,000389: 
014153,000390: 15,3032           00022                                    18D                                   
014154,000391: 15,3033           00051                                    S1                                    
014155,000392: 15,3034           00006                                    6                                     
014156,000393: 
014157,000394: 15,3035           66374                           AXT,2    SSP                                   
014158,000395: 15,3036           00006                                    6                                     
014159,000396: 15,3037           00052                                    S2                                    
014160,000397: 15,3040           00002                                    2                                     
014161,000398: 
014162,000399: 15,3041           76720        AXISGEN2           XCHX,1   VLOAD*                                
014163,000400: 15,3042           00036                                    30D                                   #  X1=-6 X2=+6   X1=-6 X2=+4    X1=-6 X2=+2
014164,000401: 15,3043           00001                                    0,1                                   
014165,000402: 15,3044           62757                           VXSC*    PDVL*                                 #  J=(UA)(UB1)   J=(UA)(UB2)    J=(UA)(UB3)
014166,000403: 

Page 331

014168,000405: 15,3045           75324                                    STARAD     +6,2                       
014169,000406: 15,3046           00007                                    6,1                                   
014170,000407: 15,3047           77757                           VXSC*                                          
014171,000408: 15,3050           75316                                    STARAD     +12D,2                     
014172,000409: 15,3051           30031                           STOVL*   24D                                   #  K=(VA)(VB1)   J=(VA)(VB2)   J=(VA)(VB3)
014173,000410: 15,3052           00015                                    12D,1                                 
014174,000411: 
014175,000412: 15,3053           53357                           VXSC*    VAD                                   
014176,000413: 15,3054           75310                                    STARAD     +18D,2                     #  L=(WA)(WB1)   J=(WA)(WB2)   J=(WA)(WB3)
014177,000414: 15,3055           76455                           VAD      VSL1                                  
014178,000415: 15,3056           00031                                    24D                                   
014179,000416: 15,3057           77720                           XCHX,1                                         
014180,000417: 15,3060           00036                                    30D                                   
014181,000418: 15,3061           06445                           STORE    XDC        +18D,1                     #  XDC = L+J+K   YDC = L+J+K   ZDC = L+J+K
014182,000419: 
014183,000420: 15,3062           77700                           TIX,1                                          
014184,000421: 15,3063           33064                                    AXISGEN3                              
014185,000422: 
014186,000423: 15,3064           77704        AXISGEN3           TIX,2                                          
014187,000424: 15,3065           33041                                    AXISGEN2                              
014188,000425: 
014189,000426: 15,3066           77775                           VLOAD                                          
014190,000427: 15,3067           02423                                    XDC                                   
014191,000428: 15,3070           26445                           STOVL    STARAD                                
014192,000429: 15,3071           02431                                    YDC                                   
014193,000430: 15,3072           26453                           STOVL    STARAD     +6                         
014194,000431: 15,3073           02437                                    ZDC                                   
014195,000432: 15,3074           02461                           STORE    STARAD     +12D                       
014196,000433: 
014197,000434: 15,3075           77616                           RVQ                                            
014198,000435: 

Page 332

014200,000437: 
014201,000438:                                                                                                  #  TRANSPSE COMPUTES THE TRANSPOSE OF A MATRIX (TRANSPOSE = INVERSE OF ORTHOGONAL TRANSFORMATION).
014202,000439: 
014203,000440:                                                                                                  #  THE INPUT IS A MATRIX DEFINING COORDINATE SYSTEM A WITH RESPECT TO COORDINATE SYSTEM B STORED IN STARAD THRU
014204,000441:                                                                                                  #  STARAD +17D.
014205,000442: 
014206,000443:                                                                                                  #  THE OUTPUT IS A MATRIX DEFINING COORDINATE SYSTEM B WITH RESPECT TO COORDINATE SYSTEM A STORED IN STARAD THRU
014207,000444:                                                                                                  #  STARAD +17D.
014208,000445: 
014209,000446: 15,3076           53447        TRANSPSE           DXCH     STARAD     +2                         #  PUSHDOWN NONE
014210,000447: 15,3077           53453                           DXCH     STARAD     +6                         
014211,000448: 15,3100           53447                           DXCH     STARAD     +2                         
014212,000449: 
014213,000450: 15,3101           53451                           DXCH     STARAD     +4                         
014214,000451: 15,3102           53461                           DXCH     STARAD     +12D                       
014215,000452: 15,3103           53451                           DXCH     STARAD     +4                         
014216,000453: 
014217,000454: 15,3104           53457                           DXCH     STARAD     +10D                       
014218,000455: 15,3105           53463                           DXCH     STARAD     +14D                       
014219,000456: 15,3106           53457                           DXCH     STARAD     +10D                       
014220,000457: 15,3107           16115                           TCF      DANZIG                                
014221,000458: 
014222,000459: 
014223,000460: 
014224,000461:                                                                                                  #  SMD/EREF TRANSFORMS STABLE MEMBER DESIRED COORDINATES FROM STABLE MEMBER DESIRED (DESIRED = PRESENT HERE) TO
014225,000462:                                                                                                  #  EARTH REFERENCE COORDINATES TO ALIGN THE STABLE MEMBER TO SPECIFIED GIMBAL ANGLES.
014226,000463: 
014227,000464:                                                                                                  #  THE INPUTS ARE 1) THE MATRIX DEFINING THE EARTH REFERENCE COORDINATE FRAME WITH RESPECT TO THE NAVIGATION BASE
014228,000465:                                                                                                  #  COORDINATE FRAME. 2) SAME AS 2) AND 3) OF SMNB.
014229,000466: 
014230,000467:                                                                                                  #  THE OUTPUT IS THE DESIRED STABLE MEMBER COORDINATES WITH RESPECT TO THE EARTH REFERENCE COORDINATE FRAME. THE
014231,000468:                                                                                                  #  THREE UNIT VECTORS ARE STORED AT XSM, YSM, AND ZSM.
014232,000469: 
014233,000470: 15,3110           77220        SMD/EREF           ITA      VLOAD                                 #  PUSHDOWN 00,02,04-10D,30D,32D-36D
014234,000471: 15,3111           00014                                    12D                                   
014235,000472: 15,3112           33150                                    XUNIT                                 
014236,000473: 15,3113           34041                           STCALL   32D                                   
014237,000474: 15,3114           32576                                    SMNB                                  #  STABLE MEMBER TO NAVIGATION BASE
014238,000475: 15,3115           76521                           MXV      VSL1                                  
014239,000476: 15,3116           02445                                    STARAD                                #  THEN TO EARTH REFERENCE
014240,000477: 15,3117           26401                           STOVL    XSM                                   
014241,000478: 15,3120           33146                                    YUNIT                                 
014242,000479: 
014243,000480: 15,3121           34041                           STCALL   32D                                   
014244,000481: 15,3122           32576                                    SMNB                                  #  STABLE MEMBER TO NAVIGATION BASE
014245,000482: 15,3123           76521                           MXV      VSL1                                  
014246,000483: 15,3124           02445                                    STARAD                                #  THEN TO EARTH REFERENCE
014247,000484: 15,3125           26407                           STOVL    YSM                                   
014248,000485: 15,3126           33144                                    ZUNIT                                 
014249,000486: 
014250,000487: 15,3127           34041                           STCALL   32D                                   
014251,000488: 

Page 333

014253,000490: 15,3130           32576                                    SMNB                                  #  STABLE MEMBER TO NAVIGATION BASE
014254,000491: 15,3131           76521                           MXV      VSL1                                  
014255,000492: 15,3132           02445                                    STARAD                                #  THEN TO EARTH REFERENCE
014256,000493: 15,3133           36415                           STCALL   ZSM                                   
014257,000494: 15,3134           00014                                    12D                                   
014258,000495: 
014259,000496: 15,3135           67777 77777  270DEG             2DEC     -.25                                  
014260,000497: 
014261,000498: 15,3137           05520 26075  QTSN45             2DEC     .1768                                 
014262,000499: 
014263,000500: 15,3141           20000 00000  HALFDP             2DEC     .5                                    
014264,000501: 
014265,000502: 15,3143           00000 00000  ZUNIT              2DEC     0          B-28                       
014266,000503: 
014267,000504: 15,3145           00000 00000  YUNIT              2DEC     0          B-28                       
014268,000505: 
014269,000506: 15,3147           20000 00000  XUNIT              2DEC     0.5                                   
014270,000507: 
014271,000508: 15,3151           00000 00000  ZERODP             2DEC     0          B-28                       
014272,000509: 
014273,000510: 15,3153           00000 00000                     2DEC     0          B-28                       
014274,000511: 
014275,000512: 15,3155           00000 00000                     2DEC     0          B-28                       
014276,000513: 
014277,000514: 15,3157           05252 25253  .166...            2DEC     .1666666667                            
014278,000515: 

Page 334

014280,000517: 
014281,000518:                                                                                                  #  AOTNB CONVERTS THE AOT RETICLE ROTATION ANGLE (YROT AND SROT) AND
014282,000519:                                                                                                  #  THE DETENT SETTING TO A HALF UNIT STAR VECTOR REFERRED TO THE
014283,000520:                                                                                                  #  NAVIGATION BASE FOR NON-FLIGHT ALIGNMENT MODES
014284,000521: 
014285,000522:                                                                                                  #  THE INPUTS ARE
014286,000523: 
014287,000524:                                                                                                  #     Y RET. LINE RATATION S(YROT) STORED IN LOC 3 OF THE MARK VAC AREA
014288,000525:                                                                                                  #     SPIRAL ROTATION ANGLE S(SROT) STORED IN LOC 5 OF MARK VAC AREA
014289,000526:                                                                                                  #     ANGLE OF CENTER OF FIELD OF VIEW S(ELV) STORED IN LOC 9 OF MARK VAC
014290,000527:                                                                                                  #     AOT ASZIMUTH ANGLE S(DET) STORED IN LOC 8 OF MARK VAC AREA
014291,000528:                                                                                                  #     THE COMPLEMENT OF BASE ADDRESS OF MARK VAC IS STORED AT X1
014292,000529:                                                                                                  #     COMPENSATION FOR FIELD OF VIEW TILT IN LOC 10D
014293,000530:                                                                                                  #  THE ABOVE STORAGE IS DONE BY AOTMARK
014294,000531: 
014295,000532: 
014296,000533:                                                                                                  #  THE OUTPUT IS A HALF UNIT STAR VECTOR IN NB COORDINATES STORED
014297,000534:                                                                                                  #  AT 32D AND AVAILABLE IN VAC ON RETURN TO THE CALLING PROGRAM
014298,000535: 
014299,000536: 15,3161           66601        AOTNB              SETPD    SLOAD*                                
014300,000537: 15,3162           00001                                    0                                     
014301,000538: 15,3163           00013                                    10D,1                                 #  AOT FOV TILT COMPENSATION ANGLE
014302,000539: 15,3164           41542                           SR1      PUSH                                  #  RESCALE TILT TO 2PI
014303,000540: 15,3165           47133                           SLOAD*   RTB                                   
014304,000541: 15,3166           00004                                    3,1                                   
014305,000542: 15,3167           33524                                    CDULOGIC                              
014306,000543: 15,3170           00017                           STORE    14D                                   #  STORE UNCOMPENSATED YROT FOR S COMP
014307,000544: 15,3171           41415                           DAD      PUSH                                  #  YROT NOW CORRECTED FOR TILT
014308,000545: 15,3172           65346                           COS      PDDL                                  #  1/2 COS(YROT) PD 0-1
014309,000546: 15,3173           41556                           SIN      PUSH                                  #  1/2 SIN(YROT) PD 2-3
014310,000547: 15,3174           47133                           SLOAD*   RTB                                   
014311,000548: 15,3175           00006                                    5,1                                   
014312,000549: 15,3176           33524                                    CDULOGIC                              
014313,000550: 15,3177           00021                           STORE    16D                                   #  STORE S IF S AND Y ARE ZERO, S=0
014314,000551: 15,3200           52054                           BZE      GOTO                                  #  S NOT ZERO
014315,000552: 15,3201           33203                                    SISZ                                  #  S=0
014316,000553: 15,3202           33213                                    SCOMP                                 
014317,000554: 15,3203           53145        SISZ               DLOAD    BZE                                   #  IS Y ZERO
014318,000555: 15,3204           00017                                    14D                                   
014319,000556: 
014320,000557: 15,3205           33210                                    YISZ                                  #  Y=0
014321,000558: 15,3206           77650                           GOTO                                           
014322,000559: 15,3207           33213                                    SCOMP                                 
014323,000560: 15,3210           52145        YISZ               DLOAD    GOTO                                  
014324,000561: 15,3211           33152                                    ZERODP                                
014325,000562: 15,3212           33220                                    SGOT                                  
014326,000563: 15,3213           45345        SCOMP              DLOAD    DSU                                   
014327,000564: 15,3214           00017                                    14D                                   
014328,000565: 15,3215           00021                                    16D                                   #  Y-S
014329,000566: 15,3216           77621                           BDSU                                           
014330,000567: 15,3217           33305                                    NEARONE                               #  S=360-(Y-S)
014331,000568: 15,3220           41405        SGOT               DMP      PUSH                                  
014332,000569: 

Page 335

014334,000571: 15,3221           33303                                    DP1/12                                
014335,000572: 15,3222           65346                           COS      PDDL                                  
014336,000573: 15,3223           41556                           SIN      PUSH                                  
014337,000574: 15,3224           72405                           DMP      SL1                                   
014338,000575: 15,3225           00001                                    0                                     
014339,000576: 15,3226           14001                           STODL    0                                     
014340,000577: 
014341,000578: 15,3227           00003                                    2                                     
014342,000579: 15,3230           45405                           DMP      STADR                                 
014343,000580: 15,3231           77774                           STORE    2                                     
014344,000581: 
014345,000582: 15,3232           47133                           SLOAD*   RTB                                   
014346,000583: 15,3233           00012                                    9D,1                                  
014347,000584: 15,3234           33524                                    CDULOGIC                              
014348,000585: 15,3235           73406                           PUSH     SIN                                   
014349,000586: 15,3236           71525                           PDDL     COS                                   
014350,000587: 15,3237           41206                           PUSH     DMP                                   
014351,000588: 15,3240           00001                                    0                                     
014352,000589: 15,3241           41325                           PDDL     DMP                                   
014353,000590: 
014354,000591: 15,3242           00005                                    4                                     
014355,000592: 15,3243           00007                                    6                                     
014356,000593: 15,3244           72415                           DAD      SL1                                   
014357,000594: 15,3245           77626                           STADR                                          
014358,000595: 15,3246           63736                           STODL    32D                                   
014359,000596: 
014360,000597: 15,3247           77605                           DMP                                            
014361,000598: 15,3250           00005                                    4                                     
014362,000599: 15,3251           14005                           STODL    4                                     
014363,000600: 
014364,000601: 15,3252           44205                           DMP      BDSU                                  
014365,000602: 15,3253           00001                                    0                                     
014366,000603: 15,3254           66606                           PUSH     SLOAD*                                
014367,000604: 15,3255           00011                                    8D,1                                  
014368,000605: 15,3256           41434                           RTB      PUSH                                  
014369,000606: 15,3257           33524                                    CDULOGIC                              
014370,000607: 15,3260           65346                           COS      PDDL                                  
014371,000608: 15,3261           77756                           SIN                                            
014372,000609: 15,3262           00001                           STORE    0                                     
014373,000610: 
014374,000611: 15,3263           65205                           DMP      PDDL                                  
014375,000612: 15,3264           00005                                    4                                     
014376,000613: 15,3265           00007                                    6                                     
014377,000614: 
014378,000615: 15,3266           43205                           DMP      DAD                                   
014379,000616: 15,3267           00003                                    2                                     
014380,000617: 15,3270           77712                           SL2                                            
014381,000618: 15,3271           14043                           STODL    34D                                   
014382,000619: 
014383,000620: 15,3272           45405                           DMP      STADR                                 
014384,000621: 15,3273           63732                           STODL    36D                                   
014385,000622: 

Page 336

014387,000624: 15,3274           77605                           DMP                                            
014388,000625: 15,3275           62421                           BDSU     SL2                                   
014389,000626: 
014390,000627: 15,3276           00045                                    36D                                   
014391,000628: 15,3277           24045                           STOVL    36D                                   
014392,000629: 15,3300           00041                                    32D                                   
014393,000630: 15,3301           77616                           RVQ                                            
014394,000631: 
014395,000632: 15,3302           02525 12525  DP1/12             2DEC     .0833333333                            
014396,000633: 
014397,000634: 15,3304           37777 37777  NEARONE            2DEC     .999999999                            
014398,000635: 

Page 337

014400,000637: 
014401,000638:                                                                                                  #  AOTSM CALCULATES A HALF UNIT STAR VECTOR IN STABLE MEMBER COORDINATES
014402,000639:                                                                                                  #  FROM TWO PLANES CONTAINING THE STAR REFERRED TO NB
014403,000640: 
014404,000641:                                                                                                  #  THE INPUTS ARE
014405,000642: 
014406,000643:                                                                                                  #     AOT AZIMUTH AND ELEVATION STORED IN 8D AND 9D RESP. OF VAC AREA
014407,000644:                                                                                                  #     CDUY, CDUZ AND CDUX FROM A YMARK STORED AT 3, 5, AND 7 OF VAC AREA
014408,000645:                                                                                                  #     CDUY, CDUZ AND CDUX FROM A XMARK STORED AT 2, 4, AND 6 OF VAC AREA
014409,000646: 
014410,000647:                                                                                                  #     COMPENSATION FOR FIELD OF VIEW STORED AT 10D OF VAC AREA
014411,000648:                                                                                                  #  THE BASE ADDRESS OF THE CDUS IS STORED AT LOCATION S1
014412,000649: 
014413,000650:                                                                                                  #  THE OUTPUT IS A STAR VECTOR REFERRED TO STABLE MEMBER AT LOC 32D
014414,000651:                                                                                                  #  AND AVAILBLE IN MPAC
014415,000652: 
014416,000653: 15,3306           40220        AOTSM              STQ      SETPD                                 
014417,000654: 15,3307           00035                                    29D                                   #  SET UP RETURN
014418,000655: 15,3310           00001                                    0                                     
014419,000656: 15,3311           66740                           LXC,1    SLOAD*                                
014420,000657: 15,3312           00050                                    S1                                    #  COMPLEMENT OF CDU ADR FOR XMARK
014421,000658: 15,3313           00011                                    8D,1                                  #  LOAD APPARENT TILT ANGLE,ONES COMP
014422,000659: 15,3314           77742                           SR1                                            #  RESCALE TILT TO 2PI
014423,000660: 15,3315           71406                           PUSH     COS                                   
014424,000661: 15,3316           73525                           PDDL     SIN                                   #  1/2 COS(TA)  0-1
014425,000662: 15,3317           66606                           PUSH     SLOAD*                                #  1/2 SIN(TA)  2-3
014426,000663: 15,3320           00007                                    6,1                                   #  LOAD AZIMUTH, 2S COMP
014427,000664: 15,3321           41434                           RTB      PUSH                                  
014428,000665: 15,3322           33524                                    CDULOGIC                              
014429,000666: 15,3323           65346                           COS      PDDL                                  #  1/2 COS(AZ)  4-5
014430,000667: 15,3324           41556                           SIN      PUSH                                  #  1/2 SIN(AZ)  6-7
014431,000668: 15,3325           65205                           DMP      PDDL                                  
014432,000669: 15,3326           00001                                    0                                     
014433,000670: 
014434,000671: 15,3327           65205                           DMP      PDDL                                  
014435,000672: 15,3330           00003                                    2                                     
014436,000673: 15,3331           00005                                    4                                     
014437,000674: 15,3332           65205                           DMP      PDDL                                  
014438,000675: 15,3333           00001                                    0                                     
014439,000676: 15,3334           00005                                    4                                     
014440,000677: 15,3335           41405                           DMP      PUSH                                  
014441,000678: 15,3336           47133                           SLOAD*   RTB                                   
014442,000679: 15,3337           00010                                    7,1                                   #  LOAD ELEVATION, 2S COMP
014443,000680: 15,3340           33524                                    CDULOGIC                              
014444,000681: 15,3341           73406                           PUSH     SIN                                   
014445,000682: 15,3342           71525                           PDDL     COS                                   #  1/2 SIN(ELV)  14-15
014446,000683: 15,3343           41206                           PUSH     DMP                                   #  1/2 COS(ELV)  16-17
014447,000684: 15,3344           00001                                    0                                     
014448,000685: 15,3345           77752                           SL1                                            
014449,000686: 15,3346           14041                           STODL    32D                                   #  X COMPONENT OF X-PLANE VECTOR
014450,000687: 
014451,000688: 15,3347           72405                           DMP      SL1                                   #  UP 16-17
014452,000689: 15,3350           00003                                    2                                     
014453,000690: 

Page 338

014455,000692: 
014456,000693: 15,3351           65276                           DCOMP    PDDL                                  #  X COMPONENT OF Y-PLANE VECTOR 16-17
014457,000694: 
014458,000695: 15,3352           00017                                    14D                                   
014459,000696: 15,3353           72405                           DMP      SL1                                   
014460,000697: 15,3354           00007                                    6                                     
014461,000698: 15,3355           72421                           BDSU     SL1                                   
014462,000699: 15,3356           00015                                    12D                                   
014463,000700: 15,3357           14043                           STODL    34D                                   #  Y COMPONENT OF X-PLANE VEC
014464,000701: 
014465,000702: 15,3360           00017                                    14D                                   
014466,000703: 15,3361           72405                           DMP      SL1                                   
014467,000704: 15,3362           00013                                    10D                                   
014468,000705: 15,3363           72415                           DAD      SL1                                   
014469,000706: 15,3364           00011                                    8D                                    
014470,000707: 
014471,000708: 15,3365           77676                           DCOMP                                          
014472,000709: 15,3366           14045                           STODL    36D                                   #  Z COMPONENT OF X-PLANE VECTOR
014473,000710: 
014474,000711: 15,3367           00017                                    14D                                   
014475,000712: 15,3370           72405                           DMP      SL1                                   
014476,000713: 15,3371           00011                                    8D                                    
014477,000714: 15,3372           72415                           DAD      SL1                                   
014478,000715: 15,3373           00013                                    10D                                   
014479,000716: 15,3374           41325                           PDDL     DMP                                   #  Y COMPONENT OF Y-PLANE VECTOR 18-19
014480,000717: 
014481,000718: 15,3375           00017                                    14D                                   
014482,000719: 15,3376           00015                                    12D                                   
014483,000720: 15,3377           72425                           DSU      SL1                                   
014484,000721: 15,3400           00007                                    6                                     
014485,000722: 15,3401           34025                           STCALL   20D                                   #  Z COMPONENT OF Y-PLANE VECTOR 20-21
014486,000723: 
014487,000724: 15,3402           32622                                    NBSM                                  #  TRANSFORM TO SM
014488,000725: 15,3403           24013                           STOVL    10D                                   #  STORE X-PLAVE VECTOR (SM)
014489,000726: 
014490,000727: 15,3404           00021                                    16D                                   #  LOAD Y-PLANE VECTOR (NB)
014491,000728: 15,3405           62120                           XCHX,1   INCR,1                                
014492,000729: 15,3406           00050                                    S1                                    #  INCREMENT CDU BASE ADR TO YMARK CDUS
014493,000730: 15,3407           00001                                    1                                     
014494,000731: 
014495,000732: 15,3410           77720                           XCHX,1                                         #  PUT IT BACK IN S1
014496,000733: 15,3411           00050                                    S1                                    
014497,000734: 15,3412           34041                           STCALL   32D                                   
014498,000735: 15,3413           32622                                    NBSM                                  #  GET Y-PLANE IN SM
014499,000736: 15,3414           76435                           VXV      VSL1                                  #  YP CROSS XP
014500,000737: 15,3415           00013                                    10D                                   
014501,000738: 15,3416           53476                           VCOMP    UNIT                                  #  UNIT (XP CROSS YP)
014502,000739: 15,3417           00041                           STORE    32D                                   #  STAR VECTOR IN SM COORDINATES
014503,000740: 15,3420           77650                           GOTO                                           
014504,000741: 15,3421           00035                                    29D                                   #  RETURN
014505,000742: 

Page 339

014507,000744: 
014508,000745:                                                                                                  #           THE FOLLOWING ROUTINE TAKES A HALF UNIT TARGET VECTOR REFERRED TO NAV BASE COORDINATES AND FINDS BOTH
014509,000746:                                                                                                  #  GIMBAL ORIENTATIONS AT WHICH THE RR MIGHT SIGHT THE TARGET. THE GIMBAL ANGLES CORRESPONDING TO THE PRESENT MODE
014510,000747:                                                                                                  #  ARE LEFT IN MODEA AND THOSE WHICH WOULD BE USED AFTER A REMODE IN MODEB. THIS ROUTINE ASSUMES MODE 1 IS TRUNNION
014511,000748:                                                                                                  #  ANGLE LESS THAN 90 DEGS IN ABS VALUE WITH ARBITRARY SHAFT, WITH A CORRESPONDING DEFINITION FOR MODE 2. MODE
014512,000749:                                                                                                  #  SELECTION AND LIMIT CHECKING ARE DONE ELSEWHERE.
014513,000750: 
014514,000751:                                                                                                  #           THE MODE 1 CONFIGURATION IS CALCULATED FROM THE VECTOR AND THEN MODE 2 IS FOUND USING THE RELATIONS
014515,000752: 
014516,000753:                                                                                                  #           S(2) = 180 + S(1)
014517,000754:                                                                                                  #           T(2) = 180 - T(1)
014518,000755: 
014519,000756: 15,3422           57545        RRANGLES           DLOAD    DCOMP                                 #  SINCE WE WILL FIND THE MODE 1 SHAFT
014520,000757: 15,3423           00043                                    34D                                   #  ANGLE LATER, WE CAN FIND THE MODE 1
014521,000758: 15,3424           67401                           SETPD    ASIN                                  #  TRUNNION BY SIMPLY TAKING THE ARCSIN OF
014522,000759: 15,3425           00001                                    0                                     #  THE Y COMPONENT, THE ASIN GIVING AN
014523,000760: 15,3426           44206                           PUSH     BDSU                                  #  ANSWER WHOSE ABS VAL IS LESS THAN 90 DEG
014524,000761: 15,3427           33142                                    HALFDP                                
014525,000762: 15,3430           14005                           STODL    4                                     #  MODE 2 TRUNNION TO 4.
014526,000763: 
014527,000764: 15,3431           33152                                    ZERODP                                
014528,000765: 15,3432           24043                           STOVL    34D                                   #  UNIT THE PROJECTION OF THE VECTOR IN THE
014529,000766: 15,3433           00041                                    32D                                   #  X-Z PLANE.
014530,000767: 15,3434           41056                           UNIT     BOVB                                  #  CALL FOR S/C MANEUVER ON GIMBAL LOCK.
014531,000768: 15,3435           20346                                    DESRETRN   +1                         
014532,000769: 15,3436           14041                           STODL    32D                                   #  PROJECTION VECTOR.
014533,000770: 15,3437           00041                                    32D                                   
014534,000771: 15,3440           44142                           SR1      STQ                                   
014535,000772: 15,3441           00051                                    S2                                    
014536,000773: 15,3442           14023                           STODL    SINTH                                 #  USE ARCTRIG SINCE SHAFT COULD BE ARB.
014537,000774: 15,3443           00045                                    36D                                   
014538,000775: 15,3444           77742                           SR1                                            
014539,000776: 15,3445           34021                           STCALL   COSTH                                 
014540,000777: 15,3446           32543                                    ARCTRIG                               
014541,000778: 

Page 340

014543,000780: 15,3447           43206                           PUSH     DAD                                   #  MODE 1 SHAFT TO 2.
014544,000781: 15,3450           33142                                    HALFDP                                #  (OVERFLOW DOESNT MATTER SINCE SCALED REV
014545,000782: 
014546,000783: 15,3451           24007                           STOVL    6                                     
014547,000784: 15,3452           00005                                    4                                     
014548,000785: 15,3453           77634                           RTB                                            #  FIND MODE 2 CDU ANGLES.
014549,000786: 15,3454           33610                                    2V1STO2S                              
014550,000787: 15,3455           24426                           STOVL    MODEB                                 
014551,000788: 15,3456           00001                                    0                                     
014552,000789: 15,3457           77634                           RTB                                            #  MODE 1 ANGLES TO MODE A.
014553,000790: 15,3460           33610                                    2V1STO2S                              
014554,000791: 15,3461           00424                           STORE    MODEA                                 
014555,000792: 15,3462           77776                           EXIT                                           
014556,000793: 
014557,000794: 15,3463           40413                           CS       RADMODES                              #  SWAP MODEA AND MODEB IF RR IN MODE2.
014558,000795: 15,3464           77742                           MASK     BIT12                                 
014559,000796: 15,3465           10000                           CCS      A                                     
014560,000797: 15,3466           13472                           TCF      +4                                    
014561,000798: 
014562,000799: 15,3467           52424                           DXCH     MODEA                                 
014563,000800: 15,3470           52426                           DXCH     MODEB                                 
014564,000801: 15,3471           52424                           DXCH     MODEA                                 
014565,000802: 
014566,000803: 15,3472           06103                           TC       INTPRET                               
014567,000804: 15,3473           77650                           GOTO                                           
014568,000805: 15,3474           00051                                    S2                                    
014569,000806: 

Page 341

014571,000808:                                                                                                  #     GIVEN RR TRUNION AND SHAFT (T,S) IN TANG,+1, FIND THE ASSOCIATED
014572,000809:                                                                                                  #  LINE OF SIGHT IN NAV BASE AXES.  THE HALF UNIT VECTOR, .5(SIN(S)COS(T),
014573,000810:                                                                                                  #  -SIN(T),COS(S)COS(T)) IS LEFT IN MPAC AND 32D.
014574,000811: 
014575,000812: 15,3475           47135        RRNB               SLOAD    RTB                                   
014576,000813: 15,3476           00424                                    TANG                                  
014577,000814: 15,3477           33524                                    CDULOGIC                              
014578,000815: 15,3500           41401                           SETPD    PUSH                                  #  TRUNNION ANGLE TO 0
014579,000816: 
014580,000817: 15,3501           00001                                    0                                     
014581,000818: 15,3502           57556                           SIN      DCOMP                                 
014582,000819: 15,3503           14043                           STODL    34D                                   #  Y COMPONENT
014583,000820: 
014584,000821: 15,3504           41546                           COS      PUSH                                  #  .5 COS(T) TO 0
014585,000822: 15,3505           47135                           SLOAD    RTB                                   
014586,000823: 15,3506           00425                                    TANG       +1                         
014587,000824: 15,3507           33524                                    CDULOGIC                              
014588,000825: 15,3510           71406                           PUSH     COS                                   #  SHAFT ANGLE TO 2
014589,000826: 15,3511           72405                           DMP      SL1                                   
014590,000827: 15,3512           00001                                    0                                     
014591,000828: 15,3513           14045                           STODL    36D                                   #  Z COMPONENT
014592,000829: 
014593,000830: 15,3514           41356                           SIN      DMP                                   
014594,000831: 15,3515           77752                           SL1                                            
014595,000832: 15,3516           24041                           STOVL    32D                                   
014596,000833: 15,3517           00041                                    32D                                   
014597,000834: 15,3520           77616                           RVQ                                            

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