forked from chrislgarry/Apollo-11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
P37_P70.s
1950 lines (1879 loc) · 36.9 KB
/
P37_P70.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
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
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright: Public domain.
# Filename: P37_P70.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Jim Lawton <jim.lawton@gmail.com>.
# Website: www.ibiblio.org/apollo.
# Pages: 890-933
# Mod history: 2009-05-11 JVL Adapted from the Colossus249/ file
# of the same name, using Comanche055 page
# images.
# 2009-05-20 RSB Added missing label V2T179. Fixed POODOO -> P00DOO.
# 2009-05-23 RSB In RTD18, corrected a STOVL DELVLVC to
# STODL DELVLVC and a STODL 02D to STORE 02D.
#
# 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 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 890
BANK 31
SETLOC RTE1
BANK
EBANK= RTEDVD
COUNT 31/P37
# PROGRAM DESCRIPTION: P37, RETURN TO EARTH
#
# DESCRIPTION
# A RETURN TO EARTH TRAJECTORY IS COMPUTED PROVIDED THE CSM IS OUTSIDE THE LUNAR SPHERE OF INFLUENCE AT THE
# TIME OF IGNITION. INITIALLY A CONIC TRAJECTORY IS DETERMINED AND RESULTING IGNITION AND REENTRY PARAMETERS ARE
# DISPLAYED TO THE ASTRONAUT. THEN IF THE ASTRONAUT SO DESIRES, A PRECISION TRAJECTORY IS DETERMINED WTIH THE
# RESULTING IGNITION AND REENTRY PARAMETERS DISPLAYED. UPON FINAL ACCEPTANCE BY THE ASTRONAUT, THE PROGRAM
# COMPUTES AND STORES THE TARGET PARAMETERS FOR RETURN TO EARTH FOR USE BY SPS PROGRAM (P40) OR RCS PROGRAM (P41).
#
# CALLING SEQUENCE
# L TC P37
#
# SUBROUTINES CALLED
# PREC100
# V2T100
# RTENCK2
# RTENCK3
# TIMERAD
# PARAM
# V2T100
# GAMDV10
# XT1LIM
# DVCALC
# RTENCK1
# INTSTALL
# INTEGRVS
# RTEVN
# RETDISP
# TMRAD100
# AUGEKUGL
# LAT-LONG
# TMRAD100
# TIMERAD
# INVC100
# CSMPREC
# GETERAD
# TIMETHET
# P370ALRM
# VN1645
# POLY
#
# ERASABLE INITIALIZATION REQUIRED
# CSM STATE VECTOR
# Page 891
# NJETSFLG NUMBER OF JETS IF THE RCS PROPULSION SYSTEM SELECTED STATE FLAG 0=4 JETS 1=2 JETS
#
# ASTRONAUT INPUT
# SPRTETIG TIME OF IGNITION (OVERLAYS TIG) DP B28 CS
# VPRED DESIRED CHANGE IN VELOCITY AT TIG(PROGRM COMPUTED IF 0) DP B7 METERS/CS
# GAMMAEI DESIRED FLIGHT PATH ANGLE AT REENTRY (COMPUTED IF 0) DP B0 REVS + ABOVE HORIZ.
# OPTION2 PROPULSION SYSTEM OPTION SP B14 1=SPS, 2=RCS
#
# OUTPUT
# CONIC OR PRECISION TRAJECTORY DISPLAY
# VPRED VELOCITY MAGNITUDE AT 400,000 FT. ENTRY ALTITUDE DP B7 METERS/CS
# T3TOT4 TRANSIT TIME TO 400,000 FT. ENTRY ALTITUDE DP B28 CS
# GAMMAEI FLIGHT PATH ANGLE AT 400,00 FT. ENTRY ALTITUDE DP B0 REVS + ABOVE HORIZON
# DELVLVC INITIAL VELOCITY CHANGE VECTOR IN LOCAL VERTICAL COORD. VECTOR B7 METERS/CS
# LAT(SPL) LATITUDE OF THE LANDING SITE DP B0 REVS
# LNG(SPL) LONGITUDE OF THE LANDING SITE DP B0 REVS
# TARGETING COMPUTATION DISPLAY
# TIG RECOMPUTED TIG BASED ON THRUST OPTION DP B28 CS
# TTOGO TIME FROM TIG DP B28 CS
# +MGA POSITIVE MIDDLE GIMBAL ANGLE DP B0 REVS -.02 IF REFSMFLG=0
# THRUST PROGRAM COMMUNICATION
# XDELVFLG EXTERNAL DELTA V FLAG STATE FLAG SET 0 FOR LAMBERT AIMPT
# NORMSW LAMBERT AIMPT ROTATION SWITCH STATE FLAG SET 0 FOR NO ROTATION
# ECSTEER CROSS PRODUCT STEERING CONSTANT SP B2 SET 1
# RTARG CONICALLY INTEGRATED REENTRY POSITION VECTOR VECTOR B29 METERS
# TPASS4 REENTRY TIME DP B28 CS
P37 TC PHASCHNG # P37 IS NOT RESTARTABLE
OCT 4
TC INTPRET
AXT,1 SXA,1
OCT 04000
ECSTEER
DLOAD
ZEROVECS
STORE VPRED
STORE GAMMAEI
EXIT
CAF V6N33RTE # INPUT TIG STORED IN SPRTETIG
TCR P370GOF # OVERLAYED WITH TIG
TCF -2 # DISPLAY NEW DATA
CAF V6N60RTE # INPUT REENTRY ANGLE IN GAMMAEI
TCR P37GFRB1 # AND DESIRED DELTA V IN RETDVD
TCF -2 # DISPLAY NEW DATA
RTE299 TC INTPRET
SSP DLOAD
OVFIND
0
VPRED
# Page 892
STODL RTEDVD
GAMMAEI
STODL RTEGAM2D
1RTEB13
STODL CONICX1
C4RTE
STCALL MAMAX1
INVC100 # GET R(T1)/,V(T1)/,UR1/,UH/
CLEAR DLOAD
SLOWFLG
RTEDVD
BPL ABS
RTE317
STORE RTEDVD
DLOAD DSU
R(T1)
K1RTE
BMN SET
RTE317
SLOWFLG
RTE317 DLOAD EXIT
R(T1)
TC POLY
DEC 2
2DEC 181000434. B-31
2DEC 1.50785145 B-2
2DEC* -6.49993057 E-9 B27*
2DEC* 9.76938926 E-18 B56*
TC INTPRET
SL1
STODL MAMAX2 # C0+C1*R+C2*R**2+C3*R**3=MAMAX2 B30
M9RTEB28
STODL NN1A
K2RTE
RTE320 STODL RCON # RCON=K2
RTEGAM2D
BZE BDSU
RTE340 # GOTORTE340 IF REENTRY ANGLE NOT INPUT
1RTEB2
PUSH COS # PL02D
PDDL SIN
BDDV STADR # PL00D
STCALL X(T2) # X(T2)=COT(GAM2D) B0
RTE360
RTE340 DLOAD DSU
R(T1)
# Page 893
K1RTE
BMN DLOAD
RTE350
K4RTE
STCALL X(T2) # X(T2)=K4
RTE360
RTE350 DLOAD
K3RTE
STORE X(T2) # X(T2)=K3
RTE360 CALL
V2T100
BZE GOTO
RTE367
RTEALRM
RTE367 VLOAD
R(T1)/
STODL RVEC
RCON
STOVL RDESIRED
V2(T1)/
STCALL VVEC
TMRAD100
DAD
T1
STODL T2
RTEGAM2D
BZE GOTO
RTE369
RTE372
RTE369 VLOAD ABVAL
V(T2)/
EXIT
TC POLY
DEC 2
2DEC 0
2DEC -4.8760771 E-2 B4
2DEC 4.5419476 E-4 B11
2DEC -1.4317675 E-6 B18
TC INTPRET
DAD
RTED1
SL3 GOTO # X(T2),=D1+D2V2+D3V2**2+D4V2**3
RTE373
RTE372 DLOAD # X(T2),=X(T2)
X(T2)
RTE373 DSU PUSH # X(T2)ERR B0 PL02D
# Page 894
X(T2)
VLOAD UNIT
R(T2)/ # B58
STCALL ALPHAV
GETERAD
DAD
E3RTE
PUSH DSU # RCON,=(E1/1+E2BETA11)**.5)+E3 B29 PL04D
RCON
ABS DSU
EPC2RTE
BMN GOTO
RTE374
RTE375
RTE374 DLOAD ABS
00D
DSU BMN
EPC3RTE
P37E
RTE375 DLOAD DAD
NN1A
1RTEB28
BMN SLOAD
RTE380
OCT605
GOTO
RTEALRM # TOO MANY ITERATIONS
RTE380 STORE NN1A
DSU BZE
M8RTEB28
RTE385
DLOAD DSU
00D
DRCON
NORM PDDL # X(T2)ERR-X(T2)ERR,=Z1 PL06D
X1
RPRE'
DSU DDV # X(T2)PRI-X(T2)=Z2 PL04D
X(T2)
DMP SL* # DX(T2)=X(T2)ERR(Z2/Z1)
00D
0,1
GOTO
RTE390
RTE385 DLOAD # DX(T2)=X(T2)ERR
00D
RTE390 STODL 16D # DX(T2) PL02D
STADR
STODL RCON # RCON=RCON,
BOV
# Page 895
RTE360
STODL DRCON # X(T2)ERR,=X(T2)ERR
X(T2)
STODL RPRE' # X(T2)PRI=X(T2)
16D
DAD
X(T2)
STCALL X(T2) # X(T2)=X(T2)+DX(T2)
RTE360 # REITERATE
P37E CALL # DISPLAY CONIC SOLUTION
RTEVN
RTE505 DLOAD DMP
PCON
BETA1
BDSU BZE
RCON
RTE510
BMN DLOAD
RTE510
1RTEB2
GOTO # ENTRY NEAR APOGEE
RTE515
RTE510 DLOAD DCOMP # ENTRY NEAR PERIGEE
1RTEB2
RTE515 STCALL PHI2
PREC100 # PRECISION TRAJECTORY COMPUTATION
RTE625 BZE
P37G
RTEALRM CALL
P370ALRM
EXIT
TCF P37 # RECYCLE AFTER ALARM DISPLAY
# RETURN TO EARTH DISPLAY SUBROUTINE
RTEVN STQ CALL
VNSTORE
RTEDISP # DISPLAY PREPARATION
EXIT
CAF V6N61RTE # LATITUDE,LONGITUDE,BLANK
TCR P370GOFR # IN LAT(SPL),LNG(SPL),-
CAF FOUR
TCR 37BLANK +1
TCF +5
TCF P37 # RECYCLE
CAF V6N39RTE # T21 HRS,MIN,SEC IN T3TOT4
TCR P370GOF
TCF P37 # RECYCLE
CAF V6N60RTE # DISPLAY BLANK,V(T2),FPA2
TCR P37GFRB1 # IN -,VPRED,GAMMAEI
# Page 896
TCF P37 # RECYCLE
CAF V6N81RTE # DISPLAY DELTA V (LV) IN DELVLVC
TCR P370GOF
TCF P37 # RECYCLE
TCR INTPRET
GOTO
VNSTORE
# PRECISION DISPLAY, TARGETING COMPUTATION AND RTE END PROCESSING
P37G CALL
RTEVN
EXIT
P37N CAF SEVEN
TS OPTION1
CAF ONE
TS OPTION2
CAF V4N06RTE # DISPLAY RCS OR SPS OPTION SPS ASSUMED
TCR P370GOF
TCF -2 # RECYCLE
TC INTPRET # PROCEED
SETPD SLOAD
00D
OPTION2
DSU BZE
1RTEB13
P37Q
SLOAD NORM # SPS
EMDOT
X1
PDDL GOTO
VCSPS
P37T
P37Q DLOAD BON # RCS
MDOTRCS
NJETSFLG
P37R
SL1
P37R SL1
NORM PDDL
X1
VCRCS
P37T PDDL DDV # DV/VC B7 -B5 = B2 PL02D
DV
EXIT
TC POLY
DEC 1
2DEC 5.66240507 E-4 B-3
2DEC 9.79487897 E-1 B-1
# Page 897
2DEC -.388281955 B1
TC INTPRET
PUSH SLOAD # (1-E)**(-DV/VC)=A B3 PL04D
WEIGHT/G
DMP DDV # DTB=(M0/MDOT)A B16+B3-B3=B16 PL00D
SL* DMP
0 -12D,1
CSUBT
BDSU
T1
STORE TIG # TIG=T1-CT*DTB B28
EXIT
CAF V6N33RTE # DISPLAY BIASED TIG
TCR P370GOF
TCF -2
CAF ZERO
TS VHFCNT
TS TRKMKCNT
TC INTPRET
CALL # CONICALLY INTEGRATE FROM R1,V1 OVER T12
RTENCK1
VLOAD UNIT # PL00D
R(T2)/
PDVL VXSC # UR2 B1 PL06D
UR1/
MCOS7.5
PDVL VXSC # -UR1(COS7.5) B1 PL12D
UH/
MSIN7.5
VAD DOT # K/=-UR1(COS7.5)-UH(SIN7.5) B2 PL00D
DAD BMN
MCOS22.5
P37W
VLOAD DOT # K/ . UR2 GR COS22.5
UH/
R(T2)/
BMN DLOAD
P37U
THETA165
PUSH GOTO
P37V
P37U DLOAD PUSH
THETA210
P37V SIN
STODL SNTH
COS CLEAR
RVSW
STOVL CSTH
R(T1)/
# Page 898
STOVL RVEC
V2(T1)/
STCALL VVEC
TIMETHET
P37W CLEAR CLEAR
XDELVFLG
NORMSW
SET VLOAD
FINALFLG
STADR
STODL RTARG
T
DAD
T1
STOVL TPASS4
V2(T1)/
VSU
V(T1)/
STCALL DELVSIN
VN1645
GOTO
P37W
# SUBROUTINE TO GO TO GOFLASHR AND BLANK R1
P37GFRB1 EXTEND
QXCH SPRTEX
TCR P370GOFR
37BLANK CAF ONE
TCR BLANKET
TCF ENDOFJOB
TC SPRTEX # RECYCLE
TCF P37PROC # PROCEED
# SUBROUTINE TO GO TO GOFLASHR
P370GOFR EXTEND
QXCH RTENCKEX
TCR BANKCALL
CADR GOFLASHR
TCF GOTOP00H # TERMINATE
TCF +3
TCF +4
TC RTENCKEX # IMMEDIATE RETURN
INDEX RTENCKEX # PROCEED
TCF 0 +4
INDEX RTENCKEX # RECYCLE
TCF 0 +3
# SUBROUTINE TO GO TO GOFLASH
# Page 899
P370GOF EXTEND
QXCH SPRTEX
TCR BANKCALL
CADR GOFLASH
TCF GOTOP00H
TCF +2
TC SPRTEX
P37PROC INDEX SPRTEX
TCF 0 +1
V6N33RTE VN 0633
V4N06RTE VN 0406
V6N61RTE VN 0661
V6N39RTE VN 0639
V6N60RTE VN 0660
V6N81RTE VN 0681
BANK 32
SETLOC RTE
BANK
COUNT 32/RTE
# Page 900
# ALARM DISPLAY SUBROUTINE
P370ALRM STQ EXIT
SPRTEX
CA MPAC
TC VARALARM
CAF V5N09RTE
TC BANKCALL
CADR GOFLASH
TCF GOTOP00H
TCF -4
TC INTPRET
GOTO
SPRTEX
V5N09RTE VN 0509
# Page 901
# TIME RADIUS CALLING SUBROUTINE
#
# INPUT
# RVEC INITIAL POSITION VECTOR VECTOR B29 METERS
# VVEC INITIAL VELOCITY VECTOR VECTOR B7 METERS/CS
# RDESIRED FINAL RADIUS FOR WHICH TRANSFER TIME IS TO BE COMPUTED DP B29 METERS
# CONICX1 X1 SETTING FOR CONIC SUBROUTINES -2=EARTH SP B14
#
# OUTPUT
# R(T2)/ FINAL POSITION VECTOR VECTOR B29 METERS
# V(T2)/ FINAL VELOCITY VECTOR VECTOR B7 METERS/CS
# T12 TRANSFER TIME TO FINAL RADIUS DP B28 CS
TMRAD100 STQ CLEAR
RTENCKEX
RVSW
AXC,2 SXA,2
OCT 20000
SGNRDOT
LXC,1 CALL
CONICX1
TIMERAD
STOVL V(T2)/ PL00D
STADR
STODL R(T2)/
T
STCALL T12
RTENCKEX
# Page 902
# DISPLAY CALCULATION SUBROUTINE
#
# DESCRIPTION
# OUTPUT FOR DISPLAY IS CONVERTED TO PROPER UNITS AND PLACED IN OUTPUT STORAGE REGISTERS. LANDING SITE
# COMPUTATION FOR DETERMINING LANDING SITE LATITUDE AND LONGITUDE IS INCLUDED IN THE ROUTINE.
#
# CALLING SEQUENCE
# L CALL
# L+1 RTEDISP
#
# SUBROUTINES CALLED
# TMRAD100
# AUGEKUGL
# LAT-LONG
#
# ERASABLE INITIALIZATION REQUIRED
# PUSHLIST
# NONE
# MPAC
# NONE
# OTHER
# R(T2)/ FINAL POSITION VECTOR VECTOR B29 METERS
# V(T2)/ FINAL VELOCITY VECTOR VECTOR B7 METERS/CS
# T2 FINAL TIME DP B28 CS
# V2(T1)/ POST IMPULSE INITIAL VELOCITY VECTOR VECTOR B7 METERS/CS
# V(T1)/ INITIAL VELOCITY VECTOR VECTOR B7
# UR1/ UNIT INITIAL VECTOR VECTOR B1
# UH/ UNIT HORIZONTAL VECTOR VECTOR B1
#
# OUTPUT
# VPRED VELOCITY MAGNITUDE AT 400,000 FT. ENTRY ALTITUDE DP B7 METERS/CS
# T3TOT4 TRANSIT TIME TO 400,000 FT. ENTRY ALTITUDE DP B28 CS
# GAMMAEI FLIGHT PATH ANGLE AT 400,000 FT. ENTRY ALTITUDE DP B0 REVS + ABOVE HORIZ
# DELVLVC INITIAL VELOCITY CHANGE VECTOR IN LOCAL VERTICAL COORD. VECTOR B7 METERS/CS
# LAT(SPL) LATITUDE OF THE LANDING SITE DP B0 REVS
# LNG(SPL) LONGITUDE OF THE LANDING SITE DP B0 REVS
RTEDISP STQ VLOAD # DISPLAY
SPRTEX
V(T2)/
UNIT PDDL
36D
STODL VPRED # V(T2)
T2
DSU
SPRTETIG
STOVL T3TOT4 # T21
R(T2)/
UNIT DOT
SL1
# Page 903
ARCCOS BDSU
1RTEB2
STOVL GAMMAEI # FLIGHT PATH ANGLE T2
V2(T1)/
VSU PUSH
V(T1)/
DOT DCOMP
UR1/
PDVL PUSH
DLOAD PDVL
ZERORTE
DOT VDEF
UH/
VSL1
STODL DELVLVC
DELVLVC
BOFF DCOMP
RETROFLG
RTD18
STORE DELVLVC # NEGATE X COMPONENT, RETROGRADE
RTD18 VLOAD ABVAL
DELVLVC
STOVL VGDISP
R(T2)/
STORE RVEC # ***** LANDING SITE COMPUTATION *****
ABVAL DSU
30480RTE
STOVL RDESIRED
V(T2)/
STCALL VVEC
TMRAD100 # R3,V3,T23 FROM TIMERAD
VLOAD UNIT
R(T2)/
PDVL UNIT # UR3 PL06D
V(T2)/
DOT SL1 # GAMMAE=ARCSIN(UR3 . UV3) PL00D
ARCSIN PDDL # V(T3) PL02D
36D
PDDL ABS
PUSH CALL # /GAMMAE/ PL04D
AUGEKUGL # PHIE PL06D
DAD DAD
T12 # T23
T2
STORE 02D # T(LS)=T2&T23&TE
SLOAD BZE
P37RANGE
RTD22
STORE 04D # OVERRIDE RANGE (PCR 261)
RTD22 DLOAD SIN
# Page 904
04D
STODL LNG(SPL) # LNG(SPL)=SIN(PHIE) PL04D
COS
STORE LAT(SPL) # LAT(SPL)=COS(PHIE)
VLOAD UNIT
R(T2)/
PUSH PUSH
PDVL UNIT # PL22D
V(T2)/
PDVL VXV
VXV UNIT # UH3=UNIT(UR3 X UV3 X UR3) PL10D
VXSC PDVL
LNG(SPL)
VXSC VAD # PL04D
LAT(SPL)
CLEAR CLEAR # T(LS) IN MPAC
ERADFLAG
LUNAFLAG
STODL ALPHAV # ALPHAV=UR3(COSPHIE)+UH3(SINPHIE) PL02D
CALL
LAT-LONG
DLOAD
LAT
STODL LAT(SPL) # LATITUDE LANDING SITE *****
LONG
STCALL LNG(SPL) # LONGITUDE LANDING SITE *****
SPRTEX
COUNT* $$/RTE
# Page 905
# INITIAL VECTOR SUBROUTINE
#
# DESCRIPTION
# A PRECISION INTEGRATION OF THE STATE VECTOR TO THE TIME OF IGNITION IS PERFORMED. PRECOMPUTATIONS OCCUR.
#
# CALLING SEQUENCE
# L CALL
# L+1 INVC100
#
# NORMAL EXIT MODE
# AT L+2 OF CALLING SEQUENCE WITH MPAC = 0
#
# ALARM EXIT MODE
# AT L+2 OF CALLING SEQUENCE WITH MPAC = OCTAL 612 FOR STATE VECTOR IN MOONS SPHERE OF INFLUENCE
#
# SUBROUTINES CALLED
# CSMPREC
#
# ERASABLE INITIALIZATION REQUIRED
# PUSHLIST
# NONE
# MPAC
# NONE
# OTHER
# SPRTETIG TIME OF IGNITION DP B28 CS
# CSM STATE VECTOR
#
# OUTPUT
# R(T1)/ INITIAL POSITION VECTOR AT TIG VECTOR B29 METERS
# V(T1)/ INITIAL VELOCITY VECTOR AT TIG VECTOR B7 METERS/CS
# T1 INITIAL VECTOR TIME (TIG) DP B28 CS
# UR1/ UNIT INITIAL VECTOR VECTOR B1
# UH/ UNIT HORIZONTAL VECTOR VECTOR B1
# CFPA COSINE OF INITIAL FLIGHT PATH ANGLE DP B1
INVC100 STQ DLOAD
SPRTEX
SPRTETIG
STCALL TDEC1
CSMPREC # PRECISION INTEGRATION R0,V0 TO R1,V1
VLOAD SXA,2
RATT
P(T1)
STOVL R(T1)/
VATT
STODL V(T1)/
TAT
STORE T1
SLOAD BZE
P(T1)
# Page 906
INVC109
INVC107 SLOAD GOTO
OCT612
RTEALRM # R1,V1 NOT IN PROPER SPHERE OF INFLUENCE
INVC109 VLOAD UNIT
R(T1)/
STODL UR1/ # UR1/ B1
36D
STOVL R(T1) # R(T1) B29
V(T1)/
UNIT
STORE UV1/
DOT SL1
UR1/
STORE CFPA # CFPA B1
ABS DSU
EPC1RTE
BMN DLOAD
INVC115 # NOT NEAR RECTILINEAR
1RTEB2
PDDL PUSH
ZERORTE
VDEF PUSH # N/ = (0,0,1)
GOTO
INVC120
INVC115 VLOAD VXV
UR1/
UV1/
PUSH # N/ = UR X UV B2
INVC120 CLEAR DLOAD
RETROFLG
PUSH BPL
INVC125
VLOAD VCOMP # RETROGRADE ORBIT
PUSH SET
RETROFLG
INVC125 VLOAD
VXV UNIT
UR1/
STORE UH/ # UH/ B1
GOTO
SPRTEX
# Page 907
# PRECISION TRAJECTORY COMPUTATION SUBROUTINE
#
# DESCRIPTION
# A NUMERICALLY INTEGRATED TRAJECTORY IS GENERATED WHICH FOR THE RETURN TO EARTH PROBLEM SATISFIES THE REENTRY
# CONSTRAINTS (RCON AND X(T2)) ACHIEVED BY THE INITIAL CONIC TRAJECTORY AND MEETS THE DVD REQUIREMENT AS CLOSELY
# AS POSSIBLE.
#
# CALLING SEQUENCE
# L CALL
# L+1 PREC100
#
# NORMAL EXIT MODE
# AT L+2 OF CALLING SEQUENCE WITH MPAC = 0
#
# ALARM EXIT MODE
# AT L+2 OF CALLING SEQUENCE WITH MPAC =
# OCTAL 605 FOR EXCESS ITERATIONS
# OCTAL 613 FOR REENTRY ANGLE OUT OF LIMITS
#
# SUBROUTINES CALLED
# INTSTALL
# RTENCK2
# RTENCK3
# TIMERAD
# PARAM
# V2T100
#
# ERASABLE INITIALIZATION REQUIRED
# PUSHLIST
# NONE
# MPAC
# NONE
# OTHER
# R(T1)/ INITIAL POSITION VECTOR VECTOR B29/B27 METERS
# V2(T1)/ POST IMPULSE INITIAL VELOCITY VECTOR VECTOR B7/B5 METERS/CS
# V(T1)/ INITIAL VELOCITY VECTOR VECTOR B7/B5 METERS/CS
# T1 INITIAL VECTOR TIME DP B28 CS
# T12 INITIAL TO FINAL POSITION TIME DP B28 CS
# RCON CONIC FINAL RADIUS DP B29/B27 METERS
# R(T1) MAGNITUDE OF INITIAL POSITION VECTOR DP B29/B27 METERS
# X(T2) COTANGENT OF FINAL FLIGHT PATH ANGLE DP B0
# X(T1) COTANGENT OF INITIAL FLIGHT PATH ANGLE DP B5
# RTEDVD DELTA VELOCITY DESIRED DP B7/B5 METERS/CS
# MAMAX1 MAJOR AXIS LIMIT FOR LOWER BOUND ON GAMDV ITERATOR DP B30/B28 METERS
# MAMAX2 MAJOR AXIS LIMIT FOR UPPER BOUND ON GAMDV ITERATOR DP B30/B28 METERS
# UR1/ UNIT INITIAL VECTOR VECTOR B1
# UH/ UNIT HORIZONTAL VECTOR VECTOR B1
# BETA1 1+X(T2)**2 DP B1
# PHI2 PERIGEE OR APOGEE INDICATOR DP B2 -1 PERIGEE, +1 APOGEE
#
# Page 908
#
# OUTPUT
# V2(T1)/ POST IMPULSE INITIAL VELOCITY VECTOR VECTOR B7 METERS/CS
# R(T2)/ FINAL POSITION VECTOR VECTOR B29 METERS
# V(T2)/ FINAL VELOCITY VECTOR VECTOR B7 METERS/CS
# T2 FINAL TIME DP B28 CENTISECONDS
#
# DEBRIS
# RD FINAL R DESIRED DP B29/B27 METERS
# R/APRE R/A DP B6
# P/RPRE P/R DP B4
# RPRE MAGNITUDE OF R(T2)/ DP B29/B27 METERS
# X(T2)PRE COTANGENT OF GAMMA2 DP B0
# DT12 CORRECTION TO FINAL TIME T2 DP B28 CENTISECONDS
# RCON FINAL RADIUS DP B29/B27 METERS
# DRCON DELTA RCON DP B29/B27 METERS
PREC100 STQ DLOAD
SPRTEX
10RTE
STODL NN1A
RCON
STORE RD
PREC120 DLOAD
2RTEB1
STODL DT21PR # DT21PR = POSMAX
M15RTE
STCALL NN2
RTENCK3
PREC125 CALL
PARAM
DLOAD
P
STODL P/RPRE
R1A
STODL R/APRE
R1
STODL RPRE
COGA
SL
5
STORE X(T2)PRE
DCOMP DAD
X(T2)
ABS DSU
EPC4RTE
BOV BMN
PREC130
PREC175
# DESIRED REENTRY ANGLE NOT ACHIEVED
# Page 909
PREC130 DLOAD BMN
NN2
PREC140
PREC132 SLOAD GOTO # TOO MANY ITERATIONS
OCT605 # EXIT WITH ALARM
PRECX
# DETERMINE RADIUS AT WHICH THE DESIRED REENTRY ANGLE WILL BE ACHIEVED
PREC140 DLOAD BZE
NN1A
PREC162
PREC150 DLOAD SL2 B2
P/RPRE
DMP SL1 # BETA2=BETA1*P/R B2 PL02
BETA1
PUSH DLOAD
R/APRE
SL4 DMP
00D
BDSU BMN # BETA3=1-BETA2*R/A
1RTEB4
PREC160
PREC155 SL2 SQRT
DMP BDSU
PHI2
1RTEB3
NORM PDDL
X1
SR1 DDV # BETA4=BETA2/(1-PHI2*SQRT(BETA3))
SL* GOTO B1
0 -1,1
PREC165
PREC160 DLOAD NORM
R/APRE
X1
BDDV SL* B1
1RTEB1
0 -6,1
GOTO
PREC165
PREC162 DLOAD NORM
RPRE
X1
BDDV SL* # BETA4=RD/RPRE B1
RD
0 -1,1
PREC165 SETPD PUSH
0
DSU DCOMP
# Page 910
1RTEB1
STORE BETA12
BMN DLOAD
PREC168
X(T2)PRE
BMN DLOAD
PREC167
BETA12
DCOMP
STORE BETA12
PREC167 DLOAD
BETA12
PREC168 ABS DSU
EPC6RTE
BMN DLOAD
PREC175
DMP SL1
RPRE
PUSH # RF = NEW RADIUS
PREC170 DLOAD DAD
NN2
1RTEB28
STORE NN2
VLOAD SET
R(T2)/
RVSW
STOVL RVEC
V(T2)/
SIGN
BETA12
STODL VVEC
1RTEB1
SIGN DCOMP
BETA12
LXA,2 DLOAD
MPAC
LXC,1 SXA,2
CONICX1
SGNRDOT
STCALL RDESIRED # COMPUTED DT12 (CORRECTION TO TIME OF
TIMERAD # NEW RADIUS)
DLOAD SIGN
T
BETA12
PDDL NORM # DT21=(PHI4)DT21 PL02D
DT21PR
X1
BDDV SL*
00D
0 -3,1
# Page 911
PUSH BMN # BETA13=(DT21)/(DT21PR) R3 PL04D
PREC172
DLOAD PDDL # BETA14=1 B0 PL04D
2RTEB1
GOTO
PREC173
PREC172 DLOAD PDDL # BETA14=.6 B0 PL04D
M.6RTE
PREC173 DDV DSU
02D
1RTEB3
BMN DLOAD