Source Code
This is a reconstructed version of Luminary 130, the initial AGC program released
in November 1969 for the Apollo 13 LM. Three more releases
followed before the flown revision was finally manufactured in February 1970.
This reconstruction was created from a previous transcription of the original listing of Luminary 131, combined with Luminary memo #129 which describes the small difference between the Luminary 130 and 131. The reconstructed source code was verified by matching memory-bank checksums to those listed for Luminary 130 in drawing 2021152G. In this source code, program comments from the original (Luminary 131) code are prefixed with '#', while those added later by the Virtual AGC project are prefixed with '##'. |
028014,000002: ## Copyright: Public domain.
028015,000003: ## Filename: GROUND_TRACKING_DETERMINATION_PROGRAM_-_P21.agc
028016,000004: ## Purpose: A section of the reconstructed source code for Luminary 130.
028017,000005: ## This was the original program released for the Apollo 13 LM,
028018,000006: ## although several more revisions would follow. It has been
028019,000007: ## reconstructed from a listing of Luminary 131, from which it
028020,000008: ## differs on only two lines in P70-P71. The difference is
028021,000009: ## described in detail in Luminary memo #129, which was used
028022,000010: ## to perform the reconstruction. This file is intended to be a
028023,000011: ## faithful reconstruction, except that the code format has been
028024,000012: ## changed to conform to the requirements of the yaYUL assembler
028025,000013: ## rather than the original YUL assembler.
028026,000014: ## Reference: pp. 656-659
028027,000015: ## Contact: Ron Burkey <info@sandroid.org>.
028028,000016: ## Website: www.ibiblio.org/apollo/index.html
028029,000017: ## Mod history: 05/21/03 RSB. Began transcribing.
028030,000018: ## 05/14/05 RSB Corrected website reference above.
028031,000019: ## 2017-01-06 RSB Page numbers now agree with those on the
028032,000020: ## original harcopy, as opposed to the PDF page
028033,000021: ## numbers in 1701.pdf.
028034,000022: ## 2017-02-24 RSB Proofed comment text using octopus/ProoferComments.
028035,000023: ## 2017-03-01 RSB Fixed a couple comment-text errors found while
028036,000024: ## diff'ing vs Luminary 116.
028037,000025: ## 2018-09-04 MAS Copied from Luminary 131 for Luminary 130.
028038,000026:
Page 656 |
028040,000028: # GROUND TRACKING DETERMINATION PROGRAM P21
028041,000029:
028042,000030: # PROGRAM DESCRIPTION
028043,000031: # MOD NO - 1
028044,000032: # MOD BY - N. M. NEVILLE
028045,000033:
028046,000034: # FUNCTIONAL DECRIPTION -
028047,000035: # TO PROVIDE THE ASTRONAUT DETAILS OF THE LM OR CSM GROUND TRACK WITHOUT
028048,000036: # THE NEED FOR GROUND COMMUNICATION (REQUESTED BY DSKY).
028049,000037:
028050,000038: # CALLING SEQUENCE -
028051,000039: # ASTRONAUT REQUEST THROUGH DSKY V37E21E
028052,000040:
028053,000041: # SUBROUTINES CALLED -
028054,000042: # GOPERF4
028055,000043: # GOFLASH
028056,000044: # THISPREC
028057,000045: # OTHPREC
028058,000046: # LAT-LONG
028059,000047:
028060,000048: # NORMAL EXIT MODES -
028061,000049: # ASTRONAUT REQUEST TROUGH DSKY TO TERMINATE PROGRAM V34E
028062,000050:
028063,000051: # ALARM OR ABORT EXIT MODES -
028064,000052: # NONE
028065,000053:
028066,000054: # OUTPUT -
028067,000055: # OCTAL DISPLAY OF OPTION CODE AND VEHICLE WHOSE GROUND TRACK IS TO BE
028068,000056: # COMPUTED
028069,000057: # OPTION CODE 00002
028070,000058: # THIS 00001
028071,000059: # OTHER 00002
028072,000060: # DECIMAL DISPLAY OF TIME TO BE INTEGRATED TO HOURS, MINUTES, SECONDS
028073,000061: # DECIMAL DISPLAY OF LAT,LONG,ALT
028074,000062:
028075,000063: # ERASABLE INITIALIZATION REQUIRED
028076,000064: # AX0 2DEC 4.652459653 E-5 RADIANS %68-69 CONSTANTS"
028077,000065: # -AY0 2DEC 2.147535898 E-5 RADIANS
028078,000066: # AZ0 2DEC .7753206164 REVOLUTIONS
028079,000067: # FOR LUNAR ORBITS 504LM VECTOR IS NEEDED
028080,000068: # 504LM 2DEC -2.700340600 E-5 RADIANS
028081,000069: # 504LM _2 2DEC -7.514128400 E-4 RADIANS
028082,000070: # 504LM _4 2DEC _2.553198641 E-4 RADIANS
028083,000071:
028084,000072: # NONE
028085,000073: # DEBRIS
Page 657 |
028087,000075: # CENTRALS - A,Q,L
028088,000076: # OTHER - THOSE USED BY THE ABOVE LISTED SUBROUTINES
028089,000077: # SEE LEMPREC, LAT-LONG
028090,000078:
028091,000079: 35,2455 30,2000 SBANK= LOWSUPER # FOR LOW 2CADR'S.
028092,000080:
028093,000081: 33,2200 BANK 33
028094,000082: 24,2000 SETLOC P20S
028095,000083: 24,2000 BANK
028096,000084:
028097,000085: 24,3506 E7,1762 EBANK= P21TIME
028098,000086: 24,3506 COUNT* $$/P21
028099,000087: 24,3506 34753 PROG21 CAF ONE
028100,000088: 24,3507 55144 TS OPTION2 # ASSUMED VEHICLE IS LM, R2 = 00001
028101,000089: 24,3510 34752 CAF BIT2 # OPTION 2
028102,000090: 24,3511 04616 TC BANKCALL
028103,000091: 24,3512 20634 CADR GOPERF4
028104,000092: 24,3513 06001 TC GOTOPOOH # TERMINATE
028105,000093: 24,3514 03516 TC +2 # PROCEED VALUE OF ASSUMED VEHICLE OK
028106,000094: 24,3515 03510 TC -5 # R2 LOADED THROUGH DSKY
028107,000095: 24,3516 34755 CAF ZERO # INITIAL TIME = PRESENT TIME
028108,000096: 24,3517 55044 TS DSPTEM1
028109,000097: 24,3520 55045 TS DSPTEM1 +1
028110,000098: 24,3521 33675 P21PROG1 CAF V6N34 # LOAD DESIRED TIME OF LAT-LONG.
028111,000099: 24,3522 04616 TC BANKCALL
028112,000100: 24,3523 20477 CADR GOFLASH
028113,000101: 24,3524 06001 TC GOTOPOOH # TERM
028114,000102: 24,3525 03527 TC +2 # PROCEED VALUES OK
028115,000103: 24,3526 03521 TC -5 # TIME LOADED THROUGH DSKY
028116,000104: 24,3527 06042 TC INTPRET
028117,000105: 24,3530 53145 DLOAD BZE
028118,000106: 24,3531 01045 DSPTEM1
028119,000107: 24,3532 51667 P21PRTM
028120,000108: 24,3533 34041 P21PROG2 STCALL TDEC1 # INTEG TO TIME SPECIFIED IN TDEC1
028121,000109: 24,3534 27410 INTSTALL
028122,000110: 24,3535 43014 BON CLEAR
028123,000111: 24,3536 00304 P21FLAG
028124,000112: 24,3537 51555 P21CONT # ON---RECYCLE USING BASE VECTOR
028125,000113: 24,3540 01674 VINTFLAG # OFF--1ST PASS CALL BASE VECTOR
028126,000114: 24,3541 70535 SLOAD SR1
028127,000115: 24,3542 01145 OPTION2
028128,000116: 24,3543 43030 BHIZ SET
028129,000117: 24,3544 51546 +2 # ZERO--THIS VEHICLE (LM)
028130,000118: 24,3545 01474 VINTFLAG # ONE--OTHER VEHICLE (CM)
028131,000119: 24,3546 43014 CLEAR CLEAR
028132,000120: 24,3547 01676 DIM0FLAG
028133,000121: 24,3550 01673 INTYPFLG # PRECISION
028134,000122: 24,3551 77624 CALL
028135,000123: 24,3552 27133 INTEGRV # CALCULATE
028136,000124: 24,3553 77650 GOTO # -AND
Page 658 |
028138,000126: 24,3554 51576 P21VSAVE # -SAVE BASE VECTOR
028139,000127: 24,3555 77775 P21CONT VLOAD
028140,000128: 24,3556 03676 P21BASER # RECYCLE--INTEG FROM BASE VECTOR
028141,000129: 24,3557 25535 STOVL RCV # --POS
028142,000130: 24,3560 03704 P21BASEV
028143,000131: 24,3561 15543 STODL VCV # --VEL
028144,000132: 24,3562 03763 P21TIME
028145,000133: 24,3563 01517 STORE TET # --TIME
028146,000134: 24,3564 43014 CLEAR CLEAR
028147,000135: 24,3565 01676 DIM0FLAG
028148,000136: 24,3566 00263 MOONFLAG
028149,000137: 24,3567 53135 SLOAD BZE
028150,000138: 24,3570 01163 P21ORIG
028151,000139: 24,3571 51574 +3 # ZERO = EARTH
028152,000140: 24,3572 77614 SET # ---2 = MOON
028153,000141: 24,3573 00063 MOONFLAG
028154,000142: 24,3574 77624 +3 CALL
028155,000143: 24,3575 27106 INTEGRVS
028156,000144: 24,3576 77745 P21VSAVE DLOAD # SAVE CURRENT BASE VECTOR
028157,000145: 24,3577 00015 TAT
028158,000146: 24,3600 27763 STOVL P21TIME # --TIME
028159,000147: 24,3601 00017 RATT1
028160,000148: 24,3602 27676 STOVL P21BASER # --POS B-29 OR B-27
028161,000149: 24,3603 00025 VATT1
028162,000150: 24,3604 03704 STORE P21BASEV # --VEL B-07 OR B-05
028163,000151: 24,3605 53646 ABVAL SL*
028164,000152: 24,3606 57576 0,2
028165,000153: 24,3607 27712 STOVL P21VEL # VEL/ FOR N91 DISP
028166,000154: 24,3610 00001 RATT
028167,000155: 24,3611 50256 UNIT DOT
028168,000156: 24,3612 00007 VATT # U(R).V
028169,000157: 24,3613 67471 DDV ASIN # U(R).U(V)
028170,000158: 24,3614 03712 P21VEL
028171,000159: 24,3615 03714 STORE P21GAM # SIN-1 U(R).U(V) , -90 TO &90
028172,000160: 24,3616 67334 SXA,2 SLOAD
028173,000161: 24,3617 01162 P21ORIG # 0 = EARTH
028174,000162: 24,3620 01145 OPTION2
028175,000163: 24,3621 46142 SR1 BHIZ
028176,000164: 24,3622 51625 +3
028177,000165: 24,3623 77650 GOTO
028178,000166: 24,3624 51630 +4
028179,000167: 24,3625 77614 +3 BON
028180,000168: 24,3626 04307 SURFFLAG
028181,000169: 24,3627 51632 P21DSP
028182,000170: 24,3630 77614 +4 SET
028183,000171: 24,3631 00064 P21FLAG
028184,000172: 24,3632 67214 P21DSP CLEAR SLOAD # GENERATE DISPLAY DATA
028185,000173: 24,3633 01663 LUNAFLAG
028186,000174: 24,3634 00050 X2
028187,000175: 24,3635 43054 BZE SET
Page 659 |
028189,000177: 24,3636 51640 +2 # 0 = EARTH
028190,000178: 24,3637 01463 LUNAFLAG
028191,000179: 24,3640 77775 VLOAD
028192,000180: 24,3641 00001 RATT
028193,000181: 24,3642 16032 STODL ALPHAV
028194,000182: 24,3643 00015 TAT
028195,000183: 24,3644 45014 CLEAR CALL
028196,000184: 24,3645 00662 ERADFLAG
028197,000185: 24,3646 26347 LAT-LONG
028198,000186: 24,3647 77605 DMP # MPAC = ALT, METERS B-29
028199,000187: 24,3650 11677 K.01
028200,000188: 24,3651 03716 STORE P21ALT # ALT/100 FOR N91 DISP
028201,000189: 24,3652 77776 EXIT
028202,000190: 24,3653 33674 CAF V06N43 # DISPLAY LAT, LONG, ALT
028203,000191: 24,3654 04616 TC BANKCALL # LAT, LONG = 1/2 REVS B0
028204,000192: 24,3655 20477 CADR GOFLASH # ALT = KM B14
028205,000193: 24,3656 06001 TC GOTOPOOH # TERM
028206,000194: 24,3657 06001 TC GOTOPOOH
028207,000195: 24,3660 06042 TC INTPRET # V32E RECYCLE
028208,000196: 24,3661 43345 DLOAD DAD
028209,000197: 24,3662 03763 P21TIME
028210,000198: 24,3663 11673 600SEC # 600 SECONDS OR 10 MIN
028211,000199: 24,3664 01045 STORE DSPTEM1
028212,000200: 24,3665 77634 RTB
028213,000201: 24,3666 51521 P21PROG1
028214,000202: 24,3667 52034 P21PRTM RTB GOTO
028215,000203: 24,3670 21574 LOADTIME
028216,000204: 24,3671 51533 P21PROG2
028217,000205: 24,3672 00003 25140 600SEC 2DEC 60000 B-28 # 10 MIN
028218,000206:
028219,000207: 24,3674 01453 V06N43 VN 00643
028220,000208: 24,3675 01442 V6N34 VN 00634
028221,000209: 24,3676 00243 32703 K.01 2DEC .01
028222,000210:
End of include-file GROUND_TRACKING_DETERMINATION_PROGRAM_-_P21.agc. Parent file is MAIN.agc