Source Code

017324,000002: ## Copyright: Public domain. 017325,000003: ## Filename: INFLIGHT_ALIGNMENT_SUBROUTINES.agc 017326,000004: ## Purpose: Part of the source code for Solarium build 55. This 017327,000005: ## is for the Command Module's (CM) Apollo Guidance 017328,000006: ## Computer (AGC), for Apollo 6. 017329,000007: ## Assembler: yaYUL --block1 017330,000008: ## Contact: Jim Lawton <jim DOT lawton AT gmail DOT com> 017331,000009: ## Website: www.ibiblio.org/apollo/index.html 017332,000010: ## Page Scans: www.ibiblio.org/apollo/ScansForConversion/Solarium055/ 017333,000011: ## Mod history: 2009-10-04 JL Created. 017334,000012: ## 2016-12-28 RSB Proofed comment text using octopus/ProoferComments, 017335,000013: ## and fixed errors found. 017336,000014:

Page 461

017338,000016: 
017339,000017:                                                                                                  #  CALGTA                GIVEN THE DESIRED XD,YD AND ZD UNIT VECTORS REFERED TO
017340,000018:                                                                                                  #  --------              PRESENT STABLE MEMBER ORIENTATION, THIS SUBROUTINE FINDS
017341,000019:                                                                                                  #                        THETAY, THETAZ, AND THETAX, THE REQUIRED GYRO TORQUE
017342,000020:                                                                                                  #                        ANGLES IN THE ORDER TO BE APPLIED TO BRING THE STABLE
017343,000021:                                                                                                  #                        MEMBER INTO THE DESIRED ORIENTATION.
017344,000022: 
017345,000023: 
017346,000024: 
017347,000025: 22,6352                                           BANK     22                                    
017348,000026: 22,6352           45575        CALCGTA            ITA      1                                     #  DEFINE THE VECTOR ZPRIME WHICH IS THE
017349,000027: 22,6353           45176                           DMOVE                                          
017350,000028: 22,6354           00052                                    S2                                    #  IMAGE OF Z UNDER THE ROTATION ABOUT Y
017351,000029: 22,6355           01477                                    XDSMPR                                
017352,000030: 
017353,000031: 22,6356           45176                           DMOVE    0                                     #  ZPRIME =(-XD  ,0 , XD )
017354,000032: 22,6357           05174                                    ZERODP                                #              2        0
017355,000033: 
017356,000034: 22,6360           47175                           COMP     1                                     
017357,000035: 22,6361           41153                           VDEF     UNIT                                  
017358,000036: 22,6362           01503                                    XDSMPR     +4                         
017359,000037: 22,6363           32027                           STORE    ZPRIME                                
017360,000038: 
017361,000039: 22,6364           56776                           TSRT     0                                     #  SET UP COSTH AND SINTH TO ENTER
017362,000040: 22,6365           00027                                    ZPRIME                                #      ARCTRIG FOR COMPUTATION OF THETA-Y
017363,000041: 22,6366           00002                                    1                                     
017364,000042: 22,6367           32023                           STORE    SINTH                                 
017365,000043: 
017366,000044: 22,6370           56776                           TSRT     0                                     
017367,000045: 22,6371           00033                                    ZPRIME     +4D                        
017368,000046: 22,6372           00002                                    1                                     
017369,000047: 22,6373           32021                           STORE    COSTH                                 
017370,000048: 
017371,000049: 22,6374           76776                           ITC      0                                     
017372,000050: 22,6375           04437                                    ARCTRIG                               
017373,000051: 
017374,000052: 22,6376           47576                           NOLOD    0                                     
017375,000053: 22,6377           33523                           STORE    IGC                                   
017376,000054: 
017377,000055: 22,6400           56776                           TSRT     0                                     
017378,000056: 22,6401           01501                                    XDSMPR     +2                         
017379,000057: 22,6402           00002                                    1                                     
017380,000058: 22,6403           32023                           STORE    SINTH                                 
017381,000059: 
017382,000060: 22,6404           64776                           DMP      0                                     
017383,000061: 22,6405           00027                                    ZPRIME                                
017384,000062: 22,6406           01503                                    XDSMPR     +4                         
017385,000063: 
017386,000064: 22,6407           64775                           DMP      1                                     
017387,000065: 22,6410           66776                           DSU                                            
017388,000066: 22,6411           00033                                    ZPRIME     +4                         

Page 462

