Programming the Guidance Systems for Apollo

Programming the Guidance Systems for Apollo

I asked my father to tell me about how they went about programming the guidance systems for Apollo.  I already knew that a lot of it was done by punch cards.  Punch cards look a lot like the voting systems in Florida, so think of them like the original hanging chads, and we all remember hanging chads right?

Punch cards were actually just the data entry tool that was used before keyboards.  Each punch card had 80 columns that contained 10 numbers (0-9) and 2 over punches.  With these numbers you could create a number, letter or special character. So each column was a single number or letter i.e. a single keystroke on a keyboard. Fortunately, they didn’t have to punch the cards by hand (no hanging chads this way), they had key punch machines that they could use to punch out each column.  So each card could contain 80 keystrokes.  But wait, that’s not all, after you punch out all your cards to make up the code you want to write, you want to make sure everything is correct.  ibm-punchcardSo you would put the cards through a punch card printer, which would then print out the card data, on large sheets of green continuous feed paper.  You could then review what you created on your cards. Of course, we know that programmers always write code correctly the first time, so no need to go back and re-punch any cards or print out again and validate.  So, once you have all the cards just the way you want them, you would then put them in a punch card reader with some control cards which would tell the general computer what you were doing and where to put it. It would call up the YUL assembler which was specially written to take source code and produce Apollo Guidance Code (AGC). Of course, you actually do all this on a simulator first, which you would run many many times before actually getting it onto the AGC computer.

And yes, I am sure 52 card pickup was a popular prank!

The Instrumentation Lab developed the assembler language & interpreter that handled the Apollo guidance systems.

In a previous post I talked about an Astronaut error. The astronauts used a control panel where they could call up actions and programs through a panel.  I am over simplifying, but they had a button for Verbs, Nouns and Programs\Actions and a corresponding manual with codes for each of these.  So, if they wanted to “CHECK, FUEL, BoostEngine.” They would call up the appropriate program and then for example hit the verb button, enter code number (V21), enter noun button and enter code  (N74), then enter program and enter the right program number (Poo).  I just made you say POO!

I have fond memories of punch cards as my father always had stack of them in his back pocket and shirt pocket. Not only were they a programming tool, but they made great note paper.

I will forever be amazed at how we were able to put a man on the moon with the technology of the 60’s.   FOREVER!

 

 

Polaris (Not the Snowmobile)

Polaris (Not the Snowmobile)

The Polaris missile was a two-stage solid-fueled nuclear-armed submarine-launched ballistic missile (SLBM) built during the Cold War by Lockheed Corporation for the United States Navy or referred to as an Intermediate Range Ballistic Missile (IRBM).

Polaris-a3
Polaris Missile

In layman’s terms, it was a missile designed to be launched from a submerged submarine. My father was involved with this program working with the guidance systems, specifically working with Joe Sabo, who showed him the ropes on how to debug the Polaris guidance computer. Basically, it was a computer guided missile that would launch with a determined target and would have a vX, vY & vZ, basically left/right guidance, required thrust and for lack of a better explanation, height.  The computer would adjust during flight based on initial target calculations.

One of my fathers biggest thrills was being in Cape Canaveral when they tested the Polaris, and out of nowhere a missile came out of the water….  he couldn’t believe that the math on paper actually worked.

Later, he would travel on a top secret (well classified) mission accompanying the Polaris missile on a submarine across the Atlantic. Leaving from Connecticut and arriving in Scotland 2 months later all the while submerged. His job was to babysit the Polaris guidance system, oh… did I mention they had nukes attached?  In fact, he slept in the missile compartment 15 feet from one of the warheads.  I guess that’s one way to keep warm.  He was lucky, he had a pull down bunk all to himself, not one of the stacked variety subs are know for.  The down side, was there was a metal beam overhead they used to move heavy objects so if they need to move something in the night, he had to get up, fold up his bunk and wait till they were through.

This is where the Lickly lore kicks in.  You see, he basically entered Scotland in Cold War times through military channels.  Then after 2 months on a sub,

letter
Letter from the sub commander courtesy of my Aunt Mary

