Source Code

These source-code files are part of a reconstructed copy of Corona 261, the final, flown release of the Block I Command Module (CM) Apollo Guidance Computer (AGC) software for the AS-202 mission.

They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on the mission, part numbers 1003733-171, 1003733-241, 1003733-191, 1003733-211, 1003733-221, and 1003733-241. The source code for the Apollo 4 and 6 software, Solarium 55, was used as a starting point, since it was directly derived from Corona and (at least in theory) only minimally modified.

Since only binary dumps (rather than listings) of Corona are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

019216,000002:                                                                                                  ## Copyright:   Public domain.
019217,000003:                                                                                                  ## Filename:    INFLIGHT_ALIGNMENT_SUBROUTINES.agc
019218,000004:                                                                                                  ## Purpose:     A section of Corona revision 261.
019219,000005:                                                                                                  ##              It is part of the source code for the Apollo Guidance Computer
019220,000006:                                                                                                  ##              (AGC) for AS-202. No original listings of this software are
019221,000007:                                                                                                  ##              available; instead, this file was created via disassembly of
019222,000008:                                                                                                  ##              the core rope modules actually flown on the mission.
019223,000009:                                                                                                  ## Assembler:   yaYUL
019224,000010:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
019225,000011:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
019226,000012:                                                                                                  ## Mod history: 2023-05-27 MAS  Created from Solarium 55.
019227,000013: 
019228,000014: 
019229,000015:                                                                                                  #  CALGTA                GIVEN THE DESIRED XD,YD AND ZD UNIT VECTORS REFERED TO
019230,000016:                                                                                                  #  --------              PRESENT STABLE MEMBER ORIENTATION, THIS SUBROUTINE FINDS
019231,000017:                                                                                                  #                        THETAY, THETAZ, AND THETAX, THE REQUIRED GYRO TORQUE
019232,000018:                                                                                                  #                        ANGLES IN THE ORDER TO BE APPLIED TO BRING THE STABLE
019233,000019:                                                                                                  #                        MEMBER INTO THE DESIRED ORIENTATION.
019234,000020: 
019235,000021: 
019236,000022: 
019237,000023: 22,6352                                           BANK     22                                    
019238,000024: 22,6352           45575        CALCGTA            ITA      1                                     #  DEFINE THE VECTOR ZPRIME WHICH IS THE
019239,000025: 22,6353           45176                           DMOVE                                          
019240,000026: 22,6354           00052                                    S2                                    #  IMAGE OF Z UNDER THE ROTATION ABOUT Y
019241,000027: 22,6355           01477                                    XDSMPR                                
019242,000028: 
019243,000029: 22,6356           45176                           DMOVE    0                                     #  ZPRIME =(-XD  ,0 , XD )
019244,000030: 22,6357           05174                                    ZERODP                                #              2        0
019245,000031: 
019246,000032: 22,6360           47175                           COMP     1                                     
019247,000033: 22,6361           41153                           VDEF     UNIT                                  
019248,000034: 22,6362           01503                                    XDSMPR     +4                         
019249,000035: 22,6363           32027                           STORE    ZPRIME                                
019250,000036: 
019251,000037: 22,6364           56776                           TSRT     0                                     #  SET UP COSTH AND SINTH TO ENTER
019252,000038: 22,6365           00027                                    ZPRIME                                #      ARCTRIG FOR COMPUTATION OF THETA-Y
019253,000039: 22,6366           00002                                    1                                     
019254,000040: 22,6367           32023                           STORE    SINTH                                 
019255,000041: 
019256,000042: 22,6370           56776                           TSRT     0                                     
019257,000043: 22,6371           00033                                    ZPRIME     +4D                        
019258,000044: 22,6372           00002                                    1                                     
019259,000045: 22,6373           32021                           STORE    COSTH                                 
019260,000046: 
019261,000047: 22,6374           76776                           ITC      0                                     
019262,000048: 22,6375           04437                                    ARCTRIG                               
019263,000049: 
019264,000050: 22,6376           47576                           NOLOD    0                                     
019265,000051: 22,6377           33523                           STORE    IGC                                   
019266,000052: 
019267,000053: 22,6400           56776                           TSRT     0                                     
019268,000054: 22,6401           01501                                    XDSMPR     +2                         
019269,000055: 22,6402           00002                                    1                                     
019270,000056: 22,6403           32023                           STORE    SINTH                                 
019271,000057: 
019272,000058: 22,6404           64776                           DMP      0                                     
019273,000059: 22,6405           00027                                    ZPRIME                                
019274,000060: 22,6406           01503                                    XDSMPR     +4                         
019275,000061: 
019276,000062: 22,6407           64775                           DMP      1                                     
019277,000063: 22,6410           66776                           DSU                                            
019278,000064: 22,6411           00033                                    ZPRIME     +4                         
019279,000065: 22,6412           01477                                    XDSMPR                                
019280,000066: 22,6413           32021                           STORE    COSTH                                 
019281,000067: 
019282,000068: 22,6414           76776                           ITC      0                                     
019283,000069: 22,6415           04437                                    ARCTRIG                               
019284,000070: 
019285,000071: 22,6416           47576                           NOLOD    0                                     
019286,000072: 22,6417           33525                           STORE    MGC                                   
019287,000073: 
019288,000074: 22,6420           42776                           DOT      0                                     
019289,000075: 22,6421           00027                                    ZPRIME                                
019290,000076: 22,6422           01513                                    ZDSMPR                                
019291,000077: 22,6423           32021                           STORE    COSTH                                 
019292,000078: 
019293,000079: 22,6424           42776                           DOT      0                                     
019294,000080: 22,6425           00027                                    ZPRIME                                
019295,000081: 22,6426           01505                                    YDSMPR                                
019296,000082: 22,6427           32023                           STORE    SINTH                                 
019297,000083: 
019298,000084: 22,6430           76776                           ITC      0                                     
019299,000085: 22,6431           04437                                    ARCTRIG                               
019300,000086: 
019301,000087: 22,6432           47576                           NOLOD    0                                     
019302,000088: 22,6433           33521                           STORE    OGC                                   
019303,000089: 
019304,000090: 22,6434           44576                           ITCI     0                                     
019305,000091: 22,6435           00052                                    S2                                    
019306,000092: 
019307,000093: 
019308,000094: 22,6436           65175        ARCTRIG            ABS      1                                     #  GIVEN SINTH AND COSTH SCALED X1/4 FIND
019309,000095: 22,6437           66756                           DSU      BMN                                   #  THETA IN THE RANGE -PI TO +PI SCALED-
019310,000096: 22,6440           00023                                    SINTH                                 #  TEMPORARY FOR SINTH               XPI/2
019311,000097: 22,6441           05170                                    QTSN45                                #  CONSTANT=0.1768
019312,000098: 22,6442           04453                                    TRIG1                                 
019313,000099: 
019314,000100: 22,6443           63775                           TSLT     1                                     
019315,000101: 22,6444           61056                           ACOS     SIGN                                  
019316,000102: 22,6445           00021                                    COSTH                                 #  TEMPORARY FOR COSTH
019317,000103: 22,6446           00002                                    1                                     
019318,000104: 22,6447           00023                                    SINTH                                 #  TEMPORARY FOR SINTH
019319,000105: 22,6450           32025                           STORE    THETA                                 
019320,000106: 
019321,000107: 22,6451           40576                           ITCQ     0                                     #  RETURN TO MAIN PROGRAM
019322,000108: 
019323,000109: 22,6452           63775        TRIG1              TSLT     1                                     #  SINTH LESS THAN QTSN45
019324,000110: 22,6453           63176                           ASIN                                           
019325,000111: 22,6454           00023                                    SINTH                                 #  TEMPORARY FOR SINTH
019326,000112: 22,6455           00002                                    1                                     
019327,000113: 22,6456           32025                           STORE    THETA                                 
019328,000114: 
019329,000115: 22,6457           73776                           BMN      0                                     
019330,000116: 22,6460           00021                                    COSTH                                 
019331,000117: 22,6461           04466                                    TRIG2                                 
019332,000118: 
019333,000119: 22,6462           45175                           DMOVE    1                                     
019334,000120: 22,6463           40576                           ITCQ                                           
019335,000121: 22,6464           00025                                    THETA                                 
019336,000122: 22,6465           53775        TRIG2              SIGN     1                                     #  COSTH NEGATIVE
019337,000123: 22,6466           66776                           DSU                                            
019338,000124: 22,6467           05200                                    HALFDP                                
019339,000125: 22,6470           00023                                    SINTH                                 #  WITH ASIN
019340,000126: 22,6471           00025                                    THETA                                 
019341,000127: 22,6472           32025                           STORE    THETA                                 
019342,000128: 
019343,000129: 22,6473           40576                           ITCQ     0                                     #  RETURN
019344,000130: 
019345,000131: 
019346,000132:                                                                                                  #                                          THIS PROGRAM COMPUTES SXT ANGLES SAC AND
019347,000133:                                                                                                  #                                          PAC IN HALF AND EIGHT REVOLUTIONS RESPEC
019348,000134:                                                                                                  #                                          GO IN WITH S1=BASE ADDRESS OF CDU;S
019349,000135: 
019350,000136: 22,6474           45575        SMNB               ITA      1                                     #  CHECK THAT NBSMBIT IS OFF,IF IT ISGO TO
019351,000137: 22,6475           43411                           TEST     SWITCH                                #  NBSM1,OTHERWISE SWITCH IT OFF
019352,000138: 22,6476           00052                                    S2                                    
019353,000139: 22,6477           00006                                    NBSMBIT                               
019354,000140: 22,6500           04503                                    SMNB1                                 
019355,000141: 22,6501           00006                                    NBSMBIT                               
019356,000142: 
019357,000143: 22,6502           75575        SMNB1              AXT,1    1                                     #  NBSMBIT IS OFF
019358,000144: 22,6503           74572                           AXT,2    ITC                                   #  SET INDECES TO ROTATE X,Z ABOUT Y
019359,000145: 22,6504           00005                                    4                                     
019360,000146: 22,6505           00001                                    0                                     
019361,000147: 22,6506           04556                                    AXISROT                               #  DO AXIS ROTATION
019362,000148: 
019363,000149: 22,6507           75575                           AXT,1    1                                     #  SET INDECES TO ROTATE Y,X ABOUT Z
019364,000150: 22,6510           74572                           AXT,2    ITC                                   
019365,000151: 22,6511           00003                                    2                                     
019366,000152: 22,6512           00005                                    4                                     
019367,000153: 22,6513           04556                                    AXISROT                               #  DO AXIS ROTATION
019368,000154: 
019369,000155: 22,6514           75575                           AXT,1    1                                     #  SET INDECES TO ROTATE Z,Y ABOUT X
019370,000156: 22,6515           74572                           AXT,2    ITC                                   
019371,000157: 22,6516           00001                                    0                                     
019372,000158: 22,6517           00003                                    2                                     
019373,000159: 22,6520           04556                                    AXISROT                               #  DO AXIS ROTATION
019374,000160: 
019375,000161: 22,6521           44576                           ITCI     0                                     #  RETURN
019376,000162: 22,6522           00052                                    S2                                    
019377,000163: 
019378,000164: 
019379,000165: 22,6523           45575        NBSM               ITA      1                                     #  CHECK THAT NBSMBIT IS ON,IF IT IS NOT GO
019380,000166: 22,6524           43576                           TEST                                           #  TO NBSM1 AND SWITCH IT ON
019381,000167: 22,6525           00052                                    S2                                    
019382,000168: 22,6526           00006                                    NBSMBIT                               
019383,000169: 22,6527           04552                                    NBSM1                                 
019384,000170: 
019385,000171: 22,6530           75575        NBSM2              AXT,1    1                                     #  ROTATE Z,Y ABOUT X
019386,000172: 22,6531           74572                           AXT,2    ITC                                   
019387,000173: 22,6532           00001                                    0                                     
019388,000174: 22,6533           00003                                    2                                     
019389,000175: 22,6534           04556                                    AXISROT                               
019390,000176: 
019391,000177: 22,6535           75575                           AXT,1    1                                     #  ROTATE Y,X ABOUT Z
019392,000178: 22,6536           74572                           AXT,2    ITC                                   
019393,000179: 22,6537           00003                                    2                                     
019394,000180: 22,6540           00005                                    4                                     
019395,000181: 22,6541           04556                                    AXISROT                               
019396,000182: 
019397,000183: 22,6542           75575                           AXT,1    1                                     #  ROTATE X,Z ABOUT Y
019398,000184: 22,6543           74572                           AXT,2    ITC                                   
019399,000185: 22,6544           00005                                    4                                     
019400,000186: 22,6545           00001                                    0                                     
019401,000187: 22,6546           04556                                    AXISROT                               
019402,000188: 
019403,000189: 22,6547           44576                           ITCI     0                                     #  RETURN
019404,000190: 22,6550           00052                                    S2                                    
019405,000191: 
019406,000192: 22,6551           42575        NBSM1              SWITCH   1                                     
019407,000193: 22,6552           76776                           ITC                                            
019408,000194: 22,6553           00006                                    NBSMBIT                               
019409,000195: 22,6554           04531                                    NBSM2                                 
019410,000196: 
019411,000197: 
019412,000198: 22,6555           57574        AXISROT            XSU,1    2                                     #  ROUTINE FOR SINGLE AXIS ROTATIONS
019413,000199: 22,6556           42171                           SMOVE*   RTB                                   
019414,000200: 22,6557           61576                           XAD,1                                          #  REMARKS ARE FOR ROTATING Z,Y ABOUT X
019415,000201: 22,6560           00051                                    S1                                    
019416,000202: 22,6561           00011                                    4,1                                   #  INDEX1=0,INDEX2=2
019417,000203: 22,6562           20303                                    CDULOGIC                              #  ANGLES ARE STORED IN THE ORDER IGA,MGA,
019418,000204: 22,6563           00051                                    S1                                    
019419,000205: 22,6564           32037                           STORE    30D                                   #  OGA,SO WE PICK UP OGZ
019420,000206: 
019421,000207: 22,6565           55176        ACCUROT            COS      0                                     
019422,000208: 22,6566           00037                                    30D                                   
019423,000209: 22,6567           34021                           STORE    8D,1                                  #  STORE COS(OGA) IN 8
019424,000210: 
019425,000211: 22,6570           57176                           SIN      0                                     
019426,000212: 22,6571           00037                                    30D                                   
019427,000213: 22,6572           34025                           STORE    10D,1                                 #  STORE SIN(OGA) IN 10D
019428,000214: 
019429,000215: 22,6573           64375                           DMP*     1                                     
019430,000216: 22,6574           63776                           TSLT                                           
019431,000217: 22,6575           00025                                    10D,1                                 
019432,000218: 22,6576           00112                                    VAC        +4,2                       #  PUSH DOWN (VAC +2)SIN(OGA)
019433,000219: 22,6577           00002                                    1                                     
019434,000220: 
019435,000221: 22,6600           64375                           DMP*     1                                     
019436,000222: 22,6601           63776                           TSLT                                           
019437,000223: 22,6602           00021                                    8D,1                                  
019438,000224: 22,6603           00112                                    VAC        +4,2                       #  PUSH DOWN (VAC +2)COS(OGA)
019439,000225: 22,6604           00002                                    1                                     
019440,000226: 
019441,000227: 22,6605           64374                           DMP*     2                                     
019442,000228: 22,6606           63615                           TSLT     TEST                                  
019443,000229: 22,6607           65776                           BDSU                                           
019444,000230: 22,6610           00025                                    10D,1                                 
019445,000231: 22,6611           00111                                    VAC        +4,1                       
019446,000232: 22,6612           00002                                    1                                     
019447,000233: 22,6613           00006                                    NBSMBIT                               
019448,000234: 22,6614           04630                                    AXISROT1                              
019449,000235: 22,6615           34112                           STORE    VAC        +4,2                       #  VAC+2=(VAC+2)COS(OGA)-(VAC+4)SIN(OGA)
019450,000236: 
019451,000237: 22,6616           64375                           DMP*     1                                     
019452,000238: 22,6617           63742                           TSLT     DAD                                   
019453,000239: 22,6620           00021                                    8D,1                                  
019454,000240: 22,6621           00111                                    VAC        +4,1                       
019455,000241: 22,6622           00002                                    1                                     
019456,000242: 22,6623           34111                           STORE    VAC        +4,1                       #  VAC+4=(VAC+2)SIN(OGA)+(VAC+4)COS(OGA)
019457,000243: 
019458,000244: 22,6624           75175                           VMOVE    1                                     
019459,000245: 22,6625           40576                           ITCQ                                           
019460,000246: 22,6626           00041                                    VAC                                   
019461,000247: 
019462,000248: 22,6627           47575        AXISROT1           NOLOD    1                                     #  TEST WAS 0 FOR SMNB
019463,000249: 22,6630           70776                           DAD                                            
019464,000250: 22,6631           34112                           STORE    VAC        +4,2                       #  VAC+2=(VAC+2)COS(OGA)+(VAC+4)SIN(OGA)
019465,000251: 
019466,000252: 22,6632           64375                           DMP*     1                                     
019467,000253: 22,6633           63732                           TSLT     DSU                                   
019468,000254: 22,6634           00021                                    8D,1                                  
019469,000255: 22,6635           00111                                    VAC        +4,1                       
019470,000256: 22,6636           00002                                    1                                     
019471,000257: 22,6637           34111                           STORE    VAC        +4,1                       #  VAC+4=-(VAC+2)SIN(OGA)+(VAC+4)COS(OGA)
019472,000258: 
019473,000259: 22,6640           75175                           VMOVE    1                                     
019474,000260: 22,6641           40576                           ITCQ                                           
019475,000261: 22,6642           00041                                    VAC                                   
019476,000262: 
019477,000263: 
019478,000264: 22,6643           41775        CALCGA             VXV      1                                     #  CALCULATE GIMBAL ANGLES GIVEN THE X,Y,Z-
019479,000265: 22,6644           73176                           UNIT                                           
019480,000266: 22,6645           01477                                    XNB                                   
019481,000267: 22,6646           01433                                    YSM                                   
019482,000268: 
019483,000269: 22,6647           47575                           NOLOD    1                                     
019484,000270: 22,6650           42625                           DOT      ITA                                   
019485,000271: 22,6651           01513                                    ZNB                                   
019486,000272: 22,6652           00052                                    S2                                    
019487,000273: 22,6653           32021                           STORE    COSTH                                 #  TEMPORARY FOR COSTH
019488,000274: 
019489,000275: 22,6654           47575                           NOLOD    1                                     
019490,000276: 22,6655           42776                           DOT                                            
019491,000277: 22,6656           01505                                    YNB                                   
019492,000278: 22,6657           32023                           STORE    SINTH                                 
019493,000279: 
019494,000280: 22,6660           76776                           ITC      0                                     
019495,000281: 22,6661           04437                                    ARCTRIG                               
019496,000282: 
019497,000283: 22,6662           47576                           NOLOD    0                                     
019498,000284: 22,6663           33521                           STORE    OGC                                   
019499,000285: 
019500,000286: 22,6664           42774                           DOT      2                                     
019501,000287: 22,6665           63746                           TSLT     BOV                                   
019502,000288: 22,6666           56713                           TSRT     ASIN                                  
019503,000289: 22,6667           01433                                    YSM                                   
019504,000290: 22,6670           01477                                    XNB                                   
019505,000291: 22,6671           00003                                    2                                     
019506,000292: 22,6672           04725                                    GIMLOCK1                              #  LOOK FOR EXCESSIVE MGC
019507,000293: 22,6673           00002                                    1                                     
019508,000294: 22,6674           33525                           STORE    MGC                                   
019509,000295: 
019510,000296: 22,6675           65175                           ABS      1                                     
019511,000297: 22,6676           66616                           DSU      BPL                                   
019512,000298: 22,6677           01525                                    MGC                                   
019513,000299: 22,6700           05202                                    .333...                               
019514,000300: 22,6701           04725                                    GIMLOCK1                              
019515,000301: 
019516,000302: 22,6702           42776        CALCGA1            DOT      0                                     
019517,000303: 22,6703           01441                                    ZSM                                   
019518,000304: 22,6704           00001                                    0                                     #  CONTAINS AMG
019519,000305: 22,6705           32021                           STORE    COSTH                                 
019520,000306: 
019521,000307: 22,6706           42776                           DOT      0                                     
019522,000308: 22,6707           01425                                    XSM                                   
019523,000309: 22,6710           32023                           STORE    SINTH                                 
019524,000310: 
019525,000311: 22,6711           76776                           ITC      0                                     
019526,000312: 22,6712           04437                                    ARCTRIG                               
019527,000313: 22,6713           47576                           NOLOD    0                                     
019528,000314: 22,6714           33523                           STORE    IGC                                   
019529,000315: 
019530,000316: 22,6715           75175                           VMOVE    1                                     #  OP COUNT BY UNEEDA DEBUGGING SERVICE INC
019531,000317: 22,6716           76576                           RTB                                            
019532,000318: 22,6717           01521                                    OGC                                   
019533,000319: 22,6720           20631                                    V1STO2S                               
019534,000320: 22,6721           32701                           STORE    THETAD                                #  *** BEWARE *** MODE IS NOW DP ***
019535,000321: 
019536,000322: 22,6722           44576                           ITCI     0                                     
019537,000323: 22,6723           00052                                    S2                                    
019538,000324: 
019539,000325: 22,6724           77576        GIMLOCK1           EXIT     0                                     
019540,000326: 
019541,000327: 22,6725           03015                           TC       ALARM                                 
019542,000328: 22,6726           00401                           OCT      00401                                 
019543,000329: 22,6727           04000                           TC       INTPRET                               #  RESUME ROUTINE.
019544,000330: 
019545,000331: 22,6730           76776                           ITC      0                                     
019546,000332: 22,6731           04703                                    CALCGA1                               
019547,000333: 
019548,000334: 
019549,000335: 22,6732           42175        SXTNB              SMOVE*   1                                     #  THIS PROGRAM COMPUTES COMPONENTS OF
019550,000336: 22,6733           76571                           RTB      RTB                                   #  THE STAR HALF UNIT VECTOR,STARM, GIVEN
019551,000337: 22,6734           00013                                    5,1                                   #  THE MEASURED SXT ANGLES PAM AND SAM.
019552,000338: 22,6735           20303                                    CDULOGIC                              
019553,000339: 22,6736           20406                                    TRUNLOG                               
019554,000340: 
019555,000341: 22,6737           47575                           NOLOD    1                                     
019556,000342: 22,6740           57116                           SIN      TSLT                                  
019557,000343: 22,6741           00002                                    1                                     #  STORE A=SIN(PAM.PI/4)
019558,000344: 
019559,000345: 22,6742           42175                           SMOVE*   1                                     
019560,000346: 22,6743           76576                           RTB                                            
019561,000347: 22,6744           00007                                    3,1                                   
019562,000348: 22,6745           20303                                    CDULOGIC                              #  STORE  SAM/2 IN PD 4,RESOLVES +/- ZERO
019563,000349: 
019564,000350: 22,6746           47575                           NOLOD    1                                     
019565,000351: 22,6747           55122                           COS      DMP                                   
019566,000352: 22,6750           00003                                    2                                     
019567,000353: 22,6751           32041                           STORE    STARM                                 #  STARM +0=(A.COS(PI.SAM))/2
019568,000354: 
019569,000355: 22,6752           57175                           SIN      1                                     #  SIN(2PI.PD4).PD2
019570,000356: 22,6753           64776                           DMP                                            
019571,000357: 22,6754           32043                           STORE    STARM      +2                         #  STARM +2=(A.SIN(PI.SAM))/2
019572,000358: 
019573,000359: 22,6755           55176                           COS      0                                     
019574,000360: 22,6756           32045                           STORE    STARM      +4                         #  STARM +4=0.5.COS(PAM.PI/4)
019575,000361: 
019576,000362: 22,6757           40576                           ITCQ     0                                     
019577,000363: 
019578,000364: 
019579,000365:                                                                                                  #  AXISGEN               GIVEN TWO STAR VECTORS     -         -
019580,000366:                                                                                                  #  -------                                      STARA AND STARB WRITTEN IN TWO
019581,000367:                                                                                                  #                          COORDINATE SYSTEMS, THE D AND C SYSTEMS SO THAT WE
019582,000368:                                                                                                  #                          HAVE       -       -           -       -
019583,000369:                                                                                                  #                                 STARA   STARB   AND STARB , STARA
019584,000370:                                                                                                  #                                      D       D           C       C
019585,000371:                                                                                                  #                          THIS PROGRAM COMPUTES THE HALF UNIT AXES
019586,000372:                                                                                                  #                                  -   -   -
019587,000373:                                                                                                  #                                 XD  YD  ZD
019588,000374:                                                                                                  #                                   C   C   C
019589,000375:                                                                                                  #                          THAT IS THE D COORDINATE SYSTEM AXES REFERRED TO THE C
019590,000376:                                                                                                  #                          COORDINATE SYSTEM
019591,000377:                                                                                                  #                        THE INPUTS ARE STORED AS FOLLOWS
019592,000378:                                                                                                  #                                                                -
019593,000379:                                                                                                  #                                 C(STARAD) - C(STARAD +5) = STARA
019594,000380:                                                                                                  #                                                                 D
019595,000381:                                                                                                  #                                                                -
019596,000382:                                                                                                  #                                 C(STARAD+6)-C(STARAD+11D)= STARB
019597,000383:                                                                                                  #                                                                 D
019598,000384:                                                                                                  #                                                                -
019599,000385:                                                                                                  #                                 C(6D) - C(11D)           = STARA
019600,000386:                                                                                                  #                                                                 C
019601,000387:                                                                                                  #                                                                -
019602,000388:                                                                                                  #                                 C(12D) - C(17D)          = STARB
019603,000389:                                                                                                  #                                                                 C
019604,000390:                                                                                                  #                        RESULTS ARE LEFT IN XDC TO XDC +17D
019605,000391:                                                                                                  #                          THE RETUTINE DESTROYS THE INPUTS AND USES LOCATIONS
019606,000392:                                                                                                  #                             STARAD+12D TO STARAD+17D AND 18D - 23D +30D
019607,000393: 22,6760           75575        AXISGEN            AXT,1    1                                     
019608,000394: 22,6761           55576                           AST,1                                          
019609,000395: 22,6762           01411                                    STARAD     +6                         
019610,000396: 22,6763           01375                                    STARAD     -6                         
019611,000397: 22,6764           41375        AXISGEN1           VXV*     1                                     
019612,000398: 22,6765           73176                           UNIT                                           
019613,000399: 22,6766           03035                                    STARAD     +12D,1                     
019614,000400: 22,6767           03051                                    STARAD     +18D,1                     
019615,000401: 22,6770           37051                           STORE    STARAD     +18D,1                     
019616,000402: 
019617,000403: 22,6771           41375                           VXV*     1                                     
019618,000404: 22,6772           44776                           VSLT                                           
019619,000405: 22,6773           03035                                    STARAD     +12D,1                     
019620,000406: 22,6774           03051                                    STARAD     +18D,1                     
019621,000407: 22,6775           00002                                    1                                     
019622,000408: 22,6776           37065                           STORE    STARAD     +24D,1                     
019623,000409: 
019624,000410: 22,6777           51576                           TIX,1    0                                     
019625,000411: 22,7000           04765                                    AXISGEN1                              
019626,000412: 
019627,000413: 22,7001           53573                           AXC,1    3                                     
019628,000414: 22,7002           67565                           SXA,1    AXT,1                                 
019629,000415: 22,7003           55561                           AST,1    AXT,2                                 
019630,000416: 22,7004           54576                           AST,2                                          
019631,000417: 22,7005           00007                                    6                                     
019632,000418: 22,7006           00037                                    30D                                   
019633,000419: 22,7007           00023                                    18D                                   
019634,000420: 22,7010           00007                                    6                                     
019635,000421: 22,7011           00007                                    6                                     
019636,000422: 22,7012           00003                                    2                                     
019637,000423: 
019638,000424: 22,7013           65576        AXISGEN2           XCHX,1   0                                     
019639,000425: 22,7014           00037                                    30D                                   
019640,000426: 
019641,000427: 22,7015           75376                           VXSC*    0                                     
019642,000428: 22,7016           00001                                    0,1                                   
019643,000429: 22,7017           03022                                    STARAD     +6,2                       
019644,000430: 
019645,000431: 22,7020           75376                           VXSC*    0                                     
019646,000432: 22,7021           00015                                    6,1                                   
019647,000433: 22,7022           03036                                    STARAD     +12D,2                     
019648,000434: 22,7023           32031                           STORE    24D                                   
019649,000435: 
019650,000436: 22,7024           75374                           VXSC*    2                                     
019651,000437: 22,7025           50642                           VAD      VAD                                   
019652,000438: 22,7026           44725                           VSLT     XCHX,1                                
019653,000439: 22,7027           00031                                    12D,1                                 
019654,000440: 22,7030           03052                                    STARAD     +18D,2                     
019655,000441: 22,7031           77777                                    -                                     
019656,000442: 22,7032           00031                                    24D                                   
019657,000443: 22,7033           00002                                    1                                     
019658,000444: 22,7034           00037                                    30D                                   
019659,000445: 22,7035           37241                           STORE    XDC        +18D,1                     
019660,000446: 
019661,000447: 22,7036           51576                           TIX,1    0                                     
019662,000448: 22,7037           05041                                    AXISGEN3                              
019663,000449: 
019664,000450: 22,7040           50576        AXISGEN3           TIX,2    0                                     
019665,000451: 22,7041           05014                                    AXISGEN2                              
019666,000452: 
019667,000453: 22,7042           40576                           ITCQ     0                                     
019668,000454: 
019669,000455: 
019670,000456: 22,7043           75175        CALCSXA            VMOVE    1                                     #  THIS PROGRAM COMPUTES THE SXT ANGLES SAC
019671,000457: 22,7044           45572                           ITA      ITC                                   #  AND PAC GIVEN THE STAR VECTOR IN SM AXES
019672,000458: 22,7045           01417                                    STAR                                  
019673,000459: 22,7046           00052                                    S2                                    #  HALF UNIT VECTOR
019674,000460: 22,7047           04475                                    SMNB                                  
019675,000461: 
019676,000462: 22,7050           47576                           NOLOD    0                                     
019677,000463: 22,7051           32007                           STORE    6                                     #  STORE (STARM0,STARM1,STARM2)
019678,000464: 
019679,000465: 22,7052           45176                           DMOVE    0                                     
019680,000466: 22,7053           05174                                    ZERODP                                
019681,000467: 22,7054           32045                           STORE    VAC        +4                         #  SET VAC TO (STARM0,STARM1,0)
019682,000468: 
019683,000469: 22,7055           47575                           NOLOD    1                                     #  UNIT VAC TO (S0,S1,0)
019684,000470: 22,7056           73072                           UNIT     TSRT                                  
019685,000471: 22,7057           00003                                    2                                     
019686,000472: 22,7060           32001                           STORE    0                                     #  STORE  COS/4 =S0/4 , SIN/4 = S1/4 ,0
019687,000473: 
019688,000474: 22,7061           45176                           DMOVE    0                                     
019689,000475: 22,7062           00001                                    0                                     
019690,000476: 22,7063           00021                                    COSTH                                 
019691,000477: 
019692,000478: 22,7064           45176                           DMOVE    0                                     
019693,000479: 22,7065           00003                                    2                                     
019694,000480: 22,7066           00023                                    SINTH                                 
019695,000481: 
019696,000482: 22,7067           76776                           ITC      0                                     
019697,000483: 22,7070           04437                                    ARCTRIG                               #  USES THE COS/SIN STORED ABOVE
019698,000484: 
019699,000485: 22,7071           76576                           RTB      0                                     
019700,000486: 22,7072           20324                                    1STO2S                                
019701,000487: 22,7073           33521                           STORE    SAC                                   
019702,000488: 
019703,000489: 22,7074           42773                           DOT      3                                     
019704,000490: 22,7075           63713                           TSLT     ASIN                                  
019705,000491: 22,7076           63746                           TSLT     BOV                                   
019706,000492: 22,7077           73771                           BMN      RTB                                   
019707,000493: 22,7100           00001                                    0                                     #  1/4 UNIT  (STARM0,STARM1,0)
019708,000494: 22,7101           00007                                    6                                     #  STARM-1/2 UNIT VECTOR
019709,000495: 22,7102           00004                                    3                                     
019710,000496: 22,7103           00004                                    3                                     
019711,000497: 22,7104           05113                                    CALCSXA1                              
019712,000498: 22,7105           05113                                    CALCSXA1                              
019713,000499: 22,7106           20324                                    1STO2S                                
019714,000500: 22,7107           33523                           STORE    PAC                                   
019715,000501: 
019716,000502: 22,7110           44576                           ITCI     0                                     
019717,000503: 22,7111           00052                                    S2                                    
019718,000504: 
019719,000505: 22,7112           77576        CALCSXA1           EXIT     0                                     #  PROGRAM ERROR,STAR OUT OF FIELD OF VIEW
019720,000506: 22,7113           03015                           TC       ALARM                                 
019721,000507: 22,7114           00402                           OCT      00402                                 
019722,000508: 22,7115           02124                           TC       ENDOFJOB                              
019723,000509: 
019724,000510: 
019725,000511: 22,7116           41775        SXTANG             VXV      1                                     #  TIVELY FROM INPUTS STAR AND XNB,YNB,ZNB
019726,000512: 22,7117           73026                           UNIT     VSRT                                  #  THE HALF UNIT STAR VECTOR AND THE NAV
019727,000513: 22,7120           01513                                    ZNB                                   #  BASE HALF AXES.
019728,000514: 22,7121           01417                                    STAR                                  
019729,000515: 22,7122           00002                                    1                                     
019730,000516: 22,7123           32027                           STORE    PDA                                   #  DEFINES PROJECTION OF STAR IN XY PLANE
019731,000517: 
019732,000518: 22,7124           42775                           DOT      1                                     
019733,000519: 22,7125           47025                           COMP     ITA                                   #  COMPUTE  SIN(PI.SAC)/4
019734,000520: 22,7126           00027                                    PDA                                   
019735,000521: 22,7127           01477                                    XNB                                   
019736,000522: 22,7130           00052                                    S2                                    
019737,000523: 22,7131           32023                           STORE    SINTH                                 
019738,000524: 
019739,000525: 22,7132           42776                           DOT      0                                     #  COMPUTE  COS(PI.SAC)/4
019740,000526: 22,7133           00027                                    PDA                                   
019741,000527: 22,7134           01505                                    YNB                                   
019742,000528: 22,7135           32021                           STORE    COSTH                                 
019743,000529: 
019744,000530: 22,7136           76776                           ITC      0                                     #  COMPUTE SAC
019745,000531: 22,7137           04437                                    ARCTRIG                               
019746,000532: 
019747,000533: 22,7140           76576                           RTB      0                                     
019748,000534: 22,7141           20324                                    1STO2S                                
019749,000535: 22,7142           33521                           STORE    SAC                                   
019750,000536: 
019751,000537: 22,7143           41772                           VXV      4                                     
019752,000538: 22,7144           42716                           DOT      TSLT                                  
019753,000539: 22,7145           63116                           ASIN     TSLT                                  #  COMPUTE PAC
019754,000540: 22,7146           71756                           BOV      BMN                                   
019755,000541: 22,7147           76576                           RTB                                            
019756,000542: 22,7150           00027                                    PDA                                   
019757,000543: 22,7151           01513                                    ZNB                                   
019758,000544: 22,7152           01417                                    STAR                                  
019759,000545: 22,7153           00003                                    2                                     
019760,000546: 22,7154           00004                                    3                                     
019761,000547: 22,7155           05164                                    SXTALARM                              
019762,000548: 22,7156           05164                                    SXTALARM                              #  WE NOW HAVE PRECISION ANGLE
019763,000549: 22,7157           20324                                    1STO2S                                
019764,000550: 22,7160           33523                           STORE    PAC                                   
019765,000551: 
019766,000552: 22,7161           44576                           ITCI     0                                     #  JOB IS DONE
019767,000553: 22,7162           00052                                    S2                                    
019768,000554: 
019769,000555: 22,7163           77576        SXTALARM           EXIT     0                                     #  BRANCH TO RESTART SEQUENCE
019770,000556: 
019771,000557: 22,7164           03015                           TC       ALARM                                 
019772,000558: 22,7165           00403                           OCT      00403                                 
019773,000559: 22,7166           02124                           TC       ENDOFJOB                              
019774,000560: 
019775,000561: 
019776,000562: 22,7167           05520 26075  QTSN45             2DEC     .1768                                 
019777,000563: 22,7171           05260 04061  THIRD              2DEC     .167                                  
019778,000564: 22,7173                        ZPRIME             =        22D                                   
019779,000565: 22,7173                        PDA                =        22D                                   
019780,000566: 22,7173                        COSTH              =        16D                                   
019781,000567: 22,7173                        SINTH              =        18D                                   
019782,000568: 22,7173                        THETA              =        20D                                   
019783,000569: 22,7173  0000040               STARM              =        VAC                                   
019784,000570: 22,7173           00000 00000  ZERODP             2DEC     0          B-28                       
019785,000571: 22,7175           37777        POSMAXDP           OCT      37777                                 
019786,000572: 22,7176           37777                           OCT      37777                                 
019787,000573: 22,7177           20000 00000  HALFDP             2DEC     .5                                    
019788,000574: 22,7201           12525 12525  .333...            2DEC     .3333333333                            

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