forked from chrislgarry/Apollo-11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LAMBERT_AIMPOINT_GUIDANCE.s
169 lines (153 loc) · 4.12 KB
/
LAMBERT_AIMPOINT_GUIDANCE.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
# Copyright: Public domain.
# Filename: LAMBERT_AIMPOINT_GUIDANCE.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: 651-653
# Mod history: 2009-05-18 RSB Transcribed from Luminary 099
# page images.
# 2009-06-05 RSB Corrected 4 typos.
# 2009-06-07 RSB Fixed a typo.
#
# 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 651
# GENERAL LAMBERT AIMPOINT GUIDANCE **
# WRITTEN BY RAMA M AIYAWAR
# PROGRAM P-31 DESCRIPTION **
#
# 1. TO ACCEPT TARGETING PARAMETERS OBTAINED FROM A SOURCE EXTERNAL
# TO THE LEM AND COMPUTE THERE FROM THE REQUIRED-VELOCITY AND
# OTHER INITIAL CONDITIONS REQUIRED BY LM FOR DESIRED MANEUVER.
# THE TARGETING PARAMETERS ARE TIG (TIME OF IGNITION), TARGET
# VECTOR (RTARG), AND THE TIME FROM TIG UNTIL THE TARGET IS
# REACHED (DELLT4), DESIRED TIME OF FLIGHT FROM RINIT TO RTARG.
# ASSUMPTIONS **
#
# 1. THE TARGET PARAMETERS MAY HAVE BEEN LOADED PRIOR TO THE
# EXECUTION OF THIS PROGRAM.
# 2. THIS PROGRAM IS APPLICABLE IN EITHER EARTH OR LUNAR ORBIT.
# 3. THIS PROGRAM IS DESIGNED FOR ONE-MAN OPERATION, AND SHOULD
# BE SELECTED BY THE ASTRONAUT BY DSKY ENTRY V37 E31.
# SUBROUTINES USED **
#
# MANUPARM, TTG/N35, R02BOTH, MIDGIM, DISPMGA, FLAGDOWN, BANKCALL,
# GOTOPOOH, ENDOFJOB, PHASCHNG, GOFLASHR, GOFLASH.
#
# MANUPARM CALCULATES APOGEE, PERIGEE ALTITUDES AND DELTAV DESIRED
# FOR THE MANEUVER.
#
# TTG/N35 CLOCKTASK - UPDATES CLOCK.
#
# MIDGIM CALCULATES MIDDLE GIMBAL ANGLE FOR DISPLAY.
#
# R02BOTH IMU - STATUS CHECK ROUTINE.
# DISPLAYS USED IN P-31LM **
#
# V06N33 DISPLAY SOTRED TIG (IN HRS. MINS. SECS.)
# V06N42 DISPLAY APOGEE, PERIGEE, DELTAV.
# V16N35 DISPLAY TIME FROM TIG.
# V06N45 TIME FROM IGNITION AND MIDDLE GIMBAL ANGLE.
# ERASABLE INITIALIZATION REQUIRED **
#
# TIG TIME OF IGNITION DP (B+28) CS.
#
# DELLT4 DESIRED TIME OF FLIGHT DP (B+28) CS
# FROM RINIT TO RTARG.
#
# RTARG RADIUS VECTOR OF TARGET POSITION VECTOR
# RADIUS VECTOR SCALED TO (B+29)METERS IF EARTH ORBIT
# Page 652
# RADIUS VECTOR SCALED TO (B+27)METERS IF MOON ORBIT
# OUTPUT **
#
# HAPO APOGEE ALTITUDE
# HPER PERIGEE ALTITUDE
# VGDISP MAG. OF DELTAV FOR DISPLAY, SCALING B+7 M/CS EARTH
# MAG. OF DELTAV FOR DISPLAY, SCALING B+5 M/CS MOON
# MIDGIM MIDDLE GIMBAL ANGLE
# XDELVFLG RESETS XDELVFLG FOR LAMBERT VG COMPUTATIONS
# ALARMS OR ABORTS NONE **
# RESTARTS ARE VIA GROUP 4 **
SETLOC GLM
BANK
EBANK= SUBEXIT
COUNT* $$/P31
P31 TC P20FLGON
CAF V06N33 # T16
TC VNP00H
TC INTPRET
CLEAR DLOAD
UPDATFLG
TIG
STCALL TDEC1 # INTEGRATE STATE VECTORS TO TIG
LEMPREC
VLOAD SETPD
RATT
0D
STORE RTIG
STOVL RINIT
VATT
STORE VTIG
STODL VINIT
P30ZERO
PUSH PDDL # E4 AND NUMIT = 0
DELLT4
DAD SXA,1
TIG
RTX1
STORE TPASS4
SXA,2 CALL
RTX2
INITVEL
VLOAD PUSH
# Page 653
DELVEET3
STORE DELVSIN
ABVAL CLEAR
XDELVFLG
STCALL VGDISP
GET.LVC
VLOAD PDVL
RTIG
VIPRIME
CALL
PERIAPO1
CALL
SHIFTR1
CALL # LIMIT DISPLAY TO 9999.9 N. MI.
MAXCHK
STODL HPER
4D
CALL
SHIFTR1
CALL # LIMIT DISPLAY TO 9999.9 N. MI.
MAXCHK
STORE HAPO
EXIT
CAF V06N81 # DELVLVC
TC VNP00H
CAF V06N42 # HAPO, HPER, VGDISP
TC VNP00H
TC INTPRET
REVN1645 SET CALL # TRKMKCNT, TTOGO, +MGA
FINALFLG
VN1645
GOTO
REVN1645
# *** END OF LEMP30S .103 ***