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!

027508,000002:                                                                                                  ## Copyright:   Public domain.
027509,000003:                                                                                                  ## Filename:    LAMBERT_AIMPOINT_GUIDANCE.agc
027510,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
027511,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
027512,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
027513,000007:                                                                                                  ## Assembler:   yaYUL
027514,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
027515,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
027516,000010:                                                                                                  ## Pages:       651-653
027517,000011:                                                                                                  ## Mod history: 2009-05-18 RSB  Transcribed from Luminary 099
027518,000012:                                                                                                  ##                              page images.
027519,000013:                                                                                                  ##              2009-06-05 RSB  Corrected 4 typos.
027520,000014:                                                                                                  ##              2009-06-07 RSB  Fixed a typo.
027521,000015:                                                                                                  ##              2016-12-14 RSB  VNP00H -> VNPOOH.
027522,000016:                                                                                                  ##              2016-12-14 RSB  Proofed text comments with octopus/ProoferComments
027523,000017:                                                                                                  ##                              and corrected the errors found.
027524,000018:                                                                                                  ##              2017-03-03 RSB  Snapshot of Luminary 99 Rev 1. 
027525,000019: 

Page 651

027527,000021: 
027528,000022:                                                                                                  #  GENERAL LAMBERT AIMPOINT GUIDANCE **
027529,000023:                                                                                                  #  WRITTEN BY RAMA M AIYAWAR
027530,000024: 
027531,000025:                                                                                                  #  PROGRAM P-31 DESCRIPTION **
027532,000026: 
027533,000027:                                                                                                  #  1.    TO ACCEPT TARGETING PARAMETERS OBTAINED FROM A SOURCE EXTERNAL
027534,000028:                                                                                                  #        TO THE LEM AND COMPUTE THERE FROM THE REQUIRED-VELOCITY AND
027535,000029:                                                                                                  #        OTHER INITIAL CONDITIONS REQUIRED BY LM FOR DESIRED MANEUVER.
027536,000030:                                                                                                  #        THE TARGETING PARAMETERS ARE TIG (TIME OF IGNITION), TARGET 
027537,000031:                                                                                                  #        VECTOR (RTARG), AND THE TIME FROM TIG UNTIL THE TARGET IS
027538,000032:                                                                                                  #        REACHED (DELLT4), DESIRED TIME OF FLIGHT FROM RINIT TO RTARG..
027539,000033: 
027540,000034:                                                                                                  #  ASSUMPTIONS **
027541,000035: 
027542,000036:                                                                                                  #  1.    THE TARGET PARAMETERS MAY HAVE BEEN LOADED PRIOR TO THE
027543,000037:                                                                                                  #        EXECUTION OF THIS PROGRAM.
027544,000038:                                                                                                  #  2.    THIS PROGRAM IS APPLICABLE IN EITHER EARTH OR LUNAR ORBIT.
027545,000039:                                                                                                  #  3.    THIS PROGRAM IS DESIGNED FOR ONE-MAN OPERATION, AND SHOULD
027546,000040:                                                                                                  #        BE SELECTED BY THE ASTRONAUT BY DSKY ENTRY V37 E31.
027547,000041: 
027548,000042:                                                                                                  #  SUBROUTINES USED **
027549,000043:                                                                                                  #  
027550,000044:                                                                                                  #  MANUPARM, TTG/N35, R02BOTH, MIDGIM, DISPMGA, FLAGDOWN, BANKCALL,
027551,000045:                                                                                                  #  GOTOPOOH, ENDOFJOB, PHASCHNG, GOFLASHR, GOFLASH.
027552,000046: 
027553,000047:                                                                                                  #  MANUPARM      CALCULATES APOGEE, PERIGEE ALTITUDES AND DELTAV DESIRED
027554,000048:                                                                                                  #                FOR THE MANEUVER.
027555,000049: 
027556,000050:                                                                                                  #  TTG/N35       CLOCKTASK - UPDATES CLOCK.
027557,000051: 
027558,000052:                                                                                                  #  MIDGIM        CALCULATES MIDDLE GIMBAL ANGLE FOR DISPLAY.
027559,000053: 
027560,000054:                                                                                                  #  R02BOTH       IMU - STATUS CHECK ROUTINE.
027561,000055: 
027562,000056:                                                                                                  #  DISPLAYS USED IN P-31LM **
027563,000057: 
027564,000058:                                                                                                  #  V06N33        DISPLAY SOTRED TIG (IN HRS. MINS. SECS)
027565,000059:                                                                                                  #  V06N42        DISPLAY APOGEE, PERIGEE, DELTAV.
027566,000060:                                                                                                  #  V16N35        DISPLAY TIME FROM TIG.
027567,000061:                                                                                                  #  V06N45        TIME FROM IGNITION AND MIDDLE GIMBAL ANGLE.
027568,000062: 
027569,000063:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED **
027570,000064: 
027571,000065:                                                                                                  #  TIG           TIME OF IGNITION                DP      (B+28) CS.
027572,000066: 
027573,000067:                                                                                                  #  DELLT4        DESIRED TIME OF FLIGHT          DP      (B+28) CS
027574,000068:                                                                                                  #                FROM RINIT TO RTARG.
027575,000069: 
027576,000070:                                                                                                  #  RTARG         RADIUS VECTOR OF TARGET POSITION VECTOR
027577,000071:                                                                                                  #                RADIUS VECTOR SCALED TO (B+29)METERS IF EARTH ORBIT

Page 652

