Re: Landing RADAR Data Reasonableness Test
I dived into the documentation and the Luminary source and here's what I think is happening.
From R-567: Guidance System Operations Plan for Manned LM Earth Orbital and Lunar Missions Using Program Luminary 1C (Rev. 131) Pages 5.3-81-85
First, here's the note about why they're doing it:
The objective of the LR data reasonableness test is to detect and reject degraded LR data caused by cross-coupled side lobe or vibrating structure frequency-tracker lock-up.
Well, naturally. (However, if you now want to make a comment about a
cross-coupled side lobe or a
vibrating structure frequency-tracker lock-up you're either an electrical engineer or you've got a dirty mind.)
The altitude (un)reasonableness test is a linear function of the estimated current altitude:
|<delta>q| >= DELQFIX + 0.125 q'
This tests if the (absolute value of the difference between the landing radar altitude and the currently estimated altitude based on the state vector) is greater than or equal to (DELQFIX + 1/8 of the state vector estimated altitude). If this happens then the LR data looks bad and we should flash the ALT light so the astronaut is aware that there is a problem.
The reasonableness test says that as you're descending the altitude presented by the landing radar should fall within a gradually decreasing envelope around the current state-vector's estimate.
Apparently DELQFIX is normally set to 50 feet but I'm not sure where. DELQFIX is in erasable memory. Of course all the calculations are done in meters - in this case scaled 2^-24 with the least significant bit of the double precision value representing 1/16 of a meter.
The Luminary (LGC computer program) code for this calculation is as follows. The #s are comments. DELTAH (=<delta>q) and HCALC (=q') have already been computed and DELTAH is already in the MPAC accumulator register.
TC INTPRET
ABS DSU
DELQFIX # ABS(DELTAH) - DQFIX 50 FT NOM
SL3 DSU # SCALE TO 2(21)
HCALC # ABS(DELTAH) - (50 + HCALC/8) AT 2(21)
EXIT
INCR LRLCTR
TC BRANCH
TCF HFAIL # DELTA H TOO LARGE
TCF HFAIL # DELTA H TOO LARGE
TC DOWNFLAG # TURN OFF ALT FAIL LAMP
ADRES HFLSHFLG
...
HFAIL
...
TC UPFLAG # AND SET BIT TO TURN ON TRACKER FAIL LITE
ADRES HFLSHFLG
The stuff between the "TC INTPRET" and the "EXIT" tells the instruction interpreter to execute some magic multi-precision interpreted instructions. To save space (instructions codes are small and you can fit two in a word) a pair of instructions are written on a single line and then the arguments for those instructions follow that line. So you should mentally be reading this as:
start of magic interpreter instruction section
ABS # ABS(DELTAH)
DSU DELQFIX # ABS(DELTAH) - DELQFIX
SL3 # (ABS(DELTAH) - DELQFIX) * 8
DSU HCALC # (ABS(DELTAH) - DELQFIX) * 8 - HCALC
end of magic interpreter instruction section
which computes the value of
(|<delta>q| - DELQFIX) * 8 - q'
which has the correct sign for the reasonableness test.
The "TC BRANCH" is a subroutine call which tests the double-precision value left by the magic multi-precision instructions and then runs whichever of the following instructions corresponds to a value > 0, = 0 or < 0. In this case it will jump to HFAIL if the value is >= 0.
Finally the flag argument to the "TC UPFLAG" subroutine call is (naturally) in the instruction slot
following the subroutine call. We're going to be setting the
H-
FLa
SHing-
FLa
G which will cause the ALT light to flash.
The velocity (un)reasonableness calculation is similar but uses vectors!