Apollo Guidance Computer Activities

AGC - Conference 2: Computer simulations

Apollo Guidance Computer History Project

Second conference

September 14, 2001

 

Computer Simulations

FRED MARTIN: I want to get back to something that Jim said and what he did in that group. There was another fellow who perhaps should be here as well who also contributed to that group, Bill Widnall. We needed those simulations so much because it was the only thing that grounded us to what the truth was. You could never tell if what you were doing was going to work until you banged it against a simulator.

MARGARET HAMILTON: Unless the simulation was wrong.

FRED MARTIN: Unless the simulation was wrong. And I suppose that happened.

DAN LICKLY: But that's why it was so important.

FRED MARTIN: I don't remember that happening too many times.  I was really impressed when somebody had five degrees of freedom in the fuel sloshing module of the vehicle. They also had all the stars in the right places in the heavens. And everything else in motion would happen correctly. It was really our truth. I was thinking about this last night before I came here, also, that this was basically a fun project, although there were plenty of difficult times in the project when you were in the middle of it.

We did a lot of testing in this project. And a lot of testing with these simulators. I think that if all we ever did was fly the nominal mission, with nothing wrong, it would have been pretty boring after a while if you had this just one set of parameters and you always fly this one set of parameters. I think that part of the fun that we had was thinking up and creating these crazy off-nominal cases that probably could never, never happen. And then bang that against the software that we designed and design certain margins into the software that would make sure that whichever way the gimbal would go, that you'd be able to get out of it.

For one nominal case, we ran a hundred off-nominal cases.

JIM MILLER: The saving grace of the Apollo computer was that it was slow. Why I say that is that the simulations that we ran and the assemblies that we had to do were very long. And if the AGC had been ten times as fast, it would have taken ten times longer to run the simulations. We would never have been able to run enough of them. They would have just taken more time or machines than we could possibly have had. Sometimes limited resources are a blessing in disguise.

DAN LICKLY: That's why those simulators people have on today's computers have so much trouble. They're trying to emulate something that's so fast. 

JIM MILLER: Exactly so. We had a feature in the simulation called 'clock advance,' by which you would tell the simulator you were willing, when nothing useful was happening in the AGC, to just jump the AGC's clock up to the point where something did happen. And the simulator would figure out when that was, and just take a leap up to there without having to explicitly simulate all the idle time. It really increased the speed of the simulation to the point where it was nearly real-time, depending on how busy the computer was. But there were lots of periods where it was just idling. And maybe a few instructions or maybe a few seconds. It would just leap the clock forward. That, as far as I know, never caused any difficulties.

MARGARET HAMILTON: I keep telling people what that simulator used to do and they can't believe it. It's many things it did that most people don't do today that they should do.

JIM MILLER: Houston wanted to have an independent computer simulation from the one we had, as a cross check. So they assigned somebody to write a simulator. And they wrote it in Fortran. I had personally modified our MAC executive so that some things we needed to do in the simulator could be done by run-time software in this part of the simulator's run-time environment. One involved stealing some functions that I knew nobody would ever use, like the hyperbolic cosecant function in the language.  So if you put hyperbolic cosecant of minus 1 in there, or something, it would type a message on the console typewriter or something.

I got a look at the listing of their 'independent' simulator written in Fortran. And right there was hyperbolic cosecant of minus 1 to write on the console of a machine that didn't even have a console typewriter. This was certainly not what you'd call an independent simulation. (Laughter) They were copying code directly into Fortran without the slightest idea of what it was doing. I thought, this is not much of a cross check. Oh well. We did get there.

We were running lots of simulations on the IBM system, and a lot of other lab stuff as well, when we realized we had to have more simulation time than that on one machine could provide. So I went to Chris Kraft and said, "We've got to have a second machine." It was absolutely astonishing. Within six weeks, that machine was running in our place. The prior one had taken probably ten months. He just was able to make things happen for us and for everybody else in the project that really gave it what it needed to succeed. And I think without the influence of Chris Kraft, both inspirationally, because he really was a guy we all respected and liked, and his clout, the project could have not made it. There were just lots of things that happened to come together.

Innovations in software


site last updated 12-08-2002 by Alexander Brown