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.

022072,000002:                                                                                                  ## Copyright:   Public domain.
022073,000003:                                                                                                  ## Filename:    S-BAND_ANTENNA_FOR_LM.agc
022074,000004:                                                                                                  ## Purpose:     A log section of Zerlina 56, the final revision of
022075,000005:                                                                                                  ##              Don Eyles's offline development program for the variable 
022076,000006:                                                                                                  ##              guidance period servicer. It also includes a new P66 with LPD 
022077,000007:                                                                                                  ##              (Landing Point Designator) capability, based on an idea of John 
022078,000008:                                                                                                  ##              Young's. Neither of these advanced features were actually flown,
022079,000009:                                                                                                  ##              but Zerlina was also the birthplace of other big improvements to
022080,000010:                                                                                                  ##              Luminary including the terrain model and new (Luminary 1E)
022081,000011:                                                                                                  ##              analog display programs. Zerlina was branched off of Luminary 145,
022082,000012:                                                                                                  ##              and revision 56 includes all changes up to and including Luminary
022083,000013:                                                                                                  ##              183. It is therefore quite close to the Apollo 14 program,
022084,000014:                                                                                                  ##              Luminary 178, where not modified with new features.
022085,000015:                                                                                                  ## Reference:   pp. 494-497
022086,000016:                                                                                                  ## Assembler:   yaYUL
022087,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
022088,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
022089,000019:                                                                                                  ## Mod history: 2017-07-28 MAS  Created from Luminary 210.
022090,000020:                                                                                                  ##              2017-08-20 MAS  Updated for Zerlina 56.
022091,000021: 

Page 494

022093,000023:                                                                                                  #  SUBROUTINE NAME: R05 - S-BAND ANTENNA FOR LM
022094,000024: 
022095,000025:                                                                                                  #  MOD0 BY T. JAMES
022096,000026:                                                                                                  #  MOD1 BY P. SHAKIR
022097,000027: 
022098,000028:                                                                                                  #  FUNCTIONAL DESCRIPTION
022099,000029: 
022100,000030:                                                                                                  #      THE S-BAND ANTENNA ROUTINE, R05, COMPUTES AND DISPLAYS THE PITCH AND
022101,000031:                                                                                                  #  YAW ANTENNA GIMBAL ANGLES REQUIRED TO POINT THE LM STEERABLE ANTENNA
022102,000032:                                                                                                  #  TOWARD THE CENTER OF THE EARTH. THIS ROUTINE IS SELECTED BY THE ASTRO-
022103,000033:                                                                                                  #  NAUT VIA DSKY ENTRY DURING COASTING FLIGHT OR WHEN THE LM IS ON THE MOON
022104,000034:                                                                                                  #  SURFACE. THE EARTH OR MOON REFERENCE COORDINATE SYSTEM IS USED DEPENDING
022105,000035:                                                                                                  #  ON WHETHER THE LM IS ABOUT TO ENTER OR HAS ALREADY ENTERED THE MOON
022106,000036:                                                                                                  #  SPHERE OF INFLUENCE, RESPECTIVELY.  CAN BE CALLED ANY TIME EXCEPT WHEN
022107,000037:                                                                                                  #  ANOTHER EXTENDED VERB IS IN USE. DISPLAY IS MEANINGLESS WITH IMU OFF.
022108,000038: 
022109,000039:                                                                                                  #  TO CALL SUBROUTINE, ASTRONAUT KEYS IN V 64 E
022110,000040: 
022111,000041:                                                                                                  #  SUBROUTINES CALLED-
022112,000042: 
022113,000043:                                                                                                  #      INTPRET
022114,000044:                                                                                                  #      LOADTIME
022115,000045:                                                                                                  #      LEMCONIC
022116,000046:                                                                                                  #      LUNPOS
022117,000047:                                                                                                  #      CDUTRIG
022118,000048:                                                                                                  #      *SMNB*
022119,000049:                                                                                                  #      BANKCALL
022120,000050:                                                                                                  #      B5OFF
022121,000051:                                                                                                  #      ENDOFJOB
022122,000052:                                                                                                  #      BLANKET
022123,000053: 
022124,000054:                                                                                                  #  RETURNS WITH
022125,000055: 
022126,000056:                                                                                                  #      PITCH ANGLE IN PITCHANG  REV. B0
022127,000057:                                                                                                  #      YAW ANGLE IN YAWANG  REV. B0
022128,000058: 
022129,000059:                                                                                                  #  ERASABLES USED
022130,000060: 
022131,000061:                                                                                                  #      PITCHANG
022132,000062:                                                                                                  #      YAWANG
022133,000063:                                                                                                  #      RLM
022134,000064:                                                                                                  #      VAC AREA
022135,000065: 
022136,000066: 41,3775                                           BANK     41                                    
022137,000067: 42,2000                                           SETLOC   SBAND                                 
022138,000068: 42,2000                                           BANK                                           
022139,000069: 
022140,000070: 42,3614  E7,1471                                  EBANK=   WHOCARES                              
022141,000071: 42,3614                                           COUNT*   $$/R05                                
022142,000072: 42,3614           06051        SBANDANT           TC       INTPRET                               