017390,000068: 22,6412           01477                                    XDSMPR                                
017391,000069: 22,6413           32021                           STORE    COSTH                                 
017392,000070: 
017393,000071: 22,6414           76776                           ITC      0                                     
017394,000072: 22,6415           04437                                    ARCTRIG                               
017395,000073: 
017396,000074: 22,6416           47576                           NOLOD    0                                     
017397,000075: 22,6417           33525                           STORE    MGC                                   
017398,000076: 
017399,000077: 22,6420           42776                           DOT      0                                     
017400,000078: 22,6421           00027                                    ZPRIME                                
017401,000079: 22,6422           01513                                    ZDSMPR                                
017402,000080: 22,6423           32021                           STORE    COSTH                                 
017403,000081: 
017404,000082: 22,6424           42776                           DOT      0                                     
017405,000083: 22,6425           00027                                    ZPRIME                                
017406,000084: 22,6426           01505                                    YDSMPR                                
017407,000085: 22,6427           32023                           STORE    SINTH                                 
017408,000086: 
017409,000087: 22,6430           76776                           ITC      0                                     
017410,000088: 22,6431           04437                                    ARCTRIG                               
017411,000089: 
017412,000090: 22,6432           47576                           NOLOD    0                                     
017413,000091: 22,6433           33521                           STORE    OGC                                   
017414,000092: 
017415,000093: 22,6434           44576                           ITCI     0                                     
017416,000094: 22,6435           00052                                    S2                                    
017417,000095: 

Page 463

017419,000097: 
017420,000098: 22,6436           65175        ARCTRIG            ABS      1                                     #  GIVEN SINTH AND COSTH SCALED X1/4 FIND
017421,000099: 22,6437           66756                           DSU      BMN                                   #  THETA IN THE RANGE -PI TO +PI SCALED-
017422,000100: 22,6440           00023                                    SINTH                                 #  TEMPORARY FOR SINTH               XPI/2
017423,000101: 22,6441           05170                                    QTSN45                                #  CONSTANT=0.1768
017424,000102: 22,6442           04453                                    TRIG1                                 
017425,000103: 
017426,000104: 22,6443           63775                           TSLT     1                                     
017427,000105: 22,6444           61056                           ACOS     SIGN                                  
017428,000106: 22,6445           00021                                    COSTH                                 #  TEMPORARY FOR COSTH
017429,000107: 22,6446           00002                                    1                                     
017430,000108: 22,6447           00023                                    SINTH                                 #  TEMPORARY FOR SINTH
017431,000109: 22,6450           32025                           STORE    THETA                                 
017432,000110: 
017433,000111: 22,6451           40576                           ITCQ     0                                     #  RETURN TO MAIN PROGRAM
017434,000112: 
017435,000113: 22,6452           63775        TRIG1              TSLT     1                                     #  SINTH LESS THAN QTSN45
017436,000114: 22,6453           63176                           ASIN                                           
017437,000115: 22,6454           00023                                    SINTH                                 #  TEMPORARY FOR SINTH
017438,000116: 22,6455           00002                                    1                                     
017439,000117: 22,6456           32025                           STORE    THETA                                 
017440,000118: 
017441,000119: 22,6457           73776                           BMN      0                                     
017442,000120: 22,6460           00021                                    COSTH                                 
017443,000121: 22,6461           04466                                    TRIG2                                 
017444,000122: 
017445,000123: 22,6462           45175                           DMOVE    1                                     
017446,000124: 22,6463           40576                           ITCQ                                           
017447,000125: 22,6464           00025                                    THETA                                 
017448,000126: 22,6465           53775        TRIG2              SIGN     1                                     #  COSTH NEGATIVE
017449,000127: 22,6466           66776                           DSU                                            
017450,000128: 22,6467           05200                                    HALFDP                                
017451,000129: 22,6470           00023                                    SINTH                                 #  WITH ASIN
017452,000130: 22,6471           00025                                    THETA                                 
017453,000131: 22,6472           32025                           STORE    THETA                                 
017454,000132: 
017455,000133: 22,6473           40576                           ITCQ     0                                     #  RETURN
017456,000134: 

Page 464

