Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of BURST120 (SUNBURST 120). They were scanned at archive.org's Boston facility, and the scanning was sponsored by Mike Stewart. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are in ALL-CAPS, whereas comments added later in transcription are in Mixed-Case. In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the BURST120 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	YUL SYSTEM FOR AGC: REVISION 0 OF PROGRAM BURST120 
	BY NASA 2021106-031 DEC 7, 1967

	THIS LISTING IS A COPY OF A VERSION OF THE PROGRAM INTENDED 
	FOR USE IN THE ON-BOARD PRIMARY GUIDANCE COMPUTER IN THE 
	UNMANNED FLIGHT OF APOLLO LUNAR MODULE 1 --- THE AS206 MISSION.
Note that the date is the date of the printout, not the date of the program revision.

014038,000002:                                                                                                  ## Copyright:   Public domain.
014039,000003:                                                                                                  ## Filename:    INFLIGHT_ALIGNMENT_ROUTINES.agc
014040,000004:                                                                                                  ## Purpose:     A module for revision 0 of BURST120 (Sunburst). It 
014041,000005:                                                                                                  ##              is part of the source code for the Lunar Module's
014042,000006:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 5.
014043,000007:                                                                                                  ## Assembler:   yaYUL
014044,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
014045,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
014046,000010:                                                                                                  ## Mod history: 2016-09-30 RSB  Created draft version.
014047,000011:                                                                                                  ##              2016-10-16 RSB  Transcribed.
014048,000012:                                                                                                  ##              2016-10-31 RSB  Typos.
014049,000013:                                                                                                  ##              2016-11-01 RSB  More typos.
014050,000014:                                                                                                  ##              2016-11-02 RSB  More typos.
014051,000015:                                                                                                  ##              2016-12-05 RSB  Comment-proofing pass with octopus/ProoferComments completed;
014052,000016:                                                                                                  ##                              changes made.
014053,000017:                                                                                                  ##              2017-03-17 RSB  Comment-text fixes identified in diff'ing
014054,000018:                                                                                                  ##                              Luminary 99 vs Comanche 55.
014055,000019: 

Page 340

014057,000021: 15,2425                                           BANK     15                                    
014058,000022: 15,2425  E5,1400                                  EBANK=   XSM                                   
014059,000023: 
014060,000024: 
014061,000025:                                                                                                  #  CALCGTA COMPUTES THE GYRO TORQUE ANGLES REQUIRED TO BRING THE STABLE MEMBER INTO THE DESIRED ORIENTATION.
014062,000026: 
014063,000027:                                                                                                  #  THE INPUT IS THE DESIRED STABLE MEMBER COORDINATES REFERRED TO PRESENT STABLE MEMBER COORDINATES.  THE THREE
014064,000028:                                                                                                  #  HALF-UNIT VECTORS ARE STORED AT XDC, YDC, AND ZDC.
014065,000029: 
014066,000030:                                                                                                  #  THE OUTPUTS ARE THE THREE GYRO TORQUING ANGLES TO BE APPLIED TO THE Y, Z, AND X GYROS AND ARE STORED DP AT IGC,
014067,000031:                                                                                                  #  MGC, AND OGC RESPECTIVELY. ANGLES ARE SCALED PROPERLY FOR IMUPULSE.
014068,000032: 
014069,000033: 
014070,000034: 15,2425           71220        CALCGTA            ITA      DLOAD                                 #  PUSHDOWN 00,02,16D,18D,22D-26D,32D-36D
014071,000035: 15,2426           00051                                    S2                                    #  XDC = (XD1 XD2 XD3)
014072,000036: 15,2427           02423                                    XDC                                   #  YDC = (YD1 YD2 YD3)
014073,000037: 15,2430           65325                           PDDL     PDDL                                  #  ZDC = (ZD1 ZD2 ZD3)
014074,000038: 15,2431           33105                                    ZERODP                                
014075,000039: 15,2432           02427                                    XDC        +4                         
014076,000040: 15,2433           55476                           DCOMP    VDEF                                  
014077,000041: 15,2434           77656                           UNIT                                           
014078,000042: 15,2435           14027                           STODL    ZPRIME                                #  ZP = UNIT(-XD3 0 XD1) = (ZP1 ZP2 ZP3)
014079,000043: 15,2436           00027                                    ZPRIME                                
014080,000044: 
014081,000045: 15,2437           77742                           SR1                                            
014082,000046: 15,2440           14023                           STODL    SINTH                                 #  SIN(IGC) = ZP1
014083,000047: 15,2441           00033                                    ZPRIME     +4                         
014084,000048: 15,2442           77742                           SR1                                            
014085,000049: 15,2443           34021                           STCALL   COSTH                                 #  COS(IGC) = ZP3
014086,000050: 15,2444           32476                                    ARCTRIG                               
014087,000051: 
014088,000052: 15,2445           16503                           STODL    IGC                                   #  Y GYRO TORQUING ANGLE   FRACTION OF REV.
014089,000053: 15,2446           02425                                    XDC        +2                         
014090,000054: 15,2447           77742                           SR1                                            
014091,000055: 15,2450           14023                           STODL    SINTH                                 #  SIN(MGC) = XD2
014092,000056: 15,2451           00027                                    ZPRIME                                
014093,000057: 
014094,000058: 15,2452           65205                           DMP      PDDL                                  
014095,000059: 15,2453           02427                                    XDC        +4                         #  PD00 = (ZP1)(XD3)
014096,000060: 15,2454           00033                                    ZPRIME     +4                         
014097,000061: 
014098,000062: 15,2455           45205                           DMP      DSU                                   
014099,000063: 15,2456           02423                                    XDC                                   #  MPAC = (ZP3)(XD1)
014100,000064: 15,2457           77626                           STADR                                          
014101,000065: 15,2460           43756                           STCALL   COSTH                                 #  COS(MGC) = MPAC - PD00
014102,000066: 15,2461           32476                                    ARCTRIG                               
014103,000067: 
014104,000068: 15,2462           26505                           STOVL    MGC                                   #  Z GYRO TORQUING ANGLE   FRACTION OF REV.

Page 341

014106,000070: 15,2463           00027                                    ZPRIME                                
014107,000071: 15,2464           77641                           DOT                                            
014108,000072: 15,2465           02437                                    ZDC                                   
014109,000073: 15,2466           24021                           STOVL    COSTH                                 #  COS(OGC) = ZP . ZDC
014110,000074: 15,2467           00027                                    ZPRIME                                
014111,000075: 15,2470           77641                           DOT                                            
014112,000076: 15,2471           02431                                    YDC                                   
014113,000077: 15,2472           34023                           STCALL   SINTH                                 #  SIN(OGC) = ZP . YDC
014114,000078: 15,2473           32476                                    ARCTRIG                               
014115,000079: 
014116,000080: 15,2474           36501                           STCALL   OGC                                   #  X GYRO TORQUING ANGLE   FRACTION OF REV.
014117,000081: 15,2475           00051                                    S2                                    
014118,000082: 

Page 342