Page 495

022144,000074: 42,3615           47001                           SETPD    RTB                                   
022145,000075: 42,3616           00001                                    0D                                    
022146,000076: 42,3617           21555                                    LOADTIME                              #  PICK UP CURRENT TIME
022147,000077: 42,3620           34041                           STCALL   TDEC1                                 #  ADVANCE INTEGRATION TO TIME IN TDEC1
022148,000078: 42,3621           27077                                    LEMCONIC                              #  USING CONIC INTEGRATION
022149,000079: 42,3622           46135                           SLOAD    BHIZ                                  
022150,000080: 42,3623           00050                                    X2                                    #  X2 =0 EARTH SPHERE, X2 =2 MOON SPHERE
022151,000081: 42,3624           65642                                    CONV4                                 
022152,000082: 42,3625           77775                           VLOAD                                          
022153,000083: 42,3626           00001                                    RATT                                  
022154,000084: 42,3627           16176                           STODL    RLM                                   
022155,000085: 42,3630           00015                                    TAT                                   
022156,000086: 42,3631           77624        CONV3              CALL                                           
022157,000087: 42,3632           33660                                    LUNPOS                                #  UNIT POSITION VECTOR FROM EARTH TO MOON
022158,000088: 42,3633           74375                           VLOAD    VXSC                                  
022159,000089: 42,3634           02723                                    VMOON                                 
022160,000090: 42,3635           24001                                    REMDIST                               #  MEAN DISTANCE FROM EARTH TO MOON
022161,000091: 42,3636           53372                           VSL1     VAD                                   
022162,000092: 42,3637           02176                                    RLM                                   
022163,000093: 42,3640           77650                           GOTO                                           
022164,000094: 42,3641           65644                                    CONV5                                 
022165,000095: 42,3642           77775        CONV4              VLOAD                                          
022166,000096: 42,3643           00001                                    RATT                                  #  UE = -UNIT(RATT)  EARTH SPHERE
022167,000097: 42,3644           53401        CONV5              SETPD    UNIT                                  #  UE = -UNIT((REM)(UEM) + RL)  MOON SPHERE
022168,000098: 42,3645           00001                                    0D                                    #  SET PL POINTER TO 0
022169,000099: 42,3646           45076                           VCOMP    CALL                                  
022170,000100: 42,3647           47535                                    CDUTRIG                               #  COMPUTE SINES AND COSINES OF CDU ANGLES
022171,000101: 42,3650           76521                           MXV      VSL1                                  #  TRANSFORM REF. COORDINATE SYSTEM TO
022172,000102: 42,3651           01732                                    REFSMMAT                              #  STABLE MEMBER  B-1 X B-1 X B+1 = B-1
022173,000103: 42,3652           71206                           PUSH     DLOAD                                 #  8D
022174,000104: 42,3653           06520                                    HI6ZEROS                              
022175,000105: 42,3654           02172                           STORE    PITCHANG                              
022176,000106: 42,3655           26174                           STOVL    YAWANG                                #  ZERO OUT ANGLES
022177,000107: 42,3656           77624                           CALL                                           
022178,000108: 42,3657           47676                                    *SMNB*                                
022179,000109: 42,3660           16176                           STODL    RLM                                   #  PRE-MULTIPLY RLM BY (NBSA) MATRIX(B0)
022180,000110: 42,3661           02200                                    RLM        +2                         
022181,000111: 42,3662           45206                           PUSH     DSU                                   
022182,000112: 42,3663           02176                                    RLM                                   
022183,000113: 42,3664           77605                           DMP                                            
022184,000114: 42,3665           25775                                    1OVSQRT2                              
022185,000115: 42,3666           16200                           STODL    RLM        +2                         
022186,000116: 42,3667           41215                           DAD      DMP                                   
022187,000117: 42,3670           02176                                    RLM                                   
022188,000118: 42,3671           25775                                    1OVSQRT2                              
022189,000119: 42,3672           26176                           STOVL    RLM                                   #  R  B-1
022190,000120: 42,3673           02176                                    RLM                                   
022191,000121: 42,3674           63256                           UNIT     PDVL                                  
022192,000122: 42,3675           02176                                    RLM                                   
022193,000123: 42,3676           72431                           VPROJ    VSL2                                  #  PROJECTION OF R ONTO LM XZ PLANE

Page 496

