Source Code
This is an attempt to recreate Luminary 99 Rev 2, otherwise known as LUM99R2, from Luminary 99 Rev 1 and ephemeris data from Luminary 116. The differences are confined to the last 10-12 lines of the CONTROLLED CONSTANTS. Luminary 99 Rev 1 source-code was transcribed from a printout in the MIT Museum, while Luminary 116 source code was transcribed from a printout belonging to Don Eyles. AGC developer James Kernan, the "rope mother" for the Apollo 11 Lunar Module's AGC, explains as follows: "At the last minute, Dan Lickly, our chief engineer, appeared with ephemerides updates and it took two tries to get it right. The result was that we created Lum99 Revision 1 and Lum99 Revision 2." It is suspected that the former is what's in the MIT Museum, and the latter is what we are trying to recreate here. As for which revision actually flew in Apollo 11, all of the other available surviving evidence points to Rev 1 rather than to Rev 2, so we're just not sure! |
027665,000002: ## Copyright: Public domain.
027666,000003: ## Filename: GROUND_TRACKING_DETERMINATION_PROGRAM.agc
027667,000004: ## Purpose: Part of the source code for Luminary 1A build 099.
027668,000005: ## It is part of the source code for the Lunar Module's (LM)
027669,000006: ## Apollo Guidance Computer (AGC), for Apollo 11.
027670,000007: ## Assembler: yaYUL
027671,000008: ## Contact: Ron Burkey <info@sandroid.org>.
027672,000009: ## Website: www.ibiblio.org/apollo.
027673,000010: ## Pages: 654-657
027674,000011: ## Mod history: 2009-05-18 RSB Adapted from the corresponding
027675,000012: ## Luminary131 file, using page
027676,000013: ## images from Luminary 1A.
027677,000014: ## 2016-12-13 RSB GOTOP00H -> GOTOPOOH
027678,000015: ## 2016-12-14 RSB Proofed text comments with octopus/ProoferComments
027679,000016: ## but no errors found.
027680,000017: ## 2017-03-03 RSB Snapshot of Luminary 99 Rev 1.
027681,000018: ## 2017-03-15 RSB Comment-text fixes identified in 5-way
027682,000019: ## side-by-side diff of Luminary 69/99/116/131/210.
027683,000020:
Page 654 |
027685,000022: # GROUND TRACKING DETERMINATION PROGRAM P21
027686,000023: # PROGRAM DESCRIPTION
027687,000024: # MOD NO - 1
027688,000025: # MOD BY - N. M. NEVILLE
027689,000026:
027690,000027: # FUNCTIONAL DECRIPTION -
027691,000028: # TO PROVIDE THE ASTRONAUT DETAILS OF THE LM OR CSM GROUND TRACK WITHOUT
027692,000029: # THE NEED FOR GROUND COMMUNICATION (REQUESTED BY DSKY).
027693,000030:
027694,000031: # CALLING SEQUENCE -
027695,000032: # ASTRONAUT REQUEST THROUGH DSKY V37E21E
027696,000033:
027697,000034: # SUBROUTINES CALLED -
027698,000035: # GOPERF4
027699,000036: # GOFLASH
027700,000037: # THISPREC
027701,000038: # OTHPREC
027702,000039: # LAT-LONG
027703,000040:
027704,000041: # NORMAL EXIT MODES -
027705,000042: # ASTRONAUT REQUEST TROUGH DSKY TO TERMINATE PROGRAM V34E
027706,000043:
027707,000044: # ALARM OR ABORT EXIT MODES -
027708,000045: # NONE
027709,000046:
027710,000047: # OUTPUT -
027711,000048: # OCTAL DISPLAY OF OPTION CODE AND VEHICLE WHOSE GROUND TRACK IS TO BE
027712,000049: # COMPUTED
027713,000050: # OPTION CODE 00002
027714,000051: # THIS 00001
027715,000052: # OTHER 00002
027716,000053: # DECIMAL DISPLAY OF TIME TO BE INTEGRATED TO HOURS, MINUTES, SECONDS
027717,000054: # DECIMAL DISPLAY OF LAT,LONG,ALT
027718,000055:
027719,000056: # ERASABLE INITIALIZATION REQUIRED
027720,000057: # AX0 2DEC 4.652459653 E-5 RADIANS %68-69 CONSTANTS"
027721,000058: # -AY0 2DEC 2.147535898 E-5 RADIANS
027722,000059: # AZ0 2DEC .7753206164 REVOLUTIONS
027723,000060: # FOR LUNAR ORBITS 504LM VECTOR IS NEEDED
027724,000061: # 504LM 2DEC -2.700340600 E-5 RADIANS
027725,000062: # 504LM _2 2DEC -7.514128400 E-4 RADIANS
027726,000063: # 504LM _4 2DEC _2.553198641 E-4 RADIANS
027727,000064:
027728,000065: # NONE
027729,000066:
027730,000067: # DEBRIS
Page 655 |
027732,000069: # CENTRALS - A,Q,L
027733,000070: # OTHER - THOSE USED BY THE ABOVE LISTED SUBROUTINES
027734,000071: # SEE LEMPREC, LAT-LONG
027735,000072:
027736,000073: 35,2545 30,2000 SBANK= LOWSUPER # FOR LOW 2CADR'S.
027737,000074:
027738,000075: 33,2200 BANK 33
027739,000076: 24,2000 SETLOC P20S
027740,000077: 24,2000 BANK
027741,000078:
027742,000079: 24,3505 E7,1762 EBANK= P21TIME
027743,000080: 24,3505 COUNT* $$/P21
027744,000081: 24,3505 34753 PROG21 CAF ONE
027745,000082: 24,3506 55145 TS OPTION2 # ASSUMED VEHICLE IS LM, R2 = 00001
027746,000083: 24,3507 34752 CAF BIT2 # OPTION 2
027747,000084: 24,3510 04616 TC BANKCALL
027748,000085: 24,3511 20633 CADR GOPERF4
027749,000086: 24,3512 06001 TC GOTOPOOH # TERMINATE
027750,000087: 24,3513 03515 TC +2 # PROCEED VALUE OF ASSUMED VEHICLE OK
027751,000088: 24,3514 03507 TC -5 # R2 LOADED THROUGH DSKY
027752,000089: 24,3515 33665 P21PROG1 CAF V6N34 # LOAD DESIRED TIME OF LAT-LONG.
027753,000090: 24,3516 04616 TC BANKCALL
027754,000091: 24,3517 20476 CADR GOFLASH
027755,000092: 24,3520 06001 TC GOTOPOOH # TERM
027756,000093: 24,3521 03523 TC +2 # PROCEED VALUES OK
027757,000094: 24,3522 03515 TC -5 # TIME LOADED THROUGH DSKY
027758,000095: 24,3523 06037 TC INTPRET
027759,000096: 24,3524 77745 DLOAD
027760,000097: 24,3525 01046 DSPTEM1
027761,000098: 24,3526 34041 STCALL TDEC1 # INTEGRATE TO TIME SPECIFIED IN TDEC
027762,000099: 24,3527 27414 INTSTALL
027763,000100: 24,3530 43014 BON CLEAR
027764,000101: 24,3531 00304 P21FLAG
027765,000102: 24,3532 51550 P21CONT # ON --- RECYCLE USING BASE VECTOR
027766,000103: 24,3533 01674 VINTFLAG # OFF -- 1ST PASS CALL BASE VECTOR
027767,000104: 24,3534 70535 SLOAD SR1
027768,000105: 24,3535 01146 OPTION2
027769,000106: 24,3536 43030 BHIZ SET
027770,000107: 24,3537 51541 +2 # ZERO -- THIS VEHICLE (LM)
027771,000108: 24,3540 01474 VINTFLAG # ONE -- OTHER VEHICLE (CM)
027772,000109: 24,3541 43014 CLEAR CLEAR
027773,000110: 24,3542 01676 DIM0FLAG
027774,000111: 24,3543 01673 INTYPFLG # PRECISION
027775,000112: 24,3544 77624 CALL
027776,000113: 24,3545 27134 INTEGRV # CALCULATE
027777,000114: 24,3546 77650 GOTO # -AND
027778,000115: 24,3547 51571 P21VSAVE # -SAVE BASE VECTOR
027779,000116: 24,3550 77775 P21CONT VLOAD
027780,000117: 24,3551 03676 P21BASER # RECYCLE -- INTEG FROM BASE VECTOR
027781,000118: 24,3552 25535 STOVL RCV # --POS
Page 656 |
027783,000120: 24,3553 03704 P21BASEV
027784,000121: 24,3554 15543 STODL VCV # --VEL
027785,000122: 24,3555 03763 P21TIME
027786,000123: 24,3556 01517 STORE TET # --TIME
027787,000124: 24,3557 43014 CLEAR CLEAR
027788,000125: 24,3560 01676 DIM0FLAG
027789,000126: 24,3561 00263 MOONFLAG
027790,000127: 24,3562 53135 SLOAD BZE
027791,000128: 24,3563 01164 P21ORIG
027792,000129: 24,3564 51567 +3 # ZERO = EARTH
027793,000130: 24,3565 77614 SET # ---2 = MOON
027794,000131: 24,3566 00063 MOONFLAG
027795,000132: 24,3567 77624 +3 CALL
027796,000133: 24,3570 27107 INTEGRVS
027797,000134: 24,3571 77745 P21VSAVE DLOAD # SAVE CURRENT BASE VECTOR
027798,000135: 24,3572 00015 TAT
027799,000136: 24,3573 27763 STOVL P21TIME # --TIME
027800,000137: 24,3574 00017 RATT1
027801,000138: 24,3575 27676 STOVL P21BASER # --POS B-29 OR B-27
027802,000139: 24,3576 00025 VATT1
027803,000140: 24,3577 03704 STORE P21BASEV # --VEL B-07 OR B-05
027804,000141: 24,3600 53646 ABVAL SL*
027805,000142: 24,3601 57576 0,2
027806,000143: 24,3602 27712 STOVL P21VEL # VEL/ FOR N91 DISP
027807,000144: 24,3603 00001 RATT
027808,000145: 24,3604 50256 UNIT DOT
027809,000146: 24,3605 00007 VATT # U(R).V
027810,000147: 24,3606 67471 DDV ASIN # U(R).U(V)
027811,000148: 24,3607 03712 P21VEL
027812,000149: 24,3610 03714 STORE P21GAM # SIN-1 U(R).U(V) , -90 TO &90
027813,000150: 24,3611 67334 SXA,2 SLOAD
027814,000151: 24,3612 01163 P21ORIG # 0 = EARTH
027815,000152: 24,3613 01146 OPTION2
027816,000153: 24,3614 46142 SR1 BHIZ
027817,000154: 24,3615 51620 +3
027818,000155: 24,3616 77650 GOTO
027819,000156: 24,3617 51623 +4
027820,000157: 24,3620 77614 +3 BON
027821,000158: 24,3621 04307 SURFFLAG
027822,000159: 24,3622 51625 P21DSP
027823,000160: 24,3623 77614 +4 SET
027824,000161: 24,3624 00064 P21FLAG
027825,000162: 24,3625 67214 P21DSP CLEAR SLOAD # GENERATE DISPLAY DATA
027826,000163: 24,3626 01663 LUNAFLAG
027827,000164: 24,3627 00050 X2
027828,000165: 24,3630 43054 BZE SET
027829,000166: 24,3631 51633 +2 # 0 = EARTH
027830,000167: 24,3632 01463 LUNAFLAG
027831,000168: 24,3633 77775 VLOAD
027832,000169: 24,3634 00001 RATT
Page 657 |
027834,000171: 24,3635 16032 STODL ALPHAV
027835,000172: 24,3636 00015 TAT
027836,000173: 24,3637 45014 CLEAR CALL
027837,000174: 24,3640 00662 ERADFLAG
027838,000175: 24,3641 26351 LAT-LONG
027839,000176: 24,3642 77605 DMP # MPAC = ALT, METERS B-29
027840,000177: 24,3643 11667 K.01
027841,000178: 24,3644 03716 STORE P21ALT # ALT/100 FOR N91 DISP
027842,000179: 24,3645 77776 EXIT
027843,000180: 24,3646 33664 CAF V06N43 # DISPLAY LAT, LONG, ALT
027844,000181: 24,3647 04616 TC BANKCALL # LAT, LONG = 1/2 REVS B0
027845,000182: 24,3650 20476 CADR GOFLASH # ALT = KM B14
027846,000183: 24,3651 06001 TC GOTOPOOH # TERM
027847,000184: 24,3652 06001 TC GOTOPOOH
027848,000185: 24,3653 06037 TC INTPRET # V32E RECYCLE
027849,000186: 24,3654 43345 DLOAD DAD
027850,000187: 24,3655 03763 P21TIME
027851,000188: 24,3656 11663 600SEC # 600 SECONDS OR 10 MIN
027852,000189: 24,3657 01046 STORE DSPTEM1
027853,000190: 24,3660 77634 RTB
027854,000191: 24,3661 51515 P21PROG1
027855,000192: 24,3662 00003 25140 600SEC 2DEC 60000 B-28 # 10 MIN
027856,000193:
027857,000194: 24,3664 01453 V06N43 VN 00643
027858,000195: 24,3665 01442 V6N34 VN 00634
027859,000196: 24,3666 00243 32703 K.01 2DEC .01
027860,000197:
End of include-file GROUND_TRACKING_DETERMINATION_PROGRAM_-_P21.agc. Parent file is MAIN.agc