017458,000136: 
017459,000137:                                                                                                  #                                          THIS PROGRAM COMPUTES SXT ANGLES SAC AND
017460,000138:                                                                                                  #                                          PAC IN HALF AND EIGHT REVOLUTIONS RESPEC
017461,000139:                                                                                                  #                                          GO IN WITH S1=BASE ADDRESS OF CDU;S
017462,000140: 
017463,000141: 22,6474           45575        SMNB               ITA      1                                     #  CHECK THAT NBSMBIT IS OFF,IF IT ISGO TO
017464,000142: 22,6475           43411                           TEST     SWITCH                                #  NBSM1,OTHERWISE SWITCH IT OFF
017465,000143: 22,6476           00052                                    S2                                    
017466,000144: 22,6477           00006                                    NBSMBIT                               
017467,000145: 22,6500           04503                                    SMNB1                                 
017468,000146: 22,6501           00006                                    NBSMBIT                               
017469,000147: 
017470,000148: 22,6502           75575        SMNB1              AXT,1    1                                     #  NBSMBIT IS OFF
017471,000149: 22,6503           74572                           AXT,2    ITC                                   #  SET INDECES TO ROTATE X,Z ABOUT Y
017472,000150: 22,6504           00005                                    4                                     
017473,000151: 22,6505           00001                                    0                                     
017474,000152: 22,6506           04556                                    AXISROT                               #  DO AXIS ROTATION
017475,000153: 
017476,000154: 22,6507           75575                           AXT,1    1                                     #  SET INDECES TO ROTATE Y,X ABOUT Z
017477,000155: 22,6510           74572                           AXT,2    ITC                                   
017478,000156: 22,6511           00003                                    2                                     
017479,000157: 22,6512           00005                                    4                                     
017480,000158: 22,6513           04556                                    AXISROT                               #  DO AXIS ROTATION
017481,000159: 
017482,000160: 22,6514           75575                           AXT,1    1                                     #  SET INDECES TO ROTATE Z,Y ABOUT X
017483,000161: 22,6515           74572                           AXT,2    ITC                                   
017484,000162: 22,6516           00001                                    0                                     
017485,000163: 22,6517           00003                                    2                                     
017486,000164: 22,6520           04556                                    AXISROT                               #  DO AXIS ROTATION
017487,000165: 
017488,000166: 22,6521           44576                           ITCI     0                                     #  RETURN
017489,000167: 22,6522           00052                                    S2                                    
017490,000168: 

Page 465

017492,000170: 
017493,000171: 22,6523           45575        NBSM               ITA      1                                     #  CHECK THAT NBSMBIT IS ON,IF IT IS NOT GO
017494,000172: 22,6524           43576                           TEST                                           #  TO NBSM1 AND SWITCH IT ON
017495,000173: 22,6525           00052                                    S2                                    
017496,000174: 22,6526           00006                                    NBSMBIT                               
017497,000175: 22,6527           04552                                    NBSM1                                 
017498,000176: 
017499,000177: 22,6530           75575        NBSM2              AXT,1    1                                     #  ROTATE Z,Y ABOUT X
017500,000178: 22,6531           74572                           AXT,2    ITC                                   
017501,000179: 22,6532           00001                                    0                                     
017502,000180: 22,6533           00003                                    2                                     
017503,000181: 22,6534           04556                                    AXISROT                               
017504,000182: 
017505,000183: 22,6535           75575                           AXT,1    1                                     #  ROTATE Y,X ABOUT Z
017506,000184: 22,6536           74572                           AXT,2    ITC                                   
017507,000185: 22,6537           00003                                    2                                     
017508,000186: 22,6540           00005                                    4                                     
017509,000187: 22,6541           04556                                    AXISROT                               
017510,000188: 
017511,000189: 22,6542           75575                           AXT,1    1                                     #  ROTATE X,Z ABOUT Y
017512,000190: 22,6543           74572                           AXT,2    ITC                                   
017513,000191: 22,6544           00005                                    4                                     
017514,000192: 22,6545           00001                                    0                                     
017515,000193: 22,6546           04556                                    AXISROT                               
017516,000194: 
017517,000195: 22,6547           44576                           ITCI     0                                     #  RETURN
017518,000196: 22,6550           00052                                    S2                                    
017519,000197: 
017520,000198: 22,6551           42575        NBSM1              SWITCH   1                                     
017521,000199: 22,6552           76776                           ITC                                            
017522,000200: 22,6553           00006                                    NBSMBIT                               
017523,000201: 22,6554           04531                                    NBSM2                                 
017524,000202: 

Page 466