022195,000125: 42,3677           06514                                    HIUNITY                               
022196,000126: 42,3700           40045                           BVSU     BOV                                   #  CLEAR OVERFLOW INDICATOR IF ON
022197,000127: 42,3701           02176                                    RLM                                   
022198,000128: 42,3702           65703                                    COVCNV                                
022199,000129: 42,3703           40056        COVCNV             UNIT     BOV                                   #  EXIT ON OVERFLOW
022200,000130: 42,3704           65751                                    SBANDEX                               
022201,000131: 42,3705           47206                           PUSH     VXV                                   #  URP VECTOR  B-1
022202,000132: 42,3706           06512                                    HIUNITZ                               
022203,000133: 42,3707           57572                           VSL1     VCOMP                                 #  UZ X URP = -(URP X UZ)
022204,000134: 42,3710           02176                           STORE    RLM                                   #  X VEC  B-1
022205,000135: 42,3711           63241                           DOT      PDVL                                  #  SGN(X.UY) UNSCALED
022206,000136: 42,3712           06514                                    HIUNITY                               
022207,000137: 42,3713           02176                                    RLM                                   
022208,000138: 42,3714           75246                           ABVAL    SIGN                                  
022209,000139: 42,3715           77736                           ASIN                                           #  ASIN((SGN(X.UY))ABV(X)) REV B0
022210,000140: 42,3716           26172                           STOVL    PITCHANG                              
022211,000141: 42,3717           00007                                    URP                                   
022212,000142: 42,3720           51041                           DOT      BPL                                   
022213,000143: 42,3721           06512                                    HIUNITZ                               
022214,000144: 42,3722           65727                                    NOADJUST                              #  YES, -90 TO +90
022215,000145: 42,3723           45345                           DLOAD    DSU                                   
022216,000146: 42,3724           06516                                    HIDPHALF                              
022217,000147: 42,3725           02172                                    PITCHANG                              
022218,000148: 42,3726           02172                           STORE    PITCHANG                              
022219,000149: 42,3727           47375        NOADJUST           VLOAD    VXV                                   
022220,000150: 42,3730           00001                                    UR                                    #  Z = (UR X URP)
022221,000151: 42,3731           00007                                    URP                                   
022222,000152: 42,3732           77772                           VSL1                                           
022223,000153: 42,3733           16176                           STODL    RLM                                   #  Z VEC  B-1
022224,000154: 42,3734           02172                                    PITCHANG                              
022225,000155: 42,3735           74356                           SIN      VXSC                                  
022226,000156: 42,3736           06512                                    HIUNITZ                               
022227,000157: 42,3737           71525                           PDDL     COS                                   
022228,000158: 42,3740           02172                                    PITCHANG                              
022229,000159: 42,3741           52361                           VXSC     VSU                                   
022230,000160: 42,3742           06516                                    HIUNITX                               #  (UX COS ALPHA) - (UZ SIN ALPHA)
022231,000161: 42,3743           63241                           DOT      PDVL                                  #  YAW.Z
022232,000162: 42,3744           02176                                    RLM                                   
022233,000163: 42,3745           02176                                    RLM                                   
022234,000164: 42,3746           75246                           ABVAL    SIGN                                  
022235,000165: 42,3747           77736                           ASIN                                           
022236,000166: 42,3750           02174                           STORE    YAWANG                                
022237,000167: 42,3751           77776        SBANDEX            EXIT                                           
022238,000168: 42,3752           31043                           CA       EXTVBACT                              
022239,000169: 42,3753           74747                           MASK     BIT5                                  #  IS BIT5 STILL ON
022240,000170: 42,3754           00006                           EXTEND                                         
022241,000171: 42,3755           15503                           BZF      ENDEXT                                #  NO
022242,000172: 42,3756           35017                           CAF      PRIO5                                 
022243,000173: 42,3757           05146                           TC       PRIOCHNG                              
022244,000174: 42,3760           33773                           CAF      V06N51                                #  DISPLAY ANGLES
022245,000175: 

Page 497

022247,000177: 42,3761           04616                           TC       BANKCALL                              
022248,000178: 42,3762           20353                           CADR     GOMARKFR                              
022249,000179: 42,3763           05574                           TC       B5OFF                                 #  TERMINATE
022250,000180: 42,3764           05574                           TC       B5OFF                                 #  PROCEED
022251,000181: 42,3765           05155                           TC       ENDOFJOB                              #  RECYCLE
022252,000182: 42,3766           34751                           CAF      BIT3                                  #  IMMEDIATE RETURN
022253,000183: 42,3767           05475                           TC       BLANKET                               #  BLANK R3
022254,000184: 42,3770           34740                           CAF      PRIO4                                 
022255,000185: 42,3771           05146                           TC       PRIOCHNG                              
022256,000186: 42,3772           03614                           TC       SBANDANT                              #  YES, CONTINUE DISPLAYING ANGLES.
022257,000187: 42,3773           01463        V06N51             VN       0651                                  
022258,000188: 42,3774           26501 07463  1OVSQRT2           2DEC     .7071067815                            #  1/SQRT(2)
022259,000189: 
022260,000190: 42,3776                        UR                 EQUALS   0D                                    
022261,000191: 42,3776                        URP                EQUALS   6D                                    
022262,000192: 42,3776  30,2000                                  SBANK=   LOWSUPER                              

End of include-file S-BAND_ANTENNA_FOR_LM.agc.  Parent file is MAIN.agc