Landing On The Moon

Mike Hewson
Mike Hewson
Moderator
Joined: 1 Dec 05
Posts: 6591
Credit: 323987861
RAC: 173209
Topic 230419

It is July 20 1969 in mid afternoon. The place is the lone Lunar Module (LM) at its periaspsis of about 50000 feet above the lunar surface and roughly 250 nautical miles (nm) uprange from the intended landing site upon the Sea Of Tranquility. The LM is travelling at 5560 feet-per-second (fps) with a retrograde attitude. LM Pilot Buzz Aldrin in the right side position, having previously selected Program 63 (P63), and in response to three flashing numbers on the computer's display and keyboard unit (DSKY), presses the PROCEED (PRO) key. As P63 is used for the braking phase of the lunar landing those flashing numbers indicate, respectively : the time of the burn, the time until ignition, and the crossrange distance of the expected landing site from the plane of the LM's orbit. Pressing PRO is to accept that data. The LM's computer is running code called Luminary revision 99. The target of this braking phase is to enter the High Gate, a point 7600 feet in altitude and some 4 nm short of the landing site, at a speed of -140 fps ( ie. descending ) in the vertical direction, with most of the initial velocity downrange gone.

After further steps, including an unscheduled reset of the landing radar (LR) circuit breaker, the BURNBABY code is entered. First it calculates the LM's orbital state vector as it will exist at 30 seconds prior to this Powered Descent Insertion (PDI). PDI is when the descent engine will be fired for the second time. The first occasion was after separation from the Command and Service Module (CSM) at an altitude of 60 nm, which brought the LM down to its current orbit. The state vector calculation is complete when Noun 62 appears on the DSKY. Ignition is now about 10 minutes away. After 5 more minutes Mission Control at Houston gives the GO for PDI. At Time Of Ignition (TIG) minus 35 seconds READACCS reads the accelerometers within the Inertial Measurement Unit (IMU) then schedules the SERVICER job - a sequence that will repeat every two seconds during the subsequent powered flight. At TIG minus 13 seconds Aldrin arms the engine. At TIG minus 7.5 seconds Reaction Control System (RCS) jets briefly fire some gas forwards in order to settle the fuel and oxidizer in their respective tanks (ullage). At TIG minus 5 seconds Aldrin presses PRO in response to a flashing display. The Mission Elapsed Time (MET) for this Apollo 11 mission is at 4 days, six hours and 33 minutes.

TIG/PDI is a moment of truth. There are only three alternatives after that : abort, crash or land safely. The rest is history.

You see, I have just read this amazing book which was published in 2018 by Fort Point Press in Boston. It is titled Sunburst and Luminary : An Apollo Memoir by Mr Don Eyles. He was one of a team of men and women who coded the software for the LM, to be used during powered descents to the Moon's surface. Sunburst and Luminary are the names of operating system versions for the Apollo Guidance Computer (AGC) that sits on the back wall of the LM. It is an outstanding book and tells the tale of Don's involvement as a programmer and as a young person alive in sociopolitical environment of the times. It contains much wit, humor, truths about the Instrumentation Lab (IL) at the Massachusetts Institute of Technology (MIT), and the culture of NASA. What you should do now is go and buy the book and read it cover to cover. It is 357 pages long and also contains a glossary of all the acronyms and other terms, a bibliography, page notes and an index. I paid $57.01 AUD, including shipping, from Booktopia. But if you only want my precis of the central theme of the book then read my further installments here. My especial interest is the generation of program alarms during the Apollo 11 powered descent, what they meant, what caused them, and why the GO from Houston when they occurred might not have been the wisest course of action in retrospect. Luck, both good and bad, played a part. 

{Spoiler Alert : Those alarms can be technically traced to interface assumptions related to two devices that read angle information from sensors on the shaft and trunnion of the Rendevous Radar (RR) assembly. The pointing of the RR was not even relevant to the powered descent.} 

Who knows, you may decide to buy the book anyway.

Cheers, Mike.