014120,000084:                                                                                                  #  ARCTRIG COMPUTES AN ANGLE GIVEN THE SINE AND COSINE OF THIS ANGLE.
014121,000085: 
014122,000086:                                                                                                  #  THE INPUTS ARE SIN/4 AND COS/4 STORED DP AT SINTH AND COSTH.
014123,000087: 
014124,000088:                                                                                                  #  THE OUTPUT IS THE CALCULATED ANGLE BETWEEN +.5 AND -.5 REVOLUTIONS AND STORED AT THETA. THE OUTPUT IS ALSO
014125,000089:                                                                                                  #  AVAILABLE AT MPAC.
014126,000090: 
014127,000091: 15,2476           51545        ARCTRIG            DLOAD    ABS                                   #  PUSHDOWN  16D,18D,20D,22D-26D
014128,000092: 15,2477           00023                                    SINTH                                 
014129,000093: 15,2500           50025                           DSU      BMN                                   
014130,000094: 15,2501           33073                                    QTSN45                                #  ABS(SIN/4) - SIN(45)/4
014131,000095: 15,2502           32511                                    TRIG1                                 #  IF (-45,45) OR (135,-135)
014132,000096: 
014133,000097: 
014134,000098: 15,2503           72545                           DLOAD    SL1                                   #  (45,135) OR (-135,-45)
014135,000099: 15,2504           00021                                    COSTH                                 
014136,000100: 15,2505           75326                           ACOS     SIGN                                  
014137,000101: 15,2506           00023                                    SINTH                                 
014138,000102: 15,2507           00025                           STORE    THETA                                 #  X = ARCCOS(COS) WITH SIGN(SIN)
014139,000103: 15,2510           77616                           RVQ                                            
014140,000104: 
014141,000105: 
014142,000106: 15,2511           72545        TRIG1              DLOAD    SL1                                   #  (-45,45) OR (135,-135)
014143,000107: 15,2512           00023                                    SINTH                                 
014144,000108: 15,2513           77736                           ASIN                                           
014145,000109: 15,2514           14025                           STODL    THETA                                 #  X = ARCSIN(SIN) WITH SIGN(SIN)
014146,000110: 15,2515           00021                                    COSTH                                 
014147,000111: 15,2516           77640                           BMN                                            
014148,000112: 15,2517           32522                                    TRIG2                                 #  IF (135,-135)
014149,000113: 
014150,000114: 15,2520           43545                           DLOAD    RVQ                                   
014151,000115: 15,2521           00025                                    THETA                                 #  X = ARCSIN(SIN)   (-45,45)
014152,000116: 
014153,000117: 
014154,000118: 15,2522           75345        TRIG2              DLOAD    SIGN                                  #  (135,-135)
014155,000119: 15,2523           33075                                    HALFDP                                
014156,000120: 15,2524           00023                                    SINTH                                 
014157,000121: 15,2525           77625                           DSU                                            
014158,000122: 15,2526           00025                                    THETA                                 
014159,000123: 15,2527           00025                           STORE    THETA                                 #  X = .5 WITH SIGN(SIN) - ARCSIN(SIN)
014160,000124: 15,2530           77616                           RVQ                                            #                   (+) - (+) OR (-) - (-)
014161,000125: 

Page 343

014163,000127:                                                                                                  #  SMNB TRANSFORMS A STAR DIRECTION FROM STABLE MEMBER TO NAVIGATION BASE COORDINATES.
014164,000128: 
014165,000129:                                                                                                  #  THE INPUTS ARE  1) THE STAR VECTOR REFERRED TO PRESENT STABLE MEMBER COORDINATES STORED AT LOCATION 32D OF THE
014166,000130:                                                                                                  #  VAC AREA.  2) THE GIMBAL ANGLES (CDUY,CDUZ,CDUX) STORED AT ALTERNATING LOCATIONS RESPECTIVELY. THE ANGLES ARE
014167,000131:                                                                                                  #  USUALLY STORED AT LOCATIONS 2,4, AND 6 OF THE MARK VAC AREA. THEY CAN BE STORED AT LOCATIONS 20,22, AND 24 OF
014168,000132:                                                                                                  #  YOUR JOB VAC AREA.  3) THE BASE ADDRESS OF THE GIMBAL ANGLES STORED SP AT LOCATION S1 OF YOUR JOB VAC AREA.
014169,000133: 
014170,000134:                                                                                                  #  THE OUTPUT IS THE STAR VECTOR REFERRED TO NAVIGATION BASE COORDINATES STORED AT 32D OF THE VAC AREA. THE OUTPUT
014171,000135:                                                                                                  #  IS ALSO AVAILABLE AT MPAC.
014172,000136: 
014173,000137: 
014174,000138: 
014175,000139: 15,2531           43020        SMNB               ITA      CLEAR                                 #  PUSHDOWN 00,02,04-10D,30D,32D-36D
014176,000140: 15,2532           00051                                    S2                                    
014177,000141: 15,2533           00264                                    NBSMBIT                               #  SET NBSMBIT = 0
014178,000142: 
014179,000143: 15,2534           77170        SMNB1              AXT,1    AXT,2                                 #  ROTATE X,Z, ABOUT Y
014180,000144: 15,2535           00004                                    4                                     
014181,000145: 15,2536           00000                                    0                                     
014182,000146: 15,2537           77624                           CALL                                           
014183,000147: 15,2540           32601                                    AXISROT                               
014184,000148: 
014185,000149: 15,2541           77170                           AXT,1    AXT,2                                 #  ROTATE Y,X ABOUT Z
014186,000150: 15,2542           00002                                    2                                     
014187,000151: 15,2543           00004                                    4                                     
014188,000152: 15,2544           77624                           CALL                                           
014189,000153: 15,2545           32601                                    AXISROT                               
014190,000154: 
014191,000155: 15,2546           77170                           AXT,1    AXT,2                                 #  ROTATE Z,Y ABOUT X
014192,000156: 15,2547           00000                                    0                                     
014193,000157: 15,2550           00002                                    2                                     
014194,000158: 15,2551           77624                           CALL                                           
014195,000159: 15,2552           32601                                    AXISROT                               
014196,000160: 
014197,000161: 15,2553           77650                           GOTO                                           
014198,000162: 15,2554           00051                                    S2                                    

Page 344

014200,000164: 
014201,000165:                                                                                                  #  NBSM TRANSFORMS A STAR DIRECTION FROM NAVIGATION BASE TO STABLE MEMBER COORDINATES.
014202,000166: 
014203,000167:                                                                                                  #  THE INPUTS ARE  1) THE STAR VECTOR REFERRED TO NAVIGATION BASE COORDINATES STORED AT LOCATION 32D OF THE VAC
014204,000168:                                                                                                  #  AREA.  2) THE GIMBAL ANGLES (CDUY,CDUZ,CDUX) STORED AT ALTERNATING LOCATIONS RESPECTIVELY. THE ANGLES ARE 
014205,000169:                                                                                                  #  USUALLY STORED AT LOCATIONS 2,4, AND 6 OF THE MARK VAC AREA. THEY CAN BE STORED AT LOCATIONS 20,22, AND 24 OF
014206,000170:                                                                                                  #  YOUR JOB VAC AREA.  3) THE BASE ADDRESS OF THE GIMBAL ANGLES STORED SP AT LOCATION S1 OF YOUR JOB VAC AREA.
014207,000171: 
014208,000172:                                                                                                  #  THE OUTPUT IS THE STAR VECTOR REFERRED TO PRESENT STABLE MEMBER COORDINATES STORED AT LOCATION 32D OF THE VAC
014209,000173:                                                                                                  #  AREA. THE OUTPUT IS ALSO AVAILABLE AT MPAC.
014210,000174: 
014211,000175: 
014212,000176: 
014213,000177: 15,2555           43020        NBSM               ITA      SET                                   #  PUSHDOWN 00,02,04-10D,30D,32D-36D
014214,000178: 15,2556           00051                                    S2                                    
014215,000179: 15,2557           00064                                    NBSMBIT                               #  SET NBSMBIT = 1
014216,000180: 
014217,000181: 15,2560           77170        NBSM2              AXT,1    AXT,2                                 #  ROTATE Z,Y ABOUT X
014218,000182: 15,2561           00000                                    0                                     
014219,000183: 15,2562           00002                                    2                                     
014220,000184: 15,2563           77624                           CALL                                           
014221,000185: 15,2564           32601                                    AXISROT                               
014222,000186: 
014223,000187: 15,2565           77170                           AXT,1    AXT,2                                 #  ROTATE Y,X ABOUT Z
014224,000188: 15,2566           00002                                    2                                     
014225,000189: 15,2567           00004                                    4                                     
014226,000190: 15,2570           77624                           CALL                                           
014227,000191: 15,2571           32601                                    AXISROT                               
014228,000192: 
014229,000193: 15,2572           77170                           AXT,1    AXT,2                                 #  ROTATE X,Z, ABOUT Y
014230,000194: 15,2573           00004                                    4                                     
014231,000195: 15,2574           00000                                    0                                     
014232,000196: 15,2575           77624                           CALL                                           
014233,000197: 15,2576           32601                                    AXISROT                               
014234,000198: 
014235,000199: 15,2577           77650                           GOTO                                           
014236,000200: 15,2600           00051                                    S2                                    

