Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

065499,000002:                                                                                                  ## Copyright:   Public domain.
065500,000003:                                                                                                  ## Filename:    SPS_BACK-UP_RCS_CONTROL.agc
065501,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
065502,000005:                                                                                                  ##              It is part of the source code for the original release
065503,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
065504,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
065505,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
065506,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
065507,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
065508,000011:                                                                                                  ##              that the code format has been changed to conform to the
065509,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
065510,000013:                                                                                                  ##              original YUL assembler.
065511,000014:                                                                                                  ## Reference:   pp. 1500-1502
065512,000015:                                                                                                  ## Assembler:   yaYUL
065513,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
065514,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
065515,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
065516,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
065517,000020:                                                                                                  ##              2017-01-22 HG   Transcribed
065518,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
065519,000022:                                                                                                  ##                              and fixed errors found.
065520,000023: 

Page 1500

065522,000025:                                                                                                  #  PROGRAM NAME:  SPSRCS
065523,000026: 
065524,000027:                                                                                                  #  AUTHOR:  EDGAR M. OSHIKA (AC ELECTRONICS)
065525,000028: 
065526,000029:                                                                                                  #  MODIFIED:  TO RETURN TO ALL AXES VIA Q BY P. S. WEISSMAN, OCT 7, 1968
065527,000030: 
065528,000031:                                                                                                  #  FUNCTIONAL DESCRIPTION:
065529,000032: 
065530,000033:                                                                                                  #  THIS PROGRAM CONTROLS THE FIRING OF ALL RCS JETS IN THE DOCKED CONFIGURATION ACCORDING TO THE FOLLOWING PHASE
065531,000034:                                                                                                  #  PLANE LOGIC.
065532,000035: 
065533,000036:                                                                                                  #  1.  OUTER RATE LIMIT (SPSRCS)
065534,000037: 
065535,000038:                                                                                                  #  IF MAGNITUDE OF EDOT IS GREATER THAN 1.73 DEG/SEC SET JET FIRING TIME, TJ, TO REDUCE RATE AND THEN RETURN TO
065536,000039:                                                                                                  #  CALLING PROGRAM (REQUESTING 4 JETS FOR P-AXIS).
065537,000040:                                                                                                  #  OTHERWISE, CONTINUE.
065538,000041: 
065539,000042:                                                                                                  #  2.  RATE DEAD BAND TEST ( JTONTEST)
065540,000043: 
065541,000044:                                                                                                  #  IF JETS ARE FIRING NEGATIVE AND RATE IS GREATER THAN -0.101 DEG/SEC, LEAVE JETS ON AND RETURN,
065542,000045:                                                                                                  #  IF JETS ARE FIRING POSITIVE AND RATE IS LESS THAN +0.101 DEG/SEC, LEAVE JETS ON AND RETURN, OTHERWISE CONTINUE.
065543,000046: 
065544,000047:                                                                                                  #  3.  COASTING TEST (SPSSTART)
065545,000048: 
065546,000049:                                                                                                  #  IF STATE (E,EDOT) IS BELOW LINE  E + 4 X EDOT > -1.4 DEG  AND EDOT IS LESS THAN 1.30 DEG/SEC SET JET TIME POSI-
065547,000050:                                                                                                  #  TIVE AND RETURN,
065548,000051:                                                                                                  #  IF STATE IS ABOVE LINE E + 4 X EDOT > +1.4 DEG AND EDOT IS GREATER THAN -1.30 DEG/SEC, SET JET TIME NEGATIVE
065549,000052:                                                                                                  #  AND RETURN,
065550,000053:                                                                                                  #  OTHERWISE, SET JET TIME ZERO AND RETURN.
065551,000054: 
065552,000055:                                                                                                  #  THE MINIMUM PULSE WIDTH OF THIS CONTROLLER IS DETERMINED BY THE REPETITION  RATE AT WHICH THIS ROUTINE IS CALLED
065553,000056:                                                                                                  #  AND IS NOMINALLY 100 MS FOR ALL AXES IN DRIFTING FLIGHT.   DURING POWERED FLIGHT THE MINIMUM IS 100 MS FOR THE
065554,000057:                                                                                                  #  P AXIS AND 200 MS FOR THE CONTROL OF THE U AND V AXES.
065555,000058: 
065556,000059:                                                                                                  #  CALLING SEQUENCE:
065557,000060: 
065558,000061:                                                                                                  #           TC     SPSRCS          FROM Q,R AXES RCS AUTOPILOT
065559,000062:                                                                                                  #                      INHINT                  FROM P-AXIS RCS AUTOPILOT
065560,000063:                                                                                                  #                      TC      IBNKCALL
065561,000064:                                                                                                  #                      CADR    SPSRCS
065562,000065: 
065563,000066: 
065564,000067:                                                                                                  #  EXIT:
065565,000068: 
065566,000069:                                                                                                  #           TC     Q
065567,000070:                                                                                                  #  ALARM/ABORT MODE:    NONE
065568,000071: 
065569,000072:                                                                                                  #  SUBROUTINES CALLED:    NONE
065570,000073: 
065571,000074:                                                                                                  #  INPUT:      E, EDOT
065572,000075: 

Page 1501