Notes:

  • for the most part all numbers are approximate, to aid readability.
  • periapsis, also known here as perilune, is the point of closest approach to the Moon for a given orbit.
  • you will note that the units are Imperial. The (fallacious) gag is that there are two types of countries : those that use the metric system, and those that put men on the Moon.
  • retrograde for the LM means big end first, the part with the landing legs, so that the descent engine is facing the direction of travel. To be exact that engine is arranged to fire along a line that goes through the LM centre of mass.
  • ullage derives from brewing, it is the space above the beer in a keg. The fuel & oxidizer tanks have lower outlets and one wants no bubbles in the mix come ignition time.
  • a state vector means complete information about the position, velocity and attitude of the LM at some time.
  • the AGC in the LM is also called the LGC. There is an identical AGC in the Command Module (CM), but it runs different software ( there are some commonalities).

I have made this letter longer than usual because I lack the time to make it shorter ...

... and my other CPU is a Ryzen 5950X :-) Blaise Pascal

Mike Hewson
Mike Hewson
Moderator
Joined: 1 Dec 05
Posts: 6591
Credit: 323987861
RAC: 173209

For those of you who are too

For those of you who are too young, or otherwise, to know of the LM I will give a quick but not comprehensive overview. It sits in the Apollo stack at launch below the CSM, with a shroud to protect it during launch. Below it is the 3rd stage booster. It has two main parts.

The lower descent stage consists of the descent engine, fuel tanks, the LR and four lander legs that have shock absorbing struts. Three of those legs have a narrow prong that extend about six feet downwards, the purpose of which is to trigger a light on the LM control panel to glow when at least one of them contacts the lunar surface. The other leg has a ladder for passage to/from the surface via an ingress/egress platform with rails.

The upper ascent stage contains the two astronauts - the LM Commander and LM Pilot. It has life support, two hatches, an ascent engine with its fuel tanks, the RR, RCS thrusters in four locations, and various communications equipment. One of the hatches, between the two crew positions at lower leg level, is for ingress/egress to the landing leg ladder. The other is in the centre of the roof and is used for docking.

Those two crew positions inside the LM are the Commander's on the left and the Pilot's on the right. They stand with their feet towards the descent stage, facing the two front triangular windows of the LM that are at eye level. The back wall has the LGC attached, which has dimensions of about two feet by one foot by six inches. The LGC is sealed and has a case made of gold colored magnesium alloy. The control panel with many lights, indicators and switches is on the front wall between the astronauts and to their sides, where the lower part of the centre attaches the DSKY. The IMU is a ball about a foot in diameter sited in the roof of the LM above & between the two crew. Just forward of the IMU a telescope for taking star sightings comes down from the roof. There are two hand controllers for the Commander's position which are used to control powered flight or designate a landing site.

All of the above would not be of much use if not for fluorescent reticles, vertically oriented, attached to the inner and outer surfaces of the window material. These reticles are like the scale that you have on the edge of a ruler, except that they measure degrees of angle. The idea is that given a certain angle as displayed on the DSKY a crewman can line up his eye with the corresponding two reticle markers for that angle and hence look in a certain direction. During the later part of the powered descent the Commander, say, could see what part of the lunar landscape the LGC was targeting. In effect a plane was being defined that would intersect the surface and the Commander may choose, with his right hand controller, to go long or go short, to go left or go right, of that indicated surface target.

Errata from the previous post as I can't edit it. For the PDI acronym I is for Initiation not Insertion. Also P63 initially calculates the duration of the burn, time until ignition and the crossrange distance (my bad wording). Plus I should have said the LM was near its periapsis.

Cheers, Mike.

