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.

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

Page 1495

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

Page 1496

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

Page 1497

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

Page 1498

066174,000174: 21,3660           00006                           EXTEND                                         
066175,000175: 21,3661           71411                           MP       DKDB                                  #  PAD LOADED DEADBAND. FRESHSTART: 1.4 DEG
066176,000176: 21,3662           00006                           EXTEND                                         
066177,000177: 21,3663           13700                           BZF      TJZERO                                
066178,000178: 
066179,000179: 21,3664           00006                           EXTEND                                         
066180,000180: 21,3665           63674                           BZMF     +7                                    
066181,000181: 21,3666           31427                           CA       EDOT                                  
066182,000182: 21,3667           63560                           AD       RATELIM2                              
066183,000183: 21,3670           00006                           EXTEND                                         
066184,000184: 21,3671           63700                           BZMF     TJZERO                                
066185,000185: 21,3672           44736        NEGTHRST           CS       HALF                                  
066186,000186: 21,3673           13562                           TCF      POSTHRST   +1                         
066187,000187: 21,3674           43560                 +7        CS       RATELIM2                              
066188,000188: 21,3675           61427                           AD       EDOT                                  
066189,000189: 21,3676           00006                           EXTEND                                         
066190,000190: 21,3677           63561                           BZMF     POSTHRST                              
066191,000191: 21,3700           34755        TJZERO             CA       ZERO                                  
066192,000192: 21,3701           13562                           TCF      POSTHRST   +1                         
066193,000193: 
066194,000194: 
066195,000195: 21,3702     4766               RATELIM1           =        CALLCODE                              #  = 00032, CORRESPONDING TO 1.73 DEG/SEC
066196,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