017526,000204: 
017527,000205: 22,6555           57574        AXISROT            XSU,1    2                                     #  ROUTINE FOR SINGLE AXIS ROTATIONS
017528,000206: 22,6556           42171                           SMOVE*   RTB                                   
017529,000207: 22,6557           61576                           XAD,1                                          #  REMARKS ARE FOR ROTATING Z,Y ABOUT X
017530,000208: 22,6560           00051                                    S1                                    
017531,000209: 22,6561           00011                                    4,1                                   #  INDEX1=0,INDEX2=2
017532,000210: 22,6562           20304                                    CDULOGIC                              #  ANGLES ARE STORED IN THE ORDER IGA,MGA,
017533,000211: 22,6563           00051                                    S1                                    
017534,000212: 22,6564           32037                           STORE    30D                                   #  OGA,SO WE PICK UP OGZ
017535,000213: 
017536,000214: 22,6565           55176        ACCUROT            COS      0                                     
017537,000215: 22,6566           00037                                    30D                                   
017538,000216: 22,6567           34021                           STORE    8D,1                                  #  STORE COS(OGA) IN 8
017539,000217: 
017540,000218: 22,6570           57176                           SIN      0                                     
017541,000219: 22,6571           00037                                    30D                                   
017542,000220: 22,6572           34025                           STORE    10D,1                                 #  STORE SIN(OGA) IN 10D
017543,000221: 
017544,000222: 22,6573           64375                           DMP*     1                                     
017545,000223: 22,6574           63776                           TSLT                                           
017546,000224: 22,6575           00025                                    10D,1                                 
017547,000225: 22,6576           00112                                    VAC        +4,2                       #  PUSH DOWN (VAC +2)SIN(OGA)
017548,000226: 22,6577           00002                                    1                                     
017549,000227: 
017550,000228: 22,6600           64375                           DMP*     1                                     
017551,000229: 22,6601           63776                           TSLT                                           
017552,000230: 22,6602           00021                                    8D,1                                  
017553,000231: 22,6603           00112                                    VAC        +4,2                       #  PUSH DOWN (VAC +2)COS(OGA)
017554,000232: 22,6604           00002                                    1                                     
017555,000233: 
017556,000234: 22,6605           64374                           DMP*     2                                     
017557,000235: 22,6606           63615                           TSLT     TEST                                  
017558,000236: 22,6607           65776                           BDSU                                           
017559,000237: 22,6610           00025                                    10D,1                                 
017560,000238: 22,6611           00111                                    VAC        +4,1                       
017561,000239: 22,6612           00002                                    1                                     
017562,000240: 22,6613           00006                                    NBSMBIT                               
017563,000241: 22,6614           04630                                    AXISROT1                              
017564,000242: 22,6615           34112                           STORE    VAC        +4,2                       #  VAC+2=(VAC+2)COS(OGA)-(VAC+4)SIN(OGA)
017565,000243: 
017566,000244: 22,6616           64375                           DMP*     1                                     
017567,000245: 22,6617           63742                           TSLT     DAD                                   
017568,000246: 22,6620           00021                                    8D,1                                  
017569,000247: 22,6621           00111                                    VAC        +4,1                       
017570,000248: 22,6622           00002                                    1                                     
017571,000249: 22,6623           34111                           STORE    VAC        +4,1                       #  VAC+4=(VAC+2)SIN(OGA)+(VAC+4)COS(OGA)
017572,000250: 
017573,000251: 22,6624           75175                           VMOVE    1                                     
017574,000252: 22,6625           40576                           ITCQ                                           
017575,000253: 22,6626           00041                                    VAC                                   

Page 467

017577,000255: 
017578,000256: 22,6627           47575        AXISROT1           NOLOD    1                                     #  TEST WAS 0 FOR SMNB
017579,000257: 22,6630           70776                           DAD                                            
017580,000258: 22,6631           34112                           STORE    VAC        +4,2                       #  VAC+2=(VAC+2)COS(OGA)+(VAC+4)SIN(OGA)
017581,000259: 
017582,000260: 22,6632           64375                           DMP*     1                                     
017583,000261: 22,6633           63732                           TSLT     DSU                                   
017584,000262: 22,6634           00021                                    8D,1                                  
017585,000263: 22,6635           00111                                    VAC        +4,1                       
017586,000264: 22,6636           00002                                    1                                     
017587,000265: 22,6637           34111                           STORE    VAC        +4,1                       #  VAC+4=-(VAC+2)SIN(OGA)+(VAC+4)COS(OGA)
017588,000266: 
017589,000267: 22,6640           75175                           VMOVE    1                                     
017590,000268: 22,6641           40576                           ITCQ                                           
017591,000269: 22,6642           00041                                    VAC                                   
017592,000270: 

Page 468