was let loose to travel Europe.  When he went to catch a flight to England, the immigration people got confused as his passport was never stamped for entry. The details here get fuzzy but it sounds like he finally wore them down as he couldn’t admit to being on a confidential mission.  He met up with Steve Copps (Ed Copps brother), Alex Cosmala and did what most 20 somethings do in Europe.

 

The majority of the Polaris team ended up moving over to the Apollo program working on the guidance systems.

 

HAL

HAL

I’m sorry, Dave. I’m afraid I can’t do that.

We all know HAL 9000 from a 2001: A Space Odyssey. HAL stood for HAL – Heuristically programmed ALgorithmic computer.

That’s not the HAL I am talking about.  I am talking about HAL\S or Higher Ordedr_halcombe_laningr Algorithmic Language Shuttle. Supposedly this name was given by Ed Copps in honor of Hal Laning of the Instrumentation Lab, who developed the first language compiler anywhere, a system of guidance algorithms, was basically brilliant and was a geeks geek. Seriously, this guy is fascinating, check out  J. Halcombe Laning.

HAL was developed at Intermetrics and NASA adopted that language in 1975 for the shuttle. It was used for almost 30 years and it was used to program all the on-board stuff.

The language is designed to allow aerospace-related tasks (such as vector/matrix arithmetic) to be accomplished in a way that is easily understandable by people who have spaceflight knowledge, but may not necessarily have proficiency with computer programming. (Source Wikipedia)

Note:  Dan is losing his voice, I’d like to say it’s because of my relentless questioning but actually, it’s a cold.  Posts might be short for awhile

 

“We Got Shut Out By Abe Lincoln!”

“We Got Shut Out By Abe Lincoln!”

Intermetrics was a Draper Lab spin off, founded to commercialize technology developed during the Apollo program. To say it was an interesting place is an enormous understatement.  More on I² soon.

Intermetrics had a softball team thanks to Bob Milosavljevic. What started as a beer game, morphed over time to a competitive fast pitch softball team and ultimately a championship team in Cambridge. Bob being a Cantabridgian was weaned on Cambridge fast pitch softball. Maybe Bob knows the exact time and place that he put two and two together.  You see, besides being a rocket scientist, a competitive contract bridge player, a nationally ranked (hard ball) squash player, my father is also a pretty damn good fastpitch softball pitcher.

Back in the day, he actually won some city championships in Cambridge and I remember him playing on a team called “The Hobos.”

So, Intermetrics softball was born.  I was privileged to play on this team for many years and to have so many memories and experiences.  Here are a few of the more interesting highlights.

The Infamous Tux Game:

As legend has it, Bob found a bunch of baby blue tuxedos at building 19 1/2 and bought them.  We proceeded to play a game on the Cambridge common dressed in baby  blue tuxes.  Here’s proof.

tuxgame

We followed that up a year later with another tux game and to this day, Intermetrics remains 2-0 all time in Tux games. (note, photo is from second year).

2-4-6-8 who do you appreciate?

To say we were a bit different doesn’t really do US justice. A radical high tech company in a tough gritty city league…. yeah, it’s sort like kids from Minnesota and Boston getting along on the 1980 Olympic hockey team. And we didn’t exactly help matters. Most baseball signals are hand signals, touch your belt – it’s a bunt, touch your cap – a steal, etc…

Not us.  Nope, uh, uh….   Bob decided to use math.  (How appropriate for geeks).  He would shout out numbers as signals. for example, 7,4,3,1.  The exact algorithm remains a team secret, but let’s just say it drove the other team nuts!  Bob’s mad scientist genius was probably worth a few games (and fights) every year!

Hoyt Field

Hoyt Field was in Cambridgeport with a youth center connected.  On one shining night, a group of youths decided to strut straight through our game in the middle of an inning.  Having a few champion trash talkers (Derek) there was some yapping back and forth. Next thing we know a large metal trash barrel is being hurled onto the field…  Fortunately calmer heads prevailed.

Abe Lincoln

