Source Code

These source-code files were transcribed from a printout in Don Eyles's personal collection, scanned by archive.org, and financially sponsored by Linden Sims. A team of volunteers performed the transcription and proof-reading. The scanned page images are available at the Virtual AGC Project website, as well as higher-quality (but much larger) images at the Virtual AGC Project's collection in the Internet Archive. Report any problems by creating "issues" at the Virtual AGC Project's GitHub Repository.

Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 56 OF AGC PROGRAM ZERLINA BY ZOROASTER
	9:12 OCT. 21,1970
Note that the date is the date of the printout, not the date of the program revision.

065985,000002:                                                                                                  ## Copyright:   Public domain.
065986,000003:                                                                                                  ## Filename:    SPS_BACK-UP_RCS_CONTROL.agc
065987,000004:                                                                                                  ## Purpose:     A log section of Zerlina 56, the final revision of
065988,000005:                                                                                                  ##              Don Eyles's offline development program for the variable 
065989,000006:                                                                                                  ##              guidance period servicer. It also includes a new P66 with LPD 
065990,000007:                                                                                                  ##              (Landing Point Designator) capability, based on an idea of John 
065991,000008:                                                                                                  ##              Young's. Neither of these advanced features were actually flown,
065992,000009:                                                                                                  ##              but Zerlina was also the birthplace of other big improvements to
065993,000010:                                                                                                  ##              Luminary including the terrain model and new (Luminary 1E)
065994,000011:                                                                                                  ##              analog display programs. Zerlina was branched off of Luminary 145,
065995,000012:                                                                                                  ##              and revision 56 includes all changes up to and including Luminary
065996,000013:                                                                                                  ##              183. It is therefore quite close to the Apollo 14 program,
065997,000014:                                                                                                  ##              Luminary 178, where not modified with new features.
065998,000015:                                                                                                  ## Reference:   pp. 1495-1498
065999,000016:                                                                                                  ## Assembler:   yaYUL
066000,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
066001,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
066002,000019:                                                                                                  ## Mod history: 2017-07-28 MAS  Created from Luminary 210.
066003,000020:                                                                                                  ##              2017-08-29 RSB  Transcribed.
066004,000021: 

Page 1495

