forked from chrislgarry/Apollo-11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
P11.s
922 lines (850 loc) · 22.3 KB
/
P11.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
# Copyright: Public domain.
# Filename: P11.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: Hartmuth Gutsche <hgutsche@xplornet.com>.
# Website: www.ibiblio.org/apollo.
# Pages: 533-550
# Mod history: 2009-05-13 HG Started adapting from the Colossus249/ file
# of the same name, using Comanche055 page
# images 0533.jpg - 0550.jpg.
# 2009-05-20 RSB Corrections: ERTHALT -> EARTHALT,
# STATSW -> SATSW.
# 2009-05-23 RSB At end of RESCALES, corrected TC 0 to TC Q.
# Added an SBANK= prior to a 2CADR.
#
# 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 533
# EARTH ORBIT INSERTION MONITOR PROGRAM
# *************************************
#
# PROGRAM DESCRIPTION -P11-
#
# MOD NO. 1
# MOD BY ELIASSEN
#
# FUNCTIONAL DESCRIPTION
#
# P11 IS INITIATED BY
#
# A) GYROCOMPASS PRG P02 WHEN LIFTOFF DISCRETE IS RECEIVED OR
# B) BACKUP THRU VERB 75 ENTER
#
# PROGRAM WILL
# 1. ZERO CMC CLOCK AT LIFTOFF (OR UPON RECEIPT OF BACKUP)
# 2. UPDATE TEPHEM TO TIME CMC CLOCK WAS ZEROED
# 3. INITIATE SERVICER AT PREREAD1
# 4. CHANGE MAJOR MODE TO 11
# 5. CLEAR DSKY IN CASE OF V 75
# 6. STORE LIFTOFF IMU-CDU ANGLES FOR ATT. ERROR DISPLAY
# 7. TERMINATE GYROCOMPASSING __ __
# 8. COMPUTE INITIAL VECTORS RN, VN _ _ _
# 9. COMPUTE REFSMMAT FOR PRELAUNCH ALIGNMENT WHERE U ,U ,U ARE
# _ _ X Y Z
# U =(UNIT(-R) LOCAL VERTICAL AT TIME OF LIFTOFF
# _Z _ _
# U =UNIT(A), A=HOR VECTOR AT LAUNCH AZIMUTH
# _X _ _
# U =U * U
# U Z X
# 10. SET REFSMMAT KNOWN FLAG
# 11. SET AVGEXIT IN SERVICER TO VHHDOT TO
# COMPUTE AND DISPLAY NOUN 62 EVERY 2 SECONDS
#
# R1 V1 -- INERTIAL VELOCITY MAGNITUDE IN FPS
# R2 HDOT -- RATE OF CHANGE OF VEHICLE VEL IN FPS
# R3 H -- VEHICLE ALTITUDE ABOVE PAD IN NM
#
# 12. DISPLAY BODY AXES ATT. ERRORS ON FDAI NEEDLES
#
# A) FROM L.O. TO RPSTART (APPROX. 0 TO +10SECS AFTER L.O.)
# DESIRED ATTITUDE IS AS STORED AT L.O.
# B) FROM RPSTART TO POLYSTOP (APPROX. +10 TO +133SECS AFTER LO)
# DESIRED ATTITUDE IS SPECIFIED BY CMC PITCH AND ROLL
# POLYNOMIALS DURING SATURN ROLLOUT AND PITCHOVER
# Page 534
# THE DISPLAY IS RUN AS LOW PRIORITY JOB APPROX.
# EVERY 1/2 SEC OR LESS AND IS DISABLED UPON OVFLO OF TIME1
#
# SUBROUTINES CALLED
#
# 2PHSCHNG BANKCALL CALCGRA CDUTRIG CLEANDSP DANZIG
# DELAYJOB EARTHR ENDOFJOB FINDVAC IBNKCALL
# INTPRET LALOTORV NEEDLER NEWMODEX PHASCHNG
# POSTJUMP POWRSERS PREREAD1 REGODSPR S11.1
# SERVEXIT TASKOVER TCDANZIG V1STO2S WAITLIST
#
# ASTRONAUT REQUESTS (IF ALTITUDE ABOVE 300,000 FT)
#
# DSKY --
# MONITOR DISPLAY OF TIME TO PERIGEE R1 HOURS
# R2 MINUTES
#
# DSKY --
# MONITOR DISPLAY OF R1 APOGEE ALTITUDE IN NAUTICAL MILES
# R2 PERIGEE ALTITUDE IN NAUTICAL MILES
# R3 TFF IN MINUTES/SECS
#
# IF ASTRONAUT HAS REQUESTED ANY OF THESE DISPLAYS HE MUST
# HIT PROCEED TO RETURN TO NORMAL NOUN 62 DISPLAY.
# NORMAL EXIT MODE
#
# ASTRONAUT VERB 37 ENTER 00 ENTER
#
# ALARM MODES -- NONE
#
# ABORT EXIT MODES --
#
# OUTPUT
#
# TLIFTOFF (DP) TEPHEM (TP)
# REFSMMAT
# DSKY DISPLAY
# FDAI DISPLAY
#
# ERASABLE INITIALIZATION
#
# AZO, AXO, -AYO
# LATITUDE
# PADLONG
# TEPHEM
# PGNCSALT
# POLYNUM THRU POLYNUM +14D
# RPSTART
# POLYSTOP
# FLAGS SET OR RESET
# Page 535
# SET REFSMFLG
# SET DVMON IDLE FLAG
# CLEAR ERADFLAG
#
# DEBRIS
#
# LIFTTEMP
# POLYNUM THRU POLYNUM +7
# SPOLYARG
# BODY1, BODY2, BODY3
# VMAG2, ALTI, HDOT
# CENTRALS, CORE SET, AND VAC AREAS
COUNT 34/P11
BITS5-6 = SUPER011
BANK 42
SETLOC P11ONE
BANK
EBANK= TEPHEM
P11 CA EBANK3
TS EBANK
EXTEND
DCA REP11S # DIRECT RESTARTS TO REP11
DXCH -PHASE3
CS ZERO
ZL
TS LIFTTEMP
DXCH -PHASE5 # INACTIVE GROUP 5, PRELAUNCH PROTECTION
P11+7 EXTEND
DCA REP11SA
DXCH TLIFTOFF
EXTEND
DCA TIME2
DXCH LIFTTEMP # FORE RESTARTS
CA ZERO
ZL
DXCH TIME2
REP11A-2 DXCH TLIFTOFF
REP11A-1 DXCH -PHASE3 # RESET PHASE
REP11A INHINT
EXTEND
DCA TEPHEM +1
DXCH TEPHEM1 +1
CA TEPHEM
# Page 536
XCH TEPHEM1
EXTEND
DCA TLIFTOFF
DAS TEPHEM1 +1
ADS TEPHEM1 # CORRECT FOR OVERFLOW
TC PHASCHNG
OCT 05023
OCT 22000
INHINT
EXTEND
DCA TEPHEM1
DXCH TEPHEM
CA TEPHEM1 +2
XCH TEPHEM +2
CAF EBDVCNT
TS EBANK
EBANK= DVCNTR
TC IBNKCALL
CADR PREREAD1 # ZERO PIPS AND INITIALIZE AVERAGEG
TC PHASCHNG
OCT 05023 # CONTINUE HERE ON RESTART
OCT 22000
CAF .5SEC # START ATT ERROR DISPLAY
TC WAITLIST # IN .5 SEC
EBANK= BODY3
2CADR ATERTASK
TC NEWMODEX # DISPLAY MM 11
MM 11
TC UPFLAG
ADRES NODOP01
CA POWDNCOD # SWITCH TO POWERED FLIGHT DOWNLIST
TS DNLSTCOD
TC BANKCALL
CADR CLEANDSP # CLEAR DSKY IN CASE OF V75
TC 2PHSCHNG
OCT 40514 # PROTECT ATERTASK
OCT 00073
CAF EBQPLACE
# Page 537
TS EBANK
EBANK= QPLACES
CA P11XIT # SET EXIT FROM PROUT IN EARTHR
TS QPLACES
TC INTPRET
VLOAD MXV
THETAN
XSM
VSL1 VAD
ERCOMP
STODL ERCOMP
TLIFTOFF
SSP GOTO
S2
CADR PROUT # RETURN FROM EARTHR
EARTHR +3
MATRXJOB ZL # STORE DP GIMBAL ANGLES FOR ATTITUDE
CA CDUX # ERROR DISPLAY AFTER LIFTOFF
DXCH OGC
ZL
CA CDUY
DXCH IGC
ZL
CA CDUZ
DXCH MGC
TC INTPRET _
VLOAD VSR1 # SCALE OGC B-1
OGC
STORE OGC
SSP # ZERO RTX2
RTX2 # FOR
0 # EARTH
DLOAD PDDL
PGNCSALT # ALTITUDE OF PGNCS
PADLONG # LONGITUDE
PDDL VDEF
LATITUDE # GEODETIC LATITUDE
STODL LAT # LAT,LONG,ALT ARE CONSECUTIVE
HI6ZEROS # TIME = 0
CLEAR CALL
ERADFLAG
LALOTORV # CONVERT TO POSITION VECTOR IN REF. COORDS.
STCALL RN1 # _
GETDOWN # RETURN WITH VECTOR FOR DOWN DIRECTION
VCOMP UNIT
STOVL REFSMMAT +12D # UNITZ = UNIT(GRAV)
RN1
VXV VXSC
# Page 538
UNITW # SCALED AT 1
-ERTHRAT # V = EARTHRATE X R
VSL4 # SCALE TO 2(7) M/CS
STOVL VN1
REFSMMAT +12D
VXV UNIT
UNITW # (REF3 X UNITW) = EAST
PUSH VXV
REFSMMAT +12D # (EAST X REF3) = -SOUTH
UNIT PDDL
LAUNCHAZ # COS(AZ)*SOUTH
COS VXSC
STADR
STODL REFSMMAT # TEMPORARY STORAGE
LAUNCHAZ
SIN VXSC # SIN(AZ)*EAST
VAD UNIT # SIN(AZ)*EAST - COS(AZ)*SOUTH = REF1
REFSMMAT
STORE REFSMMAT
VXV UNIT # (REF1 X REF3) = -REF3
REFSMMAT +12D
VCOMP
STORE REFSMMAT +6
DLOAD DSU
DPHALF # 1/2 REV
LAUNCHAZ
DAD PDDL
AZIMUTH
SATRLRT # SET SATRLRT = -SATRLRT IF
SIGN STADR # (1/2REV -LAVNCHAZ +AZIMUTH) IS NEGATIVE
STORE SATRLRT # FOR ROLL CALC IN FDAI ATT. ERROR DISPLAY
SET EXIT
REFSMFLG # SET REFSMMAT KNOWN FLAG
TC PHASCHNG
OCT 04023
EXTEND
DCA P11SCADR
DXCH AVGEXIT # SET AVGEXIT
CA PRIO31 # 2 SECONDS AT 2(+8)
TS 1/PIPADT
EBANK= RCSFLAGS
CA EBANK6
TS EBANK
INHINT
# Page 539
CS ZERO
TS TBASE5 # RESTART READACCS 2 SECONDS AFTER LIFTOFF
CS TIME1
AD 2SECS # DO READACCS 2 SECONDS AFTER LIFTOFF
CCS A # CHECK TO INSURE DT IS POSITIVE
TCF +3 # TIME POSITIVE
TCF +2 # CANNOT GET HERE
CA ZERO # TIME NEGATIVE -- SET TO 1
AD ONE # RESTORE TIME -- OR MAKE POSITIVE
TC WAITLIST
EBANK= AOG
2CADR READACCS
TC 2PHSCHNG
OCT 00003 # TURN OFF GROUP 3
OCT 00025 # PROTECT NORMLIZE AND READACCS
TC POSTJUMP
CADR NORMLIZE # DO NORMLIZE AND ENDOFJOB
EBANK= TEPHEM
REP11 INHINT
CCS PHASE5
TC ENDOFJOB
CCS LIFTTEMP
TCF +4
TCF +3
TCF +2
TCF P11+7
CS TLIFTOFF
EXTEND
BZMF ENDREP11
CCS TIME2 # ** TIME2 MUST BE NON-ZERO AT LIFTOFF **
TCF REP11A -5 # T2,T1 NOT YET ZEROED, GO AND DO IT
EXTEND # T2,T1 ZEROED, SET TLIFTOFF
DCA LIFTTEMP
TCF REP11A-2
ENDREP11 EXTEND
DCA REP11SA
TCF REP11A-1
#Page 540
REP11S 2OCT 7776600011
REP11SA 2OCT 7776400013
P11XIT GENADR P11OUT
-ERTHRAT 2DEC* -7.292115138 E-7 B18* # - EARTH RATE AT 2(18)
EBANK= BODY3
P11SCADR 2CADR VHHDOT
POWDNCOD EQUALS THREE
EBANK= BODY3
# VHHDOT IS EXECUTED EVERY 2 SECONDS TO DISPLAY ON DSKY
# VI INERTIAL VELOCITY MAGNITUDE
# HDOT RATE OF CHANGE OF ALT ABOVE L PAD RADIUS
# H ALTITUDE ABOVE L PAD RADIUS
VHHDOT TC INTPRET
CALL # LOAD VMAGI, ALTI,
S11.1 # HDOT FOR DISPLAY
EXIT
TC PHASCHNG
OCT 00035
CAF V06N62 # DISPLAY IN R1 R2 R3
TC BANKCALL # VI HDOT H
CADR REGODSP
ATERTASK CAF PRIO1 # ESTABLISH JOB TO DISPLAY ATT ERRORS
TC FINDVAC # COMES HERE AT L.O. + .33 SEC
EBANK= BODY3
2CADR ATERJOB
CS RCSFLAGS # SET BIT3 FOR
MASK BIT3 # NEEDLER
ADS RCSFLAGS # INITIALIZATION PASS
TC IBNKCALL # AND GO
CADR NEEDLER # DO IT
CA BIT1 # SET SW
TS SATSW # FOR DISPLAY
TC TASKOVER
GETDOWN STQ SETPD
INCORPEX
0D
DLOAD
HI6ZEROS
#Page 541
STODL 6D
DPHALF
STCALL 8D
LALOTORV +5
# THIS SECTION PROVIDES ATTITUDE ERROR DISPLAYS TO THE FDAI DURING SONE BOOST
#
# COMPUTE DESIRED PITCH W.R.T. PAD LOCAL VERTICAL AT LIFTOFF
# 2 3 4 5 6
# PITCH = A0+A1T+A2T +A3T +A4T +A5T +A6T
# SCALED TO 32 REVS. -14
# IF TL = TIME IN SECS FROM L.O., THEN T = 100(TL-RPSTART0)2
# WHERE TL GE RPSTART
# TL LE (-POLYSTOP + RPSTART)
# COMPUTE DESIRED ROLL WEHRE ROLL EQUALS ANGLE FROM
# LAUNCHAZ TO -Z(S/C) AS SEEN FROM X(S/C).
# ROLL = LAUNCHAZ-AZIMUTH-.5+SATRLRT*T IN REV
# SATRLRT = RATE OF ROLL IN REV/CENTI-SEC
# T, IN CENTI-SEC, IS DEFINED AS ABOVE, INCLUSIVE OF TIME RESTRICTIONS
#
# FOR SIMPLICITY, LET P = 2*PI*PITCH
# R = 2*PI*ROLL
#
# CONSTRUCT THE TRANSFORMATION MATRIX, TSMV, GIVING DESIRED S/C AXES IN
# TERMS OF SM COORDINATES. LET THE RESULTING ROWS EQUAL THE VECTORS XDC,
# YDC, AND ZDC.
#
# * ( SIN(P) 0 -COS(P) ) (XDC)
# TSMV = (-SIN(R)*COS(P) -COS(R) -SIN(R)*SIN(P)) = (YDC)
# (-COS(R)*COS(P) SIN(R) -COS(R)*SIN(P)) (ZDC)
#
# XDC,YDC,ZDC ARE USED AS INPUT TO CALCGTA FOR THE EXTRACTION OF THE
# EULER SET OF ANGLES WHICH WILL BRING THE SM INTO THE DESIRED
# ORIENTATION. THIS EULER SET, OGC, IGC, AND MGC, MAY BE IDENTIFIED
# AS THE DESIRED CDU ANGLES.
#
# (XDC) (OGC)
# (YDC) ---) CALCGTA ---) (IGC)
# (ZDC) (MGC)
# _
# DEFINE THE VECTOR DELTACDU.
#
# _ (OGC) (CDUX)
# DELTACDU = (IGC) - (CDUY)
# (MGC) (CDUZ)
# _ _ * _
# COMPUTE ATTITUDE ERRORS, A, WHERE A = TGSC*DELTACDU
#
# * (1 SIN(CDUZ) 0 ) THE GIMBAL ANGLES
#Page 542
# TGSC = (0 COS(CDUX)*COS(CDUZ) SIN(CDUX)) = TO SPACECRAFT AXES
# (0 -SIN(CDUX)*COS(CDUZ) COS(CDUX)) CONVERSION MATRIX
# _
# THE ATTITUDE ERRORS, A, ARE STORED ONE HALF SINGLE PRECISION IN
# THE REGISTERS AK, AK1, AK2 AS INPUT TO NEEDLER, THE FDAI ATTITUDE
# ERROR DISPLAY ROUTINE.
ATERJOB CAE FLAGWRD6 # CHECK FLAGWRD6
MASK OCT60000 # BITS 14, 15
EXTEND
BZF +2 # OK -- CONTINUE
TC ENDOFJOB # STAURN STICK ON -- KILL JOB
CAF BIT10 # CHECK IF S/C CONTROL
EXTEND # OF SATURN PANEL
RAND CHAN30 # SWITCH IS ON
EXTEND
BZF STRSAT # IT IS -- GO STEER
CCS SATSW # IT IS NOT -- WAS IT ON LAST CYCLE
TC ATTDISP # NO -- CONTINUE
TC ATRESET # YES -- REINITIALIZE NEEDLER
TC ATRESET # YES -- REINITIALIZE NEEDLER
ATTDISP CS RPSTART # PITCH/ROLL START TIME
AD TIME1
EXTEND
BZMF NOPOLY # IF MINUS THEN ATTITUDE HOLD
TS MPAC # MPAC = TIME1 - RPSTART
TS SPOLYARG # SAVE FOR USE IN ROLL CALCULATION
AD POLYSTOP # NEG PITCHOVER TIME IN CSECS
EXTEND
BZMF +2
TC NOPOLY # GO TO ATTITUDE HOLD
CA TIME2
EXTEND
BZMF +2
TC NOPOLY # GO TO ATTITUDE HOLD
CAE POLYNUM
TS L
CAF COEFPOLY # EVALUATE PITCH POLYNOMIAL
TC POWRSERS # SCALED TO 32 REVOLUTIONS
CA ZERO # RETURN WITH PITCH(32REV)
TS MODE # STORED MPAC, MPAC +1
TC INTPRET
SETPD SL # 32(PITCH(32REV)) = PITCH(REV)
0
5
PUSH # LET P(RAD) = 2*PI*PITCH(REV)
GOTO
ATTDISP1 # AROUND SETLOC
#Page 543
# *
# CONSTRUCT SM TO S/C MATRIX, TSMV
SETLOC P11TWO
BANK # 36 IN COL., 34 IN DISK
COUNT 36/P11
ATTDISP1 COS DCOMP
STODL 14D # -.5*COS(P)
SIN
STODL 10D # .5*SIN(P)
ZEROVECS
STORE 12D # 0
# EVALUATE ROLL = LAUNCHAZ-AZIMUTH-.5+SATRLRT*T
SLOAD DMP
SPOLYARG # TIME1 - RSPSTART, CSECS B-14.
SATRLRT
SL DSU
14D
DPHALF
DAD DSU # ASSUMING X(SM) ALONG LAUNCH AZIMUTH,
LAUNCHAZ # LAUNCHAZ = ANGLE FROM NORTH TO X(SM).
AZIMUTH # AZIMUTH = -ANGLE FROM NORTH TO Z(S/C)
RTB # DETERMINE IF ROLLOUT
RLTST # IS COMPLETED
ATTDISPR PUSH COS # CONTINUE COMPUTING TSMV
PUSH # LET R(RAD) = 2*PI*ROLL(REV)
DMP SL1
14D
STODL 22D # -.5*COS(R)*COS(P)
DCOMP
STORE 18D # -.5*COS(R)
DMP SL1
10D
STODL 26D # -.5*COS(R)*SIN(P)
SIN PUSH
STORE 24D # .5*SIN(R)
DMP SL1
14D
STODL 16D # -.5*SIN(R)*COS(P)
DCOMP
DMP SL1
10D
STOVL 20D # -.5*SIN(R)*SIN(P)
10D
# FROM TSMV FIND THE HALF UNIT VECTORS XDC,YDC,ZDC = INPUT TO CALCGTA
# Page 544
UNIT
STOVL XDC # XDC = .5*UNIT(SIN(P),0,-COS(P))
16D
UNIT
STOVL YDC # YDC = .5*UNIT(-SIN(R)*COS(P),-COS(R),
22D # -SIN(R)*SIN(P))
UNIT
STCALL ZDC # ZDC = .5*UNIT(-COS(R)*COS(P),SIN(R),
CALCGTA # -COS(R)*SIN(P))
# CALL CALCGTA TO COMPUTE DESIRED SM ORIENTATION OGC,IGC, AND MGC
# _ _ _
# FIND DIFFERENCE VECTOR DELTACDU = OGC-CDUX
#
# ENTER HERE IF ATTITUDE HOLD
NOPOLYM VLOAD PUSH # OGC IGC
OGC # CHANGE IGC TO MGC FOR COMPATIBILITY
PUSH CALL # MGC OGC
CDUTRIG # WITH Y,Z,X ORDER OF CDUSPOT
VLOAD RTB # _ DPHI OGC-CDUX , PD4
2 # DELTACDU = DTHETA = IGC-CDUY , 0
V1STO2S # DPSI MGC-CDUZ , 2
STOVL BOOSTEMP
ZEROVECS
STOVL 0
CDUSPOT
RTB RTB
V1STO2S
DELSTOR
STODL 10D
SINCDUZ
DMP SL1
0
DAD SR2 # CHANGE SCALE OF AK TO 2REVS
4
GOTO
ATTDISP2
SETLOC P11ONE
BANK
COUNT 34/P11
ATTDISP2 STODL 16D # 16D, .5(DPHI + DTHETA*SIN(CDUZ))
COSCDUZ
DMP PUSH
0
DMP SL1
COSCDUX
PDDL DMP
# Page 545
SINCDUX
2
DAD SL1
STADR
STODL 17D # 17D, .5(DTHETA*COS(CDUX)*COS(CDUZ)
DMP SL1 # +DPSI*SIN(CDUX))
SINCDUX
PDDL DMP
COSCDUX
2
DSU SL1
STADR
STORE 18D # 18D, .5(-DTHETA*SIN(CDUX)*COS(CDUZ)
TLOAD # +DPSI*COS(CDUX))
16D
STORE AK # STORE ATTITUDE ERRORS IN AK,AK1,AK2
EXIT
CA SATSW
CCS A # CHK TAKEOVER STATUS
TC SATOUT # POS -- DISPLAY ONLY
TC AKLOAD # 0 STORE BIAS
STEERSAT TC INTPRET # NEG STEER L/V
TLOAD TAD
BIASAK
AK
STORE AK # AKS = AKS - STORED BIAS
EXIT
CA AK
TC RESCALES
TS AK
CA AK1
TC RESCALES
TS AK1
CA AK2
TC RESCALES
TS AK2
# DISPLAY ATTITUDE ERRORS ON FDAI VIA NEEDLER
SATOUT TC BANKCALL
CADR NEEDLER
ATERSET CAF OCT31 # DELAY .25 SEC
TC BANKCALL # EXECUTION + DELAY = .56SEC APPROX
CADR DELAYJOB
TC ATERJOB # END OF ATT ERROR DISPLAY CYCLE
AKLOAD CS AK # STORE AKS
TS BIASAK # INTO BIAS
CS AK1 # COMPLEMENTED
TS BIASAK +1
# Page 546
CS AK2
TS BIASAK +2
CS BIT1 # SET SW
TS SATSW # TO STEER
TC STEERSAT # GO STEER
STRSAT CA SATSW # CHECK IF NEDLER
EXTEND # HAS BEEN INITIALIZED
BZMF ATTDISP # YES -- CONTINUE
ATRESET CS RCSFLAGS # NO -- SET
MASK BIT3 # INITIALIZATION SW
ADS RCSFLAGS # FOR NEDLER
TC BANKCALL # AND GO
CADR NEEDLER # DO IT
CAF REVCNT # OCT 6
TC BANKCALL # DELAY JOB
CADR DELAYJOB # 60 MS --WAIT TILL IMUERRCNTR ZEROED
CCS SATSW # CHECK SW STATUS
TC TAKEON # POS STEER INIT.
TC +1 # 0 RETURN TO DISPLAY
CA BIT1 # NEG RETURN TO DISPLAY
TS SATSW # SW = DISPLAY ON
CS BIT9 # DISABLE
EXTEND # SIVB
WAND CHAN12 # TAKEOVER
TC SATOUT # DISPLAY
TAKEON CAF BIT9 # ENABLE
EXTEND # SIVB
WOR CHAN12 # TAKEOVER
CA ZERO # INDICATE NEEDLER
TS SATSW # WAS INITIALIZED
TC SATOUT
S11.1 VLOAD ABVAL
VN
STOVL VMAGI # VI SCALED 2(7) IN METERS/CSEC
RN
UNIT DOT
VN
SL1
STODL HDOT
RPAD
BOF VLOAD
AMOONFLG
EARTHALT
RLS
ABVAL SR2
EARTHALT BDSU
36D
STORE ALTI
RVQ
DELSTOR CA BOOSTEMP
# Page 547
EXTEND # STORE DELTACDU INTO PDL 0,2,4
MSU MPAC
INDEX FIXLOC
TS 0
CA BOOSTEMP +1
EXTEND
MSU MPAC +1
INDEX FIXLOC
TS 2
CA BOOSTEMP +2
EXTEND
MSU MPAC +2
INDEX FIXLOC
TS 4
TCF DANZIG
RLTST CA MPAC # DETERMINE IF ROLLOUT
EXTEND # IS COMPLETED
MP SATRLRT +1
EXTEND
BZMF DANZIG # UNLIKE SIGNS STILL ROLLING
EXTEND # ROLLOUT COMPLETED
DCA MBDYTCTL +2 # ZERO OUT ROLL CONTRIBUTION
DXCH MPAC
TC DANZIG
NOPOLY TC INTPRET # COMES HERE IF
SETPD GOTO # ATTITUDE HOLD
0
NOPOLYM
COEFPOLY ADRES POLYLOC
V06N62 VN 0662
RESCALES EXTEND # RESCALE AK S FOR
MP SATSCALE # NEW HARDWARE
DDOUBL # SCALING FOR
DDOUBL # STEERING
TC Q # SATURN
# SATURN TAKEOVER FUNCTION
# ************************
#
# PROGRAM DESCRIPTION
#
# MOD NUMBER 1
# MOD BY ELIASSEN
#
# FUNCTIONAL DESCRIPTION
#
# DURING THE COASTING PHASE OF SIVB ATTACHED, THE
# ASTRONAUT MAY REQUEST SATURN TAKEOVER THROUGH
# EXTENDED VERB 46 (BITS 13,14 OF DAPDATR1 SET ).
# THE CMC REGARDS RHC COMMANDS AS BODY-AXES RATE
# COMMANDS AND IT TRANSMITS THESE TO SATURN AS DC
#Page 548
# VOLTAGES. THE VALUE OF THE CONSTANT RATE COMMAND
# IS 0.5 DEG/SEC. AN ABSENCE OF RHC ACTIVITY RE-
# SULTS IN A ZERO RATE COMMAND.
#
# THE FDAI ERROR NEEDLES WILL INDICATE THE VALUE
# OF THE RATE COMMAND.
#
# CALLING SEQUENCE
#
# DAPFIG +9D TC POSTJUMP
# CADR SATSTKON
#
# SUBROUTINES CALLED
#
# ENDEXT
# IBNKCALL
# STICKCHK
# NEEDLER
# T5RUPT
# RESUME
#
# ASTRONAUT REQUESTS
#
# ENTRY -- VERB 46 ENTER
# (CONDITION -- BITS 13, 14 OF DAPDATR1 SET)
#
# EXIT -- VERB 48 ENTER (FLASH V06N46)
# VERB 21 ENTER AXXXX ENTER WHERE A=0 OR 1
# VERB 34 ENTER
# VERB 46 ENTER
#
# NORMAL EXIT MODE
#
# VERB 46 ENTER (SEE ASTRONAUT ABOVE)
#
# ALARM OR ABORT EXIT MODES
#
# NONE
#
# OUTPUT
#
# SATURN RATES IN CDUXCMD, CDUYCMD, CDUZCMD
#
# ERASABLE INITIALIZATION
#
# DAPDATR1 (BITS 13, 14 MUST BE SET)
#
# DEBRIS
#
# CENTRALS
#Page 549
# CDUXCMD, CDUYCMD, CDUZCMD
BANK 43
SETLOC EXTVERBS
BANK
COUNT 23/STTKE
SATSTKON EXTEND
DCA 2REDOSAT
INHINT
DXCH T5LOC
CAF POSMAX
TS TIME5
CS FLAGWRD6 # TURN ON BITS 15,14 OF
MASK RELTAB11 # FLAGWRD6
ADS FLAGWRD6 # SATSTICK CONTROL OF T5
TC IBNKCALL # ZERO JET CHANNELS IN 14 MS AND THEN
CADR ZEROJET # LEAVE THE T6 CLOCK DISABLED
RELINT
TC GOPIN # EXIT THUS BECAUSE WE CAME VIA V46
SBANK= PINSUPER # Added RSB 2009
EBANK= BODY3
2REDOSAT 2CADR REDOSAT
SBANK= LOWSUPER
BANK 32
SETLOC P11FOUR
BANK
REDOSAT LXCH BANKRUPT # ALSO COMES HERE FOR RESTARTS
EXTEND
QXCH QRUPT
CS RCSFLAGS # TURN ON BIT3 OF RCSFLAGX
MASK BIT3 # FOR
ADS RCSFLAGS # NEEDLER INITIALIZATION
TC IBNKCALL
CADR NEEDLER # DISABLE IMU ERR COUNTERS ETC.
CAF BIT9 # SIVB
EXTEND # TAKEOVER
WOR CHAN12 # ENABLE
EXTEND # SET UP T5 CYCLE
DCA 2SATSTCK
DXCH T5LOC
CAF 100MST5 # IN 100 MSECS
TS TIME5
TCF RESUME # END OF SATURN STICK INITIALIZATION
# THIS SECTION IS EXECUTED EVERY 100 MSECS.
#Page 550
SATSTICK LXCH BANKRUPT
EXTEND
QXCH QRUPT
CAF 2SATSTCK # SET UP RUPT
TS T5LOC # LO ORDER LOC SET
CAF 100MST5 # 100 MSECS
TS TIME5
CAF STIKBITS
EXTEND
RXOR CHAN31 # CHECK IF MAN ROT BITS SAME
MASK STIKBITS
TC IBNKCALL # SET RATE INDICES
CADR STICKCHK # FOR PITCH YAW AND ROLL
INDEX RMANNDX # SET SATURN RATES
CA SATRATE
TS AK # ROLL
INDEX PMANNDX
CA SATRATE
TS AK1 # PITCH
INDEX YMANNDX
CA SATRATE
TS AK2 # YAW
TC IBNKCALL # FOR SATURN INTERFACE AND FDAI DISPLAY
CADR NEEDLER
TCF RESUME # END OF SATURN STICK CONTROL
STIKBITS OCT 00077
100MST5 DEC 16374
EBANK= BODY3
2SATSTCK 2CADR SATSTICK