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.

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

Page 322

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

Page 323

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

Page 324

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

Page 325

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

Page 326

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

Page 327

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

Page 328

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

Page 329

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

Page 330

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

Page 331

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

Page 332

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

Page 333

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

Page 334

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

Page 335

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

Page 336

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

Page 337

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

Page 338

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

Page 339

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

Page 340

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

Page 341

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

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