Source Code

This source code is very close to the Apollo Guidance Computer software for the Apollo 13 Lunar module. This revision of the Luminary 131 program is from December of 1969, whereas there was a later revision in January of 1970, and still another revision in February, which is the code that flew on the mission. As far as this transcription is concerned, it was originally from a copy made in 1991 of a printout from the collection of AGC developer Don Eyles for collector David Craig. It was subsequently scanned by Gary Neff, reprocessed for online presentation at the now-discontinued History of Recent Science and Technology (HRST) website of MIT's Dibner Institute (the full-quality scans being discarded in the process), and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a high-quality replacement scan for a completely illegible page was later provided by Gary Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many errors to be introduced into the transcription. Accordingly, a second scan of the same physical printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive, and used to correct the transcription errors. All of the scanned materials mentioned, as well as other Luminary 131 related material, are available online. Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017, so the two scans are not identical in that respect. The page-headings in the printout read, in part:
	GAP:  ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091
	17:53 DEC. 19, 1969
Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together.

062110,000002:                                                                                                  ## Copyright:   Public domain.
062111,000003:                                                                                                  ## Filename:    KALMAN_FILTER.agc
062112,000004:                                                                                                  ## Purpose:     A section of Luminary 1C, revision 131.
062113,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
062114,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13.
062115,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
062116,000008:                                                                                                  ##              that the code format has been changed to conform to the
062117,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
062118,000010:                                                                                                  ##              original YUL assembler.
062119,000011:                                                                                                  ## Reference:   pp. 1462-1463
062120,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
062121,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
062122,000014:                                                                                                  ## Mod history: 06/08/03 RSB.   Began transcribing.
062123,000015:                                                                                                  ##              05/14/05 RSB    Corrected website reference above
062124,000016:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
062125,000017:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
062126,000018:                                                                                                  ##                              numbers in 1701.pdf.
062127,000019:                                                                                                  ##              2017-02-28 RSB  Proofed comment text using octopus/ProoferComments.
062128,000020: 

Page 1462

062130,000022: 17,3777  E6,1522                                  EBANK=   NO.UJETS                              
062131,000023: 16,3645                                           BANK     16                                    
062132,000024: 16,2000                                           SETLOC   DAPS1                                 
062133,000025: 16,2000                                           BANK                                           
062134,000026: 
062135,000027: 16,3645                                           COUNT*   $$/DAP                                
062136,000028: 
062137,000029: 16,3645           34752        RATELOOP           CA       TWO                                   
062138,000030: 16,3646           55743                           TS       DAPTEMP6                              
062139,000031: 16,3647           60000                           DOUBLE                                         
062140,000032: 16,3650           54002                           TS       Q                                     
062141,000033: 16,3651           51743                           INDEX    DAPTEMP6                              
062142,000034: 16,3652           11524                           CCS      TJP                                   
062143,000035: 16,3653           13655                           TCF      +2                                    
062144,000036: 16,3654           13674                           TCF      LOOPRATE                              
062145,000037: 16,3655           63735                           AD       -100MST6                              
062146,000038: 16,3656           00006                           EXTEND                                         
062147,000039: 16,3657           63713                           BZMF     SMALLTJU                              
062148,000040: 16,3660           51743                           INDEX    DAPTEMP6                              
062149,000041: 16,3661           11524                           CCS      TJP                                   
062150,000042: 16,3662           33735                           CA       -100MST6                              
062151,000043: 16,3663           13665                           TCF      +2                                    
062152,000044: 16,3664           43735                           CS       -100MST6                              
062153,000045: 16,3665           51743                           INDEX    DAPTEMP6                              
062154,000046: 16,3666           27524                           ADS      TJP                                   
062155,000047: 16,3667           51743                           INDEX    DAPTEMP6                              
062156,000048: 16,3670           11524                           CCS      TJP                                   
062157,000049: 16,3671           43621                           CS       -100MS                                #  0.1 AT 1
062158,000050: 16,3672           13674                           TCF      +2                                    
062159,000051: 16,3673           33621                           CA       -100MS                                
062160,000052: 16,3674           00006        LOOPRATE           EXTEND                                         
062161,000053: 16,3675           51743                           INDEX    DAPTEMP6                              
062162,000054: 16,3676           71521                           MP       NO.PJETS                              
062163,000055: 16,3677           30001                           CA       L                                     
062164,000056: 16,3700           51743                           INDEX    DAPTEMP6                              
062165,000057: 16,3701           55736                           TS       DAPTEMP1                              #  SIGNED TORQUE AT 1 JET-SEC FOR FILTER
062166,000058: 16,3702           00006                           EXTEND                                         
062167,000059: 16,3703           74742                           MP       BIT10                                 #  RESCALE TO 32; ONE BIT ABOUT 2 JET-MSEC
062168,000060: 16,3704           00006                           EXTEND                                         
062169,000061: 16,3705           63736                           BZMF     NEGTORK                               
062170,000062: 16,3706           50002        STORTORK           INDEX    Q                                     #  INCREMENT DOWNLIST REGISTER.
062171,000063: 16,3707           27513                           ADS      DOWNTORK                              #        NOTE:  NOT INITIALIZED; OVERFLOWS.
062172,000064: 
062173,000065: 16,3710           11743                           CCS      DAPTEMP6                              
062174,000066: 16,3711           13646                           TCF      RATELOOP   +1                         
062175,000067: 16,3712           13722                           TCF      ROTORQUE                              
062176,000068: 16,3713           34755        SMALLTJU           CA       ZERO                                  
062177,000069: 16,3714           51743                           INDEX    DAPTEMP6                              
062178,000070: 16,3715           57524                           XCH      TJP                                   
062179,000071: 16,3716           00006                           EXTEND                                         

Page 1463

062181,000073: 16,3717           74760                           MP       ELEVEN                                #  10.24 PLUS
062182,000074: 16,3720           30001                           CA       L                                     
062183,000075: 16,3721           13674                           TCF      LOOPRATE                              
062184,000076: 16,3722           31737        ROTORQUE           CA       DAPTEMP2                              
062185,000077: 16,3723           61740                           AD       DAPTEMP3                              
062186,000078: 16,3724           00006                           EXTEND                                         
062187,000079: 16,3725           71532                           MP       1JACCR                                
062188,000080: 16,3726           55746                           TS       JETRATER                              
062189,000081: 16,3727           41740                           CS       DAPTEMP3                              
062190,000082: 16,3730           61737                           AD       DAPTEMP2                              
062191,000083: 16,3731           00006                           EXTEND                                         
062192,000084: 16,3732           71531                           MP       1JACCQ                                
062193,000085: 16,3733           55745                           TS       JETRATEQ                              
062194,000086: 16,3734           12316                           TCF      BACKP                                 
062195,000087: 16,3735           77537        -100MST6           DEC      -160       B-14                       
062196,000088: 
062197,000089: 16,3736           40000        NEGTORK            COM                                            
062198,000090: 16,3737           24002                           INCR     Q                                     
062199,000091: 16,3740           13706                           TCF      STORTORK                              
062200,000092: 
062201,000093: 

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