Page 345

014238,000202: 
014239,000203:                                                                                                  #  AXISROT IS UTILIZED BY THE SMNB AND NBSM ROUTINES. SEE REMARKS ON THESE ROUTINES FOR INPUTS AND OUTPUTS.
014240,000204: 
014241,000205: 
014242,000206: 
014243,000207: 15,2601           66660        AXISROT            XSU,1    SLOAD*                                
014244,000208: 15,2602           00050                                    S1                                    #       SMNB         .       NBSM
014245,000209: 15,2603           00005                                    4,1                                   #  IG    MG    OG    .  OG    MG    IG
014246,000210: 15,2604           56034                           RTB      XAD,1                                 
014247,000211: 15,2605           33457                                    CDULOGIC                              
014248,000212: 15,2606           00050                                    S1                                    
014249,000213: 15,2607           00037                           STORE    30D                                   
014250,000214: 
014251,000215: 15,2610           77746        ACCUROT            COS                                            
014252,000216: 15,2611           04011                           STORE    8D,1                                  #               COS(ANGLE)
014253,000217: 15,2612           73545                           DLOAD    SIN                                   
014254,000218: 15,2613           00037                                    30D                                   
014255,000219: 15,2614           04013                           STORE    10D,1                                 #               SIN(ANGLE)
014256,000220: 
014257,000221: 15,2615           72403                           DMP*     SL1                                   
014258,000222: 15,2616           77732                                    32D        +4,2                       
014259,000223: 15,2617           40723                           PDDL*    DMP*                                  #                   PD0
014260,000224: 15,2620           00011                                    8D,1                                  #  S3SIN S1SIN S2SIN . S2SIN S1SIN S3SIN
014261,000225: 15,2621           77732                                    32D        +4,2                       
014262,000226: 
014263,000227: 15,2622           64752                           SL1      PDDL*                                 #                   PD2
014264,000228: 15,2623           00013                                    10D,1                                 #  S3COS S1COS S2COS . S2COS S1COS S3COS
014265,000229: 
014266,000230: 15,2624           72403                           DMP*     SL1                                   #                  MPAC
014267,000231: 15,2625           00045                                    32D        +4,1                       #  S1SIN S2SIN S3SIN . S3SIN S2SIN S1SIN
014268,000232: 
014269,000233: 15,2626           77614                           BOFF                                           
014270,000234: 15,2627           00344                                    NBSMBIT                               
014271,000235: 15,2630           32643                                    AXISROT1                              
014272,000236: 
014273,000237: 15,2631           45421                           BDSU     STADR                                 #                    .   PD2 - MPAC
014274,000238: 15,2632           67732                           STORE    32D        +4,2                       #                    . S2    S1    S3
014275,000239: 15,2633           77743                           DLOAD*                                         
014276,000240: 15,2634           00011                                    8D,1                                  
014277,000241: 
014278,000242: 15,2635           72403                           DMP*     SL1                                   #                    .      MPAC
014279,000243: 15,2636           00045                                    32D        +4,1                       #                    . S3COS S2COS S1COS
014280,000244: 
014281,000245: 15,2637           45415                           DAD      STADR                                 #                    .   PD0 + MPAC
014282,000246: 15,2640           73732                           STORE    32D        +4,1                       #                    . S3    S2    S1
014283,000247: 15,2641           43575                           VLOAD    RVQ                                   
014284,000248: 15,2642           00041                                    32D                                   
014285,000249: 15,2643           45415        AXISROT1           DAD      STADR                                 #    MPAC + PD2      .
014286,000250: 15,2644           67732                           STORE    32D        +4,2                       #  S3    S1    S2
014287,000251: 15,2645           77743                           DLOAD*                                         
014288,000252: 15,2646           00011                                    8D,1                                  

Page 346

014290,000254: 15,2647           72403                           DMP*     SL1                                   #       MPAC         .
014291,000255: 15,2650           00045                                    32D        +4,1                       #  S1COS S2COS S3COS .
014292,000256: 
014293,000257: 15,2651           45425                           DSU      STADR                                 #    MPAC - PD0      .
014294,000258: 15,2652           73732                           STORE    32D        +4,1                       #  S1    S2    S3
014295,000259: 15,2653           43575                           VLOAD    RVQ                                   
014296,000260: 15,2654           00041                                    32D                                   
014297,000261:                                                                                                  #  CALCGA COMPUTES THE CDU DRIVING ANGLES REQUIRED TO BRING THE STABLE MEMBER INTO THE DESIRED ORIENTATION.
014298,000262: 
014299,000263:                                                                                                  #  THE INPUTS ARE  1) THE NAVIGATION BASE COORDINATES REFERRED TO ANY COORDINATE SYSTEM. THE THREE HALF-UNIT
014300,000264:                                                                                                  #  VECTORS ARE STORED AT XNB,YNB, AND ZNB.  2) THE DESIRED STABLE MEMBER COORDINATES REFERRED TO THE SAME
014301,000265:                                                                                                  #  COORDINATE SYSTEM ARE STORED AT XSM, YSM, AND ZSM.
014302,000266: 
014303,000267:                                                                                                  #  THE OUTPUTS ARE THE THREE CDU DRIVING ANGLES AND ARE STORED SP AT THETAD, THETAD +1, AND THETAD +2.
014304,000268: 
014305,000269: 
014306,000270: 15,2655           47375        CALCGA             VLOAD    VXV                                   #  PUSHDONW 00-04,16D,18D
014307,000271: 15,2656           02423                                    XNB                                   #  XNB = OGA (OUTER GIMBAL AXIS)
014308,000272: 15,2657           02407                                    YSM                                   #  YSM = IGA (INNER GIMBAL AXIS)
014309,000273: 15,2660           41456                           UNIT     PUSH                                  #  PD0 = UNIT(OGA X IGA) = MGA
014310,000274: 
014311,000275: 15,2661           44041                           DOT      ITA                                   
014312,000276: 15,2662           02437                                    ZNB                                   
014313,000277: 15,2663           00051                                    S2                                    
014314,000278: 15,2664           24021                           STOVL    COSTH                                 #  COS(OG) = MGA . ZNB
014315,000279: 15,2665           00001                                    0                                     
014316,000280: 15,2666           77641                           DOT                                            
014317,000281: 15,2667           02431                                    YNB                                   
014318,000282: 15,2670           34023                           STCALL   SINTH                                 #  SIN(OG) = MGA . YNB
014319,000283: 15,2671           32476                                    ARCTRIG                               
014320,000284: 15,2672           26501                           STOVL    OGC                                   
014321,000285: 15,2673           00001                                    0                                     
014322,000286: 
014323,000287: 15,2674           50235                           VXV      DOT                                   #  PROVISION FOR MG ANGLE OF 90 DEGREES
014324,000288: 15,2675           02423                                    XNB                                   
014325,000289: 15,2676           02407                                    YSM                                   
014326,000290: 15,2677           77752                           SL1                                            
014327,000291: 15,2700           24021                           STOVL    COSTH                                 #  COS(MG) = IGA . (MGA X OGA)
014328,000292: 15,2701           02407                                    YSM                                   
014329,000293: 15,2702           77641                           DOT                                            
014330,000294: 15,2703           02423                                    XNB                                   
014331,000295: 15,2704           34023                           STCALL   SINTH                                 #  SIN(MG) = IGA . OGA
014332,000296: 15,2705           32476                                    ARCTRIG                               
014333,000297: 15,2706           02505                           STORE    MGC                                   
014334,000298: 
014335,000299: 15,2707           45246                           ABS      DSU                                   
014336,000300: 15,2710           33113                                    .166...                               
014337,000301: 15,2711           77644                           BPL                                            
014338,000302: 15,2712           32731                                    GIMLOCK1                              #  IF ANGLE GREATER THAN 60 DEGREES