Notes:

  • for later missions there was a lunar rover folded onto the side of the descent stage. There was also a TV camera that allowed us on Earth to view Armstrong descending down the ladder.
  • the IMU contained accelerometers and gyros for three mutually orthogonal spatial directions. In effect it was a 3D compass that would almost perfectly point in the same spatial direction, regardless of the rotations of the LM surrounding it. The accelerometers were the key to updating the LM's velocity vector which in turn updated the position vector. Now the system wasn't perfect over the long distance from Earth launch to the lunar landing. Also the Moon is not a perfectly spherical ball. Which is why there was the LR to get the height above the surface exactly right during descent.
  • the star sighting telescope was typically used to check or align the stable member (SM, contained within the IMU) orientation to the celestial sphere which was a common reference (REF) structure. One could sight a star, input the findings via the DSKY and an algorithm could inform the contents of a certain 3 by 3 array of numbers called REFSMMAT. Rinse & repeat for many stars to improve the accuracy. You don't want to lose your REFSMMAT, as one has to then laboriously reconstruct it from first principles using the telescope. Jim Lovell in Apollo 13 quickly transferred an approximate REFSMMAT from the CM to the LM after their incident.
  • interestingly, the geometry of the windows and hence the reticles could be affected by the pressurisation of the LM cabin. Too much pressure would cause it to bloat and subtly change the orientation of those reticle angles with respect to the outside world.

I have made this letter longer than usual because I lack the time to make it shorter ...

... and my other CPU is a Ryzen 5950X :-) Blaise Pascal

astro-marwil
astro-marwil
Joined: 28 May 05
Posts: 534
Credit: 663976543
RAC: 569684

Hallo Mike! Do you know

Hallo Mike!

Do you know whether the other nations - Russia, China etc. - follow a different strategy for landing on the moon, and what is it? And is this for the planed moon mission the same as for the historic first one? Except that the mechanical gyros from 1964 became replaced by modern fiber gyros.

Kind regards and happy crunching

Martin

Mike Hewson
Mike Hewson
Moderator
Joined: 1 Dec 05
Posts: 6591
Credit: 323987861
RAC: 173209

Hi Martin! I don't know

Hi Martin!

I don't know what the strategies of those nations are. It would depend upon what they want to do when/if they get there. If it is just to land, place a flag, and then leave, then the original Apollo strategy of lunar orbit rendezvous looks good ie. it's been done. For sure you could use Sagnac effect devices as gyros, but would you also want a backup?

Cheers, Mike.

I have made this letter longer than usual because I lack the time to make it shorter ...

... and my other CPU is a Ryzen 5950X :-) Blaise Pascal

Mike Hewson
Mike Hewson
Moderator
Joined: 1 Dec 05
Posts: 6591
Credit: 323987861
RAC: 173209

Now let's have a closer look

Now let's have a closer look at what is inside the LGC box. Again this is better described elsewhere so I'll keep it short. There is power supply circuitry to the various components, with the components arranged as elongated modules about ten inches long but variable in width and depth. Each is plugged into it's own electronic interface to the rest of the LGC, and they are arranged long side to long side like a stack of 'cordwood'.

Now there's 2800 integrated circuits (IC) in total inside these modules, each consisting of two identical logical devices : 3-input NOR gates. From those gates one can construct any desired binary logic function : and, or, not etc. These logically made up what we would now call a CPU. There were over 30 different machine language instructions to program with. Of course you could write a program using binary code, or octal actually as five octal digits fits nicely into a single word. A low level Basic language was invented (no relation to any other programming language) which was composed of simple mnemonics for the instructions. Later a proper assembler was produced with further symbolic abstractions. There was even an interpreted language called, not surprisingly, Interpretive.

Then there is memory of two types, erasable and fixed ( corresponding to the modern terms RAM and ROM respectively). The erasable memory is an array of memory cores, wee little magnetic doughnuts that could be energised to one of two states (ie. a logical 0 or a logical 1). There are 2K words (1K = 1024 words) of these in 8 banks of 256 words. The fixed memory is of 'rope' type, an ingenious arrangement of cores that would take us too far afield to describe much further. It was durable but took a long time to weave wires in and around the cores. Basically a logical one would be coded by passing a sense wire through a core, or a logical zero by bypassing it. There was initially 32K words of this fixed memory, for landing missions another 4K was added. All up it corresponded to 76KB in modern terms, though they never used the word 'byte'. A word was 16 bits long, fifteen to be used as instruction and/or data plus one (odd) parity bit. Generally memory could be addressable by first selecting a bank (of 1024 words) and then an address within a bank. Some banks were always visible and didn't require switching.