065574,000077:                                                                                                  #             TJP, TJV, TJU           TJ MUST NOT BE NEGATIVE ZERO
065575,000078: 
065576,000079:                                                                                                  #  OUTPUT:    TJP, TJV, TJU
065577,000080:                                                                                                  #             NUMBERT = 6,            WHEN RATE LIMITING P AXIS.
065578,000081: 
065579,000082: 
065580,000083: 17,3700                                           BANK     17                                    
065581,000084: 17,2000                                           SETLOC   DAPS2                                 
065582,000085: 17,2000                                           BANK                                           
065583,000086: 
065584,000087: 17,3700                                           COUNT*   $$/DAPBU                              
065585,000088: 
065586,000089: 17,3700  E6,1525                                  EBANK=   TJU                                   
065587,000090: 17,3700           31425        SPSRCS             CA       EDOT                                  
065588,000091: 17,3701           00006                           EXTEND                                         
065589,000092: 17,3702           74766                           MP       RATELIM1                              #  OUTER RATE LIMIT = 1.73 DEG/SEC
065590,000093: 17,3703           00006                           EXTEND                                         
065591,000094: 17,3704           13717                           BZF      JTONTEST                              
065592,000095: 
065593,000096: 17,3705           54001                           TS       L                                     
065594,000097: 17,3706           36241                           CA       SIX                                   
065595,000098: 17,3707           55741                           TS       NUMBERT                               
065596,000099: 17,3710           10001                           CCS      L                                     
065597,000100: 17,3711           13753                           TCF      NEGTHRST                              
065598,000101: 17,3712           05677                           TC       CCSHOLE                               #  **TEMP ** FILL WITH A CONSTANT
065599,000102: 17,3713  17,3664               RATELIM2           =        .1AT4                                 #  = OCT 00632,  1.125 DEG/SEC
065600,000103: 17,3713           34736        POSTHRST           CA       HALF                                  
065601,000104: 
065602,000105: 17,3714           51476                           NDX      AXISCTR                               
065603,000106: 17,3715           55525                           TS       TJU                                   
065604,000107: 17,3716           00002                           TC       Q                                     
065605,000108: 
065606,000109: 17,3717           51476        JTONTEST           NDX      AXISCTR                               
065607,000110: 17,3720           11525                           CCS      TJU                                   
065608,000111: 17,3721           13725                           TCF      +4                                    
065609,000112: 17,3722           13737                           TCF      SPSSTART                              
065610,000113: 17,3723           31425                           CA       EDOT                                  
065611,000114: 17,3724           13726                           TCF      +2                                    
065612,000115: 
065613,000116: 17,3725           41425                 +4        CS       EDOT                                  
065614,000117: 17,3726           22000                           LXCH     A                                     
065615,000118: 17,3727           40111                           CS       DAPBOOLS                              #  IF DRIFTBIT = 1, USE ZERO TARGET RATE
065616,000119: 17,3730           74744                           MASK     DRIFTBIT                              #  IF DRIFTBIT = 0, USE 0.10 RATE TARGET
065617,000120: 17,3731           10000                           CCS      A                                     
065618,000121: 17,3732           34767                           CA       RATEDB1                               
065619,000122: 17,3733           60001                           AD       L                                     
065620,000123: 17,3734           00006                           EXTEND                                         
065621,000124: 17,3735           63737                           BZMF     +2                                    
065622,000125: 17,3736           13716                           TCF      POSTHRST   +3                         
065623,000126: 

Page 1502

065625,000128: 17,3737           31425        SPSSTART           CA       EDOT                                  
065626,000129: 17,3740           61750                           AD       E                                     
065627,000130: 17,3741           00006                           EXTEND                                         
065628,000131: 17,3742           71411                           MP       DKDB                                  #  PAD LOADED DEADBAND. FRESHSTART: 1.4 DEG
065629,000132: 17,3743           00006                           EXTEND                                         
065630,000133: 17,3744           13761                           BZF      TJZERO                                
065631,000134: 
065632,000135: 17,3745           00006                           EXTEND                                         
065633,000136: 17,3746           63755                           BZMF     +7                                    
065634,000137: 17,3747           31425                           CA       EDOT                                  
065635,000138: 17,3750           63664                           AD       RATELIM2                              
065636,000139: 17,3751           00006                           EXTEND                                         
065637,000140: 17,3752           63761                           BZMF     TJZERO                                
065638,000141: 17,3753           44736        NEGTHRST           CS       HALF                                  
065639,000142: 17,3754           13714                           TCF      POSTHRST   +1                         
065640,000143: 17,3755           43664                 +7        CS       RATELIM2                              
065641,000144: 17,3756           61425                           AD       EDOT                                  
065642,000145: 17,3757           00006                           EXTEND                                         
065643,000146: 17,3760           63713                           BZMF     POSTHRST                              
065644,000147: 17,3761           34755        TJZERO             CA       ZERO                                  
065645,000148: 17,3762           13714                           TCF      POSTHRST   +1                         
065646,000149: 
065647,000150: 
065648,000151: 17,3763     4766               RATELIM1           =        CALLCODE                              #  = 00032, CORRESPONDING TO 1.73 DEG/SEC
065649,000152: 17,3763     4767               RATEDB1            =        TBUILDFX                              #   = 00045, CORRESPONDS TO 0.101 DEG/SEC

End of include-file SPS_BACK-UP_RCS_CONTROL.agc.  Parent file is MAIN.agc