My father was the Intermetrics pitcher for years.  He was our only pitcher and was in my humble opinion pretty damn good considering he was facing young bucks.  As years passed, he passed the torch to younger pitchers.  As it always happens there are games when it’s hard get a full team.  My father, in his 70’s, and having not pitched, was rushed back into duty for one game.  All we cared about was at least we didn’t have to forfeit!!  Strange things happen sometimes… he wasn’t exactly lights our or overpowering, in fact, he struck out no one. But he threw strikes and when they hit it, it was right at people.  Next thing you know, we win, 7-0.  Yup a shutout.  As we are leaving the field after the final out, clear as day we hear the now infamous quote; “We were shut out by fucking Abe Lincoln!”

So many more good tales, but as Gettyburg addresses go, this was a good one!

abe
Abe Lincoln

Hey, What’s This Button For?

Hey, What’s This Button For?

One of the early challenges between the engineers and the astronauts was the amount of human intervention especially with the guidance systems.  The Astronauts naturally being pilots wanted complete control while the engineers lobbied for automation.

As Dan put it jokingly, they wanted to fly with white scarfs around their neck waving in the breeze.

To their credit, the Apollo astronauts were a dramatically different breed then the Mercury ones.  The Mercury pilots were a bit more the swashbucklers while the second wave were all highly educated and most with advanced engineering degrees,

Rusty Schweickart, Jim McDivitt & Dave Scott were the Apollo 9 crew.  For the better part of a year and half, they stationed themselves at the M.I.T Instrumentation Lab (the precursor to Draper Lab circa 1963).  The M.I.T team worked with them to make sure things were done correctly.  Dan recalls they made fun of Dave, asking them to repeat things because Dave picked things up slowly.  ( He had a masters degree in aeronautics from M.I.T.).

During his many briefings of the Astronauts, Dan remembered they asked a lot of questions, good questions.  One Astronaut in particular Dan recalls asking many detailed and significant questions, and made it hard for him to get through his presentation, afterwards he asked who was that guy?  His name was Neil Armstrong, who they didn’t know at the time would be the first man to walk on the moon.  Dan even remembers that Neil Armstrong was so thorough that he had a wind tunnel installed at his home.

Back to man vs machines. The team at the Instrumentation Lab developed a legal sequence matrix (my interpretation not the official name) to help prevent mistakes. This matrix essentially outlined logical next sequences from any given state and these were allowable program codes to enter, all others would be not available.  For example, if the lunar module was on the moon, a pre-launch program would not be an option.  Similarly, if they were in orbit of the moon, an earth re-entry program would be unavailable.  Sounds good to me right?

Well, let’s remember the time, these guys put a man on the moon with the compute power of a hand held calculator, a 10 year old calculator, with less horse power than your iPhone 5 or 6!

We are not talking Gigabytes, nor megabytes but more like kilobytes, well it was actually “Core Rope memory”. As I recall this memory was actually made by women in the textile mills, but that’s story for another time. At that time, a megabyte cost a million dollars.

Let’s just assume memory was at a premium.  So, enter Chris Kraft, Kraft was NASA’s first flight director. He was on duty during such historic missions as America’s first human spaceflight, first human orbital flight, and first spacewalk. At the beginning of the Apollo program, Kraft retired as a flight director to concentrate on management and mission planning. So in other words, for Apollo, he was the man!.  Well, at some point, Chris decided to save memory and that they should delete the legal sequence matrix because his “Astronauts were so well trained that they wouldn’t make a mistake.”   So he had the Instrumentation Lab remove it.

During a conference on the Apollo Guidance System (circa 2001/2002), Margaret Hamilton reflected “So we were very worried that what if the astronaut, during mid-course, would select pre-launch, for example? Never would happen, they said. Never would happen. (Laughter) It happened.”

“In fact, they went back to read the program notes and we had a program note saying “Do not select PO1 mid course.” I was so happy that that it was in there. That was Apollo 8, Jim Lovell’s mission. We had the program note “do not select PO1 during flight.” I still remember the program note.”