Page 347

014340,000304: 
014341,000305: 15,2713           50375        CALCGA1            VLOAD    DOT                                   
014342,000306: 15,2714           02415                                    ZSM                                   
014343,000307: 15,2715           00001                                    0                                     
014344,000308: 15,2716           24021                           STOVL    COSTH                                 #  COS(IG) = ZSM . MGA
014345,000309: 15,2717           02401                                    XSM                                   
014346,000310: 15,2720           45441                           DOT      STADR                                 
014347,000311: 15,2721           43754                           STCALL   SINTH                                 #  SIN(IG) = XSM . MGA
014348,000312: 15,2722           32476                                    ARCTRIG                               
014349,000313: 
014350,000314: 15,2723           26503                           STOVL    IGC                                   
014351,000315: 15,2724           02501                                    OGC                                   
014352,000316: 15,2725           77634                           RTB                                            
014353,000317: 15,2726           33526                                    V1STO2S                               
014354,000318: 15,2727           34401                           STCALL   THETAD                                
014355,000319: 15,2730           00051                                    S2                                    
014356,000320: 
014357,000321: 15,2731           77776        GIMLOCK1           EXIT                                           
014358,000322: 15,2732           06051                           TC       FLAG1UP                               #  SET GIMBAL LOCK FLAG
014359,000323: 15,2733           00200                           OCT      200                                   
014360,000324: 15,2734           04755                           TC       ALARM                                 
014361,000325: 15,2735           00401                           OCT      00401                                 
014362,000326: 15,2736           06112                           TC       INTPRET                               
014363,000327: 15,2737           77650                           GOTO                                           
014364,000328: 15,2740           32713                                    CALCGA1                               

Page 348

014366,000330: 
014367,000331:                                                                                                  #  AXISGEN COMPUTES THE COORDINATES OF ONE COORDINATE SYSTEM REFERRED TO ANOTHER COORDINATE SYSTEM.
014368,000332: 
014369,000333:                                                                                                  #  THE INPUTS ARE  1) THE STAR1 VECTOR REFERRED TO COORDINATE SYSTEM A STORED AT STARAD.  2) THE STAR2 VECTOR
014370,000334:                                                                                                  #  REFERRED TO COORDINATE SYSTEM A STORED AT STARAD +6.  3) THE STAR1 VECTOR REFERRED TO COORDINATE SYSTEM B STORED
014371,000335:                                                                                                  #  AT LOCATION 6 OF THE VAC AREA.  4) THE STAR2 VECTOR REFERRED TO COORDINATE SYSTEM B STORED AT LOCATION 12D OF
014372,000336:                                                                                                  #  THE VAC AREA.
014373,000337: 
014374,000338:                                                                                                  #  THE OUTPUT DEFINES COORDINATE SYSTEM A REFERRED TO COORDINATE SYSTEM B. THE THREE HALF-UNIT VECTORS ARE STORED
014375,000339:                                                                                                  #  AT LOCATIONS XDC, XDC +6, XDC +12D, AND STARAD, STARAD +6, STARAD +12D.
014376,000340: 
014377,000341: 
014378,000342: 15,2741           66370        AXISGEN            AXT,1    SSP                                   #  PUSHDOWN 00-22D,24D-28D,30D
014379,000343: 15,2742           02452                                    STARAD     +6                         
014380,000344: 15,2743           00051                                    S1                                    
014381,000345: 15,2744           02436                                    STARAD     -6                         
014382,000346: 
014383,000347: 15,2745           46773        AXISGEN1           VLOAD*   VXV*                                  #  06D   UA = S1
014384,000348: 15,2746           02461                                    STARAD     +12D,1                     #        STARAD +00D     UB = S1
014385,000349: 15,2747           02467                                    STARAD     +18D,1                     
014386,000350: 15,2750           77656                           UNIT                                           #  12D   VA = UNIT(S1 X S2)
014387,000351: 15,2751           06467                           STORE    STARAD     +18D,1                     #        STARAD +06D     VB = UNIT(S1 X S2)
014388,000352: 15,2752           77773                           VLOAD*                                         
014389,000353: 15,2753           02461                                    STARAD     +12D,1                     
014390,000354: 
014391,000355: 15,2754           76433                           VXV*     VSL1                                  
014392,000356: 15,2755           02467                                    STARAD     +18D,1                     #  18D   WA = UA X VA
014393,000357: 15,2756           06475                           STORE    STARAD     +24D,1                     #        STARAD +12D     WB = UB X VB
014394,000358: 
014395,000359: 15,2757           77700                           TIX,1                                          
014396,000360: 15,2760           32745                                    AXISGEN1                              
014397,000361: 
014398,000362: 15,2761           66160                           AXC,1    SXA,1                                 
014399,000363: 15,2762           00006                                    6                                     
014400,000364: 15,2763           00036                                    30D                                   
014401,000365: 
014402,000366: 15,2764           66370                           AXT,1    SSP                                   
014403,000367: 15,2765           00022                                    18D                                   
014404,000368: 15,2766           00051                                    S1                                    
014405,000369: 15,2767           00006                                    6                                     
014406,000370: 
014407,000371: 15,2770           66374                           AXT,2    SSP                                   
014408,000372: 15,2771           00006                                    6                                     
014409,000373: 15,2772           00052                                    S2                                    
014410,000374: 15,2773           00002                                    2                                     
014411,000375: 
014412,000376: 15,2774           76720        AXISGEN2           XCHX,1   VLOAD*                                
014413,000377: 15,2775           00036                                    30D                                   #  X1=-6 X2=+6   X1=-6 X2=+4     X1=-6 X2=+2
014414,000378: 15,2776           00001                                    0,1                                   
014415,000379: 15,2777           62757                           VXSC*    PDVL*                                 #  J=(UA)(UB1)   J=(UA)(UB2)     J=(UA)(UB3)

Page 349