017594,000272: 
017595,000273: 22,6643           41775        CALCGA             VXV      1                                     #  CALCULATE GIMBAL ANGLES GIVEN THE X,Y,Z-
017596,000274: 22,6644           73176                           UNIT                                           
017597,000275: 22,6645           01477                                    XNB                                   
017598,000276: 22,6646           01433                                    YSM                                   
017599,000277: 
017600,000278: 22,6647           47575                           NOLOD    1                                     
017601,000279: 22,6650           42625                           DOT      ITA                                   
017602,000280: 22,6651           01513                                    ZNB                                   
017603,000281: 22,6652           00052                                    S2                                    
017604,000282: 22,6653           32021                           STORE    COSTH                                 #  TEMPORARY FOR COSTH
017605,000283: 
017606,000284: 22,6654           47575                           NOLOD    1                                     
017607,000285: 22,6655           42776                           DOT                                            
017608,000286: 22,6656           01505                                    YNB                                   
017609,000287: 22,6657           32023                           STORE    SINTH                                 
017610,000288: 
017611,000289: 22,6660           76776                           ITC      0                                     
017612,000290: 22,6661           04437                                    ARCTRIG                               
017613,000291: 
017614,000292: 22,6662           47576                           NOLOD    0                                     
017615,000293: 22,6663           33521                           STORE    OGC                                   
017616,000294: 
017617,000295: 22,6664           42774                           DOT      2                                     
017618,000296: 22,6665           63746                           TSLT     BOV                                   
017619,000297: 22,6666           56713                           TSRT     ASIN                                  
017620,000298: 22,6667           01433                                    YSM                                   
017621,000299: 22,6670           01477                                    XNB                                   
017622,000300: 22,6671           00003                                    2                                     
017623,000301: 22,6672           04725                                    GIMLOCK1                              #  LOOK FOR EXCESSIVE MGC
017624,000302: 22,6673           00002                                    1                                     
017625,000303: 22,6674           33525                           STORE    MGC                                   
017626,000304: 
017627,000305: 22,6675           65175                           ABS      1                                     
017628,000306: 22,6676           66616                           DSU      BPL                                   
017629,000307: 22,6677           01525                                    MGC                                   
017630,000308: 22,6700           05202                                    .333...                               
017631,000309: 22,6701           04725                                    GIMLOCK1                              
017632,000310: 
017633,000311: 22,6702           42776        CALCGA1            DOT      0                                     
017634,000312: 22,6703           01441                                    ZSM                                   
017635,000313: 22,6704           00001                                    0                                     #  CONTAINS AMG
017636,000314: 22,6705           32021                           STORE    COSTH                                 
017637,000315: 
017638,000316: 22,6706           42776                           DOT      0                                     
017639,000317: 22,6707           01425                                    XSM                                   
017640,000318: 22,6710           32023                           STORE    SINTH                                 
017641,000319: 
017642,000320: 22,6711           76776                           ITC      0                                     
017643,000321: 22,6712           04437                                    ARCTRIG                               

Page 469

017645,000323: 22,6713           47576                           NOLOD    0                                     
017646,000324: 22,6714           33523                           STORE    IGC                                   
017647,000325: 
017648,000326: 22,6715           75175                           VMOVE    1                                     #  OP COUNT BY UNEEDA DEBUGGING SERVICE INC
017649,000327: 22,6716           76576                           RTB                                            
017650,000328: 22,6717           01521                                    OGC                                   
017651,000329: 22,6720           20624                                    V1STO2S                               
017652,000330: 22,6721           32701                           STORE    THETAD                                #  *** BEWARE *** MODE IS NOW DP ***
017653,000331: 
017654,000332: 22,6722           44576                           ITCI     0                                     
017655,000333: 22,6723           00052                                    S2                                    
017656,000334: 
017657,000335: 22,6724           77576        GIMLOCK1           EXIT     0                                     
017658,000336: 
017659,000337: 22,6725           03007                           TC       ALARM                                 
017660,000338: 22,6726           00401                           OCT      00401                                 
017661,000339: 22,6727           04000                           TC       INTPRET                               #  RESUME ROUTINE.
017662,000340: 
017663,000341: 22,6730           76776                           ITC      0                                     
017664,000342: 22,6731           04703                                    CALCGA1                               
017665,000343: 

Page 470

017667,000345: 
017668,000346: 22,6732           42175        SXTNB              SMOVE*   1                                     #  THIS PROGRAM COMPUTES COMPONENTS OF
017669,000347: 22,6733           76571                           RTB      RTB                                   #  THE STAR HALF UNIT VECTOR,STARM, GIVEN
017670,000348: 22,6734           00013                                    5,1                                   #  THE MEASURED SXT ANGLES PAM AND SAM.
017671,000349: 22,6735           20304                                    CDULOGIC                              
017672,000350: 22,6736           20407                                    TRUNLOG                               
017673,000351: 
017674,000352: 22,6737           47575                           NOLOD    1                                     
017675,000353: 22,6740           57116                           SIN      TSLT                                  
017676,000354: 22,6741           00002                                    1                                     #  STORE A=SIN(PAM.PI/4)
017677,000355: 
017678,000356: 22,6742           42175                           SMOVE*   1                                     
017679,000357: 22,6743           76576                           RTB                                            
017680,000358: 22,6744           00007                                    3,1                                   
017681,000359: 22,6745           20304                                    CDULOGIC                              #  STORE  SAM/2 IN PD 4,RESOLVES +/- ZERO
017682,000360: 
017683,000361: 22,6746           47575                           NOLOD    1                                     
017684,000362: 22,6747           55122                           COS      DMP                                   
017685,000363: 22,6750           00003                                    2                                     
017686,000364: 22,6751           32041                           STORE    STARM                                 #  STARM +0=(A.COS(PI.SAM))/2
017687,000365: 
017688,000366: 22,6752           57175                           SIN      1                                     #  SIN(2PI.PD4).PD2
017689,000367: 22,6753           64776                           DMP                                            
017690,000368: 22,6754           32043                           STORE    STARM      +2                         #  STARM +2=(A.SIN(PI.SAM))/2
017691,000369: 
017692,000370: 22,6755           55176                           COS      0                                     
017693,000371: 22,6756           32045                           STORE    STARM      +4                         #  STARM +4=0.5.COS(PAM.PI/4)
017694,000372: 
017695,000373: 22,6757           40576                           ITCQ     0                                     
017696,000374: 