During every Apollo flight, they would man headphones 24 hours a day in a kind of command post. About 2:00 o’clock in the afternoon, they were listening to the astronauts on the phones. All of a sudden Jim Lovell says “Oh oh.” And everybody said, “What’s oh oh?” He said “I think I just did something wrong.” I don’t know who was on the phones at NASA, and the people at NASA were all monotones. I mean, you could have an earthquake and they wouldn’t say much. So he said, “What did you do wrong?” “I think I keyed in PO1 and I’m in rendezvous. Did anything happen? Is that okay?” (Laughter) Of course, they didn’t know whether it was okay at NASA at all, and so they asked us. I guess we didn’t know if it was okay right away but it turned out it was not okay.

And Dan leaped into action, I remember him furiously spending the next I would say hour tracing through the listing, going through the situation of what would happen if you were in rendezvous and you keyed in PO1. It was quite a detective adventure. It turned out that Lovell had wiped out all of his erasable memory and all of his navigation, the correlations that he had been taking up, and all of the settings that he had done. He had pretty much corrupted the whole memory.

According to Dan, “We went and simulated what he did and checked memory, location by locaiton to see what it was before he pulled his boob boo to see how much was corrupted and how much was ok.  We were lucky, but not as lucky as the guy who did it (Jim Lovell) as he was in space.

Dan -“The thing is, the Astronauts were supremely trained, they were smart, they were talented, but you can’t account for spending days in space, with little sleep, stress… that’s when accidents happen. Sleep deprivation is a real problem”

 

 

Bah Bah Black Sheep

Bah Bah Black Sheep

It’s official!  I am the black sheep of the Lickly boys. Why you ask? I am charming, handsome, smart, funny and very humble……

Well, I didn’t go into Compilers.  It turns out my brother Ben (B.S. in Math and Computer Science @ Harvey Mudd & Ph.D. in EECS @ U.C. Berkeley) and my father Dan (Masters in Aeronautical Engineering @ M.I.T) have both been involved with writing compilers.

Ben is presently working on Java to Java Script compilers at Google. From what I could understand depending on the device, applications are written in one of the two, so for peak performance Google writes these compilers.  I hope to get a little more direct clarification on this. Now Dan, he was involved with compilers for HAL at Intermetrics more on this guy HAL in a future post.

Just to throw some salt on the wound and make me feel more like a goat (sheep), there’s Shaomei Wu Lickly (M.S. Computer Science @ UC Santa Barbara & Ph.D in Information Science @ Cornell) who works for Facebook.  You have probably seen some of her work with the recent announcement of the new Facebook feature that helps the blind see photos. I didn’t ask if this involves compilers. :-{

Today we hit the road and I hope to start posting some more interesting stories and first hand accounts from “The Dome”.  In the meantime, please accept the rest of this Facebookie post. If you haven’ been to Google, it’s sort of like a cross between College, grad school and summer camp.  Ok, that’s in the common areas, the work areas are a bit more serious!  One thing for sure, not many grey hairs to be seen.  Note to self, avoid Google around the end of the day to avoid being run over by the massive white Google buses.

Whooping it up at Google

20160405_185352
The California Lickly’s

Teaching my niece a first class Raspberry

20160405_185445
Three Generations

And Finally

20160405_142918
The Conference Bike @ Google – Seats 6

Stay tuned for more…

Preview Edition

Preview Edition

As I am getting ready to set out on my adventure I have started to think about some of the topics to discuss and have also been collecting ideas from people. So, if all goes according to plan and in no particular order, here are some of the topics I plan on covering:

  • Children playing at the Jet Propulsion Lab, M.I.T Instrumention Lab and Draper Lab ( I was one of them)
  • Some interesting adventures from the Polaris missile program
  • The first NASA contract (hint, hint guess who won it?)
  • Behind the scenes at Apollo – some errors and mishaps
  • Astronauts – what some of them were really like
  • Programming software in the NASA Apollo era
  • HAL
  • Intermetrics
  • My fathers first car (yes there is a story there)
  • The current M.I.T curriculum (trust me, it’s a classic!)
  • Lickly Corners. Yes there is such a place! (It’s where Lickley road meets Tamarack Rd. Duh!)
  • Hardball squash

Looks like we are taking the northern route, so if anyone has suggestions on places to eat or things to see, I am all ears and stomach!

Here’s a picture of the young man I will be spending the next few days with.

dad