forked from virtualagc/virtualagc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSTABLE_ORBIT_-_P38-P39.agc
409 lines (390 loc) · 13.9 KB
/
STABLE_ORBIT_-_P38-P39.agc
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
### FILE="Main.annotation"
## Copyright: Public domain.
## Filename: STABLE_ORBIT_-_P38-P39.agc
## Purpose: A section of an attempt to reconstruct Sundance revision 306
## as closely as possible with available information. Sundance
## 306 is the source code for the Lunar Module's (LM) Apollo
## Guidance Computer (AGC) for Apollo 9. This program was created
## using the mixed-revision SundanceXXX as a starting point, and
## pulling back features from Luminary 69 believed to have been
## added based on memos, checklists, observed address changes,
## or the Sundance GSOPs.
## Assembler: yaYUL
## Contact: Ron Burkey <[email protected]>.
## Website: www.ibiblio.org/apollo/index.html
## Mod history: 2020-07-24 MAS Created from SundanceXXX.
# STABLE ORBIT RENDEZVOUS PROGRAMS (P38 AND P78)
#
# MOD NO -1 LOG SECTION - STABLE ORBIT - P38-P39
# MOD BY RUDNICKI.S DATE 25JAN68
#
# FUNCTIONAL DESCRIPTION
#
# P38 AND P78 CALCULATE THE REQUIRED DELTA V AND OTHER INITIAL
# CONDITIONS REQUIRED BY THE AGC TO (1) PUT THE ACTIVE VEHICLE
# ON A TRANSFER TRAJECTORY THAT INTERCEPTS THE PASSIVE VEHICLE
# ORBIT A GIVEN DISTANCE, DELTA R, EITHER AHEAD OF OR BEHIND THE
# PASSIVE VEHICLE AND (2) ACTUALLY PLACE THE ACTIVE VEHICLE IN THE
# PASSIVE VEHICLE ORBIT WITH A DELTA R SEPARATION BETWEEN THE TWO
# VEHICLES
#
# CALLING SEQUENCE
#
# ASTRONAUT REQUEST THRU DSKY
#
# V37E38E IF THIS VEHICLE IS ACTIVE VEHICLE
# V37E78E IF OTHER VEHICLE IS ACTIVE VEHICLE
#
# INPUT
#
# (1) SOI MANEUVER
#
# (A) TIG TIME OF SOI MANEUVER
# (B) CENTANG ORBITAL CENTRAL ANGLE OF THE PASSIVE VEHICLE
# DURING TRANSFER FROM TIG TO TIME OF INTERCEPT
# (C) DELTAR THE DESIRED SEPARATION OF THE TWO VEHICLES
# SPECIFIED AS A DISTANCE ALONG THE PASSIVE VEHICLE
# ORBIT
# (D) OPTION EQUALS 1 FOR SOI
#
# (2) SOR MANEUVER
#
# (A) TIG TIME OF SOR MANEUVER
# (B) CENTANG AN OPTIONAL RESPECIFICATION OF 1 (B) ABOVE
# (C) OPTION EQUALS 2 FOR SOR
# (D) DELTTIME THE TIME REQUIRED TO TRAVERSE DELTA R WHEN
# TRAVELING AT A VELOCITY EQUAL TO THE HORIZONTAL
# VELOCITY OF THE PASSIVE VEHICLE - SAVED FROM
# SOI PHASE
# (E) TINT TIME OF INTERCEPT (SOI) - SAVED FROM SOI PHASE
#
# OUTPUT
#
# (1) TRKMKCNT NUMBER OF MARKS
# (2) TTOGO TIME TO GO
# (3) +MGA MIDDLE GIMBAL ANGLE
# (4) DSPTEM1 TIME OF INTERCEPT OF PASSIVE VEHICLE ORBIT
# (FOR SOI ONLY)
# (5) POSTTPI PERIGEE ALTITUDE OF ACTIVE VEHICLE ORBIT AFTER
# THE SOI (SOR) MANEUVER
# (6) DELVTPI MAGNITUDE OF DELTA V AT SOI (SOR) TIME
# (7) DELVTPF MAGNITUDE OF DELTA V AT INTERCEPT TIME
# (8) DELVLVC DELTA VELOCITY AT SOI (AND SOR) - LOCAL VERTICAL
# COORDINATES
#
# SUBROUTINES USED
#
# AVFLAGA
# AVFLAGP
# VNDSPLY
# BANKCALL
# GOFLASHR
# GOTOPOOH
# BLANKET
# ENDOFJOB
# PREC/TT
# SELECTMU
# INTRPVP
# MAINRTNE
BANK 04
SETLOC STBLEORB
BANK
EBANK= SUBEXIT
COUNT* $$/P3879
P38 TC BANKCALL
CADR AVFLAGA # THIS VEHICLE ACTIVE
TC +3
P78 TC BANKCALL
CADR AVFLAGP # OTHER VEHICLE ACTIVE
CAF V06N33SR # DISPLAY TIG
TC VNDSPLY
CAF V06N55SR # DISPLAY CENTANG
TCR BANKCALL
CADR GOFLASHR
TCF GOTOPOOH # TERMINATE
TCF +5 # PROCEED
TCF -5 # RECYCLE
CAF THREE # IMMEDIATE RETURN - BLANK R1, R2
TCR BLANKET
TCF ENDOFJOB
CAF FIVE
TS OPTION1
CAF ONE
TS OPTION2 # OPTION CODE IS SET TO 1
CAF V04N06SR # DISPLAY OPTION CODE - 1 = SOI, 2 = SOR
TCR BANKCALL
CADR GOFLASHR
TCF GOTOPOOH # TERMINATE
TCF +5 # PROCEED
TCF -5 # RECYCLE
CAF BIT3 # IMMEDIATE RETURN - BLANK R3
TCR BLANKET
TCF ENDOFJOB
TC INTPRET
SLOAD SR1
OPTION2
BHIZ DLOAD
OPTN1
TINT
STORE TINTSOI # STORE FOR SOR PHASE
CLRGO
OPTNSW # OPTNSW; ON = SOI, OFF = SOR
JUNCTN1
OPTN1 SET CALL # SOI
OPTNSW
PREC/TT
DAD
TIG
STORE TINT # TI = TIG + TF
STORE DSPTEM1
EXIT
CAF V06N57SR # DISPLAY DELTA R
TCR BANKCALL
CADR GOFLASHR
TCF GOTOPOOH # TERMINATE
TCF +5 # PROCEED
TCF -5 # RECYCLE
CAF SIX # IMMEDIATE RETURN - BLANK R2, R3
TCR BLANKET
TCF ENDOFJOB
+5 CAF V06N34SR # DISPLAY TIME OF INTERCEPT
TC VNDSPLY
TC INTPRET
JUNCTN1 CLEAR CALL
P39/79SW
SELECTMU # SELECT MU, CLEAR FINALFLG, GO TO VN1645
RECYCLE CALL
PREC/TT
BOFF DLOAD
OPTNSW
OPTN2
TINT
STCALL TDEC1 # PRECISION UPDATE PASSIVE VEHICLE TO
INTRPVP # INTERCEPT TIME
VLOAD UNIT
RATT # RP/(RP)
PDVL VXV
VATT
ABVAL NORM # (VP X RP/(RP))
X1
PDDL DDV
DELTAR
SL* # DELTA R / (VP X RP/RP)
0 -7,1
STCALL DELTTIME # DELTA T = (RP) DELTA R / (VP X RP)
JUNCTN2
OPTN2 DLOAD DAD
TINTSOI
T
STORE TINT # TI = TI + TF
JUNCTN2 DLOAD DSU
TINT
DELTTIME
STORE TARGTIME # TT = TI - DELTA T
# .... MAINRTNE ....
#
# SUBROUTINES USED
#
# S3435.25
# PERIAPO1
# SHIFTR1
# VNDSPLY
# BANKCALL
# GOFLASH
# GOTOPOOH
# VN1645
MAINRTNE STCALL TDEC1 # PRECISION UPDATE PASSIVE VEHICLE TO
INTRPVP # TARGET TIME
DLOAD
TIG
STORE INTIME
SSP VLOAD
NORMEX
TEST3979
RATT
CALL
S3435.25
TEST3979 BOFF BON
P39/79SW
MAINRTN1
FINALFLG
P39P79
SET
UPDATFLG
P39P79 EXIT
TC DSPLY81 # FOR P39 AND P79
MAINRTN1 VLOAD ABVAL
DELVEET3
STOVL DELVTPI # DELTA V
VPASS4
VSU ABVAL
VTPRIME
STOVL DELVTPF # DELTA V (FINAL) = V'T - VT
RACT3
PDVL CALL
VIPRIME
PERIAPO1 # GET PERIGEE ALTITUDE
CALL
SHIFTR1
STORE POSTTPI
BON SET
FINALFLG
DSPLY58
UPDATFLG
DSPLY58 EXIT
CAF V06N58SR # DISPLAY HP, DELTA V, DELTA V (FINAL)
TC VNDSPLY
DSPLY81 CAF V06N81SR # DISPLAY DELTA V (LV)
TC VNDSPLY
TC INTPRET
CLEAR VLOAD
XDELVFLG
DELVEET3
STCALL DELVSIN
VN1645 # DISPLAY TRKMKCNT, TTOGO, +MGA
BON GOTO
P39/79SW
P39/P79B
RECYCLE
# STABLE ORBIT MIDCOURSE PROGRAM (P39 AND P79)
#
# MOD NO -1 LOG SECTION - STABLE ORBIT - P38-P39
# MOD BY RUDNICKI.S DATE 25JAN68
#
# FUNCTIONAL DESCRIPTION
#
# P39 AND P79 CALCULATE THE REQUIRED DELTA V AND OTHER INITIAL
# CONDITIONS REQUIRED BY THE AGC TO MAKE A MIDCOURSE CORRECTION
# MANEUVER AFTER COMPLETING THE SOI MANEUVER BUT BEFORE MAKING
# THE SOR MANEUVER
#
# CALLING SEQUENCE
#
# ASTRONAUT REQUEST THRU DSKY
#
# V37E39E IF THIS VEHICLE IS ACTIVE VEHICLE
# V37E79E IF OTHER VEHICLE IS ACTIVE VEHICLE
#
# INPUT
#
# (1) TPASS4 TIME OF INTERCEPT - SAVED FROM P38/P78
# (2) TARGTIME TIME THAT PASSIVE VEHICLE IS AT INTERCEPT POINT -
# SAVED FROM P38/P78
#
# OUTPUT
#
# (1) TRKMKCNT NUMBER OF MARKS
# (2) TTOGO TIME TO GO
# (3) +MGA MIDDLE GIMBAL ANGLE
# (4) DELVLVC DELTA VELOCITY AT MID - LOCAL VERTICAL COORDINATES
#
# SUBROUTINES USED
#
# AVFLAGA
# AVFLAGP
# LOADTIME
# SELECTMU
# PRECSET
# S34/35.1
# MAINRTNE
P39 TC BANKCALL
CADR AVFLAGA # THIS VEHICLE ACTIVE
EXTEND
DCA ATIGINC
TC P39/P79A
P79 TC BANKCALL
CADR AVFLAGP # OTHER VEHICLE ACTIVE
EXTEND
DCA PTIGINC
P39/P79A DXCH KT # TIME TO PREPARE FOR BURN
TC INTPRET
RTB DAD
LOADTIME
KT
STCALL TIG
SELECTMU # SELECT MU, CLEAR FINALFLG, GO TO VN1645
P39/P79C DLOAD SET
TIG
P39/79SW
STCALL TDEC1 # PRECISION UPDATE ACTIVE AND PASSIVE
PRECSET # VEHICLES TO TIG
CALL
S34/35.1 # GET UNIT NORMAL
DLOAD GOTO
TARGTIME
MAINRTNE # CALCULATE DELTA V AND DELTA V (LV)
P39/P79B RTB DAD
LOADTIME
KT
STCALL TIG # TIG = T (PRESENT) + PREPARATION TIME
P39/P79C
# .... PREC/TT ....
# SUBROUTINES USED
#
# PRECSET
# TIMETHET
# S34/35.1
PREC/TT STQ DLOAD
RTRN
TIG
STCALL TDEC1 # PRECISION UPDATE ACTIVE AND PASSIVE
PRECSET # VEHICLES TO TIG
VLOAD VSR*
RPASS3
0,2
STODL RVEC
CENTANG
PUSH COS
STODL CSTH
SIN SET
RVSW
STOVL SNTH
VPASS3
VSR*
0,2
STCALL VVEC # GET TRANSFER TIME BASED ON CENTANG OF
TIMETHET # PASSIVE VEHICLE
CALL
S34/35.1 # GET UNIT NORMAL
DLOAD GOTO
T
RTRN
# .... INTRPVP ....
# SUBROUTINES USED
#
# CSMPREC
# LEMPREC
INTRPVP STQ BOFF # PRECISION UPDATE PASSIVE VEHICLE TO
RTRN # TDEC1
AVFLAG
OTHERV
CALL
CSMPREC
GOTO
RTRN
OTHERV CALL
LEMPREC
GOTO
RTRN
# .... VNDSPLY ....
# SUBROUTINES USED
#
# BANKCALL
# GOFLASH
# GOTOPOOH
VNDSPLY EXTEND # FLASH DISPLAY
QXCH RTRN
TS VERBNOUN
CA VERBNOUN
TCR BANKCALL
CADR GOFLASH
TCF GOTOPOOH # TERMINATE
TC RTRN # PROCEED
TCF -5 # RECYCLE
V06N33SR VN 0633
V06N55SR VN 0655
V04N06SR VN 0406
V06N57SR VN 0657
V06N34SR VN 0634
V06N58SR VN 0658
V06N81SR VN 0681