014417,000381: 15,3000           75324                                    STARAD     +6,2                       
014418,000382: 15,3001           00007                                    6,1                                   
014419,000383: 15,3002           77757                           VXSC*                                          
014420,000384: 15,3003           75316                                    STARAD     +12D,2                     
014421,000385: 15,3004           30031                           STOVL*   24D                                   #  K=(VA)(VB1)   J=(VA)(VB2)     J=(VA)(VB3)
014422,000386: 15,3005           00015                                    12D,1                                 
014423,000387: 
014424,000388: 15,3006           53357                           VXSC*    VAD                                   
014425,000389: 15,3007           75310                                    STARAD     +18D,2                     #  L=(WA)(WB1)   J=(WA)(WB2)     J=(WA)(WB3)
014426,000390: 15,3010           76455                           VAD      VSL1                                  
014427,000391: 15,3011           00031                                    24D                                   
014428,000392: 15,3012           77720                           XCHX,1                                         
014429,000393: 15,3013           00036                                    30D                                   
014430,000394: 15,3014           06445                           STORE    XDC        +18D,1                     #  XDC = L+J+K   YDC = L+J+K     ZDC = L+J+K
014431,000395: 
014432,000396: 15,3015           77700                           TIX,1                                          
014433,000397: 15,3016           33017                                    AXISGEN3                              
014434,000398: 
014435,000399: 15,3017           77704        AXISGEN3           TIX,2                                          
014436,000400: 15,3020           32774                                    AXISGEN2                              
014437,000401: 
014438,000402: 15,3021           77775                           VLOAD                                          
014439,000403: 15,3022           02423                                    XDC                                   
014440,000404: 15,3023           26445                           STOVL    STARAD                                
014441,000405: 15,3024           02431                                    YDC                                   
014442,000406: 15,3025           26453                           STOVL    STARAD     +6                         
014443,000407: 15,3026           02437                                    ZDC                                   
014444,000408: 15,3027           02461                           STORE    STARAD     +12D                       
014445,000409: 
014446,000410: 15,3030           77616                           RVQ                                            
014447,000411: 

Page 350

014449,000413: 
014450,000414:                                                                                                  #  TRANSPSE COMPUTES THE TRANSPOSE OF A MATRIX (TRANSPOSE = INVERSE OF ORTHOGONAL TRANSFORMATION).
014451,000415: 
014452,000416:                                                                                                  #  THE INPUT IS A MATRIX DEFINING COORDINATE SYSTEM A WITH RESPECT TO COORDINATE SYSTEM B STORED IN STARAD THRU
014453,000417:                                                                                                  #  STARAD +17D.
014454,000418: 
014455,000419:                                                                                                  #  THE OUTPUT IS A MATRIX DEFINING COORDINATE SYSTEM B WITH RESPECT TO COORDINATE SYSTEM A STORED IN STARAD THRU
014456,000420:                                                                                                  #  STARAD +17D.
014457,000421: 
014458,000422: 15,3031           53447        TRANSPSE           DXCH     STARAD     +2                         #  PUSHDOWN NONE
014459,000423: 15,3032           53453                           DXCH     STARAD     +6                         
014460,000424: 15,3033           53447                           DXCH     STARAD     +2                         
014461,000425: 
014462,000426: 15,3034           53451                           DXCH     STARAD     +4                         
014463,000427: 15,3035           53461                           DXCH     STARAD     +12D                       
014464,000428: 15,3036           53451                           DXCH     STARAD     +4                         
014465,000429: 
014466,000430: 15,3037           53457                           DXCH     STARAD     +10D                       
014467,000431: 15,3040           53463                           DXCH     STARAD     +14D                       
014468,000432: 15,3041           53457                           DXCH     STARAD     +10D                       
014469,000433: 15,3042           16125                           TCF      DANZIG                                
014470,000434: 
014471,000435: 
014472,000436: 
014473,000437:                                                                                                  #  SMD/EREF TRANSFORMS STABLE MEMBER DESIRED COORDINATES FROM STABLE MEMBER DESIRED (DESIRED = PRESENT HERE) TO
014474,000438:                                                                                                  #  EARTH REFERENCE COORDINATES TO ALIGN THE STABLE MEMBER TO SPECIFIED GIMBAL ANGLES.
014475,000439: 
014476,000440:                                                                                                  #  THE INPUTS ARE 1) THE MATRIX DEFINING THE EARTH REFERENCE COORDINATE FRAME WITH RESPECT TO THE NAVIGATION BASE
014477,000441:                                                                                                  #  COORDINATE FRAME. 2) SAME AS 3) AND 3) OF SMNB.
014478,000442: 
014479,000443:                                                                                                  #  THE OUTPUT IS THE DESIRED STABLE MEMBER COORDINATES WITH RESPECT TO THE EARTH REFERENCE COORDINATE FRAME. THE
014480,000444:                                                                                                  #  THREE UNIT VECTORS ARE STORED AT XSM, YSM, AND ZSM.
014481,000445: 
014482,000446: 15,3043           77220        SMD/EREF           ITA      VLOAD                                 #  PUSHDOWN 00,02,04-10D,30D,32D-36D
014483,000447: 15,3044           00014                                    12D                                   
014484,000448: 15,3045           33103                                    XUNIT                                 
014485,000449: 15,3046           34041                           STCALL   32D                                   
014486,000450: 15,3047           32531                                    SMNB                                  #  STABLE MEMBER TO NAVIGATION BASE
014487,000451: 15,3050           76521                           MXV      VSL1                                  
014488,000452: 15,3051           02445                                    STARAD                                #  THEN TO EARTH REFERENCE
014489,000453: 15,3052           26401                           STOVL    XSM                                   
014490,000454: 15,3053           33101                                    YUNIT                                 
014491,000455: 
014492,000456: 15,3054           34041                           STCALL   32D                                   
014493,000457: 15,3055           32531                                    SMNB                                  #  STABLE MEMBER TO NAVIGATION BASE
014494,000458: 15,3056           76521                           MXV      VSL1                                  
014495,000459: 15,3057           02445                                    STARAD                                #  THEN TO EARTH REFERENCE
014496,000460: 15,3060           26407                           STOVL    YSM                                   
014497,000461: 15,3061           33077                                    ZUNIT                                 
014498,000462: 
014499,000463: 15,3062           34041                           STCALL   32D                                   

Page 351

014501,000465: 15,3063           32531                                    SMNB                                  #  STABLE MEMBER TO NAVIGATION BASE
014502,000466: 15,3064           76521                           MXV      VSL1                                  
014503,000467: 15,3065           02445                                    STARAD                                #  THEN TO EARTH REFERENCE
014504,000468: 15,3066           36415                           STCALL   ZSM                                   
014505,000469: 15,3067           00014                                    12D                                   
014506,000470: 
014507,000471: 15,3070           67777 77777  270DEG             2DEC     -.25                                  
014508,000472: 
014509,000473: 15,3072           05520 26075  QTSN45             2DEC     .1768                                 
014510,000474: 
014511,000475: 15,3074           20000 00000  HALFDP             2DEC     .5                                    
014512,000476: 
014513,000477: 15,3076           00000 00000  ZUNIT              2DEC     0          B-28                       
014514,000478: 
014515,000479: 15,3100           00000 00000  YUNIT              2DEC     0          B-28                       
014516,000480: 
014517,000481: 15,3102           20000 00000  XUNIT              2DEC     0.5                                   
014518,000482: 
014519,000483: 15,3104           00000 00000  ZERODP             2DEC     0          B-28                       
014520,000484: 
014521,000485: 15,3106           00000 00000                     2DEC     0          B-28                       
014522,000486: 
014523,000487: 15,3110           00000 00000                     2DEC     0          B-28                       
014524,000488: 
014525,000489: 15,3112           05252 25253  .166...            2DEC     .1666666667                            
014526,000490: 

Page 352

