Source Code
These source-code files are part of a reconstructed copy of Skylark 048, the
Block II Command Module (CM) Apollo Guidance Computer (AGC) software for the
Skylab-2, Skylab-3, Skylab-4, and Apollo-Soyuz Test Project missions.
They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on Skylab-2, part numbers 2010802-541, 2010802-551, 2010802-561, 2010802-571, 2010802-581, and 2010802-591. Access to these modules was provided by the New Mexico Museum of Space History, who we are much indebted to. The source code for the Apollo 15, 16, and 17 software, Artemis 072, was used as a starting point. Heavy use was made of TRW 4900.5-244, Programmed Guidance Equations for Skylark Command Module Earth Orbital Program, dated 14 February 1972. This document contains pseudocode of essentially all of Skylark, using original program labels which have been copied for this source reconstruction. Since only binary dumps (rather than listings) of Skylark are available as source material, all comments and labels are approximate. They have been taken from the Programmed Guidance Equations or other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
016998,000002: ## Copyright: Public domain.
016999,000003: ## Filename: ANGLFIND.agc
017000,000004: ## Purpose: A section of Skylark revision 048.
017001,000005: ## It is part of the source code for the Apollo Guidance Computer (AGC)
017002,000006: ## for Skylab-2, Skylab-3, Skylab-4, and ASTP. No original listings of
017003,000007: ## this software are available; instead, this file was created via
017004,000008: ## disassembly of dumps of the core rope modules actually flown on
017005,000009: ## Skylab-2. Access to these modules was provided by the New Mexico
017006,000010: ## Museum of Space History.
017007,000011: ## Assembler: yaYUL
017008,000012: ## Contact: Ron Burkey <info@sandroid.org>.
017009,000013: ## Website: www.ibiblio.org/apollo/index.html
017010,000014: ## Mod history: 2023-09-04 MAS Created from Artemis 072.
017011,000015:
017012,000016: 22,2000 SETLOC KALCMON1
017013,000017: 22,2000 BANK
017014,000018:
017015,000019: 22,2000 E6,1712 EBANK= BCDU
017016,000020:
017017,000021: 22,2000 COUNT* $$/KALC
017018,000022: 22,2000 06006 KALCMAN3 TC INTPRET
017019,000023: 22,2001 77634 +1 RTB
017020,000024: 22,2002 44370 READCDUK # PICK UP CURRENT CDU ANGLES
017021,000025: 22,2003 03313 STORE BCDU # STORE THE INITIAL S/C ANGLES
017022,000026: 22,2004 72364 AXC,2 TLOAD # COMPUTE THE TRANSFORMATION FROM
017023,000027: 22,2005 02271 MIS # INITIAL S/C AXES TO STABLE MEMBER AXES
017024,000028: 22,2006 03313 BCDU # (MIS)
017025,000029: 22,2007 77624 CALL
017026,000030: 22,2010 44377 CDUTODCM
017027,000031: 22,2011 72364 AXC,2 TLOAD # COMPUTE THE TRANSFORMATION FROM
017028,000032: 22,2012 03425 MFS # FINAL S/C AXES TO STABLE MEMBER AXES
017029,000033: 22,2013 01300 CPHI # (MFS)
017030,000034: 22,2014 77624 CALL
017031,000035: 22,2015 44377 CDUTODCM
017032,000036: 22,2016 45160 SECAD AXC,1 CALL # MIS AND MFS ARRAYS CALCULATED $2
017033,000037: 22,2017 02271 MIS
017034,000038: 22,2020 44334 TRANSPOS
017035,000039: 22,2021 77775 VLOAD
017036,000040: 22,2022 77626 STADR
017037,000041: 22,2023 50443 STOVL TMIS +12D
017038,000042: 22,2024 77626 STADR
017039,000043: 22,2025 50451 STOVL TMIS +6
017040,000044: 22,2026 77626 STADR
017041,000045: 22,2027 74457 STORE TMIS # TMIS = TRANSPOSE(MIS) SCALED BY 2
017042,000046: 22,2030 75160 AXC,1 AXC,2
017043,000047: 22,2031 03317 TMIS
017044,000048: 22,2032 03425 MFS
017045,000049: 22,2033 77624 CALL
017046,000050: 22,2034 44304 MXM3
017047,000051: 22,2035 45575 VLOAD STADR
017048,000052: 22,2036 50335 STOVL MFI +12D
017049,000053: 22,2037 77626 STADR
017050,000054: 22,2040 50343 STOVL MFI +6
017051,000055: 22,2041 77626 STADR
017052,000056: 22,2042 74351 STORE MFI # MFI = TMIS MFS (SCALED BY 4)
017053,000057: 22,2043 45001 SETPD CALL # TRANSPOSE MFI IN PD LIST
017054,000058: 22,2044 00023 18D
017055,000059: 22,2045 44343 TRNSPSPD
017056,000060: 22,2046 45575 VLOAD STADR
017057,000061: 22,2047 50443 STOVL TMFI +12D
017058,000062: 22,2050 77626 STADR
017059,000063: 22,2051 50451 STOVL TMFI +6
017060,000064: 22,2052 77626 STADR
017061,000065: 22,2053 74457 STORE TMFI # TMFI = TRANSPOSE (MFI) SCALED BY 4
017062,000066:
017063,000067: # CALCULATE COFSKEW AND MFISYM
017064,000068:
017065,000069: 22,2054 45345 DLOAD DSU
017066,000070: 22,2055 03322 TMFI +2
017067,000071: 22,2056 03430 MFI +2
017068,000072: 22,2057 45325 PDDL DSU # CALCULATE COF SCALED BY 2/SIN(AM)
017069,000073: 22,2060 03432 MFI +4
017070,000074: 22,2061 03324 TMFI +4
017071,000075: 22,2062 45325 PDDL DSU
017072,000076: 22,2063 03332 TMFI +10D
017073,000077: 22,2064 03440 MFI +10D
017074,000078: 22,2065 77666 VDEF
017075,000079: 22,2066 03342 STORE COFSKEW # EQUALS MFISKEW
017076,000080:
017077,000081: # CALCULATE AM AND PROCEED ACCORDING TO ITS MAGNITUDE
017078,000082:
017079,000083: 22,2067 43345 DLOAD DAD
017080,000084: 22,2070 03426 MFI
017081,000085: 22,2071 03446 MFI +16D
017082,000086: 22,2072 43225 DSU DAD
017083,000087: 22,2073 15174 DP1/4TH
017084,000088: 22,2074 03436 MFI +8D
017085,000089: 22,2075 03350 STORE CAM # CAM = (MFI0+MFI4+MFI8-1)/2 HALF SCALE
017086,000090: 22,2076 77726 ARCCOS
017087,000091: 22,2077 03352 STORE AM # AM=ARCCOS(CAM) (AM SCALED BY 2)
017088,000092: 22,2100 51025 DSU BPL
017089,000093: 22,2101 04367 MINANG
017090,000094: 22,2102 44111 CHECKMAX
017091,000095: 22,2103 77776 EXIT # MANEUVER LESS THAN 0.25 DEG
017092,000096: 22,2104 00004 INHINT # GO DIRECTLY INTO ATTITUDE HOLD
017093,000097: 22,2105 45001 CS ONE # ABOUT COMMANDED ANGLES
017094,000098: 22,2106 55330 TS HOLDFLAG # NOGO WILL STOP ANY RATE AND SET UP FOR A
017095,000099: 22,2107 03230 TC LOADCDUD # GOOD RETURN
017096,000100: 22,2110 12723 TCF NOGO
017097,000101:
017098,000102: 22,2111 45345 CHECKMAX DLOAD DSU
017099,000103: 22,2112 03352 AM
017100,000104: 22,2113 04370 MAXANG
017101,000105: 22,2114 77244 BPL VLOAD
017102,000106: 22,2115 44123 ALTCALC # UNIT
017103,000107: 22,2116 03342 COFSKEW # COFSKEW
017104,000108: 22,2117 77656 UNIT
017105,000109: 22,2120 02314 STORE COF # COF IS THE MANEUVER AXIS
017106,000110: 22,2121 77650 GOTO # SEE IF MANEUVER GOES THRU GIMBAL LOCK
017107,000111: 22,2122 44745 LOCSKIRT
017108,000112: 22,2123 53375 ALTCALC VLOAD VAD # IF AM GREATER THAN 170 DEGREES
017109,000113: 22,2124 03426 MFI
017110,000114: 22,2125 03320 TMFI
017111,000115: 22,2126 77762 VSR1
017112,000116: 22,2127 27320 STOVL MFISYM
017113,000117: 22,2130 03434 MFI +6
017114,000118: 22,2131 74455 VAD VSR1
017115,000119: 22,2132 03326 TMFI +6
017116,000120: 22,2133 27326 STOVL MFISYM +6
017117,000121: 22,2134 03442 MFI +12D
017118,000122: 22,2135 74455 VAD VSR1
017119,000123: 22,2136 03334 TMFI +12D
017120,000124: 22,2137 03334 STORE MFISYM +12D # MFISYM=(MFI+TMFI)/2 SCALED BY 4
017121,000125:
017122,000126:
017123,000127: # CALCULATE COF
017124,000128:
017125,000129: 22,2140 70545 DLOAD SR1
017126,000130: 22,2141 03350 CAM
017127,000131: 22,2142 45325 PDDL DSU # PD0 CAM $4
017128,000132: 22,2143 15202 DPHALF
017129,000133: 22,2144 03350 CAM
017130,000134: 22,2145 65204 BOVB PDDL # PD2 1 - CAM $2
017131,000135: 22,2146 45742 SIGNMPAC
017132,000136: 22,2147 03340 MFISYM +16D
017133,000137: 22,2150 56225 DSU DDV
017134,000138: 22,2151 00001 0
017135,000139: 22,2152 00003 2
017136,000140: 22,2153 65366 SQRT PDDL # COFZ = SQRT(MFISYM8-CAM)/1-CAM)
017137,000141: 22,2154 03330 MFISYM +8D # $ ROOT 2
017138,000142: 22,2155 56225 DSU DDV
017139,000143: 22,2156 00001 0
017140,000144: 22,2157 00003 2
017141,000145: 22,2160 65366 SQRT PDDL # COFY = SQRT(MFISYM4-CAM)/(1-CAM) $ROOT2
017142,000146: 22,2161 03320 MFISYM
017143,000147: 22,2162 56225 DSU DDV
017144,000148: 22,2163 00001 0
017145,000149: 22,2164 00003 2
017146,000150: 22,2165 55566 SQRT VDEF # COFX = SQRT(MFISYM-CAM)/(1-CAM) $ROOT 2
017147,000151: 22,2166 77656 UNIT
017148,000152: 22,2167 02314 STORE COF
017149,000153:
017150,000154: # DETERMINE LARGEST COF AND ADJUST ACCORDINGLY
017151,000155:
017152,000156: 22,2170 45345 COFMAXGO DLOAD DSU
017153,000157: 22,2171 02314 COF
017154,000158: 22,2172 02316 COF +2
017155,000159: 22,2173 71240 BMN DLOAD # COFY G COFX
017156,000160: 22,2174 44203 COMP12
017157,000161: 22,2175 02314 COF
017158,000162: 22,2176 50025 DSU BMN
017159,000163: 22,2177 02320 COF +4
017160,000164: 22,2200 44260 METHOD3 # COFZ G COFX OR COFY
017161,000165: 22,2201 77650 GOTO
017162,000166: 22,2202 44234 METHOD1 # COFX G COFY OR COFZ
017163,000167: 22,2203 45345 COMP12 DLOAD DSU
017164,000168: 22,2204 02316 COF +2
017165,000169: 22,2205 02320 COF +4
017166,000170: 22,2206 77640 BMN
017167,000171: 22,2207 44260 METHOD3 # COFZ G COFY OR COFX
017168,000172:
017169,000173: 22,2210 51145 METHOD2 DLOAD BPL # COFY MAX
017170,000174: 22,2211 03344 COFSKEW +2 # UY
017171,000175: 22,2212 44216 U2POS
017172,000176: 22,2213 57575 VLOAD VCOMP
017173,000177: 22,2214 02314 COF
017174,000178: 22,2215 02314 STORE COF
017175,000179: 22,2216 51145 U2POS DLOAD BPL
017176,000180: 22,2217 03322 MFISYM +2 # UX UY
017177,000181: 22,2220 44224 OKU21
017178,000182: 22,2221 57545 DLOAD DCOMP # SIGN OF UX OPPOSITE TO UY
017179,000183: 22,2222 02314 COF
017180,000184: 22,2223 02314 STORE COF
017181,000185: 22,2224 51145 OKU21 DLOAD BPL
017182,000186: 22,2225 03332 MFISYM +10D # UY UZ
017183,000187: 22,2226 44745 LOCSKIRT
017184,000188: 22,2227 57545 DLOAD DCOMP # SIGN OF UZ OPPOSITE TO UY
017185,000189: 22,2230 02320 COF +4
017186,000190: 22,2231 02320 STORE COF +4
017187,000191: 22,2232 77650 GOTO
017188,000192: 22,2233 44745 LOCSKIRT
017189,000193: 22,2234 51145 METHOD1 DLOAD BPL # COFX MAX
017190,000194: 22,2235 03342 COFSKEW # UX
017191,000195: 22,2236 44242 U1POS
017192,000196: 22,2237 57575 VLOAD VCOMP
017193,000197: 22,2240 02314 COF
017194,000198: 22,2241 02314 STORE COF
017195,000199: 22,2242 51145 U1POS DLOAD BPL
017196,000200: 22,2243 03322 MFISYM +2 # UX UY
017197,000201: 22,2244 44250 OKU12
017198,000202: 22,2245 57545 DLOAD DCOMP
017199,000203: 22,2246 02316 COF +2 # SIGN OF UY OPPOSITE TO UX
017200,000204: 22,2247 02316 STORE COF +2
017201,000205: 22,2250 51145 OKU12 DLOAD BPL
017202,000206: 22,2251 03324 MFISYM +4 # UX UZ
017203,000207: 22,2252 44745 LOCSKIRT
017204,000208: 22,2253 57545 DLOAD DCOMP # SIGN OF UZ OPPOSITE TO UY
017205,000209: 22,2254 02320 COF +4
017206,000210: 22,2255 02320 STORE COF +4
017207,000211: 22,2256 77650 GOTO
017208,000212: 22,2257 44745 LOCSKIRT
017209,000213: 22,2260 51145 METHOD3 DLOAD BPL # COFZ MAX
017210,000214: 22,2261 03346 COFSKEW +4 # UZ
017211,000215: 22,2262 44266 U3POS
017212,000216: 22,2263 57575 VLOAD VCOMP
017213,000217: 22,2264 02314 COF
017214,000218: 22,2265 02314 STORE COF
017215,000219: 22,2266 51145 U3POS DLOAD BPL
017216,000220: 22,2267 03324 MFISYM +4 # UX UZ
017217,000221: 22,2270 44274 OKU31
017218,000222: 22,2271 57545 DLOAD DCOMP
017219,000223: 22,2272 02314 COF # SIGN OF UX OPPOSITE TO UZ
017220,000224: 22,2273 02314 STORE COF
017221,000225: 22,2274 51145 OKU31 DLOAD BPL
017222,000226: 22,2275 03332 MFISYM +10D # UY UZ
017223,000227: 22,2276 44745 LOCSKIRT
017224,000228: 22,2277 57545 DLOAD DCOMP
017225,000229: 22,2300 02316 COF +2 # SIGN OF UY OPPOSITE TO UZ
017226,000230: 22,2301 02316 STORE COF +2
017227,000231: 22,2302 77650 GOTO
017228,000232: 22,2303 44745 LOCSKIRT
017229,000233:
017230,000234: # MATRIX OPERATIONS
017231,000235:
017232,000236: 22,2304 77601 MXM3 SETPD # MXM3 MULTIPLIES 2 3X3 MATRICES
017233,000237: 22,2305 00001 0 # AND LEAVES RESULT IN PD LIST
017234,000238: 22,2306 64743 DLOAD* PDDL* # ADDRESS OF 1ST MATRIX IN XR1
017235,000239: 22,2307 77762 12D,2 # ADDRESS OF 2ND MATRIX IN XR2
017236,000240: 22,2310 77770 6,2
017237,000241: 22,2311 55523 PDDL* VDEF # DEFINE VECTOR M2(COL 1)
017238,000242: 22,2312 77776 0,2
017239,000243: 22,2313 64717 MXV* PDDL* # M1XM2(COL 1) IN PD
017240,000244: 22,2314 00001 0,1
017241,000245: 22,2315 77760 14D,2
017242,000246: 22,2316 64723 PDDL* PDDL*
017243,000247: 22,2317 77766 8D,2
017244,000248: 22,2320 77774 2,2
017245,000249: 22,2321 63666 VDEF MXV* # DEFINE VECTOR M2(COL 2)
017246,000250: 22,2322 00001 0,1
017247,000251: 22,2323 64723 PDDL* PDDL* # M1XM2(COL2) IN PD
017248,000252: 22,2324 77756 16D,2
017249,000253: 22,2325 77764 10D,2
017250,000254: 22,2326 55523 PDDL* VDEF # DEFINE VECTOR M2(COL 3)
017251,000255: 22,2327 77772 4,2
017252,000256: 22,2330 41517 MXV* PUSH # M1XM2(COL 3) IN PD
017253,000257: 22,2331 00001 0,1
017254,000258: 22,2332 77650 GOTO
017255,000259: 22,2333 44343 TRNSPSPD # REVERSE ROWS AND COLS IN PD AND
017256,000260: # RETURN WITH M1XM2 IN PD LIST
017257,000261:
017258,000262: 22,2334 76601 TRANSPOS SETPD VLOAD* # TRANSPOS TRANSPOSES A 3X3 MATRIX
017259,000263: 22,2335 00001 0 # AND LEAVES RESULT IN PD LIST
017260,000264: 22,2336 00001 0,1 # MATRIX ADDRESS IN XR1
017261,000265: 22,2337 62713 PDVL* PDVL*
017262,000266: 22,2340 00007 6,1
017263,000267: 22,2341 00015 12D,1
017264,000268: 22,2342 77606 PUSH # MATRIX IN PD
017265,000269: 22,2343 65345 TRNSPSPD DLOAD PDDL # ENTER WITH MATRIX IN PD LIST
017266,000270: 22,2344 00003 2
017267,000271: 22,2345 00007 6
017268,000272: 22,2346 14003 STODL 2
017269,000273: 22,2347 77626 STADR
017270,000274: 22,2350 63770 STODL 6
017271,000275: 22,2351 00005 4
017272,000276: 22,2352 77725 PDDL
017273,000277: 22,2353 00015 12D
017274,000278: 22,2354 14005 STODL 4
017275,000279: 22,2355 77626 STADR
017276,000280: 22,2356 63762 STODL 12D
017277,000281: 22,2357 00013 10D
017278,000282: 22,2360 77725 PDDL
017279,000283: 22,2361 00017 14D
017280,000284: 22,2362 14013 STODL 10D
017281,000285: 22,2363 77626 STADR
017282,000286: 22,2364 77760 STORE 14D
017283,000287: 22,2365 77616 RVQ # RETURN WITH TRANSPOSED MATRIX IN PD LIST
017284,000288: 22,2366 00013 MINANG DEC .00069375
017285,000289: 22,2367 17071 MAXANG DEC .472222
017286,000290: 22,2370 00004 READCDUK INHINT # LOAD T(MPAC) WITH THE CURRENT CDU ANGLES
017287,000291: 22,2371 30034 CA CDUZ
017288,000292: 22,2372 54156 TS MPAC +2
017289,000293: 22,2373 00006 EXTEND
017290,000294: 22,2374 30033 DCA CDUX
017291,000295: 22,2375 00003 RELINT
017292,000296: 22,2376 16445 TCF TLOAD +6
017293,000297: 22,2000 SETLOC KALCMON2
017294,000298: 22,2000 BANK
017295,000299:
017296,000300: 22,2377 COUNT* $$/KALC
017297,000301:
017298,000302: 22,2377 66370 CDUTODCM AXT,1 SSP # SUBROUTINE TO COMPUTE DIRECTION COSINE
017299,000303: 22,2400 00003 OCT 3 # MATRIX RELATING S/C AXES TO STABLE
017300,000304: 22,2401 00051 S1 # MEMBER AXES FROM 3 CDU ANGLES IN T(MPAC)
017301,000305: 22,2402 00001 OCT 1 # SET XR1, S1 AND PD FOR LOOP
017302,000306: 22,2403 00010 STORE 7
017303,000307: 22,2404 77601 SETPD
017304,000308: 22,2405 00001 0
017305,000309: 22,2406 47133 LOOPSIN SLOAD* RTB
017306,000310: 22,2407 00013 10D,1
017307,000311: 22,2410 45566 CDULOGIC
017308,000312: 22,2411 00013 STORE 10D # LOAD PD WITH 0 SIN(PHI)
017309,000313: 22,2412 65356 SIN PDDL # 2 COS(PHI)
017310,000314: 22,2413 00013 10D # 4 SIN(THETA)
017311,000315: 22,2414 41546 COS PUSH # 6 COS(THETA)
017312,000316: 22,2415 71300 TIX,1 DLOAD # 8 SIN(PSI)
017313,000317: 22,2416 44406 LOOPSIN # 10 COS(PSI)
017314,000318: 22,2417 00007 6
017315,000319: 22,2420 72405 DMP SL1
017316,000320: 22,2421 00013 10D
017317,000321: 22,2422 10001 STORE 0,2
017318,000322: 22,2423 77745 DLOAD
017319,000323: 22,2424 00005 4
017320,000324: 22,2425 65205 DMP PDDL
017321,000325: 22,2426 00001 0 # (PD6 SIN(THETA)SIN(PHI))
017322,000326: 22,2427 00007 6
017323,000327: 22,2430 41205 DMP DMP
017324,000328: 22,2431 00011 8D
017325,000329: 22,2432 00003 2
017326,000330: 22,2433 44352 SL1 BDSU
017327,000331: 22,2434 00015 12D
017328,000332: 22,2435 77752 SL1
017329,000333: 22,2436 10003 STORE 2,2
017330,000334: 22,2437 77745 DLOAD
017331,000335: 22,2440 00003 2
017332,000336: 22,2441 65205 DMP PDDL # (PD7 COS(PHI)SIN(THETA)) SCALED 4
017333,000337: 22,2442 00005 4
017334,000338: 22,2443 00007 6
017335,000339: 22,2444 41205 DMP DMP
017336,000340: 22,2445 00011 8D
017337,000341: 22,2446 00001 0
017338,000342: 22,2447 77752 SL1
017339,000343: 22,2450 72415 DAD SL1
017340,000344: 22,2451 00017 14D
017341,000345: 22,2452 10005 STORE 4,2
017342,000346: 22,2453 77745 DLOAD
017343,000347: 22,2454 00011 8D
017344,000348: 22,2455 10007 STORE 6,2
017345,000349: 22,2456 77745 DLOAD
017346,000350: 22,2457 00013 10D
017347,000351: 22,2460 72405 DMP SL1
017348,000352: 22,2461 00003 2
017349,000353: 22,2462 10011 STORE 8D,2
017350,000354: 22,2463 77745 DLOAD
017351,000355: 22,2464 00013 10D
017352,000356: 22,2465 57405 DMP DCOMP
017353,000357: 22,2466 00001 0
017354,000358: 22,2467 77752 SL1
017355,000359: 22,2470 10013 STORE 10D,2
017356,000360: 22,2471 77745 DLOAD
017357,000361: 22,2472 00005 4
017358,000362: 22,2473 57405 DMP DCOMP
017359,000363: 22,2474 00013 10D
017360,000364: 22,2475 77752 SL1
017361,000365: 22,2476 10015 STORE 12D,2
017362,000366: 22,2477 77745 DLOAD
017363,000367: 22,2500 72405 DMP SL1 # (PUSH UP 7)
017364,000368: 22,2501 00011 8D
017365,000369: 22,2502 41325 PDDL DMP # (PD7 COS(PHI)SIN(THETA)SIN(PSI)) SCALE4
017366,000370: 22,2503 00007 6
017367,000371: 22,2504 00001 0
017368,000372: 22,2505 72415 DAD SL1 # (PUSH UP 7)
017369,000373: 22,2506 77626 STADR # C7=COS(PHI)SIN(THETA)SIN(PSI)
017370,000374: 22,2507 67760 STORE 14D,2
017371,000375: 22,2510 77745 DLOAD
017372,000376: 22,2511 72405 DMP SL1 # (PUSH UP 6)
017373,000377: 22,2512 00011 8D
017374,000378: 22,2513 41325 PDDL DMP # (PD6 SIN(THETA)SIN(PHI)SIN(PSI)) SCALE4
017375,000379: 22,2514 00007 6
017376,000380: 22,2515 00003 2
017377,000381: 22,2516 72425 DSU SL1 # (PUSH UP 6)
017378,000382: 22,2517 77626 STADR
017379,000383: 22,2520 67756 STORE 16D,2 # C8=-SIN(THETA)SIN(PHI)SIN(PSI)
017380,000384: 22,2521 77616 RVQ # +COS(THETA)COS(PHI)
017381,000385: 22,2522 ENDDCM EQUALS
017382,000386:
017383,000387: 22,2000 SETLOC KALCMON1
017384,000388: 22,2000 BANK
017385,000389:
017386,000390: # CALCULATION OF THE MATRIX DEL......
017387,000391:
017388,000392: # * * --T *
017389,000393: # DEL = (IDMATRIX)COS(A)+UU (1-COS(A))+UX SIN(A) SCALED 1
017390,000394:
017391,000395: # -
017392,000396: # WHERE U IS A UNIT VECTOR (DP SCALED 2) ALONG THE AXIS OF ROTATION.
017393,000397: # A IS THE ANGLE OF ROTATION (DP SCALED 2)
017394,000398: # -
017395,000399: # UPON ENTRY THE STARTING ADDRESS OF U IS COF, AND A IS IN MPAC
017396,000400:
017397,000401: 22,2522 COUNT* $$/KALC
017398,000402: 22,2522 41401 DELCOMP SETPD PUSH # MPAC CONTAINS THE ANGLE A
017399,000403: 22,2523 00001 0
017400,000404: 22,2524 65356 SIN PDDL # PD0 = SIN(A)
017401,000405: 22,2525 41546 COS PUSH # PD2 = COS(A)
017402,000406: 22,2526 65302 SR2 PDDL # PD2 = COS(A) $8
017403,000407: 22,2527 41021 BDSU BOVB # PD4 = 1-COS(A) $2
017404,000408: 22,2530 15202 DPHALF
017405,000409: 22,2531 45742 SIGNMPAC
017406,000410:
017407,000411: # COMPUTE THE DIAGONAL COMPONENTS OF DEL
017408,000412:
017409,000413: 22,2532 77725 PDDL
017410,000414: 22,2533 02314 COF
017411,000415: 22,2534 41316 DSQ DMP
017412,000416: 22,2535 00005 4
017413,000417: 22,2536 52415 DAD SL3
017414,000418: 22,2537 00003 2
017415,000419: 22,2540 77604 BOVB
017416,000420: 22,2541 45742 SIGNMPAC
017417,000421: 22,2542 17426 STODL DEL # UX UX(U-COS(A)) +COS(A) $1
017418,000422: 22,2543 02316 COF +2
017419,000423: 22,2544 41316 DSQ DMP
017420,000424: 22,2545 00005 4
017421,000425: 22,2546 52415 DAD SL3
017422,000426: 22,2547 00003 2
017423,000427: 22,2550 77604 BOVB
017424,000428: 22,2551 45742 SIGNMPAC
017425,000429: 22,2552 17436 STODL DEL +8D # UY UY(1-COS(A)) +COS(A) $1
017426,000430: 22,2553 02320 COF +4
017427,000431: 22,2554 41316 DSQ DMP
017428,000432: 22,2555 00005 4
017429,000433: 22,2556 52415 DAD SL3
017430,000434: 22,2557 00003 2
017431,000435: 22,2560 77604 BOVB
017432,000436: 22,2561 45742 SIGNMPAC
017433,000437: 22,2562 03446 STORE DEL +16D # UZ UZ(1-COS(A)) +COS(A) $1
017434,000438:
017435,000439: # COMPUTE THE OFF DIAGONAL TERMS OF DEL
017436,000440:
017437,000441: 22,2563 41345 DLOAD DMP
017438,000442: 22,2564 02314 COF
017439,000443: 22,2565 02316 COF +2
017440,000444: 22,2566 72405 DMP SL1
017441,000445: 22,2567 00005 4
017442,000446: 22,2570 41325 PDDL DMP # D6 UX UY (1-COS A) $ 4
017443,000447: 22,2571 02320 COF +4
017444,000448: 22,2572 00001 0
017445,000449: 22,2573 43206 PUSH DAD # D8 UZ SIN A $ 4
017446,000450: 22,2574 00007 6
017447,000451: 22,2575 41112 SL2 BOVB
017448,000452: 22,2576 45742 SIGNMPAC
017449,000453: 22,2577 17434 STODL DEL +6
017450,000454: 22,2600 62421 BDSU SL2
017451,000455: 22,2601 77604 BOVB
017452,000456: 22,2602 45742 SIGNMPAC
017453,000457: 22,2603 17430 STODL DEL +2
017454,000458: 22,2604 02314 COF
017455,000459: 22,2605 41205 DMP DMP
017456,000460: 22,2606 02320 COF +4
017457,000461: 22,2607 00005 4
017458,000462: 22,2610 65352 SL1 PDDL # D6 UX UZ (1-COS A) $ 4
017459,000463: 22,2611 02316 COF +2
017460,000464: 22,2612 41405 DMP PUSH # D8 UY SIN(A)
017461,000465: 22,2613 00001 0
017462,000466: 22,2614 62415 DAD SL2
017463,000467: 22,2615 00007 6
017464,000468: 22,2616 77604 BOVB
017465,000469: 22,2617 45742 SIGNMPAC
017466,000470: 22,2620 17432 STODL DEL +4 # UX UZ (1-COS(A))+UY SIN(A)
017467,000471: 22,2621 62421 BDSU SL2
017468,000472: 22,2622 77604 BOVB
017469,000473: 22,2623 45742 SIGNMPAC
017470,000474: 22,2624 17442 STODL DEL +12D # UX UZ (U-COS(A))-UY SIN(A)
017471,000475: 22,2625 02316 COF +2
017472,000476: 22,2626 41205 DMP DMP
017473,000477: 22,2627 02320 COF +4
017474,000478: 22,2630 00005 4
017475,000479: 22,2631 65352 SL1 PDDL # D6 UY UZ (1-COS(A)) $ 4
017476,000480: 22,2632 02314 COF
017477,000481: 22,2633 41405 DMP PUSH # D8 UX SIN(A)
017478,000482: 22,2634 00001 0
017479,000483: 22,2635 62415 DAD SL2
017480,000484: 22,2636 00007 6
017481,000485: 22,2637 77604 BOVB
017482,000486: 22,2640 45742 SIGNMPAC
017483,000487: 22,2641 17444 STODL DEL +14D # UY UZ(1-COS(A)) +UX SIN(A)
017484,000488: 22,2642 62421 BDSU SL2
017485,000489: 22,2643 77604 BOVB
017486,000490: 22,2644 45742 SIGNMPAC
017487,000491: 22,2645 03440 STORE DEL +10D # UY UZ(1-COS(A)) -UX SIN(A)
017488,000492: 22,2646 77616 RVQ
017489,000493:
017490,000494: # DIRECTION COSINE MATRIX TO CDU ANGLE ROUTINE
017491,000495: # X1 CONTAINS THE COMPLEMENT OF THE STARTING ADDRESS FOR MATRIX (SCALED 2)
017492,000496: # LEAVES CDU ANGLES SCALED 2PI IN V(MPAC)
017493,000497: # COS(MGA) WILL BE LEFT IN S1 (SCALED 1)
017494,000498:
017495,000499: # THE DIRECTION COSINE MATRIX RELATING S/C AXES TO STABLE MEMBER AXES CAN BE WRITTEN AS ***
017496,000500:
017497,000501: # C =COS(THETA)COS(PSI)
017498,000502: # 0
017499,000503: # C =-COS(THETA)SIN(PSI)COS(PHI)+SI (THETA)SIN(PHI)
017500,000504: # 1
017501,000505: # C =COS(THETA)SIN(PSI)SIN(PHI) + S N(THETA)COS(PHI)
017502,000506: # 2
017503,000507: # C =SIN(PSI)
017504,000508: # 3
017505,000509: # C =COS(PSI)COS(PHI)
017506,000510: # 4
017507,000511: # C =-COS(PSI)SIN(PHI)
017508,000512: # 5
017509,000513: # C =-SIN(THETA)COS(PSI)
017510,000514: # 6
017511,000515: # C =SIN(THETA)SIN(PSI)COS(PHI)+COS THETA)SIN(PHI)
017512,000516: # 7
017513,000517: # C =-SIN(THETA)SIN(PSI)SIN(PHI)+CO (THETA)COS(PHI)
017514,000518: # 8
017515,000519:
017516,000520: # WHERE PHI = OGA
017517,000521: # THETA = IGA
017518,000522: # PSI = MGA
017519,000523:
017520,000524: 22,2647 67543 DCMTOCDU DLOAD* ARCSIN
017521,000525: 22,2650 00007 6,1
017522,000526: 22,2651 71406 PUSH COS # PD +0 PSI
017523,000527: 22,2652 41152 SL1 BOVB
017524,000528: 22,2653 45742 SIGNMPAC
017525,000529: 22,2654 00051 STORE S1
017526,000530: 22,2655 57543 DLOAD* DCOMP
017527,000531: 22,2656 00015 12D,1
017528,000532: 22,2657 67471 DDV ARCSIN
017529,000533: 22,2660 00051 S1
017530,000534: 22,2661 51123 PDDL* BPL # PD +2 THETA
017531,000535: 22,2662 00001 0,1 # MUST CHECK THE SIGN OF COS(THETA)
017532,000536: 22,2663 44675 OKTHETA # TO DETERMINE THE PROPER QUADRANT
017533,000537: 22,2664 57545 DLOAD DCOMP
017534,000538: 22,2665 43244 BPL DAD
017535,000539: 22,2666 44672 SUHALFA
017536,000540: 22,2667 15202 DPHALF
017537,000541: 22,2670 77650 GOTO
017538,000542: 22,2671 44674 CALCPHI
017539,000543: 22,2672 77625 SUHALFA DSU
017540,000544: 22,2673 15202 DPHALF
017541,000545: 22,2674 77606 CALCPHI PUSH
017542,000546: 22,2675 57543 OKTHETA DLOAD* DCOMP
017543,000547: 22,2676 00013 10D,1
017544,000548: 22,2677 67471 DDV ARCSIN
017545,000549: 22,2700 00051 S1
017546,000550: 22,2701 51123 PDDL* BPL # PUSH DOWN PHI
017547,000551: 22,2702 00011 8D,1
017548,000552: 22,2703 44715 OKPHI
017549,000553: 22,2704 57545 DLOAD DCOMP # PUSH UP PHI
017550,000554: 22,2705 43244 BPL DAD
017551,000555: 22,2706 44712 SUHALFAP
017552,000556: 22,2707 15202 DPHALF
017553,000557: 22,2710 77650 GOTO
017554,000558: 22,2711 44716 VECOFANG
017555,000559: 22,2712 52025 SUHALFAP DSU GOTO
017556,000560: 22,2713 15202 DPHALF
017557,000561: 22,2714 44716 VECOFANG
017558,000562: 22,2715 77745 OKPHI DLOAD # PUSH UP PHI
017559,000563: 22,2716 43466 VECOFANG VDEF RVQ
017560,000564:
017561,000565: # ROUTINE FOR TERMINATING AUTOMATIC MANEUVERS
017562,000566:
017563,000567: 22,2717 77776 NOGOM3 EXIT
017564,000568: 22,2720 00004 NOGOM2 INHINT # THIS LOCATION ACCESSED BY A BZMF NOGO -2
017565,000569: 22,2721 04647 TC BANKCALL
017566,000570: 22,2722 40211 CADR ZEROEROR
017567,000571:
017568,000572: 22,2723 00004 NOGO INHINT
017569,000573: 22,2724 04463 TC STOPRATE
017570,000574:
017571,000575: 22,2725 35000 CAF R67BIT
017572,000576: 22,2726 70104 MASK FLAGWRD8
017573,000577: 22,2727 00006 EXTEND
017574,000578: 22,2730 12740 BZF NOTR67ND
017575,000579:
017576,000580: 22,2731 35030 CAF 1SEC # WAITLIST TASK IN 1 SECON:
017577,000581: 22,2732 05246 TC WAITLIST # RETURN TO UPDTCALL
017578,000582: 22,2733 E6,1712 EBANK= BCDU
017579,000583: 22,2733 02554 74066 2CADR R67
017580,000584:
017581,000585: 22,2735 05415 TC PHASCHNG
017582,000586: 22,2736 00111 OCT 00111
017583,000587:
017584,000588: 22,2737 01,2025 1P11SPT2 = 1.11SPOT
017585,000589: 22,2737 05220 TC ENDOFJOB
017586,000590:
017587,000591: 22,2740 35000 NOTR67ND CAF TWO # RETURN VIA
017588,000592: 22,2741 05246 TC WAITLIST # GOODEND
017589,000593: 22,2742 E6,1712 EBANK= BCDU
017590,000594: 22,2742 02265 20066 2CADR ENDMANU
017591,000595:
017592,000596: 22,2744 15220 TCF ENDOFJOB
End of include-file ANGLFIND.agc. Parent file is MAIN.agc