Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof LUNAR_LANDING_GUIDANCE_EQUATIONS (Page 798-802) #606 #770

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions Luminary099/LUNAR_LANDING_GUIDANCE_EQUATIONS.agc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# ********************************************************

# FLIGHT SEQUENCE TABLES ARE ARRANGED BY FUNCTION. THEY ARE REFERENCED USING AS AN INDEX THE REGISTER WCHPHASE:

# WCHPHASE = -1 ---> IGNALG
# WCHPHASE = 0 ---> BRAKQUAD
# WCHPHASE = 1 ---> APPRQUAD
Expand Down Expand Up @@ -92,7 +93,7 @@ WHATDISP TCF P63DISPS # BRAKQUAD
WHATALM TCF 1406ALM # BRAKQUAD
TCF 1406ALM # APPRQUAD

# INDICES FOR REFERENCING TARGET PARAMETERS
# INDICES FOR REFERENCING TARGET PARAMETERS:

OCT 0 # IGNALG
TARGTDEX OCT 0 # BRAKQUAD
Expand All @@ -102,7 +103,7 @@ TARGTDEX OCT 0 # BRAKQUAD
# ENTRY POINTS: ?GUIDSUB FOR THE IGNITION ALGORITHM, LUNLAND FOR SERVOUT
#************************************************************************

# IGNITION ALGORITHM ENTRY: DELIVERS N PASSES OF QUADRATIC GUIDANCE
# IGNITION ALGORITHM ENTRY: DELIVERS N PASSES OF QUADRATIC QUIDANCE

?GUIDSUB EXIT
CAF TWO # N = 3
Expand All @@ -127,16 +128,16 @@ LUNLAND TC PHASCHNG

COUNT* $$/R13

# HERE IS THE PHILOSOPHY OF GUILDENSTERN: ON EVERY APPEARANCE OR DISAPPEARANCE OF THE MANUAL THROTTLE
# HERE IS THE PHILOSOPHY OF GUILDENSTERN: ON EVERY APPEARANCE OR DISAPPEARANCE OF THE MANUAL THROTTLE
# DISCRETE TO SELECT P67 OR P66 RESPECTIVELY: ON EVERY APPEARANCE OF THE ATTITUDE-HOLD DISCRETE TO SELECT P66
# UNLESS THE CURRENT PROGRAM IS P67 IN WHICH CASE THERE IS NO CHANGE
# UNLESS THE CURRENT PROGRAM IS P67 IN WHICH CASE THERE IS NO CHANGE.

GUILDEN EXTEND # IS UN-AUTO-THROTTLE DISCRETE PRESENT?
# STERN # RSB 2009: Not originally a comment.
READ CHAN30
READ CHAN30
MASK BIT5
CCS A
TCF STARTP67 # YES
CCS A
TCF STARTP67 # YES
P67NOW? TC CHECKMM # NO: ARE WE IN P67 NOW?
DEC 67
TCF STABL? # NO
Expand Down Expand Up @@ -195,7 +196,7 @@ STABL? CAF BIT13 # IS UN-ATTITUDE-HOLD DISCRETE PRESENT?
EXTEND
RAND CHAN31
CCS A
TCF GUILDRET # YES ALL'S WELL
TCF GUILDRET # YES: ALL'S WELL

P66NOW? CS MODREG
AD DEC66
Expand All @@ -204,16 +205,16 @@ P66NOW? CS MODREG

CA RODCOUNT # NO. HAS THE ROD SWITCH BEEN "CLICKED"?
EXTEND
BZF GUILDRET # NO. CONTINUE WITH AUTOMATIC LANDING
TCF STARTP66 # YES. SWITCH INTO THE ROD MODE.
BZF GUILDRET # NO. CONTINUE WITH AUTOMATIC LANDING.
TCF STARTP66 # YES. SWITCH INTO THE ROD MODE.

RESTART? CA FLAGWRD1 # HAS THERE BEEN A RESTART?
MASK RODFLBIT
EXTEND
BZF STRTP66A # YES. REINITIALIZE BUT LEAVE VDGVERT AS
# IS.

TCF VERTGUID # NO: CONTINUE WITH R.O.D.
TCF VERTGUID # NO: CONTINUE WITH R.O.D.

# *******************************************************************************
# INITIALIZATION FOR THIS PASS
Expand All @@ -225,8 +226,8 @@ GUILDRET CAF ZERO
TS RODCOUNT

# Page 802
+2 EXTEND
DCA TPIP
+2 EXTEND
DCA TPIP
DXCH TPIPOLD

TC FASTCHNG
Expand Down Expand Up @@ -268,13 +269,13 @@ STARTP64 TC NEWMODEX
ADRES REDFLAG


# (CONTINUE TO TTFINCR)
# (CONTINUE TO TTFINCR)

# *********************************************************************************
# INCREMENT TTF/8, UPDATE LAND FOR LUNAR ROTATION, DO OTHER USEFUL THINGS
# *********************************************************************************
#
# TTFINCR COMPUTATIONS ARE AS FOLLOWS --
# TTFINCR COMPUTATIONS ARE AS FOLLOWS:-
# Page 803
# TTF/8 UPDATED FOR TIME SINCE LAST PASS:
# TTF/8 = TTF/8 + (TPIP - TPIPOLD)/8
Expand Down