Source Code
These source-code files were obtained by digitally photographing
an Artemis 72 program listing from a private collection and then
modifying pre-existing Comanche 55 (Apollo 11) source files to
incorporate changes. Note that the page images
presented online are of reduced quality, and that additional images
may be available. Report any conversion errors or legibility
problems in page images to info@sandroid.org.
Notations on the program listing read, in part:GAP: ASSEMBLE REVISION 072 OF AGC PROGRAM ARTEMIS BY NASA 2021114-011 11:40 FEB. 26, 1971 THIS AGC PROGRAM SHALL ALSO BE REFERRED TO AS COLOSSUS 3 THIS PROGRAM IS INTENDED FOR USE IN THE CM AS SPECIFIED IN REPORT R-577. THIS PROGRAM WAS PREPARED UNDER OSR PROJECT 55-23890, SPONSORED BY THE MANNED SPACECRAFT CENTER OF THE NATIONAL AERONAUTICS AND SPACE ADMINISTRATION THROUGH CONTRACT NAS 9-4065 WITH THE CHARLES STARK DRAPER LABORATORY, MASSACHUSETTS INSTITUTE OF TECHNOLOGY, CAMBRIDGE, MASS. |
057938,000002: # Copyright: Public domain.
057939,000003: # Filename: INFLIGHT_ALIGNMENT_ROUTINES.agc
057940,000004: # Purpose: Part of the source code for Artemis (i.e., Colossus 3),
057941,000005: # build 072. This is for the Command Module's (CM)
057942,000006: # Apollo Guidance Computer (AGC), we believe for
057943,000007: # Apollo 15-17.
057944,000008: # Assembler: yaYUL
057945,000009: # Contact: Jim Lawton <jim DOT lawton AT gmail DOT com>
057946,000010: # Website: www.ibiblio.org/apollo/index.html
057947,000011: # Page scans: www.ibiblio.org/apollo/ScansForConversion/Artemis072/
057948,000012: # Mod history: 2009-08-20 JL Adapted from corresponding Comanche 055 file.
057949,000013: # 2010-02-20 RSB Un-##'d this header.
057950,000014:
Page 1354 |
057952,000016:
057953,000017: 23,2000 SETLOC INFLIGHT
057954,000018: 23,2000 BANK
057955,000019:
057956,000020: 23,3240 E5,1671 EBANK= XSM
057957,000021:
057958,000022: # CALCGTA COMPUTES THE GYRO TORQUE ANGLES REQUIRED TO BRING THE STABLE MEMBER INTO THE DESIRED ORIENTATION.
057959,000023:
057960,000024: # THE INPUT IS THE DESIRED STABLE MEMBER COORDINATES REFERRED TO PRESENT STABLE MEMBER COORDINATES. THE THREE
057961,000025: # HALF-UNIT VECTORS ARE STORED AT XDC, YDC, AND ZDC.
057962,000026:
057963,000027: # THE OUTPUTS ARE THE THREE GYRO TORQUE ANGLES TO BE APPLIED TO THE Y, Z, AND X GYROS AND ARE STORED DP AT IGC,
057964,000028: # MGC, AND OGC RESPECTIVELY.
057965,000029:
057966,000030: 23,3240 COUNT* $$/INFLT
057967,000031: 23,3240 71220 CALCGTA ITA DLOAD # PUSHDOWN 00-03,16D-27D,34D-37D
057968,000032: 23,3241 00051 S2 # XDC = (XD1 XD2 XD3)
057969,000033: 23,3242 02714 XDC # YDC = (YD1 YD2 YD3)
057970,000034: 23,3243 65325 PDDL PDDL # ZDC = (ZD1 ZD2 ZD3)
057971,000035: 23,3244 15336 HI6ZEROS
057972,000036: 23,3245 02720 XDC +4
057973,000037: 23,3246 55476 DCOMP VDEF
057974,000038: 23,3247 77656 UNIT
057975,000039: 23,3250 14027 STODL ZPRIME # ZP = UNIT(-XD3 0 XD1) = (ZP1 ZP2 ZP3)
057976,000040: 23,3251 00027 ZPRIME
057977,000041:
057978,000042: 23,3252 77742 SR1
057979,000043: 23,3253 14023 STODL SINTH # SIN(IGC) = ZP1
057980,000044: 23,3254 00033 ZPRIME +4
057981,000045: 23,3255 77742 SR1
057982,000046: 23,3256 34021 STCALL COSTH # COS(IGC) = ZP3
057983,000047: 23,3257 47311 ARCTRIG
057984,000048:
057985,000049: 23,3260 16762 STODL IGC # Y GYRO TORQUING ANGLE FRACTION OF REV.
057986,000050: 23,3261 02716 XDC +2
057987,000051: 23,3262 77742 SR1
057988,000052: 23,3263 14023 STODL SINTH # SIN(MGC) = XD2
057989,000053: 23,3264 00027 ZPRIME
057990,000054:
057991,000055: 23,3265 65205 DMP PDDL
057992,000056: 23,3266 02720 XDC +4 # PD00 = (ZP1)(XD3)
057993,000057: 23,3267 00033 ZPRIME +4
057994,000058:
057995,000059: 23,3270 45205 DMP DSU
057996,000060: 23,3271 02714 XDC # MPAC = (ZP3)(XD1)
057997,000061: 23,3272 77626 STADR
057998,000062: 23,3273 43756 STCALL COSTH # COS(MGC) = MPAC - PD00
057999,000063: 23,3274 47311 ARCTRIG
058000,000064: 23,3275 26764 STOVL MGC # Z GYRO TORQUING ANGLE FRACTION OF REV.
Page 1355 |
058002,000066: 23,3276 00027 ZPRIME
058003,000067: 23,3277 77641 DOT
058004,000068: 23,3300 02730 ZDC
058005,000069: 23,3301 24021 STOVL COSTH # COS(OGC) = ZP . ZDC
058006,000070: 23,3302 00027 ZPRIME
058007,000071: 23,3303 77641 DOT
058008,000072: 23,3304 02722 YDC
058009,000073: 23,3305 34023 STCALL SINTH # SIN(OGC) = ZP . YDC
058010,000074: 23,3306 47311 ARCTRIG
058011,000075:
058012,000076: 23,3307 36760 STCALL OGC # X GYRO TORQUING ANGLE FRACTION OF REV.
058013,000077: 23,3310 00051 S2
058014,000078:
Page 1356 |
058016,000080:
058017,000081: # ARCTRIG COMPUTES AN ANGLE GIVEN THE SINE AND COSINE OF THIS ANGLE.
058018,000082:
058019,000083: # THE INPUTS ARE SIN/4 AND COS/4 STORED DP AT SINTH AND COSTH.
058020,000084:
058021,000085: # THE OUTPUT IS THE CALCULATED ANGLE BETWEEN +.5 AND -.5 REVOLUTIONS AND STORED AT THETA. THE OUTPUT IS ALSO
058022,000086: # AVAILABLE AT MPAC.
058023,000087:
058024,000088: 23,3311 51545 ARCTRIG DLOAD ABS # PUSHDOWN 16D-21D
058025,000089: 23,3312 00023 SINTH
058026,000090: 23,3313 50025 DSU BMN
058027,000091: 23,3314 07525 QTSN45 # ABS(SIN/4) - SIN(45)/4
058028,000092: 23,3315 47324 TRIG1 # IF (-45,45) OR (135,-135)
058029,000093:
058030,000094: 23,3316 72545 DLOAD SL1 # (45,135) OR (-135,-45)
058031,000095: 23,3317 00021 COSTH
058032,000096: 23,3320 75326 ACOS SIGN
058033,000097: 23,3321 00023 SINTH
058034,000098: 23,3322 00025 STORE THETA # X = ARCCOS(COS) WITH SIGN(SIN)
058035,000099: 23,3323 77616 RVQ
058036,000100:
058037,000101: 23,3324 72545 TRIG1 DLOAD SL1 # (-45,45) OR (135,-135)
058038,000102: 23,3325 00023 SINTH
058039,000103: 23,3326 77736 ASIN
058040,000104: 23,3327 14025 STODL THETA # X = ARCSIN(SIN) WITH SIGN(SIN)
058041,000105: 23,3330 00021 COSTH
058042,000106: 23,3331 77640 BMN
058043,000107: 23,3332 47335 TRIG2 # IF (135,-135)
058044,000108:
058045,000109: 23,3333 43545 DLOAD RVQ
058046,000110: 23,3334 00025 THETA # X = ARCSIN(SIN) (-45,45)
058047,000111:
058048,000112: 23,3335 75345 TRIG2 DLOAD SIGN # (135,-135)
058049,000113: 23,3336 15334 HIDPHALF
058050,000114: 23,3337 00023 SINTH
058051,000115: 23,3340 77625 DSU
058052,000116: 23,3341 00025 THETA
058053,000117: 23,3342 00025 STORE THETA # X = .5 WITH SIGN(SIN) - ARCSIN(SIN)
058054,000118: 23,3343 77616 RVQ # (+) - (+) OR (-) - (-)
058055,000119:
Page 1357 |
058057,000121: # SMNB, NBSM, AND AXISROT, WHICH USED TO APPEAR HERE, HAVE BEEN
058058,000122: # COMBINED IN A ROUTINE CALLED AX*SR*T, WHICH APPEARS AMONG THE POWERED
058059,000123: # FLIGHT SUBROUTINES.
058060,000124:
Page 1358 |
058062,000126: # CALCGA COMPUTES THE CDU DRIVING ANGLES REQUIRED TO BRING THE STABLE MEMBER INTO THE DESIRED ORIENTATION.
058063,000127:
058064,000128: # THE INPUTS ARE 1) THE NAVIGATION BASE COORDINATES REFERRED TO ANY COORDINATE SYSTEM. THE THREE HALF-UNIT
058065,000129: # VECTORS ARE STORED AT XNB, YNB, AND ZNB. 2) THE DESIRED STABLE MEMBER COORDINATES REFERRED TO THE SAME
058066,000130: # COORDINATE SYSTEM ARE STORED AT XSM, YSM, AND ZSM.
058067,000131:
058068,000132: # THE OUTPUTS ARE THE THREE CDU DRIVING ANGLES AND ARE STORED SP AT THETAD, THETAD +1, AND THETAD +2.
058069,000133:
058070,000134: 23,3344 77601 CALCGA SETPD # PUSHDOWN 00-05, 16D-21D, 34D-37D
058071,000135: 23,3345 00001 0
058072,000136: 23,3346 47375 VLOAD VXV
058073,000137: 23,3347 02714 XNB # XNB = OGA (OUTER GIMBAL AXIS)
058074,000138: 23,3350 02700 YSM # YSM = IGA (INNER GIMBAL AXIS)
058075,000139: 23,3351 41456 UNIT PUSH # PD0 = UNIT(OGA X IGA) = MGA
058076,000140:
058077,000141: 23,3352 44041 DOT ITA
058078,000142: 23,3353 02730 ZNB
058079,000143: 23,3354 00051 S2
058080,000144: 23,3355 24021 STOVL COSTH # COS(OG) = MGA . ZNB
058081,000145: 23,3356 00001 0
058082,000146: 23,3357 77641 DOT
058083,000147: 23,3360 02722 YNB
058084,000148: 23,3361 34023 STCALL SINTH # SIN(OG) = MGA . YNB
058085,000149: 23,3362 47311 ARCTRIG
058086,000150: 23,3363 26760 STOVL OGC
058087,000151: 23,3364 00001 0
058088,000152:
058089,000153: 23,3365 50235 VXV DOT # PROVISION FOR MG ANGLE OF 90 DEGREES
058090,000154: 23,3366 02714 XNB
058091,000155: 23,3367 02700 YSM
058092,000156: 23,3370 77752 SL1
058093,000157: 23,3371 24021 STOVL COSTH # COS(MG) = IGA . (MGA X OGA)
058094,000158: 23,3372 02700 YSM
058095,000159: 23,3373 77641 DOT
058096,000160: 23,3374 02714 XNB
058097,000161: 23,3375 34023 STCALL SINTH # SIN(MG) = IGA . OGA
058098,000162: 23,3376 47311 ARCTRIG
058099,000163: 23,3377 02764 STORE MGC
058100,000164:
058101,000165: 23,3400 45246 ABS DSU
058102,000166: 23,3401 07527 .166...
058103,000167: 23,3402 77644 BPL
058104,000168: 23,3403 47422 GIMLOCK1 # IF ANGLE GREATER THAN 60 DEGREES
058105,000169:
058106,000170: 23,3404 50375 CALCGA1 VLOAD DOT
058107,000171: 23,3405 02706 ZSM
058108,000172: 23,3406 00001 0
058109,000173: 23,3407 24021 STOVL COSTH # COS(IG) = ZSM . MGA
058110,000174: 23,3410 02672 XSM
Page 1359 |
058112,000176: 23,3411 45441 DOT STADR
058113,000177: 23,3412 43754 STCALL SINTH # SIN(IG) = XSM . MGA
058114,000178: 23,3413 47311 ARCTRIG
058115,000179:
058116,000180: 23,3414 26762 STOVL IGC
058117,000181: 23,3415 02760 OGC
058118,000182: 23,3416 77634 RTB
058119,000183: 23,3417 45644 V1STO2S
058120,000184: 23,3420 35310 STCALL THETAD
058121,000185: 23,3421 00051 S2
058122,000186:
058123,000187: 23,3422 77776 GIMLOCK1 EXIT
058124,000188: 23,3423 05671 TC ALARM
058125,000189: 23,3424 00401 OCT 00401
058126,000190: 23,3425 05547 TC UPFLAG # GIMBAL LOCK HAS OCCURRED
058127,000191: 23,3426 00056 ADRES GLOKFAIL
058128,000192:
058129,000193: 23,3427 06006 TC INTPRET
058130,000194: 23,3430 77650 GOTO
058131,000195: 23,3431 47404 CALCGA1
058132,000196:
Page 1360 |
058134,000198:
058135,000199: # AXISGEN COMPUTES THE COORDINATES OF ONE COORDINATE SYSTEM REFERRED TO ANOTHER COORDINATE SYSTEM.
058136,000200:
058137,000201: # THE INPUTS ARE 1) THE STAR1 VECTOR REFERRED TO COORDINATE SYSTEM A STORED AT STARAD. 2) THE STAR2 VECTOR
058138,000202: # REFERRED TO COORDINATE SYSTEM A STORED AT STARAD +6. 3) THE STAR1 VECTOR REFERRED TO COORDINATE SYSTEM B STORED
058139,000203: # AT LOCATION 6 OF THE VAC AREA. 4) THE STAR2 VECTOR REFERRED TO COORDINATE SYSTEM B STORED AT LOCATION 12D OF
058140,000204: # THE VAC AREA.
058141,000205:
058142,000206: # THE OUTPUT DEFINES COORDINATE SYSTEM A REFERRED TO COORDINATE SYSTEM B. THE THREE HALF-UNIT VECTORS ARE STORED
058143,000207: # AT LOCATIONS XDC, XDC +6, XDC +12D, AND STARAD, STARAD +6, STARAD +12D.
058144,000208:
058145,000209: 23,3432 66370 AXISGEN AXT,1 SSP # PUSHDOWN 00-30D,34D-37D
058146,000210: 23,3433 02743 STARAD +6
058147,000211: 23,3434 00051 S1
058148,000212: 23,3435 02727 STARAD -6
058149,000213:
058150,000214: 23,3436 77601 SETPD
058151,000215: 23,3437 00001 0
058152,000216: 23,3440 46773 AXISGEN1 VLOAD* VXV* # 06D UA = S1
058153,000217: 23,3441 02752 STARAD +12D,1 # STARAD +00D UB = S1
058154,000218: 23,3442 02760 STARAD +18D,1
058155,000219: 23,3443 77656 UNIT # 12D VA = UNIT(S1 X S2)
058156,000220: 23,3444 06760 STORE STARAD +18D,1 # STARAD +06D VB = UNIT(S1 X S2)
058157,000221: 23,3445 77773 VLOAD*
058158,000222: 23,3446 02752 STARAD +12D,1
058159,000223:
058160,000224: 23,3447 76433 VXV* VSL1
058161,000225: 23,3450 02760 STARAD +18D,1 # 18D WA = UA X VA
058162,000226: 23,3451 06766 STORE STARAD +24D,1 # STARAD +12D WB = UB X VB
058163,000227:
058164,000228: 23,3452 77700 TIX,1
058165,000229: 23,3453 47440 AXISGEN1
058166,000230:
058167,000231: 23,3454 66160 AXC,1 SXA,1
058168,000232: 23,3455 00006 6
058169,000233: 23,3456 00036 30D
058170,000234:
058171,000235: 23,3457 66370 AXT,1 SSP
058172,000236: 23,3460 00022 18D
058173,000237: 23,3461 00051 S1
058174,000238: 23,3462 00006 6
058175,000239:
058176,000240: 23,3463 66374 AXT,2 SSP
058177,000241: 23,3464 00006 6
058178,000242: 23,3465 00052 S2
058179,000243: 23,3466 00002 2
058180,000244:
058181,000245: 23,3467 76720 AXISGEN2 XCHX,1 VLOAD*
058182,000246: 23,3470 00036 30D # X1=-6 X2=+6 X1=-6 X2=+4 X1=-6 X2=+2
058183,000247: 23,3471 00001 0,1
058184,000248:
Page 1361 |
058186,000250: 23,3472 62757 VXSC* PDVL* # J=(UA)(UB1) J=(UA)(UB2) J=(UA)(UB3)
058187,000251: 23,3473 75033 STARAD +6,2
058188,000252: 23,3474 00007 6,1
058189,000253: 23,3475 77757 VXSC*
058190,000254: 23,3476 75025 STARAD +12D,2
058191,000255: 23,3477 30031 STOVL* 24D # K=(VA)(VB1) J=(VA)(VB2) J=(VA)(VB3)
058192,000256: 23,3500 00015 12D,1
058193,000257:
058194,000258: 23,3501 53357 VXSC* VAD
058195,000259: 23,3502 75017 STARAD +18D,2 # L=(WA)(WB1) J=(WA)(WB2) J=(WA)(WB3)
058196,000260: 23,3503 76455 VAD VSL1
058197,000261: 23,3504 00031 24D
058198,000262: 23,3505 53520 XCHX,1 UNIT
058199,000263: 23,3506 00036 30D
058200,000264: 23,3507 06736 STORE XDC +18D,1 # XDC = L+J+K YDC = L+J+K ZDC = L+J+K
058201,000265:
058202,000266: 23,3510 77700 TIX,1
058203,000267: 23,3511 47512 AXISGEN3
058204,000268:
058205,000269: 23,3512 77704 AXISGEN3 TIX,2
058206,000270: 23,3513 47467 AXISGEN2
058207,000271:
058208,000272: 23,3514 77775 VLOAD
058209,000273: 23,3515 02714 XDC
058210,000274: 23,3516 26736 STOVL STARAD
058211,000275: 23,3517 02722 YDC
058212,000276: 23,3520 26744 STOVL STARAD +6
058213,000277: 23,3521 02730 ZDC
058214,000278: 23,3522 02752 STORE STARAD +12D
058215,000279:
058216,000280: 23,3523 77616 RVQ
058217,000281:
Page 1362 |
058219,000283: 23,3524 05520 26075 QTSN45 2DEC .1768
058220,000284: 23,3526 05252 25253 .166... 2DEC .1666666667
058221,000285:
Page 1363 (empty page) |
058223,000287:
058224,000288:
End of include-file INFLIGHT_ALIGNMENT_ROUTINES.agc. Parent file is MAIN.agc