066006,000023:                                                                                                  #  PROGRAM NAME:  SPSRCS
066007,000024: 
066008,000025:                                                                                                  #  AUTHOR:  EDGAR M. OSHIKA (AC ELECTRONICS)
066009,000026: 
066010,000027:                                                                                                  #  MODIFIED:  TO RETURN TO ALL AXES VIA Q BY P.S.WEISSMAN, OCT 7, 1968
066011,000028: 
066012,000029:                                                                                                  #  MODIFIED TO IMPROVE BENDING STABILITY BY G.KALAN,FEB.14,1969
066013,000030:                                                                                                  #  FUNCTIONAL DESCRIPTION:
066014,000031: 
066015,000032:                                                                                                  #  THIS PROGRAM CONTROLS THE FIRING OF ALL RCS JETS IN THE DOCKED CONFIGURATION ACCORDING TO THE FOLLOWING PHASE
066016,000033:                                                                                                  #  PLANE LOGIC.
066017,000034: 
066018,000035:                                                                                                  #  1. JET SENSE TEST (SPSRCS)
066019,000036: 
066020,000037:                                                                                                  #  IF JETS ARE FIRING NEGATIVELY,SET OLDSENSE NEGATIVE AND CONTINUE
066021,000038:                                                                                                  #  IF JETS ARE FIRING POSITIVELY,SET OLDSENSE POSITIVE AND CONTINUE
066022,000039:                                                                                                  #  IF JETS ARE NOT FIRING,SET OLDSENSE TO ZERO AND GO TO OUTER RATE LIMIT  TEST
066023,000040: 
066024,000041:                                                                                                  #  2. RATE DEAD BAND TEST
066025,000042: 
066026,000043:                                                                                                  #  IF JETS ARE FIRING NEGATIVELY AND RATE IS GREATER THAN TARGET RATE,LEAVE
066027,000044:                                                                                                  #  JETS ON AND GO TO INHIBITION LOGIC. OTHERWISE,CONTINUE.
066028,000045:                                                                                                  #  IF JETS ARE FIRING POSITIVELY AND RATE IS   LESS  THAN TARGET RATE,LEAVE
066029,000046:                                                                                                  #  JETS ON AND GO TO INHIBITION LOGIC. OTHERWISE,CONTINUE.
066030,000047: 
066031,000048:                                                                                                  #  3. OUTER RATE LIMIT TEST (SPSSTART)
066032,000049: 
066033,000050:                                                                                                  #  IF MAGNITUDE OF EDOT IS GREATER THAN 1.73 DEG/SEC SET JET FIRING TIME
066034,000051:                                                                                                  #   TO REDUCE RATE AND GO TO INHIBITION LOGIC. OTHERWISE,CONTINUE.
066035,000052: 
066036,000053:                                                                                                  #  4. COAST ZONE TEST
066037,000054: 
066038,000055:                                                                                                  #  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-
066039,000056:                                                                                                  #  TIVE AND CONTINUE. OTHERWISE,SET JET FIRING TIME TO ZERO AND CONTINUE.
066040,000057:                                                                                                  #  IF STATE IS ABOVE LINE  E + 4X EDOT > +1.4 DEG AND EDOT IS GREATER THAN -1.30 DEG/SEC, SET JET TIME NEGATIVE
066041,000058:                                                                                                  #  AND CONTINUE. OTHERWISE,SET JET FIRING TIME TO ZERO AND CONTINUE.
066042,000059: 
066043,000060:                                                                                                  #  5. INHIBITION LOGIC
066044,000061: 
066045,000062:                                                                                                  #  IF OLDSENSE IS NON-ZERO:
066046,000063:                                                                                                  #        A) RETURN IF JET TIME HAS SAME SIGN AS OLDSENSE
066047,000064:                                                                                                  #        B) SET INHIBITION COUNTER*AND RETURN IF JET TIME IS ZERO
066048,000065:                                                                                                  #        C) SET INHIBITION COUNTER,*SET JET TIME TO ZERO AND RETURN IF SIGN
066049,000066:                                                                                                  #           OF JET TIME IS OPPOSITE TO THAT OF OLDSENSE
066050,000067: 
066051,000068:                                                                                                  #  IF OLDSENSE IS ZERO:
066052,000069:                                                                                                  #        A) RETURN IF INHIBITION COUNTER IS NOT POSITIVE
066053,000070:                                                                                                  #        B) SET JET TIME TO ZERO AND RETURN IF INHIBITION COUNTER IS POSITIVE
066054,000071:                                                                                                  #  *NOTE: INHIBITION COUNTERS CAN BE SET TO 4 OR 10 FOR THE P,AND UV AXES,
066055,000072:                                                                                                  #  RESPECTIVELY,IN SPSRCS. THEY ARE DECREMENTED BY ONE AT THE BEGINNING OF

Page 1496