014528,000492: 
014529,000493:                                                                                                  #  AOTNB CONVERTS THE AOT RETICLE ROTATION ANGLE (YROT AND SROT) AND
014530,000494:                                                                                                  #  THE DETENT SETTING TO A HALF UNIT STAR VECTOR REFERRED TO THE
014531,000495:                                                                                                  #  NAVIGATION BASE FOR NON-FLIGHT ALIGNMENT MODES
014532,000496: 
014533,000497:                                                                                                  #  THE INPUTS ARE 
014534,000498: 
014535,000499:                                                                                                  #     Y RET. LINE RATATION S(YROT) STORED IN LOC 3 OF THE MARK VAC AREA
014536,000500:                                                                                                  #     SPIRAL ROTATION ANGLE S(SROT) STORED IN LOC 5 OF MARC VAC AREA
014537,000501:                                                                                                  #     ANGLE OF CENTER OF FIELD OF VIEW S(ELV) STORED IN LOC 9 OF MARK VAC
014538,000502:                                                                                                  #     AOT ASZIMUTH ANGLE S(DET) STORED IN LOC 8 OF MARK VAC AREA
014539,000503:                                                                                                  #     THE COMPLEMENT OF BASE ADDRESS OF MARK VAC IS STORED AT X1
014540,000504:                                                                                                  #     COMPENSATION FOR FIELD OF VIEW TILT IN LOC 10D
014541,000505:                                                                                                  #  THE ABOVE STORAGE IS DONE BY AOTMARK
014542,000506: 
014543,000507: 
014544,000508:                                                                                                  #  THE OUTPUT IS A HALF UNIT STAR VECTOR IN NB COORDINATES STORED
014545,000509:                                                                                                  #  AT 32D AND AVAILABLE IN VAC ON RETURN TO THE CALLING PROGRAM
014546,000510: 
014547,000511: 15,3114           66601        AOTNB              SETPD    SLOAD*                                
014548,000512: 15,3115           00001                                    0                                     
014549,000513: 15,3116           00013                                    10D,1                                 #  AOT FOV TILT COMPENSATION ANGLE
014550,000514: 15,3117           41542                           SR1      PUSH                                  #  RESCALE TILT TO 2PI                                     
014551,000515: 15,3120           47133                           SLOAD*   RTB                                   
014552,000516: 15,3121           00004                                    3,1                                   
014553,000517: 15,3122           33457                                    CDULOGIC                              
014554,000518: 15,3123           00017                           STORE    14D                                   #  STORE UNCOMPENSATED YROT FOR S COMP
014555,000519: 15,3124           41415                           DAD      PUSH                                  #  YROT NOW CORRECTED FOR TILT
014556,000520: 15,3125           65346                           COS      PDDL                                  #  1/2 COS(YROT) PD 0-1
014557,000521: 15,3126           41556                           SIN      PUSH                                  #  1/2 SIN(YROT) PD 2-3
014558,000522: 15,3127           47133                           SLOAD*   RTB                                   
014559,000523: 15,3130           00006                                    5,1                                   
014560,000524: 15,3131           33457                                    CDULOGIC                              
014561,000525: 15,3132           00021                           STORE    16D                                   #  STORE S IF S AND Y ARE ZERO, S=0
014562,000526: 15,3133           52054                           BZE      GOTO                                  #  S NOT ZERO
014563,000527: 15,3134           33136                                    SISZ                                  #  S=0
014564,000528: 15,3135           33146                                    SCOMP                                 
014565,000529: 15,3136           53145        SISZ               DLOAD    BZE                                   #  IS Y ZERO
014566,000530: 15,3137           00017                                    14D                                   
014567,000531: 15,3140           33143                                    YISZ                                  #  Y=0
014568,000532: 15,3141           77650                           GOTO                                           
014569,000533: 15,3142           33146                                    SCOMP                                 
014570,000534: 15,3143           52145        YISZ               DLOAD    GOTO                                  
014571,000535: 15,3144           33105                                    ZERODP                                
014572,000536: 15,3145           33153                                    SGOT                                  
014573,000537: 15,3146           45345        SCOMP              DLOAD    DSU                                   
014574,000538: 15,3147           00017                                    14D                                   
014575,000539: 15,3150           00021                                    16D                                   #  Y-S
014576,000540: 15,3151           77621                           BDSU                                           
014577,000541: 15,3152           33240                                    NEARONE                               #  S=360-(Y-S)
014578,000542: 15,3153           41405        SGOT               DMP      PUSH                                  

Page 353

014580,000544: 15,3154           33236                                    DP1/12                                
014581,000545: 15,3155           65346                           COS      PDDL                                  
014582,000546: 15,3156           41556                           SIN      PUSH                                  
014583,000547: 15,3157           72405                           DMP      SL1                                   
014584,000548: 15,3160           00001                                    0                                     
014585,000549: 15,3161           14001                           STODL    0                                     
014586,000550: 15,3162           00003                                    2                                     
014587,000551: 15,3163           45405                           DMP      STADR                                 
014588,000552: 15,3164           77774                           STORE    2                                     
014589,000553: 
014590,000554: 15,3165           47133                           SLOAD*   RTB                                   
014591,000555: 15,3166           00012                                    9D,1                                  
014592,000556: 15,3167           33457                                    CDULOGIC                              
014593,000557: 15,3170           73406                           PUSH     SIN                                   
014594,000558: 15,3171           71525                           PDDL     COS                                   
014595,000559: 15,3172           41206                           PUSH     DMP                                   
014596,000560: 15,3173           00001                                    0                                     
014597,000561: 15,3174           41325                           PDDL     DMP                                   
014598,000562: 15,3175           00005                                    4                                     
014599,000563: 15,3176           00007                                    6                                     
014600,000564: 15,3177           72415                           DAD      SL1                                   
014601,000565: 15,3200           77626                           STADR                                          
014602,000566: 15,3201           63736                           STODL    32D                                   
014603,000567: 
014604,000568: 15,3202           77605                           DMP                                            
014605,000569: 15,3203           00005                                    4                                     
014606,000570: 15,3204           14005                           STODL    4                                     
014607,000571: 
014608,000572: 15,3205           44205                           DMP      BDSU                                  
014609,000573: 15,3206           00001                                    0                                     
014610,000574: 15,3207           66606                           PUSH     SLOAD*                                
014611,000575: 15,3210           00011                                    8D,1                                  
014612,000576: 15,3211           41434                           RTB      PUSH                                  
014613,000577: 15,3212           33457                                    CDULOGIC                              
014614,000578: 15,3213           65346                           COS      PDDL                                  
014615,000579: 15,3214           77756                           SIN                                            
014616,000580: 15,3215           00001                           STORE    0                                     
014617,000581: 
014618,000582: 15,3216           65205                           DMP      PDDL                                  
014619,000583: 15,3217           00005                                    4                                     
014620,000584: 15,3220           00007                                    6                                     
014621,000585: 15,3221           43205                           DMP      DAD                                   
014622,000586: 15,3222           00003                                    2                                     
014623,000587: 15,3223           77712                           SL2                                            
014624,000588: 15,3224           14043                           STODL    34D                                   
014625,000589: 
014626,000590: 15,3225           45405                           DMP      STADR                                 
014627,000591: 15,3226           63732                           STODL    36D                                   

Page 354

014629,000593: 15,3227           77605                           DMP                                            
014630,000594: 15,3230           62421                           BDSU     SL2                                   
014631,000595: 15,3231           00045                                    36D                                   
014632,000596: 15,3232           24045                           STOVL    36D                                   
014633,000597: 15,3233           00041                                    32D                                   
014634,000598: 15,3234           77616                           RVQ                                            
014635,000599: 
014636,000600: 15,3235           02525 12525  DP1/12             2DEC     .0833333333                            #  ; ;          
014637,000601: 
014638,000602: 15,3237           37777 37777  NEARONE            2DEC     .999999999                            
014639,000603: 

