forked from chrislgarry/Apollo-11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
S-BAND_ANTENNA_FOR_LM.s
201 lines (195 loc) · 4.57 KB
/
S-BAND_ANTENNA_FOR_LM.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# Copyright: Public domain.
# Filename: S-BAND_ANTENNA_FOR_LM.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 486-489
# Mod history: 2009-05-17 RSB Adapted from the corresponding
# Luminary131 file, using page
# images from Luminary 1A.
# 2009-06-07 RSB Corrected a misprint.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 486
# SUBROUTINE NAME: R05 -- S-BAND ANTENNA FOR LM
#
# MOD0 BY T. JAMES
# MOD1 BY P. SHAKIR
#
# FUNCTIONAL DESCRIPTION
#
# THE S-BAND ANTENNA ROUTINE, R05, COMPUTES AND DISPLAYS THE PITCH AND
# YAW ANTENNA GIMBAL ANGLES REQUIRED TO POINT THE LM STEERABLE ANTENNA
# TOWARD THE CENTER OF THE EARTH. THIS ROUTINE IS SELECTED BY THE ASTRO-
# NAUT VIA DSKY ENTRY DURING COASTING FLIGHT OR WHEN THE LM IS ON THE MOON
# SURFACE. THE EARTH OR MOON REFERENCE COORDINATE SYSTEM IS USED DEPENDING
# ON WHETHER THE LM IS ABOUT TO ENTER OR HAS ALREADY ENTERED THE MOON
# SPHERE OF INFLUENCE, RESPECTIVELY.
#
# TO CALL SUBROUTINE, ASTRONAUT KEYS IN V 64 E
#
# SUBROUTINES CALLED ---
# R02BOTH
# INTPRET
# LOADTIME
# LEMCONIC
# LUNPOS
# CDUTRIG
# *SMNB*
# BANKCALL
# B50OFF
# ENDOFJOB
# BLANKRET
#
# RETURNS WITH
# PITCH ANGLE IN PITCHANG REV. B0
# YAW ANGLE IN YAWANG REV. B0
#
# ERASABLES USED
# PITCHANG
# YAWANG
# RLM
# VAC AREA
BANK 41
SETLOC SBAND
BANK
EBANK= WHOCARES
COUNT* $$/R05
SBANDANT TC BANKCALL
# Page 487
CADR R02BOTH # CHECK IF IMU IS ON AND ALIGNED
TC INTPRET
SETPD RTB
0D
LOADTIME # PICK UP CURRENT TIME
STCALL TDEC1 # ADVANCE INTEGRATION TO TIME IN TDEC1
LEMCONIC # USING CONIC INTEGRATION
SLOAD BHIZ
X2 # X2 =0 EARTH SPHERE, X2 =2 MOON SPHERE
CONV4
VLOAD
RATT
STODL RLM
TAT
CONV3 CALL
LUNPOS # UNIT POSITION VECTOR FROM EARTH TO MOON
VLOAD VXSC
VMOON
REMDIST # MEAN DISTANCE FROM EARTH TO MOON
VSL1 VAD
RLM
GOTO
CONV5
CONV4 VLOAD
RATT # UE = -UNIT(RATT) EARTH SPHERE
CONV5 SETPD UNIT # UE = -UNIT((REM)(UEM) + RL) MOON SPHERE
0D # SET PL POINTER TO 0
VCOMP CALL
CDUTRIG # COMPUTE SINES AND COSINES OF CDU ANGLES
MXV VSL1 # TRANSFORM REF. COORDINATE SYSTEM TO
REFSMMAT # STABLE MEMBER B-1 X B-1 X B+1 = B-1
PUSH DLOAD # 8D
HI6ZEROS
STORE PITCHANG
STOVL YAWANG # ZERO OUT ANGLES
CALL
*SMNB*
STODL RLM # PRE-MULTIPLY RLM BY (NBSA) MATRIX(B0)
RLM +2
PUSH DSU
RLM
DMP
1OVSQRT2
STODL RLM +2
DAD DMP
RLM
1OVSQRT2
STOVL RLM # R B-1
RLM
UNIT PDVL
# Page 488
RLM
VPROJ VSL2 # PROJECTION OF R ONTO LM XZ PLANE.
HIUNITY
BVSU BOV # CLEAR OVERFLOW INDICATOR IF ON
RLM
COVCNV
COVCNV UNIT BOV # EXIT ON OVERFLOW
SBANDEX
PUSH VXV # URP VECTOR B-1
HIUNITZ
VSL1 VCOMP # UZ X URP = -(URP X UZ)
STORE RLM # X VEC B-1
DOT PDVL # SGN(X.UY) UNSCALED
HIUNITY
RLM
ABVAL SIGN
ASIN # ASIN((SGN(X.UY))ABV(X)) REV B0
STOVL PITCHANG
URP
DOT BPL
HIUNITZ
NOADJUST # YES, -90 TO +90
DLOAD DSU
HIDPHALF
PITCHANG
STORE PITCHANG
NOADJUST VLOAD VXV
UR # Z = (UR X URP)
URP
VSL1
STODL RLM # Z VEC B-1
PITCHANG
SIN VXSC
HIUNITZ
PDDL COS
PITCHANG
VXSC VSU
HIUNITX # (UX COS ALPHA) - (UZ SIN ALPHA)
DOT PDVL # YAW.Z
RLM
RLM
ABVAL SIGN
ASIN
STORE YAWANG
SBANDEX EXIT
CA EXTVBACT
MASK BIT5 # IS BIT5 STILL ON
EXTEND
BZF ENDEXT # NO
CAF PRIO5
# Page 489
TC PRIOCHNG
CAF V06N51 # DISPLAY ANGLES
TC BANKCALL
CADR GOMARKFR
TC B5OFF # TERMINATE
TC B5OFF # PROCEED
TC ENDOFJOB # RECYCLE
CAF BIT3 # IMMEDIATE RETURN
TC BLANKET # BLANK R3
CAF PRIO4
TC PRIOCHNG
TC SBANDANT +2 # YES, CONTINUE DISPLAYING ANGLES.
V06N51 VN 0651
1OVSQRT2 2DEC .7071067815 # 1/SQRT(2)
UR EQUALS 0D
URP EQUALS 6D
SBANK= LOWSUPER
# END OF LNYAIDE .001 ***