066057,000074:                                                                                                  #  EACH DAP PASS.
066058,000075: 
066059,000076:                                                                                                  #  THE MINIMUM PULSE WIDTH OF THIS CONTROLLER IS DETERMINED BY THE REPETITION  RATE AT WHICH THIS ROUTINE IS CALLED
066060,000077:                                                                                                  #  AND IS NOMINALLY 100 MS FOR ALL AXES IN DRIFTING FLIGHT.   DURING POWERED FLIGHT THE MINIMUM IS 100 MS FOR THE
066061,000078:                                                                                                  #  P AXIS AND 200 MS FOR THE CONTROL OF THE U AND V AXES.
066062,000079: 
066063,000080:                                                                                                  #  CALLING SEQUENCE:
066064,000081: 
066065,000082:                                                                                                  #           INHINT
066066,000083:                                                                                                  #                      TC     IBNKCALL
066067,000084:                                                                                                  #                      CADR   SPSRCS
066068,000085: 
066069,000086: 
066070,000087:                                                                                                  #  EXIT:
066071,000088:                                                                                                  #           TC     Q
066072,000089:                                                                                                  #  ALARM/ABORT MODE:    NONE
066073,000090: 
066074,000091:                                                                                                  #  SUBROUTINES CALLED:    NONE
066075,000092: 
066076,000093:                                                                                                  #  INPUT:      E,EDOT
066077,000094:                                                                                                  #              TJP, TJV, TJU                   TJ MUST NOT BE NEGATIVE ZERO
066078,000095: 
066079,000096:                                                                                                  #  OUTPUT:     TJP, TJV, TJU
066080,000097: 
066081,000098: 
066082,000099: 21,3560                                           BANK     21                                    
066083,000100: 21,2000                                           SETLOC   DAPS4                                 
066084,000101: 21,2000                                           BANK                                           
066085,000102: 
066086,000103: 21,3560                                           COUNT*   $$/DAPBU                              
066087,000104: 
066088,000105: 21,3560  E6,1525                                  EBANK=   TJU                                   
066089,000106: 21,3560           00632        RATELIM2           OCT      00632                                 #  1.125 DEG/SEC
066090,000107: 21,3561           34736        POSTHRST           CA       HALF                                  
066091,000108: 
066092,000109: 21,3562           51505                           NDX      AXISCTR                               
066093,000110: 21,3563           55525                           TS       TJU                                   
066094,000111: 21,3564           11744                           CCS      OLDSENSE                              
066095,000112: 21,3565           13605                           TCF      POSCHECK                              #  JETS FIRING POSITIVELY
066096,000113: 21,3566           13610                           TCF      CTRCHECK                              #  JETS OFF. CHECK INHIBITION CTR
066097,000114: 21,3567           51505        NEGCHECK           INDEX    AXISCTR                               #  JETS FIRING NEGATIVELY
066098,000115: 21,3570           41525                           CS       TJU                                   
066099,000116: 21,3571           10000                           CCS      A                                     
066100,000117: 21,3572           00002                           TC       Q                                     #  RETURN
066101,000118: 21,3573           13575                           TCF      +2                                    
066102,000119: 21,3574           13575                           TCF      +1                                    #  JETS COMMANDED OFF.SET CTR AND RETURN
066103,000120: 21,3575           51505        SETCTR             INDEX    AXISCTR                               #  JET FIRING REVERSAL COMMANDED. SET CTR,
066104,000121: 21,3576           33617                           CA       UTIME                                 #  SET JET TIME TO ZERO,AND RETURN

Page 1497