Page 355

014641,000605: 
014642,000606:                                                                                                  #  AOTSM CALCULATES A HALF UNIT STAR VECTOR IN STABLE MEMBER COORDINATES
014643,000607:                                                                                                  #  FROM TWO PLANES CONTAINING THE STAR REFERRED TO NB
014644,000608: 
014645,000609:                                                                                                  #  THE INPUTS ARE
014646,000610: 
014647,000611:                                                                                                  #     AOT AZIMUTH AND ELEVATION STORED IN 8D AND 9D RESP. OF VAC AREA
014648,000612:                                                                                                  #     CDUY, CDUZ AND CDUX FROM A YMARK STORED AT 3, 5, AND 7 OF VAC AREA
014649,000613:                                                                                                  #     CDUY, CDUZ AND CDUX FROM A XMARK STORED AT 2, 4, AND 6 OF VAC AREA
014650,000614:                                                                                                  #     COMPENSATION FOR FIELD OF VIEW STORED AT 10D OF VAC AREA
014651,000615:                                                                                                  #  THE BASE ADDRESS OF THE CDUS IS STORED AT LOCATION S1
014652,000616: 
014653,000617:                                                                                                  #  THE OUTPUT IS A STAR VECTOR REFERRED TO STABLE MEMBER AT LOC 32D
014654,000618:                                                                                                  #  AND AVAILBLE IN MPAC
014655,000619: 
014656,000620: 15,3241           40220        AOTSM              STQ      SETPD                                 
014657,000621: 15,3242           00035                                    29D                                   #  SET UP RETURN
014658,000622: 15,3243           00001                                    0                                     
014659,000623: 15,3244           66740                           LXC,1    SLOAD*                                
014660,000624: 15,3245           00050                                    S1                                    #  COMPLEMENT OF CDU ADR FOR XMARK
014661,000625: 15,3246           00011                                    8D,1                                  #  LOAD APPARENT TILT ANGLE,ONES COMP
014662,000626: 15,3247           77742                           SR1                                            #  RESCALE TILT TO 2PI
014663,000627: 15,3250           71406                           PUSH     COS                                   
014664,000628: 15,3251           73525                           PDDL     SIN                                   #  1/2 COS(TA)  0-1
014665,000629: 15,3252           66606                           PUSH     SLOAD*                                #  1/2 SIN(TA)  2-3
014666,000630: 15,3253           00007                                    6,1                                   #  LOAD AZIMUTH, 2S COMP
014667,000631: 15,3254           41434                           RTB      PUSH                                  
014668,000632: 15,3255           33457                                    CDULOGIC                              
014669,000633: 15,3256           65346                           COS      PDDL                                  #  1/2 COS(AZ)  4-5
014670,000634: 15,3257           41556                           SIN      PUSH                                  #  1/2 SIN(AZ)  6-7
014671,000635: 15,3260           65205                           DMP      PDDL                                  
014672,000636: 15,3261           00001                                    0                                     
014673,000637: 15,3262           65205                           DMP      PDDL                                  
014674,000638: 15,3263           00003                                    2                                     
014675,000639: 15,3264           00005                                    4                                     
014676,000640: 15,3265           65205                           DMP      PDDL                                  
014677,000641: 15,3266           00001                                    0                                     
014678,000642: 15,3267           00005                                    4                                     
014679,000643: 15,3270           41405                           DMP      PUSH                                  
014680,000644: 15,3271           47133                           SLOAD*   RTB                                   
014681,000645: 15,3272           00010                                    7,1                                   #  LOAD ELEVATION, 2S COMP
014682,000646: 15,3273           33457                                    CDULOGIC                              
014683,000647: 15,3274           73406                           PUSH     SIN                                   
014684,000648: 15,3275           71525                           PDDL     COS                                   #  1/2 SIN(ELV)  14-15
014685,000649: 15,3276           41206                           PUSH     DMP                                   #  1/2 COS(ELV)  16-17
014686,000650: 15,3277           00001                                    0                                     
014687,000651: 15,3300           77752                           SL1                                            
014688,000652: 15,3301           14041                           STODL    32D                                   #  X COMPONENT OF X-PLANE VECTOR
014689,000653: 
014690,000654: 15,3302           72405                           DMP      SL1                                   #  UP 16-17
014691,000655: 15,3303           00003                                    2                                     

Page 356

014693,000657: 
014694,000658: 15,3304           65276                           DCOMP    PDDL                                  #  X COMPONENT OF Y-PLANE VECTOR 16-17
014695,000659: 
014696,000660: 15,3305           00017                                    14D                                   
014697,000661: 15,3306           72405                           DMP      SL1                                   
014698,000662: 15,3307           00007                                    6                                     
014699,000663: 15,3310           72421                           BDSU     SL1                                   
014700,000664: 15,3311           00015                                    12D                                   
014701,000665: 15,3312           14043                           STODL    34D                                   #  Y COMPONENT OF X-PLANE VEC   
014702,000666: 
014703,000667: 15,3313           00017                                    14D                                   
014704,000668: 15,3314           72405                           DMP      SL1                                   
014705,000669: 15,3315           00013                                    10D                                   
014706,000670: 15,3316           72415                           DAD      SL1                                   
014707,000671: 15,3317           00011                                    8D                                    
014708,000672: 15,3320           77676                           DCOMP                                          
014709,000673: 15,3321           14045                           STODL    36D                                   #  Z COMPONENT OF X-PLANE VECTOR
014710,000674: 
014711,000675: 15,3322           00017                                    14D                                   
014712,000676: 15,3323           72405                           DMP      SL1                                   
014713,000677: 15,3324           00011                                    8D                                    
014714,000678: 15,3325           72415                           DAD      SL1                                   
014715,000679: 15,3326           00013                                    10D                                   
014716,000680: 15,3327           41325                           PDDL     DMP                                   #  Y COMPONENT OF Y-PLANE VECTOR 18-19
014717,000681: 
014718,000682: 15,3330           00017                                    14D                                   
014719,000683: 15,3331           00015                                    12D                                   
014720,000684: 15,3332           72425                           DSU      SL1                                   
014721,000685: 15,3333           00007                                    6                                     
014722,000686: 15,3334           34025                           STCALL   20D                                   #  Z COMPONENT OF Y-PLANE VECTOR 20-21
014723,000687: 
014724,000688: 15,3335           32555                                    NBSM                                  #  TRANSFORM TO SM
014725,000689: 15,3336           24013                           STOVL    10D                                   #  STORE X-PLAVE VECTOR (SM)
014726,000690: 
014727,000691: 15,3337           00021                                    16D                                   #  LOAD Y-PLANE VECTOR (NB)
014728,000692: 15,3340           62120                           XCHX,1   INCR,1                                
014729,000693: 15,3341           00050                                    S1                                    #  INCREMENT CDU BASE ADR TO YMARK CDUS
014730,000694: 15,3342           00001                                    1                                     
014731,000695: 15,3343           77720                           XCHX,1                                         #  PUT IT BACK IN S1
014732,000696: 15,3344           00050                                    S1                                    
014733,000697: 15,3345           34041                           STCALL   32D                                   
014734,000698: 15,3346           32555                                    NBSM                                  #  GET Y-PLANE IN SM
014735,000699: 15,3347           76435                           VXV      VSL1                                  #  YP CROSS XP
014736,000700: 15,3350           00013                                    10D                                   
014737,000701: 15,3351           53476                           VCOMP    UNIT                                  #  UNIT (XP CROSS YP)
014738,000702: 15,3352           00041                           STORE    32D                                   #  STAR VECTOR IN SM COORDINATES
014739,000703: 15,3353           77650                           GOTO                                           
014740,000704: 15,3354           00035                                    29D                                   #  RETURN
014741,000705: 