Page 471

017698,000376: 
017699,000377:                                                                                                  #  AXISGEN               GIVEN TWO STAR VECTORS     -         -
017700,000378:                                                                                                  #  -------                                      STARA AND STARB WRITTEN IN TWO
017701,000379:                                                                                                  #                          COORDINATE SYSTEMS, THE D AND C SYSTEMS SO THAT WE
017702,000380:                                                                                                  #                          HAVE       -       -           -       -
017703,000381:                                                                                                  #                                 STARA   STARB   AND STARB , STARA
017704,000382:                                                                                                  #                                      D       D           C       C
017705,000383:                                                                                                  #                          THIS PROGRAM COMPUTES THE HALF UNIT AXES
017706,000384:                                                                                                  #                                  -   -   -
017707,000385:                                                                                                  #                                 XD  YD  ZD
017708,000386:                                                                                                  #                                   C   C   C
017709,000387:                                                                                                  #                          THAT IS THE D COORDINATE SYSTEM AXES REFERRED TO THE C
017710,000388:                                                                                                  #                          COORDINATE SYSTEM
017711,000389:                                                                                                  #                        THE INPUTS ARE STORED AS FOLLOWS
017712,000390:                                                                                                  #                                                                -
017713,000391:                                                                                                  #                                 C(STARAD) - C(STARAD +5) = STARA
017714,000392:                                                                                                  #                                                                 D
017715,000393:                                                                                                  #                                                                -
017716,000394:                                                                                                  #                                 C(STARAD+6)-C(STARAD+11D)= STARB
017717,000395:                                                                                                  #                                                                 D
017718,000396:                                                                                                  #                                                                -
017719,000397:                                                                                                  #                                 C(6D) - C(11D)           = STARA
017720,000398:                                                                                                  #                                                                 C
017721,000399:                                                                                                  #                                                                -
017722,000400:                                                                                                  #                                 C(12D) - C(17D)          = STARB
017723,000401:                                                                                                  #                                                                 C
017724,000402:                                                                                                  #                        RESULTS ARE LEFT IN XDC TO XDC +17D
017725,000403:                                                                                                  #                          THE RETUTINE DESTROYS THE INPUTS AND USES LOCATIONS
017726,000404:                                                                                                  #                             STARAD+12D TO STARAD+17D AND 18D - 23D +30D
017727,000405: 22,6760           75575        AXISGEN            AXT,1    1                                     
017728,000406: 22,6761           55576                           AST,1                                          
017729,000407: 22,6762           01411                                    STARAD     +6                         
017730,000408: 22,6763           01375                                    STARAD     -6                         
017731,000409: 22,6764           41375        AXISGEN1           VXV*     1                                     
017732,000410: 22,6765           73176                           UNIT                                           
017733,000411: 22,6766           03035                                    STARAD     +12D,1                     
017734,000412: 22,6767           03051                                    STARAD     +18D,1                     
017735,000413: 22,6770           37051                           STORE    STARAD     +18D,1                     
017736,000414: 
017737,000415: 22,6771           41375                           VXV*     1                                     
017738,000416: 22,6772           44776                           VSLT                                           
017739,000417: 22,6773           03035                                    STARAD     +12D,1                     
017740,000418: 22,6774           03051                                    STARAD     +18D,1                     
017741,000419: 22,6775           00002                                    1                                     
017742,000420: 22,6776           37065                           STORE    STARAD     +24D,1                     
017743,000421: 
017744,000422: 22,6777           51576                           TIX,1    0                                     
017745,000423: 22,7000           04765                                    AXISGEN1                              
017746,000424: 
017747,000425: 22,7001           53573                           AXC,1    3                                     
017748,000426: 22,7002           67565                           SXA,1    AXT,1                                 

Page 472

