-
Notifications
You must be signed in to change notification settings - Fork 343
/
P51-P53.agc
2297 lines (2095 loc) · 89.4 KB
/
P51-P53.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
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
### FILE="Main.annotation"
## Copyright: Public domain.
## Filename: P51-P53.agc
## Purpose: A section of LUM69 revision 2.
## It is part of the reconstructed source code for the flown
## version of the flight software for the Lunar Module's (LM)
## Apollo Guidance Computer (AGC) for Apollo 10. The code has
## been recreated from a copy of Luminary revsion 069, using
## changes present in Luminary 099 which were described in
## Luminary memos 75 and 78. The code has been adapted such
## that the resulting bugger words exactly match those specified
## for LUM69 revision 2 in NASA drawing 2021152B, which gives
## relatively high confidence that the reconstruction is correct.
## Reference: pp. 925-978
## Assembler: yaYUL
## Contact: Ron Burkey <info@sandroid.org>.
## Website: www.ibiblio.org/apollo/index.html
## Mod history: 2019-07-27 MAS Created from Luminary 69.
## Page 925
# PROGRAM NAME- PROG52 DATE- JAN 9, 1967
# MOD NO- 0 LOG SECTION- P51-P53
# MODIFICATION BY- LONSKE ASSEMBLY- SUNDANCE REV 46
# FUNCTIONAL DESCRIPTION-
# ALIGNS THE IMU TO ONE OF THREE ORIENTATIONS SELECTED BY THE ASTRONAUT. THE PRESENT IMU ORIENTATION IS KNOWN
# AND IS STORED IN REFSMMAT. THE THREE POSSIBLE ORIENTATIONS MAY BE_
# (A) PREFERRED ORIENTATION
# AN OPTIMUM ORIENTATION FOR A PREVIOUSLY CALCULATED MANUEVER. THIS ORIENTATION MUST BE CALCULATED AND
# STORED BY A PREVIOUSLY SELECTED PROGRAM.
# (B) NOMINAL ORIENTATION
#
# X = UNIT ( R )
# -SM
# Y = UNIT (V X R)
# SM
# Z = UNIT (X X Y )
# SM SM SM
# WHERE_
# R = THE GEOCENTRIC RADIUS VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
# -
# V = THE INERTIAL VELOCITY VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
# -
# (C) REFSMMAT ORIENTATION
# (D) LANDING SITE - THIS IS NOT AVAILIBLE IN SUNDANCE
# THIS SELECTION CORRECTS THE PRESENT IMU ORIENTATION. THE PRESENT ORIENTATION DIFFERS FROM THAT TO WHICH IT
# WAS LAST ALIGNED ONLY DUE TO GYRO DRIFT(I.E. NEITHER GIMBAL LOCK NOR IMU POWER INTERRUPTION HAS OCCURED
# SINCE THE LAST ALIGNMENT).
# AFTER A IMU ORIENTATION HAS BEEN SELECTED ROUTINE S52.2 IS OPERATED TO COMPUTE THE GIMBAL ANGLES USING THE
# NEW ORIENTATION AND THE PRESENT VEHICLE ATTITUDE. CAL52A THEN USES THESE ANGLES, STORED IN THETAD,+1,+2, TO
# COARSE ALIGN THE IMU. THE STAR SELECTION ROUTINE, R56, IS THEN OPERATED. IF 2 STARS ARE NOT AVAILABLE AN ALARM
# IS FLASHED TO NOTIFY THE ASTRONAUT. AT THIS POINT THE ASTRONAUT WILL MANUEVER THE VEHICLE AND SELECT 2 STARS
# EITHER MANUALLY OR AUTOMATICALLY. AFTER 2 STARS HAVE BEEN SELECTED THE IMU IS FINE ALIGNED USING ROUTINE R51. IF
# THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING(INDICATED BY RNDVZFLG) P20 IS DISPLAYED. OTHERWISE P00 IS
# REQUESTED.
# CALLING SEQUENCE-
## Page 926
# THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
# SUBROUTINES CALLED-
# 1. FLAGDOWN 7. S52.2 13. NEWMODEX
# 2. R02BOTH 8. CAL53A 14. PRIOLARM
# 3. GOPERF4 9. FLAGUP
# 4. MATMOVE 10. R56
# 5. GOFLASH 11. R51
# 6. S52.3 12. GOPERF3
# NORMAL EXIT MODES-
# EXITS TO ENDOFJOB
# ALARM OR ABORT EXIT MODES-
# NONE
# OUTPUT-
# THE FOLLOWING MAY BE FLASHED ON THE DSKY
# 1. IMU ORIENTATION CODE
# 2. ALARM CODE 215 -PREFERRED IMU ORIENTATION NOT SPECIFIED
# 3. TIME OF NEXT IGNITION
# 4. GIMBAL ANGLES
# 5. ALARM CODE 405 -TWO STARS NOT AVAILABLE
# 6. PLEASE PERFORM P00
# THE MODE DISPLAY MAY BE CHANGED TO 20
# ERASABLE INITIALIZATION REQUIRED-
# PFRATFLG SHOULD BE SET IF A PREFERRED ORIENTATION HAS BEEN COMPUTED.IF IT HAS BEEN COMPUTED IT IS STORED IN
# XSMD,YSMD,ZSMD.
# RNDVZFLG INDICATES WHETHER THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING.
# DEBRIS-
# WORK AREA
BANK 33
SETLOC P50S
BANK
EBANK= BESTI
COUNT* $$/P52
PROG52 TC BANKCALL
CADR R02BOTH # IMU STATUS CHECK
CAF PFRATBIT
MASK FLAGWRD2 # IS PFRATFLG SET?
CCS A
## Page 927
TC P52A # YES
CAF BIT2 # NO
TC P52A +1
P52A CAF BIT1
TS OPTION2
P52B CAF BIT1
TC BANKCALL # FLASH OPTION CODE AND ORIENTATION CODE
CADR GOPERF4R # FLASH V04N06
TC GOTOPOOH
TCF +5 # V33-PROCEED
TC P52B # NEW CODE - NEW ORIENTATION CODE INPUT
TC PHASCHNG # DISPLAY RETURN
OCT 00014
TC ENDOFJOB
CA OPTION2
MASK THREE
INDEX A
TC +1
TC P52T
TC P52H
TC P52T
P52E TC INTPRET
GOTO
P52F
P52T EXTEND
DCA NEG0
DXCH DSPTEM1
CAF V06N34*
TC BANKCALL
CADR GOFLASH
TC GOTOPOOH
TC +2
TC -5
DXCH DSPTEM1
EXTEND
BZMF +2 # IF TIME ZERO OR NEG USE TIME2
TCF +3
EXTEND
DCA TIME2
DXCH TALIGN
P52V CA OPTION2
MASK BIT2
CCS A
TC P52W
TC INTPRET # OPTION 4 - GET LS ORIENTATION
GOTO
P52LS
## Page 928
# START ALIGNMENT
P52W TC INTPRET
DLOAD
TALIGN # PICK UP ALIGN TIME
CALL # COMPUTE NOMINAL IMU
S52.3 # ORIENTATION
P52D CALL # READ VEHICLE ATTITUDE AND
S52.2 # COMPUTE GIMBAL ANGLES
EXIT
CAF V06N22*
TC BANKCALL # DISPLAY GIMBAL ANGLES
CADR GOFLASH
TC GOTOPOOH
TCF COARSTYP # V33-PROCEED, SEE IF GYRO TORQUE COARSE
TC INTPRET # RECYCLE - VEHICLE HAS BEEN MANUEVERED
GOTO
P52D
REGCOARS TC INTPRET
CALL # DO COARSE ALIGN
CAL53A # ROUTINE
SET CLEAR
REFSMFLG
PFRATFLG
P52F CALL
R51
P52OUT EXIT
TC GOTOPOOH
P52H TC INTPRET # PREFERRED OPTION, GO COMPUTE GIMBALS
GOTO
P52D
VB05N09 = V05N09
V06N22* VN 00622
V06N34* VN 634
V06N89* VN 0689
## Page 929
# CHECK FOR GRRO TORQUE COARSE ALIGNMENT
COARSTYP CAF OCT13
TC BANKCALL # DISPLAY V 50N25 WITH COARSE ALIGN OPTION
CADR GOPERF1
TCF GOTOPOOH # V34-TERMIN&OE
TCF REGCOARS # V33-NORMAL COARSE
TC INTPRET # V32-GYRO TORQUE COARSE
VLOAD MXV
XSMD # GET SM(DESIRED) WRT SM(PRESENT)
REFSMMAT
UNIT
STOVL XDC
YSMD
MXV UNIT
REFSMMAT
STOVL YDC
ZSMD
MXV UNIT
REFSMMAT
STCALL ZDC
GYCOARS
GOTO
P52OUT
OCT13 OCT 13
## Page 930
# COMPUTE LANDING ORIENTATION FOR OPTION 4
P52LS SET CLEAR # GET LANDING SITE ORIENTATION
LUNAFLAG
ERADFLAG # TO PICK UP RLS
SETPD VLOAD
0
RLS # PICK UP LANDING SITE VEC IN MF
PDDL PUSH # RLS PD 0-5
TALIGN
CALL
RP-TO-R # TRANS RLS TO REF
VSR2
STODL ALPHAV # INPUT TO LAT-LONG
TALIGN
CALL
LAT-LONG # GET LAT, LONG, AND ALT
DLOAD SR1 # RESCALE LONG TO DEGREES/2
LONG
STODL LANDLONG
ALT
STODL LANDALT # ALT ALREADY AT 2(29) METERS
LAT
STORE LANDLAT
EXIT
LSDISP CAF V06N89* # DISPLAY LAT,LONG/2, ALT
TC BANKCALL
CADR GOFLASH
TCF GOTOPOOH # VB34 TERMINATE
TCF +2 # VB33 PROCEED
TCF LSDISP # VB32 RECYCLE
TC INTPRET
DLOAD SL1
LANDLONG
STODL LONG
LANDALT
STODL ALT
LANDLAT
STODL LAT
TALIGN
CALL
LALOTORV
VLOAD UNIT # COMPUTE LANDING SITE ORIENT (XSMD)
ALPHAV
STCALL XSMD
LSORIENT
GOTO
P52D # NOW GO COMPUTE GIMBAL ANGLES
## Page 931
# NAME -S50 ALIAS LOCSAM
# BY
# VINCENT
# FUNCTION - COMPUTE INPUTS FOR PICAPAR AND PLANET
# DEFINE
#
# U = UNIT( SUN WRT EARTH)
# ES
# U =UNIT( MOON WRT EARTH)
# EM
# R =POSITION VECTOR OF LEM
# L
# R =MEAN DISTANCE (384402KM) BETWEEN EARTH AND MOON
# EM
# P =RATIO R /(DISTANCE SUN TO EARTH) >.00257125
# EM
# R =EQUATORIAL RADIUSS (6378.166KM) OF EARTH
# E
# LOCSAM COMPUTES IN EARTH INFLUENCE
#
# VSUN = U
# ES
# VEARTH = -UNIT( R )
# L
# VMOON = UNIT(R .U - R )
# EM EM L
# CSUN = COS 90
# CEARTH = COS(5 + ARCSIN(R /MAG(R )))
# E L
# CMOON = COS 5
#
# INPUT - TIME IN MPAC
# OUTPUT - LISTED ABOVE
# SUBROUTINES -LSPOS,LEMPREC
# DEBRIS - VAC AREA ,TSIGHT
## Page 932
SETLOC P50S1
BANK
EBANK= XSM
COUNT* $$/LOSAM
S50 = LOCSAM
LOCSAM STQ
QMIN
STCALL TSIGHT
LSPOS
DLOAD
TSIGHT
STCALL TDEC1
LEMPREC
SSP TIX,2
S2
0
MOONCNTR
EARTCNTR VLOAD VXSC
VMOON
RSUBEM
VSL1 VSU
RATT
UNIT
STOVL VMOON
RATT
UNIT VCOMP
STODL VEARTH
RSUBE
CALL
OCCOS
STODL CEARTH
CSS5
STCALL CMOON
ENDSAM
MOONCNTR VLOAD VXSC
VMOON
ROE
BVSU UNIT
VSUN
STOVL VSUN
VMOON
VXSC VAD
RSUBEM
RATT
UNIT VCOMP
STOVL VEARTH
RATT
UNIT VCOMP
## Page 933
STODL VMOON
RSUBM
CALL
OCCOS
STODL CMOON
CSS5
STORE CEARTH
ENDSAM DLOAD
CSSUN
STORE CSUN
GOTO
QMIN
OCCOS DDV SR1
36D
ASIN DAD
5DEGREES
COS SR1
RVQ
CEARTH = 14D
CSUN = 16D
CMOON = 18D
CSS5 2DEC .2490475 # (COS 5)/4
CSSUN 2DEC .125 # (COS 60)/4
5DEGREES 2DEC .013888889 # SCALED IN REVS
## Page 934
# PROGRAM NAME - R56 DATE DEC 20 66
# MOD 1 LOG SECTION P51-P53
# ASSEMBLY SUNDISK REV40
# BY KEN VINCENT
#
# FUNCTION
# THIS PROGRAM READ THE IMU-CDUS AND COMPUTES THE VEHICLE ORIENTATION
# WITH RESPECT TO INERTIAL SPACE. IT THEN COMPUTES THE SHAFT AXIS (SAX)
# WITH RESPECT TO REFERENCE INERTIAL. EACH STAR IN THE CATALOG IS TESTED
# TO DETERMINE IF IT IS OCCULTED BY EITHER THE EARTH,SUN OR MOON. IF A
# STAR IS NOT OCCULTED THEN IT IS PAIRED WITH ALL STAR OF LOWER INDEX.
# THE PAIRED STAR IS TESTED FOR OCCULTATION. PAIRS OF STARS THAT PASS
# THE OCCULTATION TESTS ARE TESTED FOR GOOD SEPARATION.A PAIR OF STARS
# HAVE GOOD SEPERATION IF THE ANGLE BETWEEN THEM IS LESS THAN 100 DEGREES
# AND MORE THAN 50 DEGREES. THOSE PAIRS WITH GOOD SEPARATION
# ARE THEN TESTED TO SEE IF THEY LIE IN CURRENT FIELD OF VIEW.(WITHIN
# 50 DEGREESOF SAX).THE PAIR WITH MAX SEPARATION IS CHOSEN FROM
# THOSE WITH GOOD SEPARATION,AND IN FIELD OF VIEW.
#
# CALLING SEQUENCE
# L TC BANKCALL
# L+1 CADR R56
# L+2 ERROR RETURN - NO STARS IN FIELD OF VIEW
# L+3 NORMAL RETURN
#
# OUTPUT
# BESTI,BESTJ -SINGLE PREC,INTEGERS,STAR NUMBERS TIMES 6
# VFLAG - FLAG BIT SET IMPLIES NO STARS IN FIELD OF VIEW
#
# INITIALIZATION
# 1)A CALL TO LOCSAM MUST BE MADE
#
# DEBRIS
# WORK AREA
# X,Y,ZNB
# SINCDU,COSCDU
# STARAD - STAR +5
R56 = PICAPAR
COUNT* $$/R56
PICAPAR TC MAKECADR
TS QMIN
TC INTPRET
CALL
CDUTRIG
CALL
CALCSMSC
SETPD
0
SET DLOAD # VFLAG = 1
VFLAG
## Page 935
DPZERO
STOVL BESTI
XNB
VXSC PDVL
HALFDP
ZNB
AXT,1 VXSC
228D # X1 = 37 X 6 + 6
HALFDP
VAD
VXM UNIT
REFSMMAT
STORE SAX # SAX = SHAFT AXIS
SSP SSP # S1=S2=6
S1
6
S2
6
PIC1 TIX,1 GOTO # MAJOR STAR
PIC2
PICEND
PIC2 VLOAD* DOT
CATLOG,1
SAX
DSU BMN
CSS33
PIC1
LXA,2
X1
PIC3 TIX,2 GOTO
PIC4
PIC1
PIC4 VLOAD* DOT
CATLOG,2
SAX
DSU BMN
CSS33
PIC3
VLOAD* DOT*
CATLOG,1
CATLOG,2
DSU BPL
CSS40
PIC3
VLOAD* CALL
CATLOG,1
OCCULT
BON
CULTFLAG
PIC1
## Page 936
VLOAD* CALL
CATLOG,2
OCCULT
BON
CULTFLAG
PIC3
STRATGY BONCLR
VFLAG
NEWPAR
XCHX,1 XCHX,2
BESTI
BESTJ
STRAT VLOAD* DOT*
CATLOG,1
CATLOG,2
PUSH BOFINV
VFLAG
STRAT -3
DLOAD DSU
BPL
PIC3
NEWPAR SXA,1 SXA,2
BESTI
BESTJ
GOTO
PIC3
OCCULT MXV BVSU
CULTRIX
CSS
BZE
CULTED
BMN SIGN
CULTED
MPAC +3
BMN SIGN
CULTED
MPAC +5
BMN CLRGO
CULTED
CULTFLAG
QPRET
CULTED SETGO
CULTFLAG
QPRET
CSS = CEARTH
CSS40 2DEC .16070 # COS 50 / 4
CSS33 2DEC .16070 # COS 50 / 4
PICEND BOFF EXIT
## Page 937
VFLAG
PICGXT
TC PICBXT
PICGXT LXA,1 LXA,2
BESTI
BESTJ
VLOAD DOT*
SAX
CATLOG,1
PDVL DOT*
SAX
CATLOG,2
DSU
BPL SXA,1
PICNSWP
BESTJ
SXA,2
BESTI
PICNSWP EXIT
INCR QMIN
PICBXT CA QMIN
TC SWCALL
VPD = 0D
V0 = 6D
V1 = 12D
V2 = 18D
V3 = 24D
DP0 = 30D
DP1 = 32D
## Page 938
# NAME-R51 FINE ALIGN
# FUNCTION-TO ALIGN THE STABLE MEMBER TO REFSMMAT
# CALLING SEQ- CALL R51
# INPUT - REFSMMAT
# OUTPUT- GYRO TORQUE PULSES
# SUBROUTINES -LOCSAM,PICAPAR,R52,R53,R54,R55
COUNT* $$/R51
R51 STQ
QMAJ
R51.1 EXIT
R51C CAF OCT15
TC BANKCALL
CADR GOPERF1
TC GOTOPOOH
TC +2 # V33E
TC R51E # ENTER
TC INTPRET
RTB DAD
LOADTIME
TSIGHT1
CALL
LOCSAM
EXIT
TC BANKCALL
CADR R56
TC R51I
R51F TC R51E
R51I TC ALARM
OCT 405
CAF VB05N09
TC BANKCALL
CADR GOFLASH
TC GOTOPOOH
TC R51E
TC R51C
R51E CAF ZERO
TS STARIND
R51.2 TC INTPRET
R51.3 EXIT
TC PHASCHNG
OCT 05024
OCT 13000
TC INTPRET
CALL
R52 # AOP WILL MAKE CALLS TO SIGHTING
EXIT
TC BANKCALL
CADR AOTMARK
TC BANKCALL
CADR OPTSTALL
## Page 939
TC CURTAINS
CCS STARIND
TCF +2
TC R51.4
TC INTPRET
VLOAD
STARAD +6
STORE STARSAV2
EXIT
TC PHASCHNG
OCT 05024
OCT 13000
TC INTPRET
DLOAD CALL
TSIGHT
PLANET
MXV UNIT
REFSMMAT
STOVL STARAD +6
PLANVEC
MXV UNIT
REFSMMAT
STOVL STARAD
STARSAV1
STOVL 6D
STARSAV2
STCALL 12D
R54 # STAR DATA TEST
BOFF CALL
FREEFLAG
R51K
AXISGEN
CALL
R55 # GYRO TORQUE
CLEAR
PFRATFLG
R51K EXIT
R51P63 CAF OCT14
TC BANKCALL
CADR GOPERF1
TC GOTOPOOH
TC R51C
TC INTPRET
GOTO
QMAJ
R51.4 TC INTPRET
VLOAD
STARAD +6
STORE STARSAV1
DLOAD CALL
## Page 940
TSIGHT
PLANET
STORE PLANVEC
SSP
STARIND
1
GOTO
R51.3
TSIGHT1 2DEC 36000 # 6 MIN TO MARKING
## Page 941
# GYRO TORQUE COARSE ALIGNMENT
GYCOARS STQ CALL
QMAJ
CALCGTA
CLEAR CLEAR
DRIFTFLG
REFSMFLG
EXIT
CAF V16N20 # MONITOR GIMBALS
TC BANKCALL
CADR GODSPR
CA R55CDR
TC BANKCALL
CADR IMUPULSE
TC BANKCALL
CADR IMUSTALL
TC CURTAINS
TC PHASCHNG
OCT 05024
OCT 13000
TC INTPRET
AXC,1 AXC,2
XSMD
REFSMMAT
CALL # STORE DESIRED REFSMMAT
MATMOVE
CLEAR SET
PFRATFLG
REFSMFLG
CALL
NCOARSE # SET DRIFT AND INITIALIZE 1/PIPADT
GOTO
R51K
V16N20 VN 1620
## Page 942
# R55 GYRO TORQUE
# FUNCTION-COMPUTE AND SEND GYRO PULSES
# CALLING SEQ- CALL R55
# INPUT- X,Y,ZDC- REFSMMAT WRT PRESENT STABLE MEMBER
# OUTPUT- GYRO PULSES
# SUBROUTINES- CALCGTA,GOFLASH,GODSPR,IMUFINE, IMUPULSE,GOPERF1
COUNT* $$/R55
R55 STQ
QMIN
CALL
CALCGTA
PULSEM EXIT
R55.1 CAF V06N93
TC BANKCALL
CADR GOFLASH
TC GOTOPOOH
TC R55.2
TC R55RET
R55.2 TC PHASCHNG
OCT 00214
CA R55CDR
TC BANKCALL
CADR IMUPULSE
TC BANKCALL
CADR IMUSTALL
TC CURTAINS
TC PHASCHNG
OCT 05024
OCT 13000
R55RET TC INTPRET
GOTO
QMIN
V06N93 VN 0693
R55CDR ECADR OGC
R54 = CHKSDATA
# ROUTINE NAME- CHKSDATA DATE- JAN 9, 1967
# MOD NO- 0 LOG SECTION- P51-P53
# MODIFICATION BY- LONSKE ASSEMBLY-
# FUNCTIONAL DESCRIPTION - CHECKS THE VALIDITY OF A PAIR OF STAR SIGHTINGS. WHEN A PAIR OF STAR SIGHTINGS ARE MADE
# BY THE ASTRONAUT THIS ROUTINE OPERATES AND CHECKS THE OBSERVED SIGHTINGS AGAINST STORED STAR VECTORS IN THE
# COMPUTER TO INSURE A PROPER SIGHTING WAS MADE. THE FOLLOWING COMPUTATIONS ARE PERFORMED_
# OS1 = OBSERVED STAR 1 VECTOR
# OS2 = OBSERVED STAR 2 VECTOR
# SS1 = STORED STAR 1 VECTOR
# SS2 = STORED STAR 2 VECTOR
# A1 = ARCCOS(OS1 - OS2)
# A2 = ARCCOS(SS1 - SS2)
# A = ABS(2(A1 - A2))
## Page 943
# THE ANGULAR DIFFERENCE IS DISPLAYED FOR ASTRONAUT ACCEPTENCE
# EXIT MODE 1. FREEFLAG SET IMPLIES ASTRONAUT WANTS TO PROCEED
# 2. FREEFLAG RESET IMPLIES ASTRONAUT WANTS TO RECYCLE ERANCE)
# OUTPUT - 1.VERB 6,NOUN 3- DISPLAYS ANGULAR DIFFERENCE BETWEEN 2 SETS OF STARS.
# 2.STAR VECTORS FROM STAR CATALOG ARE LEFT IN 6D AND 12D.
# ERASABLE INITIALIZATION REQUIRED -
# 1.MARK VECTORS ARE STORED IN STARAD AND STARAD +6.
# 2.CATALOG VECTORS ARE STORED IN 6D AND 12D.
# DEBRIS -
COUNT* $$/R54
CHKSDATA STQ SET
QMIN
FREEFLAG
CHKSAB AXC,1 # SET X1 TO STORE EPHEMERIS DATA
STARAD
CHKSB VLOAD* DOT* # CAL. ANGLE THETA
0,1
6,1
SL1 ACOS
STORE THETA
BOFF INVERT # BRANCH TO CHKSD IF THIS IS 2ND PASS
FREEFLAG
CHKSD
FREEFLAG # CLEAR FREEFLAG
AXC,1 DLOAD # SET X1 TO MARK ANGLES
6D
THETA
STORE 18D
GOTO
CHKSB # RETURN TO CAL. 2ND ANGLE
CHKSD DLOAD DSU
THETA
18D
ABS RTB # COMPUTE POS DIFF
SGNAGREE
STORE NORMTEM1
SET EXIT
FREEFLAG
CAF VB6N5
TC BANKCALL
CADR GOFLASH
TCF GOTOPOOH
TC CHKSDA # PROCEED
TC INTPRET
CLEAR GOTO
FREEFLAG
QMIN
CHKSDA TC INTPRET
## Page 944
GOTO
QMIN
VB6N5 VN 605
# NAME - CAL53A
# FUNCTION -COMPUTE DESIRED GIMBAL ANGLES AND COARSE ALIGN IF NECESSARY
# CALLING SEQUENCE - CALL CAL53A
# INPUT - X,Y,ZSMD ,CDUX,Y,Z
# DESIRED GIMBAL ANGLES - THETAD,+1,+2
# OUTPUT - THE IMU COORDINATES ARE STORED IN REFSMMAT
# SUBROUTINES - S52.2, IMUCOARSE , IMUFINE
COUNT* $$/R50
CAL53A STQ CALL
29D
S52.2 # MAKE ONE FINAL COMP OF GIMBLE ANGLES
RTB SSP
RDCDUS # READ CDUS
S1
1
AXT,1 SETPD
3
4
CALOOP DLOAD* SR1
THETAD +3D,1
PDDL* SR1
4,1
DSU ABS
PUSH DSU
DEGREE1
BMN DLOAD
CALOOP1
DSU BPL
DEG359
CALOOP1
COARFINE CALL
COARSE
CALL
NCOARSE
GOTO
FINEONLY
CALOOP1 TIX,1
CALOOP
FINEONLY AXC,1 AXC,2
XSM
REFSMMAT
CALL
MATMOVE
GOTO
29D
MATMOVE VLOAD* # TRANSFER MATRIX
0,1
## Page 945
STORE 0,2
VLOAD*
6D,1
STORE 6D,2
VLOAD*
12D,1
STORE 12D,2
RVQ
DEGREE1 DEC 46 # 1 DEG SCALED CDU/2
DEG359 DEC 16338 # 359 DEG SCALED CDU/2
RDCDUS INHINT # READ CDUS
CA CDUX
INDEX FIXLOC
TS 1
CA CDUY
INDEX FIXLOC
TS 2
CA CDUZ
INDEX FIXLOC
TS 3
RELINT
TC DANZIG # +
COUNT* $$/INFLT
CALCSMSC AXC,1
XNB
XNBNDX DLOAD DMP
SINCDUY
COSCDUZ
DCOMP
PDDL SR1
SINCDUZ
PDDL DMP
COSCDUY
COSCDUZ
VDEF VSL1
STORE 0,1
DLOAD DMP
SINCDUX
SINCDUZ
SL1
STORE 26D
DMP
SINCDUY
PDDL DMP
COSCDUX
COSCDUY
DSU
PDDL DMP
SINCDUX
## Page 946
COSCDUZ
DCOMP
PDDL DMP
COSCDUX
SINCDUY
PDDL DMP
COSCDUY
26D
DAD VDEF
VSL1
STORE 14,1
VXV* VSL1
0,1
STORE 6,1
RVQ
## Page 947
# NAME - P51 - IMU ORIENTATION DETERMINATION
# MOD.NO.1 23 JAN 67 LOG SECTION - P51-P53
# MOD BY STURLAUGSON ASSEMBLY SUNDANCE REV56
# FUNCTIONAL DESCRIPTION
# DETERMINES THE INERTIAL ORIENTATION OF THE IMU. THE PROGRAM IS SELECTED BY DSKY ENTRY. THE SIGHTING
# (AOTMARK)ROUTINE IS CALLED TO COLLECT AND PROCESS MARKED-STAR DATA. AOTMARK(R53) RETURNS THE STAR NUMBER AND THE
# STAR LOS VECTOR IN STARAD+6. TWO STARS ARE THUS SIGHTED. THE ANGLE BETWEEN THE TWO STARS IS THEN CHECKED AT
# CHKSDATA(R54). REFSMMAT IS THEN COMPUTED AT AXISGEN.
# CALLING SEQUENCE
# THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
# SUBROUTINES CALLED.
# GOPERF3
# GOPERF1
# GODSPR