Page 357

014743,000707: 
014744,000708:                                                                                                  #           THE FOLLOWING ROUTINE TAKES A HALF UNIT TARGET VECTOR REFERRED TO NAV BASE COORDINATES AND FINDS BOTH
014745,000709:                                                                                                  #  GIMBAL ORIENTATIONS AT WHICH THE RR MIGHT SIGHT THE TARGET. THE GIMBAL ANGLES CORRESPONDING TO THE PRESENT MODE
014746,000710:                                                                                                  #  ARE LEFT IN MODEA AND THOSE WHICH WOULD BE USED AFTER A REMODE IN MODEB. THIS ROUTINE ASSUMES MODE 1 IS TRUNNION
014747,000711:                                                                                                  #  ANGLE LESS THAN 90 DEGS IN ABS VALUE WITH ARBITRARY SHAFT, WITH A CORRESPONDING DEFINITION FOR MODE 2. MODE
014748,000712:                                                                                                  #  SELECTION AND LIMIT CHECKING ARE DONE ELSEWHERE.
014749,000713: 
014750,000714:                                                                                                  #            THE MODE 1 CONFIGURATION IS CALCULATED FROM THE VECTOR AND THEN MODE 2 IS FOUND USING THE RELATIONS
014751,000715: 
014752,000716:                                                                                                  #            S(2) = 180 + S(1)
014753,000717:                                                                                                  #            T(2) = 180 - T(1)
014754,000718: 
014755,000719: 15,3355           57545        RRANGLES           DLOAD    DCOMP                                 #  SINCE WE WILL FIND THE MODE 1 SHAFT
014756,000720: 15,3356           00043                                    34D                                   #  ANGLE LATER, WE CAN FIND THE MODE 1
014757,000721: 15,3357           67401                           SETPD    ASIN                                  #  TRUNNION BY SIMPLY TAKING THE ARCSIN OF
014758,000722: 15,3360           00001                                    0                                     #  THE Y COMPONENT, THE ASIN GIVING AN
014759,000723: 15,3361           44206                           PUSH     BDSU                                  #  ANSWER WHOSE ABS VAL IS LESS THAN 90 DEG
014760,000724: 15,3362           33075                                    HALFDP                                
014761,000725: 15,3363           14005                           STODL    4                                     #  MODE 2 TRUNNION TO 4.
014762,000726: 
014763,000727: 15,3364           33105                                    ZERODP                                
014764,000728: 15,3365           24043                           STOVL    34D                                   #  UNIT THE PROJECTION OF THE VECTOR IN THE
014765,000729: 15,3366           00041                                    32D                                   #  X-Z PLANE.
014766,000730: 15,3367           41056                           UNIT     BOVB                                  #  CALL FOR S/C MANEUVER ON GIMBAL LOCK.
014767,000731: 15,3370           20347                                    DESRETRN   +1                         
014768,000732: 15,3371           14041                           STODL    32D                                   #  PROJECTION VECTOR.
014769,000733: 15,3372           00041                                    32D                                   
014770,000734: 15,3373           44142                           SR1      STQ                                   
014771,000735: 15,3374           00051                                    S2                                    
014772,000736: 15,3375           14023                           STODL    SINTH                                 #  USE ARCTRIG SINCE SHAFT COULD BE ARB.
014773,000737: 15,3376           00045                                    36D                                   
014774,000738: 15,3377           77742                           SR1                                            
014775,000739: 15,3400           34021                           STCALL   COSTH                                 
014776,000740: 15,3401           32476                                    ARCTRIG                               

Page 358

014778,000742: 15,3402           43206                           PUSH     DAD                                   #  MODE 1 SHAFT TO 2.
014779,000743: 15,3403           33075                                    HALFDP                                #  (OVERFLOW DOESNT MATTER SINCE SCALED REV
014780,000744: 15,3404           24007                           STOVL    6                                     
014781,000745: 15,3405           00005                                    4                                     
014782,000746: 15,3406           77634                           RTB                                            #  FIND MODE 2 CDU ANGLES.
014783,000747: 15,3407           33543                                    2V1STO2S                              
014784,000748: 15,3410           24425                           STOVL    MODEB                                 
014785,000749: 15,3411           00001                                    0                                     
014786,000750: 15,3412           77634                           RTB                                            #  MODE 1 ANGLES TO MODE A.
014787,000751: 15,3413           33543                                    2V1STO2S                              
014788,000752: 15,3414           00423                           STORE    MODEA                                 
014789,000753: 15,3415           77776                           EXIT                                           
014790,000754: 
014791,000755: 15,3416           40412                           CS       RADMODES                              #  SWAP MODEA AND MODEB IF RR IN MODE2.
014792,000756: 15,3417           77750                           MASK     BIT12                                 
014793,000757: 15,3420           10000                           CCS      A                                     
014794,000758: 15,3421           13425                           TCF      +4                                    
014795,000759: 
014796,000760: 15,3422           52423                           DXCH     MODEA                                 
014797,000761: 15,3423           52425                           DXCH     MODEB                                 
014798,000762: 15,3424           52423                           DXCH     MODEA                                 
014799,000763: 
014800,000764: 15,3425           06112                           TC       INTPRET                               
014801,000765: 15,3426           77650                           GOTO                                           
014802,000766: 15,3427           00051                                    S2                                    
014803,000767: 

Page 359

014805,000769:                                                                                                  #     GIVEN RR TRUNION AND SHAFT (T,S) IN TANG,+1, FIND THE ASSOCIATED
014806,000770:                                                                                                  #  LINE OF SIGHT IN NAV BASE AXES.  THE HALF UNIT VECTOR, .5(SIN(S)COS(T),
014807,000771:                                                                                                  #  -SIN(T),COS(S)COS(T)) IS LEFT IN MPAC AND 32D.
014808,000772: 
014809,000773: 15,3430           47135        RRNB               SLOAD    RTB                                   
014810,000774: 15,3431           00423                                    TANG                                  
014811,000775: 15,3432           33457                                    CDULOGIC                              
014812,000776: 15,3433           41401                           SETPD    PUSH                                  #  TRUNNION ANGLE TO 0
014813,000777: 15,3434           00001                                    0                                     
014814,000778: 15,3435           57556                           SIN      DCOMP                                 
014815,000779: 15,3436           14043                           STODL    34D                                   #  Y COMPONENT
014816,000780: 
014817,000781: 15,3437           41546                           COS      PUSH                                  #  .5 COS(T) TO 0
014818,000782: 15,3440           47135                           SLOAD    RTB                                   
014819,000783: 15,3441           00424                                    TANG       +1                         
014820,000784: 15,3442           33457                                    CDULOGIC                              
014821,000785: 15,3443           71406                           PUSH     COS                                   #  SHAFT ANGLE TO 2
014822,000786: 15,3444           72405                           DMP      SL1                                   
014823,000787: 15,3445           00001                                    0                                     
014824,000788: 15,3446           14045                           STODL    36D                                   #  Z COMPONENT
014825,000789: 
014826,000790: 15,3447           41356                           SIN      DMP                                   
014827,000791: 15,3450           77752                           SL1                                            
014828,000792: 15,3451           24041                           STOVL    32D                                   
014829,000793: 15,3452           00041                                    32D                                   
014830,000794: 15,3453           77616                           RVQ                                            
014831,000795: 
014832,000796: 

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