017750,000428: 22,7003           55561                           AST,1    AXT,2                                 
017751,000429: 22,7004           54576                           AST,2                                          
017752,000430: 22,7005           00007                                    6                                     
017753,000431: 22,7006           00037                                    30D                                   
017754,000432: 22,7007           00023                                    18D                                   
017755,000433: 22,7010           00007                                    6                                     
017756,000434: 22,7011           00007                                    6                                     
017757,000435: 22,7012           00003                                    2                                     
017758,000436: 
017759,000437: 22,7013           65576        AXISGEN2           XCHX,1   0                                     
017760,000438: 22,7014           00037                                    30D                                   
017761,000439: 
017762,000440: 22,7015           75376                           VXSC*    0                                     
017763,000441: 22,7016           00001                                    0,1                                   
017764,000442: 22,7017           03022                                    STARAD     +6,2                       
017765,000443: 
017766,000444: 22,7020           75376                           VXSC*    0                                     
017767,000445: 22,7021           00015                                    6,1                                   
017768,000446: 22,7022           03036                                    STARAD     +12D,2                     
017769,000447: 22,7023           32031                           STORE    24D                                   
017770,000448: 
017771,000449: 22,7024           75374                           VXSC*    2                                     
017772,000450: 22,7025           50642                           VAD      VAD                                   
017773,000451: 22,7026           44725                           VSLT     XCHX,1                                
017774,000452: 22,7027           00031                                    12D,1                                 
017775,000453: 22,7030           03052                                    STARAD     +18D,2                     
017776,000454: 22,7031           77777                                    -                                     
017777,000455: 22,7032           00031                                    24D                                   
017778,000456: 22,7033           00002                                    1                                     
017779,000457: 22,7034           00037                                    30D                                   
017780,000458: 22,7035           37241                           STORE    XDC        +18D,1                     
017781,000459: 
017782,000460: 22,7036           51576                           TIX,1    0                                     
017783,000461: 22,7037           05041                                    AXISGEN3                              
017784,000462: 
017785,000463: 22,7040           50576        AXISGEN3           TIX,2    0                                     
017786,000464: 22,7041           05014                                    AXISGEN2                              
017787,000465: 
017788,000466: 22,7042           40576                           ITCQ     0                                     
017789,000467: 

Page 473

017791,000469: 
017792,000470: 22,7043           75175        CALCSXA            VMOVE    1                                     #  THIS PROGRAM COMPUTES THE SXT ANGLES SAC
017793,000471: 22,7044           45572                           ITA      ITC                                   #  AND PAC GIVEN THE STAR VECTOR IN SM AXES
017794,000472: 22,7045           01417                                    STAR                                  
017795,000473: 22,7046           00052                                    S2                                    #  HALF UNIT VECTOR
017796,000474: 22,7047           04475                                    SMNB                                  
017797,000475: 
017798,000476: 22,7050           47576                           NOLOD    0                                     
017799,000477: 22,7051           32007                           STORE    6                                     #  STORE (STARM0,STARM1,STARM2)
017800,000478: 
017801,000479: 22,7052           45176                           DMOVE    0                                     
017802,000480: 22,7053           05174                                    ZERODP                                
017803,000481: 22,7054           32045                           STORE    VAC        +4                         #  SET VAC TO (STARM0,STARM1,0)
017804,000482: 
017805,000483: 22,7055           47575                           NOLOD    1                                     #  UNIT VAC TO (S0,S1,0)
017806,000484: 22,7056           73072                           UNIT     TSRT                                  
017807,000485: 22,7057           00003                                    2                                     
017808,000486: 22,7060           32001                           STORE    0                                     #  STORE  COS/4 =S0/4 , SIN/4 = S1/4 ,0
017809,000487: 
017810,000488: 22,7061           45176                           DMOVE    0                                     
017811,000489: 22,7062           00001                                    0                                     
017812,000490: 22,7063           00021                                    COSTH                                 
017813,000491: 
017814,000492: 22,7064           45176                           DMOVE    0                                     
017815,000493: 22,7065           00003                                    2                                     
017816,000494: 22,7066           00023                                    SINTH                                 
017817,000495: 
017818,000496: 22,7067           76776                           ITC      0                                     
017819,000497: 22,7070           04437                                    ARCTRIG                               #  USES THE COS/SIN STORED ABOVE
017820,000498: 
017821,000499: 22,7071           76576                           RTB      0                                     
017822,000500: 22,7072           20325                                    1STO2S                                
017823,000501: 22,7073           33521                           STORE    SAC                                   
017824,000502: 
017825,000503: 22,7074           42773                           DOT      3                                     
017826,000504: 22,7075           63713                           TSLT     ASIN                                  
017827,000505: 22,7076           63746                           TSLT     BOV                                   
017828,000506: 22,7077           73771                           BMN      RTB                                   
017829,000507: 22,7100           00001                                    0                                     #  1/4 UNIT  (STARM0,STARM1,0)
017830,000508: 22,7101           00007                                    6                                     #  STARM-1/2 UNIT VECTOR
017831,000509: 22,7102           00004                                    3                                     
017832,000510: 22,7103           00004                                    3                                     
017833,000511: 22,7104           05113                                    CALCSXA1                              
017834,000512: 22,7105           05113                                    CALCSXA1                              
017835,000513: 22,7106           20325                                    1STO2S                                
017836,000514: 22,7107           33523                           STORE    PAC                                   
017837,000515: 
017838,000516: 22,7110           44576                           ITCI     0                                     
017839,000517: 22,7111           00052                                    S2                                    
017840,000518: 
017841,000519: 22,7112           77576        CALCSXA1           EXIT     0                                     #  PROGRAM ERROR,STAR OUT OF FIELD OF VIEW