So the structure of the AGC was very much hard wired and not small by today's standards. You could fit many thousands of AGCs on a modest chip now.

Cheers, Mike.

I have made this letter longer than usual because I lack the time to make it shorter ...

... and my other CPU is a Ryzen 5950X :-) Blaise Pascal

Mike Hewson
Mike Hewson
Moderator
Joined: 1 Dec 05
Posts: 6591
Credit: 323987861
RAC: 173209

So what's the physics

So what's the physics involved in a landing then? It's not going to be, in 1969, some sort of reverse of the take-off, a hover/slam, that SpaceX is famous for. A couple of relevant points here :

  • at the start of the powered descent the mass of the LM is ~34,000 pounds
  • the maximum thrust of the descent engine is ~10,000 pounds1.
  • the LM loses mass progressively because it burns fuel.
  • the descent engine doesn't operate b/w full thrust and ~60% without damaging the nozzle.
  • from 100ft down the descent engine kicks up alot of dust and one can lose sense of transverse velocity.

The reason why the LM is orbitingin the first place is because it's components of motion perpendicular to it's radius vector from the Moon's centre of mass3 is quite large. Thus by the time gravitational attraction has caused it to fall some small radial distance, it has travelled a transverse distance such that the curvature of the surface of the Moon has receded by that same small distance. Orbiting is always falling but never hitting.

To de-orbit then one must shed that perpendicular/transverse motion. So point the rocket engine towards the direction that you are travelling to, this is known as a retrograde attitude4. As that motion is shed the LM will go closer to the Moon's surface ie. descend.

The final desired situation is on the surface, upright, and motionless. To get to that then there must be a period during which the LM changes attitude from retrograde to vertical. This is the tricky part, as the pointing of the engine in that phase determines two things simultaneously : the rate of descent and further loss of transverse velocity. Fortunately one can also control the throttle. So here are the landing phases as defined for the LM's AGC to process :

  • Program 63 (P63) : from PDI to High Gate. High Gate is ~ 7600 feet, altitude diminishing at ~140 ft/s and ~ 4nm to landing site. Lose most of the transverse velocity. Partly transition toward a vertical attitude. The landing radar (LR) should acquire a ground echo during the later part of P63. May vary the intended landing site during this phase. Late in this phase the LM's mass becomes less than the descent engines thrust. There is a throttle down (as full throttle will cause the LM to ascend). 
  • Program 64 (P64) : from High Gate to Low Gate. Low gate is ~400 ft with altitude diminishing at ~ 10 ft/s, landing is imminent. Can still vary the landing site. Then enter Program 65/66/67 : chosen as to degree of manual vs astronaut control desired. 
  • Program 65 (P65) : to land with full astronaut control of throttle and attitude*. It is possible to do this, they practised it, but it places great mental strain on the astronauts. No one chose this option. So, there's ... 
  • Program 66 (P66) : to land with astronaut to select rate of descent5 and adjust attitude6. The LGC responds to inputs and computes the engine thrust and RCS thruster use to achieve this. Can avoid obstacles or bad terrain.
  • Program 67 (P67) : to land with full automated control by the computer. No adjustment for unfavourable terrain or obstacles. No one chose this option.
  • Program 70 or 71 : for abort with or without staging ie. do you keep the descent stage or drop it? Various scenarios practised.

So really the LM becomes a different beast as the powered descent proceeds, initially quite heavy becomes quite light. Pete Conrad (Commander Apollo 12) called the latter state 'sporty', so much so that Alan Bean kept reminding him to land the thing.

* Try this is in Kerbal Space Program. It sure looks easy.

Cheers, Mike.

1 - confusingly mass and force are spoken as having the same units. Pounds of mass is OK, that is according to the Imperial definition. 'Pounds of thrust' is the awkward phrase. It's best interpreted as 'that force which a mass would produce by gravitational attraction' in some agreed gravitational field. So if we agree to consider the Earth's surface field as 32.174 ft/sor 9.8m/sthen one pound of thrust is 9.8/2.2 ~ 4.45 Newtons (number of pounds in a kilogram = 2.2). In any event, at PDI the mass of the LM was much greater than the descent engines thrust.

