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.

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

Page 1500

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

Page 1501

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

Page 1502

065634,000128: 17,3737           31425        SPSSTART           CA       EDOT                                  
065635,000129: 17,3740           61750                           AD       E                                     
065636,000130: 17,3741           00006                           EXTEND                                         
065637,000131: 17,3742           71411                           MP       DKDB                                  #  PAD LOADED DEADBAND. FRESHSTART: 1.4 DEG
065638,000132: 17,3743           00006                           EXTEND                                         
065639,000133: 17,3744           13761                           BZF      TJZERO                                
065640,000134: 
065641,000135: 17,3745           00006                           EXTEND                                         
065642,000136: 17,3746           63755                           BZMF     +7                                    
065643,000137: 17,3747           31425                           CA       EDOT                                  
065644,000138: 17,3750           63664                           AD       RATELIM2                              
065645,000139: 17,3751           00006                           EXTEND                                         
065646,000140: 17,3752           63761                           BZMF     TJZERO                                
065647,000141: 17,3753           44736        NEGTHRST           CS       HALF                                  
065648,000142: 17,3754           13714                           TCF      POSTHRST   +1                         
065649,000143: 17,3755           43664                 +7        CS       RATELIM2                              
065650,000144: 17,3756           61425                           AD       EDOT                                  
065651,000145: 17,3757           00006                           EXTEND                                         
065652,000146: 17,3760           63713                           BZMF     POSTHRST                              
065653,000147: 17,3761           34755        TJZERO             CA       ZERO                                  
065654,000148: 17,3762           13714                           TCF      POSTHRST   +1                         
065655,000149: 
065656,000150: 
065657,000151: 17,3763     4766               RATELIM1           =        CALLCODE                              #  = 00032, CORRESPONDING TO 1.73 DEG/SEC
065658,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