027579,000073:                                                                                                  #                RADIUS VECTOR SCALED TO (B+27)METERS IF MOON ORBIT
027580,000074: 
027581,000075:                                                                                                  #  OUTPUT **
027582,000076: 
027583,000077:                                                                                                  #  HAPO          APOGEE ALTITUDE
027584,000078:                                                                                                  #  HPER          PERIGEE ALTITUDE
027585,000079:                                                                                                  #  VGDISP        MAG. OF DELTAV FOR DISPLAY, SCALING     B+7 M/CS EARTH
027586,000080:                                                                                                  #                MAG. OF DELTAV FOR DISPLAY, SCALING     B+5 M/CS MOON
027587,000081:                                                                                                  #  MIDGIM        MIDDLE GIMBAL ANGLE
027588,000082:                                                                                                  #  XDELVFLG      RESETS XDELVFLG FOR LAMBERT VG COMPUTATIONS
027589,000083: 
027590,000084:                                                                                                  #  ALARMS OR ABORTS      NONE **
027591,000085: 
027592,000086:                                                                                                  #  RESTARTS ARE VIA GROUP 4 **
027593,000087: 
027594,000088: 35,2000                                           SETLOC   GLM                                   
027595,000089: 35,2000                                           BANK                                           
027596,000090: 
027597,000091: 35,2450  E7,1470                                  EBANK=   SUBEXIT                               
027598,000092: 
027599,000093: 35,2450                                           COUNT*   $$/P31                                
027600,000094: 35,2450           02361        P31                TC       P20FLGON                              
027601,000095: 35,2451           32025                           CAF      V06N33                                #  TIG
027602,000096: 35,2452           03712                           TC       VNPOOH                                
027603,000097: 35,2453           06037                           TC       INTPRET                               
027604,000098: 35,2454           71214                           CLEAR    DLOAD                                 
027605,000099: 35,2455           00670                                    UPDATFLG                              
027606,000100: 35,2456           03442                                    TIG                                   
027607,000101: 35,2457           34041                           STCALL   TDEC1                                 #  INTEGRATE STATE VECTORS TO TIG
027608,000102: 35,2460           27057                                    LEMPREC                               
027609,000103: 35,2461           40375                           VLOAD    SETPD                                 
027610,000104: 35,2462           00001                                    RATT                                  
027611,000105: 35,2463           00001                                    0D                                    
027612,000106: 35,2464           03642                           STORE    RTIG                                  
027613,000107: 35,2465           26323                           STOVL    RINIT                                 
027614,000108: 35,2466           00007                                    VATT                                  
027615,000109: 35,2467           03650                           STORE    VTIG                                  
027616,000110: 35,2470           16331                           STODL    VINIT                                 
027617,000111: 35,2471           32420                                    P30ZERO                               
027618,000112: 35,2472           65206                           PUSH     PDDL                                  #  E4 AND NUMIT = 0
027619,000113: 35,2473           03452                                    DELLT4                                
027620,000114: 35,2474           66015                           DAD      SXA,1                                 
027621,000115: 35,2475           03442                                    TIG                                   
027622,000116: 35,2476           02776                                    RTX1                                  
027623,000117: 35,2477           03631                           STORE    TPASS4                                
027624,000118: 35,2500           45134                           SXA,2    CALL                                  
027625,000119: 35,2501           02777                                    RTX2                                  
027626,000120: 35,2502           22000                                    INITVEL                               
027627,000121: 35,2503           41575                           VLOAD    PUSH                                  

Page 653

027629,000123: 35,2504           02366                                    DELVEET3                              
027630,000124: 35,2505           03656                           STORE    DELVSIN                               
027631,000125: 35,2506           43046                           ABVAL    CLEAR                                 
027632,000126: 35,2507           01267                                    XDELVFLG                              
027633,000127: 35,2510           37664                           STCALL   VGDISP                                
027634,000128: 35,2511           15733                                    GET.LVC                               
027635,000129: 35,2512           63375                           VLOAD    PDVL                                  
027636,000130: 35,2513           03642                                    RTIG                                  
027637,000131: 35,2514           02337                                    VIPRIME                               
027638,000132: 35,2515           77624                           CALL                                           
027639,000133: 35,2516           46316                                    PERIAPO1                              
027640,000134: 35,2517           77624                           CALL                                           
027641,000135: 35,2520           46426                                    SHIFTR1                               
027642,000136: 35,2521           77624                           CALL                                           #  LIMIT DISPLAY TO 9999.9 N. MI.
027643,000137: 35,2522           45636                                    MAXCHK                                
027644,000138: 35,2523           16321                           STODL    HPER                                  
027645,000139: 35,2524           00005                                    4D                                    
027646,000140: 35,2525           77624                           CALL                                           
027647,000141: 35,2526           46426                                    SHIFTR1                               
027648,000142: 35,2527           77624                           CALL                                           #  LIMIT DISPLAY TO 9999.9 N. MI.
027649,000143: 35,2530           45636                                    MAXCHK                                
027650,000144: 35,2531           02317                           STORE    HAPO                                  
027651,000145: 35,2532           77776                           EXIT                                           
027652,000146: 35,2533           33727                           CAF      V06N81                                #  DELVLVC
027653,000147: 35,2534           03712                           TC       VNPOOH                                
027654,000148: 35,2535           32026                           CAF      V06N42                                #  HAPO, HPER, VGDISP
027655,000149: 35,2536           03712                           TC       VNPOOH                                
027656,000150: 35,2537           06037                           TC       INTPRET                               
027657,000151: 35,2540           45014        REVN1645           SET      CALL                                  #  TRKMKCNT, TTOGO, +MGA
027658,000152: 35,2541           01071                                    FINALFLG                              
027659,000153: 35,2542           73606                                    VN1645                                
027660,000154: 35,2543           77650                           GOTO                                           
027661,000155: 35,2544           72540                                    REVN1645                              
027662,000156: 

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