066106,000123: 21,3577           51505                           INDEX    AXISCTR                               
066107,000124: 21,3600           55767                           TS       UJETCTR                               
066108,000125: 21,3601           34755        ZAPTJ              CA       ZERO                                  
066109,000126: 21,3602           51505                           INDEX    AXISCTR                               
066110,000127: 21,3603           55525                           TS       TJU                                   
066111,000128: 21,3604           00002                           TC       Q                                     
066112,000129: 21,3605           51505        POSCHECK           INDEX    AXISCTR                               
066113,000130: 21,3606           31525                           CA       TJU                                   
066114,000131: 21,3607           13571                           TCF      NEGCHECK   +2                         
066115,000132: 21,3610           51505        CTRCHECK           INDEX    AXISCTR                               #  CHECK JET INHIBITION COUNTER
066116,000133: 21,3611           11767                           CCS      UJETCTR                               
066117,000134: 21,3612           13614                           TCF      +2                                    
066118,000135: 21,3613           00002                           TC       Q                                     #  CTR IS NOT POSITIVE. RETURN
066119,000136: 21,3614           13601                           TCF      ZAPTJ                                 #  CTR IS POSITIVE.INHIBIT FIRINGS
066120,000137: 21,3615           00002                           TC       Q                                     #  CTR IS NOT POSITIVE.RETURN
066121,000138: 21,3616           00004                           OCT      00004                                 
066122,000139: 21,3617           00012        UTIME              OCT      00012                                 
066123,000140: 21,3620           00012                           OCT      00012                                 
066124,000141: 21,3621           44753        NEGFIRE            CS       ONE                                   #  JETS FIRING NEGATIVELY
066125,000142: 21,3622           55744                           TS       OLDSENSE                              
066126,000143: 21,3623           31427                           CA       EDOT                                  
066127,000144: 21,3624           13630                           TCF      +4                                    
066128,000145: 21,3625           34753        PLUSFIRE           CA       ONE                                   
066129,000146: 21,3626           55744                           TS       OLDSENSE                              
066130,000147: 21,3627           41427                           CS       EDOT                                  #  RATE DEAD BAND TEST
066131,000148: 21,3630           22000                           LXCH     A                                     
066132,000149: 21,3631           40111                           CS       DAPBOOLS                              #  IF DRIFTBIT = 1, USE ZERO TARGET RATE
066133,000150: 21,3632           74744                           MASK     DRIFTBIT                              #  IF DRIFTBIT = 0, USE 0.10 RATE TARGET
066134,000151: 21,3633           10000                           CCS      A                                     
066135,000152: 21,3634           34767                           CA       RATEDB1                               
066136,000153: 21,3635           60001                           AD       L                                     
066137,000154: 21,3636           00006                           EXTEND                                         
066138,000155: 21,3637           63647                           BZMF     SPSSTART                              
066139,000156: 21,3640           13564                           TCF      POSTHRST   +3                         
066140,000157: 
066141,000158: 21,3641           51505        SPSRCS             INDEX    AXISCTR                               #  JET SENSE TEST
066142,000159: 21,3642           11525                           CCS      TJU                                   
066143,000160: 21,3643           13625                           TCF      PLUSFIRE                              #  JETS FIRING POSITIVELY
066144,000161: 21,3644           13646                           TCF      +2                                    
066145,000162: 21,3645           13621                           TCF      NEGFIRE                               #  JETS FIRING NEGATIVELY
066146,000163: 21,3646           55744                           TS       OLDSENSE                              #  JETS OFF
066147,000164: 21,3647           31427        SPSSTART           CA       EDOT                                  #  OUTER RATE LIMIT TEST
066148,000165: 21,3650           00006                           EXTEND                                         
066149,000166: 21,3651           74766                           MP       RATELIM1                              
066150,000167: 21,3652           10000                           CCS      A                                     
066151,000168: 21,3653           13672                           TCF      NEGTHRST                              #  OUTER RATE LIMIT EXCEEDED
066152,000169: 21,3654           13656                           TCF      +2                                    
066153,000170: 21,3655           13561                           TCF      POSTHRST                              #  OUTER RATE LIMIT EXCEEDED
066154,000171: 21,3656           31427                           CA       EDOT                                  #  COAST ZONE TEST
066155,000172: 21,3657           61751                           AD       E                                     

Page 1498

066157,000174: 21,3660           00006                           EXTEND                                         
066158,000175: 21,3661           71411                           MP       DKDB                                  #  PAD LOADED DEADBAND. FRESHSTART: 1.4 DEG
066159,000176: 21,3662           00006                           EXTEND                                         
066160,000177: 21,3663           13700                           BZF      TJZERO                                
066161,000178: 
066162,000179: 21,3664           00006                           EXTEND                                         
066163,000180: 21,3665           63674                           BZMF     +7                                    
066164,000181: 21,3666           31427                           CA       EDOT                                  
066165,000182: 21,3667           63560                           AD       RATELIM2                              
066166,000183: 21,3670           00006                           EXTEND                                         
066167,000184: 21,3671           63700                           BZMF     TJZERO                                
066168,000185: 21,3672           44736        NEGTHRST           CS       HALF                                  
066169,000186: 21,3673           13562                           TCF      POSTHRST   +1                         
066170,000187: 21,3674           43560                 +7        CS       RATELIM2                              
066171,000188: 21,3675           61427                           AD       EDOT                                  
066172,000189: 21,3676           00006                           EXTEND                                         
066173,000190: 21,3677           63561                           BZMF     POSTHRST                              
066174,000191: 21,3700           34755        TJZERO             CA       ZERO                                  
066175,000192: 21,3701           13562                           TCF      POSTHRST   +1                         
066176,000193: 
066177,000194: 
066178,000195: 21,3702     4766               RATELIM1           =        CALLCODE                              #  = 00032, CORRESPONDING TO 1.73 DEG/SEC
066179,000196: 21,3702     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