2 - we'll just think of the orbit as nearly circular, which it is. Indeed the equations that were folded into the LGC's programs accounted for that.

3 - much assumption is made by saying that the Moon has uniform density. It doesn't and this causes variation in orbits predicted by simpler calculations. In a way the LM's orbit is testing for the presence of density fluctuations (referred to as mass-cons meaning mass concentrations) that could not be measured prior to arrival. Earlier missions informed later missions in this aspect.

4 - prograde would be when the rocket points towards where you are coming from.

5 - there's a switch just near the Commander's left hand to increase or decrease the descent rate by 1 ft/s. 

6 - the attitude will be held fixed, or varied as selected by the right hand controller for the Commander.

I have made this letter longer than usual because I lack the time to make it shorter ...

... and my other CPU is a Ryzen 5950X :-) Blaise Pascal

Mike Hewson
Mike Hewson
Moderator
Joined: 1 Dec 05
Posts: 6591
Credit: 323987861
RAC: 173209

Silly me, over XMAS/NY I

Silly me, over XMAS/NY I forgot to write the punchline.

The LGC has data areas to implement (prioritised) queues of tasks ie. what to execute next. There are two queues for slightly different technical reasons, and each queue will trigger a reboot of the computer if they run out of space ie. if an attempt is made to add to an already full queue. This will manifest as a program alarm and this happened some five times during the Apollo 11 descent. A reboot isn't as desperate as it sounds as a checkpointing method gives a continuation point to re-enable processing upon. Rebooting has the effect of clearing the queues. The designers could not predict the causes of this.

So the question devolves to why did the LGC get overwhelmed with tasks? Firstly it wasn't the processing of the fly-by-wire loop for spacecraft control and this was also unaffected by the reboots. Fortunately the LGC could reset in well under two seconds which was the time between control updates for the craft's engines, jets etc. Phew! I mentioned earlier that the device that informs the central processing (when the rendezvous radar was set in a certain mode) forwards angle information for the pointing of that radar. The analogue to digital converters that are at the centre of this function have a specification for an 800 Hz AC power to function correctly. Unfortunately it has two potential power supplies for this and each was built by a different contractor, with the result of a pretty random phase difference1 b/w the two supplies when used in practice. On testing prior to the mission the A2D converters were found to be sensitive to a phase difference of around either 90 or 270 degrees. If not near these values the A2Ds would be silent, otherwise they would send frequent bursts of (garbage) information to the central processing area and then request a specific routine to handle them. So that was what overloaded the executive queues, causing reboot and issuance of the 1201 and 1202 program alarm codes.

Alas, while the AC phase conflict was known well before launch, it was judged by a higher level and less technical committee to not be significant enough to change ( time and expense quoted ). This management domain tendency was to be repeated many times in NASA history and sometimes causing death2. The testing indicated about a one in 50 chance of it happening. Apollo 11 accidentally hit the jackpot. Buzz Aldrin was not aware of the effects of enabling the Rendezvous Radar during descent. He did it to prepare for an unscheduled ascent, because an accurate fix on the Command Module position was crucial from the get go if that ascent option occurred. 

So now to the guy in the control room who made the call that the 1201/1202 alarms were harmless. He got a medal. But it is a matter of, mostly private, contention as to whether he ought have given the 'go' to the flight director when he did. Some feel that he may have not fully analysed the problem to the degree of certainty he expressed. We will leave it at that.

Also full kudos to the designer who predicted that, as a state machine, the guidance computer might need a reboot3 sometimes and thus did the checkpointing thingy.

Cheers, Mike.

1. It would be a matter of exactly when switches were applied during the power up checklist of the LM. This phase issue was solved after Apollo 11 by a simple circuit that aligned the phases ie. a phase angle of zero where there was no misbehaviour by the A2Ds.

2. Like overpressure pure O2 used in pad testing with an inward opening door, or burn through on O-rings, or heat resistant tiles getting knocked off during launch.

3. The LGC had a hardware device that detected if an infinite loop was being executed. If so, a reboot was triggered. If you wanted a software triggered reboot you would simply create a short loop in the code that would trigger the hardware reset mechanism. Something like :