Page 474

017843,000521: 22,7113           03007                           TC       ALARM                                 
017844,000522: 22,7114           00402                           OCT      00402                                 
017845,000523: 22,7115           02124                           TC       ENDOFJOB                              
017846,000524: 

Page 475

017848,000526: 
017849,000527: 22,7116           41775        SXTANG             VXV      1                                     #  TIVELY FROM INPUTS STAR AND XNB,YNB,ZNB
017850,000528: 22,7117           73026                           UNIT     VSRT                                  #  THE HALF UNIT STAR VECTOR AND THE NAV
017851,000529: 22,7120           01513                                    ZNB                                   #  BASE HALF AXES.
017852,000530: 22,7121           01417                                    STAR                                  
017853,000531: 22,7122           00002                                    1                                     
017854,000532: 22,7123           32027                           STORE    PDA                                   #  DEFINES PROJECTION OF STAR IN XY PLANE
017855,000533: 
017856,000534: 22,7124           42775                           DOT      1                                     
017857,000535: 22,7125           47025                           COMP     ITA                                   #  COMPUTE  SIN(PI.SAC)/4
017858,000536: 22,7126           00027                                    PDA                                   
017859,000537: 22,7127           01477                                    XNB                                   
017860,000538: 22,7130           00052                                    S2                                    
017861,000539: 22,7131           32023                           STORE    SINTH                                 
017862,000540: 
017863,000541: 22,7132           42776                           DOT      0                                     #  COMPUTE  COS(PI.SAC)/4
017864,000542: 22,7133           00027                                    PDA                                   
017865,000543: 22,7134           01505                                    YNB                                   
017866,000544: 22,7135           32021                           STORE    COSTH                                 
017867,000545: 
017868,000546: 22,7136           76776                           ITC      0                                     #  COMPUTE SAC
017869,000547: 22,7137           04437                                    ARCTRIG                               
017870,000548: 
017871,000549: 22,7140           76576                           RTB      0                                     
017872,000550: 22,7141           20325                                    1STO2S                                
017873,000551: 22,7142           33521                           STORE    SAC                                   
017874,000552: 
017875,000553: 22,7143           41772                           VXV      4                                     
017876,000554: 22,7144           42716                           DOT      TSLT                                  
017877,000555: 22,7145           63116                           ASIN     TSLT                                  #  COMPUTE PAC
017878,000556: 22,7146           71756                           BOV      BMN                                   
017879,000557: 22,7147           76576                           RTB                                            
017880,000558: 22,7150           00027                                    PDA                                   
017881,000559: 22,7151           01513                                    ZNB                                   
017882,000560: 22,7152           01417                                    STAR                                  
017883,000561: 22,7153           00003                                    2                                     
017884,000562: 22,7154           00004                                    3                                     
017885,000563: 22,7155           05164                                    SXTALARM                              
017886,000564: 22,7156           05164                                    SXTALARM                              #  WE NOW HAVE PRECISION ANGLE
017887,000565: 22,7157           20325                                    1STO2S                                
017888,000566: 22,7160           33523                           STORE    PAC                                   
017889,000567: 
017890,000568: 22,7161           44576                           ITCI     0                                     #  JOB IS DONE
017891,000569: 22,7162           00052                                    S2                                    
017892,000570: 
017893,000571: 22,7163           77576        SXTALARM           EXIT     0                                     #  BRANCH TO RESTART SEQUENCE
017894,000572: 
017895,000573: 22,7164           03007                           TC       ALARM                                 
017896,000574: 22,7165           00403                           OCT      00403                                 
017897,000575: 22,7166           02124                           TC       ENDOFJOB                              
017898,000576: 

Page 476

017900,000578: 
017901,000579: 22,7167           05520 26075  QTSN45             2DEC     .1768                                 
017902,000580: 22,7171           05260 04061  THIRD              2DEC     .167                                  
017903,000581: 22,7173                        ZPRIME             =        22D                                   
017904,000582: 22,7173                        PDA                =        22D                                   
017905,000583: 22,7173                        COSTH              =        16D                                   
017906,000584: 22,7173                        SINTH              =        18D                                   
017907,000585: 22,7173                        THETA              =        20D                                   
017908,000586: 22,7173  0000040               STARM              =        VAC                                   
017909,000587: 22,7173           00000 00000  ZERODP             2DEC     0          B-28                       
017910,000588: 22,7175           37777        POSMAXDP           OCT      37777                                 
017911,000589: 22,7176           37777                           OCT      37777                                 
017912,000590: 22,7177           20000 00000  HALFDP             2DEC     .5                                    
017913,000591: 22,7201           12525 12525  .333...            2DEC     .3333333333                            

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