LABEL_A: goto LABEL_A

I have made this letter longer than usual because I lack the time to make it shorter ...

... and my other CPU is a Ryzen 5950X :-) Blaise Pascal

GWGeorge007
GWGeorge007
Joined: 8 Jan 18
Posts: 3115
Credit: 5005270090
RAC: 1440465

To: Mike Hewson Where did

To: Mike Hewson

Where did you get all the detailed information of these events for landing on the moon?  It is very fascinating and I would like to read up on it myself.

Thanks in advance!

George

Proud member of the Old Farts Association

Mike Hewson
Mike Hewson
Moderator
Joined: 1 Dec 05
Posts: 6591
Credit: 323987861
RAC: 173209

It's in the first post for

It's in the first post for this thread : 

You see, I have just read this amazing book which was published in 2018 by Fort Point Press in Boston. It is titled Sunburst and Luminary : An Apollo Memoir by Mr Don Eyles. He was one of a team of men and women who coded the software for the LM, to be used during powered descents to the Moon's surface. Sunburst and Luminary are the names of operating system versions for the Apollo Guidance Computer (AGC) that sits on the back wall of the LM. It is an outstanding book and tells the tale of Don's involvement as a programmer and as a young person alive in sociopolitical environment of the times. It contains much wit, humor, truths about the Instrumentation Lab (IL) at the Massachusetts Institute of Technology (MIT), and the culture of NASA. What you should do now is go and buy the book and read it cover to cover. It is 357 pages long and also contains a glossary of all the acronyms and other terms, a bibliography, page notes and an index. I paid $57.01 AUD, including shipping, from Booktopia. But if you only want my precis of the central theme of the book then read my further installments here. My especial interest is the generation of program alarms during the Apollo 11 powered descent, what they meant, what caused them, and why the GO from Houston when they occurred might not have been the wisest course of action in retrospect. Luck, both good and bad, played a part. 

So that's the main source, plus a couple of other bits and pieces from my own memory, general Newtonian physics etc. There is also an outstanding series of Youtube vids starting at the CuriousMarc channel with his series titled The Apollo Guidance Computer. If you want to cut to the chase on the rope-core memory then try https://youtu.be/hckwxq8rnr0

Cheers, Mike.

I have made this letter longer than usual because I lack the time to make it shorter ...

... and my other CPU is a Ryzen 5950X :-) Blaise Pascal

GWGeorge007
GWGeorge007
Joined: 8 Jan 18
Posts: 3115
Credit: 5005270090
RAC: 1440465

Thanks Mike, I must have

Thanks Mike, I must have either missed that quote from your post, or have forgotten it.  Either way, thank you!

George

Proud member of the Old Farts Association

Mike Hewson
Mike Hewson
Moderator
Joined: 1 Dec 05
Posts: 6591
Credit: 323987861
RAC: 173209

One other aspect of that

One other aspect of that first landing was the timely observation by Armstrong, during later P63, that landmarks & features had been passing by too soon. This implied a higher than expected transverse velocity at any given moment ie. the LM was harder to slow down than expected. Correctly Armstrong made the call that they would 'go long' downrange and this indeed was born out. He did all of this in his head in real-time, based upon memory from training and study of the landscape. What a guy!

A word about the descent engine. It had unstable burning from about 60% to just below full throttle. This was deemed to be able to compromise the engine's wall. This was largely corrected with later designs.

Another aspect was called delta-H or the difference b/w the radar measured height and that estimated from the IMU. It was OK for that to be non-zero early on, but to be truly confident it had to tend more towards zero as the descent proceeded. Fortunately it did converge, at least well enough that the leg probes hit the surface at the expected moments. The consequences of being unsure of the distance to the terrain cannot be understated : you either crash at unacceptable speed with engine operating or drop out of the sky from low fuel.

So there was good luck too. Some is given to you, others you can help make.

Cheers, Mike.

I have made this letter longer than usual because I lack the time to make it shorter ...

... and my other CPU is a Ryzen 5950X :-) Blaise Pascal

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.