27
$\begingroup$

I keep hearing people say things like:

Duuuude! It's so insane that we're carrying around phones in our pockets that are a thousand times faster than the computers that took us to the moon!

Why do they think that such a powerful computer would be needed to calculate a few numbers? In fact, I don't understand why a computer was needed at all, either at the ground or inside the space craft.

What numbers did the space craft have to "crunch" once it's up there, that the astronauts themselves couldn't figure out by simply reading the analogue data showing on their dashboard, or even have ground control do it all remotely?

$\endgroup$
  • 17
    $\begingroup$ I feel like this post contains a lot of redundant information - it may be useful to shorten it a little... $\endgroup$ – finnmglas Sep 13 at 12:18
  • 8
    $\begingroup$ you might enjoy reading @MarkAdler's answer to The Martian: Does it really take a supercomputer to calculate spaceflight maneuvers? $\endgroup$ – uhoh Sep 13 at 12:42
  • 99
    $\begingroup$ Do I have a very naive concept of space travel? Surely, at the end of the day, once they were actually up there in orbit, they just had to "point at the moon and go there"? You have a very naive concept of space travel. $\endgroup$ – Organic Marble Sep 13 at 12:53
  • 14
    $\begingroup$ If Curious about what the software was doing see en.wikipedia.org/wiki/Apollo_Guidance_Computer#Software, and check out the source if you want. If you want to learn why computers matter, the game Kerbal Space Program can be informative, especially if you try flying with instruments hidden, as a computer less apollo would have done $\endgroup$ – GremlinWranger Sep 13 at 13:22
  • 10
    $\begingroup$ With respect, OP, have you ever tried navigating without a computer? In two dimensions, let alone three? $\endgroup$ – Mark Morgan Lloyd Sep 14 at 6:51
46
$\begingroup$

Assuming this isn't a troll question and you are serious about wanting to know what computers are used for in spaceflight (prior to 1988), NASA has a great resource for you:

Computers in Spaceflight (PDF, 494 Mb)

From the introduction:

Computers are an integral part of all current spacecraft. Today they are used for guidance and navigation functions such as rendezvous, re-entry, and mid-course corrections, as well as for system management functions, data formatting, and attitude control. However, Mercury, the first manned spacecraft, did not carry a computer. Fifteen years of unmanned earth orbital and deep space missions were carried out without general-purpose computers on board. Yet now, the manned Shuttle and the unmanned Galileo spacecraft simply could not function without computers. In fact, both carry many computers, not just one. This transition has made it possible for current spacecraft to be more versatile. Increased versatility is the result of the power of software to change the abilities of the computer in which it resides and, by extension, the hardware that it controls. As missions change and become more complex, using software to adjust for the changes is much cheaper and faster than changing the hardware.

...NASA's ground computer systems reflected the need for large-scale data processing similar to many commercial applications, but in a real-time environment, until recently not normally a requirement of business computing.

Regarding onboard computers for Apollo:

The presence of a computer in the Apollo spacecraft was justified for several reasons. Three were given early in the program: ( a ) to avoid hostile jamming, (b) to prepare for later long-duration (planetary) manned missions, and ( c ) to prevent saturation of ground stations in the event of multiple missions in space simultaneously. Yet none of these became a primary justification. Rather, it was the reality of physics expressed in the 1.5-second time delay in a signal path from the earth to the moon and back that provided the motivation for a computer in the lunar landing vehicle. With the dangerous landing conditions that were expected, which would require quick decision making and feedback, NASA wanted less reliance on ground-based computing. The choice, later in the program, of the lunar orbit rendezvous method over direct flight to the moon, further justified an on- board computer since the lunar orbit insertion would take place on the far side of the moon, out of contact with the earth. These considerations and the consensus among MIT people that autonomy was desirable ensured the place of a computer in the Apollo vehicle.

Regarding ground support computers for Apollo:

Without automatic testing the confidence in the rockets could not have been attained, since they were too complex for effective manual procedures. In addition to checkout methods specific to the launch vehicle, the launch directors in the firing rooms had access to automated test data from the spacecraft preflight test equipment developed by both the Launch Operations Center and Manned Spacecraft Center.

Three major tasks occupy the flight controllers: sampling the telemetry stream to make certain everything is going well and to collect science data, doing navigation calculations, and sending commands.

| improve this answer | |
$\endgroup$
27
$\begingroup$

Your spacecraft would need to be several orders of magnitude larger than the Saturn-Apollo.

  1. No human pilot has successfully performed a rendezvous without a computer. Note that rendezvous is bringing two spacecraft close together in orbit, position, and velocity. Docking is the actual physical contact between two spacecraft. The latter can and often is manually done by a pilot, but every attempt to perform a rendezvous without a computer has been a failure:

    • The Soviets attempted rendezvous twice with Vostok and failed. Vostok 3 and 4 were in 1962, and Vostok 5 and 6 were in 1963. Vostok lacked maneuvering thrusters to adjust its orbit to match that of its twin. The initial separation distances were in the range of 5 to 6.5 kilometers (3.1 to 4.0 mi), and slowly diverged to thousands of kilometers (over a thousand miles) over the course of the missions.

    • US astronaut Jim McDivitt tried to maneuver his Gemini 4 craft to meet its spent Titan II launch vehicle's upper stage on June 3, 1965. Although he was able to make visual contact with the target, the rendezvous failed. He was in orbit behind the target, and assumed that thrusting toward the target would bring them together. Orbital mechanics doesn't work that way, and thrusting toward the target merely made them farther apart.

    • The first successful rendezvous occurred on December 15, 1965 when Schirra maneuvered the Gemini 6 spacecraft within 1 foot (30 cm) of its sister craft Gemini 7.

      Schirra put Gemini 6A's computer in charge of the rendezvous.

    • The first rendezvous with docking was Gemini 8. "At 55 nautical miles (102 km) they gave the computer automatic control."

    • The first unmanned docking was the Soviet Cosmos 186/188 and was automated.

    • Soyuz 2/3 had the Igla automated rendezvous system. It attempted manual docking and failed.

    • Soyuz 4/5 also had the Igla automated rendezvous system. It was successful and two cosmonauts exchanged vehicles.

    • During the early years of Apollo development, Von Braun and other officials pushed the "direct" approach with a single spacecraft making the whole trip, arguing that there was no way that a lander ascending from the lunar surface could ever rendezvous with a spacecraft in lunar orbit. Quoting an interview with Robert Gilruth, the first director of the MSC in Houston:

      DeVorkin: In direct descent you needed an enormous booster. In earth orbit rendezvous, you needed two Saturn launchers to meet in orbit. In lunar orbit rendezvous, you needed only one Saturn launcher, but you had to have, correct me if I'm wrong, extremely finely tuned abilities to do celestial navigation, because the lunar orbit rendezvous was being done at the greatest distance, was the critical path. The most difficult thing to conquer.

      Gilruth: But that had onboard navigation.

      DeVorkin: Had it been developed yet? To what degree were the computers ready and available?

      Gilruth: Well, that's true, we were the people that made IBM. There's no question about it. We put the computer age ahead ten years with Apollo, because we really did use IBM and built them up in order to do this program.

      ...

      DeVorkin: Let's go back and talk about your comment about IBM, and how NASA made IBM what it is today.

      Gilruth: I think I would say that they had a lot of talent. They would have become successful no matter what, but we did help them by giving them such a challenging project as Apollo was, which required the utmost in computer development. I'm not a computer expert, although I had some very good people in that work. Without those computers, we never could have solved all those equations in such short time, that we could direct these things into proper orbits.

    • The Apollo transposition/docking/extraction (TDE) manuever started with the spacecraft already matched in position and velocity. The maximum separation was only 150 feet (50 m), so it's not a rendezvous. However, it was done manually.

    • Apollo trans-lunar injection and trans-Earth injection aren't a rendezvous (no second craft). In addition, their parameters were calculated by computers at mission control, including Apollo 13's manual burn.

    • The movie Apollo 13 shows some hand calculations. This was a rotation of the two spacecraft coordinate systems, so the the gimbal angles could be transferred from one spacecraft to another. The X-axes point in opposite directions, and the Y/Z axes are rotated because they couldn't perfectly align the roll angles of the two spacecraft when docking. These calculations had nothing to do with with calculating trajectory, thrust, or any other maneuver of the spacecraft. The fact that you saw a bunch of guys doing calculations with slide rules does not imply that every spacecraft calculation can be done that way.

    • Soyuz and the Space Shuttle used computers to rendezvous with other spacecraft.

  2. This eliminates the lunar-orbit-rendezvous (actually used by Apollo) and Earth-orbit-rendezvous mission modes, leaving only the direct mode. This requires a much larger spacecraft, because you are hauling everything (e.g. fuel, heat shield) to the lunar surface and back.

  3. Without the precise, real-time calculations afforded by a computer (whether on the spacecraft or on Earth), you need a lot more fuel margins for course corrections.

So from a practical sense, the answer is "no".

Related questions:

| improve this answer | |
$\endgroup$
  • $\begingroup$ TL;DR - spaceflight controls are not intuitive $\endgroup$ – trognanders Sep 14 at 20:07
  • $\begingroup$ Downvoting because you included Gemini 4. Gemini 4 was already rendezvoused with the upper stage. The maneuver they were trying (and failing) to perform was station-keeping, which, like docking, can and has been performed manually. $\endgroup$ – Mark Sep 14 at 21:07
  • $\begingroup$ Doing the coordinate system transformation by hand using a sliderule and paper in zero gravity, tired and stressed was tricky enough for the A13 crew. Rotations in a cartesian system are not so easy. $\endgroup$ – Uwe Sep 15 at 10:29
27
$\begingroup$

First of all, the ground team could have, and in fact did, do most of the orbital navigation remotely. This report mentions the fact that the on board computer was secondary for Apollo 8, with primary being systems from the ground. The spacecraft did have to do a few things, including making some realtime adjustments during the landing based on the actual topography, but the course corrections and burns and such were all managed from Houston. There was a desire to have a computer powerful enough to calculate the numbers on board just is case something happened that limited communication with Earth.

Computers have always been a part of launching rockets. In many instances, these were on the ground, helping to guide the rocket along its desired path. Knowing how much to steer in what direction allows one to overcome different winds, slightly offset engines, and other small problems that can be pretty much impossible to detect from the ground.

But you are absolutely right, you don't need a particularly powerful computer to do these calculations. As evidence, submit the Apollo guidance computer, which really wasn't that powerful at all. I think the common saying is just to recognize where technology has come, and if such a low end computer could do so much in the 1960s, just imagine what we can do today.

One thing you may be interested in, and it was the source for much of this, is this article talking about the power of the Apollo Guidance Computer.

| improve this answer | |
$\endgroup$
  • 6
    $\begingroup$ The flilght computer was absolutely necessary - the apollo lander was a total fly-by-wire system, and that needs a computer to operate, even when under complete manual control. Controlling it from the ground was not possible because of the transmission delay (ie: real-time control with a 2.5s time-lag is not acceptable). You could even say that the real-time FBW control systems had more complex, and more numerous, calculations to complete than simply the navigation burden. $\endgroup$ – J... Sep 14 at 13:31
  • 3
    $\begingroup$ This answer would be improved by some citation. Even just a reference for the stated facts. $\endgroup$ – Zibbobz Sep 14 at 15:48
  • 1
    $\begingroup$ Re the ground team doing most of the computation, sure, but what happens if the radio fails? $\endgroup$ – jamesqf Sep 14 at 16:53
  • 3
    $\begingroup$ Or the Soviets jammed the radio (It was certainly considered in those days!) $\endgroup$ – PearsonArtPhoto Sep 14 at 16:56
  • 1
    $\begingroup$ When I interview new engineers and get "looks like a dynamic programming problem" as an answer to a simple maximum subarray problem, or hash tables where an array would do, I really wish "we can do today" really applied :-( $\endgroup$ – moonwalker Sep 16 at 4:13
23
$\begingroup$

“Do I have a very naive concept of space travel?“ - honestly, yes you do. Here is an excerpt from Don Eyles’s wonderful book Sunburst and Luminary: An Apollo Memoir:

Guidance would be processed every two seconds, repeatedly correcting and refining the trajectory based on new data from navigation. Into the guidance equation, with each turn of the crank, went the LM’s position and velocity, known together as the state vector. Out came a pointing command for the autopilot and a thrust command for the descent engine. Between the in and the out was an equation that compared the current state of the spacecraft to target conditions that were specified not only in terms of position and velocity but also of acceleration, jerk (rate of change of acceleration), and one dimension of snap ... If the guidance equation did its job right, the LM would touch down on the lunar surface before it ran out of fuel, right-side up, at the right spot, at a steady throttle setting, and moving very slowly at the moment of contact.

And that’s just for the lunar landing manoeuvre, one of dozens of manoeuvres that the three components of the Apollo spacecraft had to execute exactly right, first time, in order to get to the moon and back again.

| improve this answer | |
$\endgroup$
7
$\begingroup$

I don't understand why a computer was needed at all, either on the ground or inside the space craft.

As Ben (PearsonArtPhoto) pointed out, computers have always been a part of launching rockets. By no means an optional one. Computers are needed to avoid collisions with the debris around earth, to auto-pilot spacecrafts and to monitor mission data (sensors, the live-support systems etc) that can be learned from to enhance future missions.

The real challenge seems [...] entirely unrelated to math, or at least "real-time" math.

Despite there being many other challenges, the "real challenge" during the mission is mostly the computational one. Everything else has to be figured out before liftoff. If not, a single error may be fatal. Many exceptional events may happen while a mission, especially in the first few minutes - it is impossible for us humans to predict them in real-time.

I don't understand why a much more powerful computer would make any difference.

The memory-cycle time for the Apollo Guidance Computer was 11.7 microseconds. A single-precision addition in the assembler language took two memory cycles. Other basic instructions needed 1, 2 or 3 memory cycles. One memory cycle took 24 cycles of the 2.048 MHz clock. (by Uwe)

Despite being pretty slow compared to the technology of today, no human could possibly do calculations at that rate. That was enough to go to the moon. But the faster, the further you go, and as a ships complexity increases, it ceases to be enough. My first phone ran at up to 1.2GHz. Phones (especially Android) in reality cannot do computations as fast as their CPU technically could though, as they mostly run virtual machines (the JVM) and are busy with computing many UI-related tasks.

Concluding

Even though phones aren't as impressive as the computer that took us to the moon, it is actually insane, that we are carrying around little computers in our pockets that are way more advanced than those that took us to the moon! That's what we call technological progress... and I believe that it is fascinating ^^

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ What is insane is that there exists at least one USB charger more powerful than the AGC $\endgroup$ – JCRM Sep 13 at 15:06
  • 7
    $\begingroup$ The Apollo Guidance Computer could not do 2 million operations per second, not even the fastest ones. It could not be faster than the memory cycle time of 11.72 microseconds. 2.048 MHz was only the crystal clock frequency but not the instructions frequency. A single-precision addition in the assembler language took two memory cycles. So only 85,324 additions per second. $\endgroup$ – Uwe Sep 13 at 15:53
  • 4
    $\begingroup$ The comparison between phones and the AGC is common but somewhat misleading. It wasn't the AGC's CPU that made it what it was, it was its thorough integration into what were essentially fly-by-wire spacecraft. Phones are more stand-alone devices with much more processing power, but are unable to interface with the engine, attitude control, sextant, telemetry, and all that jazz. $\endgroup$ – Wayne Conrad Sep 13 at 18:34
  • 2
    $\begingroup$ @LieRyan The AGC had very few registers. It could not do calculations in registers, some registers were located in memory and not in the CPU. There was nothing like an instruction cache, The AGC was built using very low scale integrated circuits, registers required many ICs. So operations faster than the memory cycle were impossible. $\endgroup$ – Uwe Sep 14 at 7:38
  • 3
    $\begingroup$ @WayneConrad I think that just distracts from the point. Adding I/O to a smartphone is trivial, and that's all that's really missing. Something like the Raspberry Pi is a good example of a tiny SoC with a bunch of I/O bolted on - sure, it would need a hardware interface layer to actually fly the LEM, but that's mostly just a mess of dumb circuitry. $\endgroup$ – J... Sep 14 at 14:04
4
$\begingroup$

As just one example consider the Lunar landing. If you think about a vehicle sitting on top of a rocket, with the thrust vector of the rocket passing through the centre of mass of the system for a moment you'll realise that it's not stable: there's nothing making it want to point in any particular direction. But you need it to face in some very particular direction so that the rocket's thrust both points the way you want and the vector passes through the centre of mass of the system so it's not exerting a torque on it. And you need it to follow a very careful trajectory down to the surface which means the thrust direction has to be continually controlled as does the amount of thrust: it has to reach the surface with fuel left, travelling very slowly, and in the right place. They have just enough fuel to do this because lifting fuel to the Moon is extremely expensive.

The astronauts have a couple of tiny windows out of which they can see. In the initial phase of the descent those windows are facing away from the surface: they can't see the surface at all. Because the LEM is under acceleration the whole way down 'down' in the LEM is not in fact down, so they don't know which way is up most of the time. So they're going to have to do this all by instruments.

Well, what can instruments tell them? They can know which way the LEM is oriented in inertial space. They can know how far it is above whatever happens to be on the surface below them (so: not how far it is above the landing site, but how far it is above whatever mountain they are passing over). They can't know its position in the two other axes really. They can know the acceleration vector of the LEM in its own frame. And let's say they knew both the position and the velocity at the start of the descent.

So what they need to do is to work out where the LEM is, and how fast it is moving. To do this they need to:

  • rotate the acceleration vector they have in the LEM's frame to one in the platform's frame, which involves trigonometry;
  • rotate this further into the appropriate coordinates for the Moon's frame (which depends on their calculated horizontal position);
  • integrate the horizontal component, once to get horizontal velocity and then again to get horizontal position;
  • integrate the vertical component once to get vertical velocity;
  • integrate it again to get computed vertical position, compare this with the readings from the radar and, I guess, some kind of terrain map to check it all makes sense;
  • compute where they are with respect to where they should be;
  • compute the thrust vector they need from all this, rotating it all back into the LEM's frame.

And they need to do this every second or so. Oh, and did I mention that while all this is happening they need to make sure the vehicle remains pointing in the right direction which is it's own horrible computational problem? And while doing that they need to watch the instruments to check nothing bad is happening, make abort decisions and so on and so on.

This is so far beyond the capabilities of a human as to be hard to describe. This is just one of the reasons why all rockets use computers for guidance: the problem is too hard to solve without one. The V-2 used a computer, for instance – it was an analogue computer, but it was a computer.

| improve this answer | |
$\endgroup$
  • 3
    $\begingroup$ " The engine is at the bottom of the LEM for obvious reasons, and if you think about it for a moment you'll realise that a system like that isn't stable" If the the engine is on top of the spaceship, the system is not stable too. That is the Pendulum Rocket Fallacy, see geocities.com/jim_bowery/pendrock.html $\endgroup$ – Uwe Sep 14 at 13:47
  • $\begingroup$ @Uwe: yes, I need to correct that. Thanks for pointing it out and making me think about it. $\endgroup$ – tfb Sep 14 at 14:00
1
$\begingroup$

Interesting that some simple astrodynamical problems indeed can be solved without a computer, just by pen and using high-school algebra.

For example mass of payload a rocket launches can be calculated by Rocket equation. The caveat is we don't account for 1)atmosphere drag and 2)non-straight trajectory of rocket.

Also orbit transfer can be calculated easily, for example Hohmann transfer. If a spacecraft has initial elliptic orbit with perigee p1 and apogee a1 we can calculate how much propellant it will need to burn to transfer at a new orbit with perigee p2 and apogee a2.

BUT. If we want to know how the velocity of the spacecraft will be changing with time, in what point the spacecraft will be at given moment - this problem can't be solved analytically. We encounter Kepler equation that needs iterative calculations, a lot of them to reach enough precision.

And Kepler equation is just the most sime case - for two-body system. In reality in flight to the Moon we have also gravitation of the Moon and Sun. In most moments of the flight we can reduce the problem to two-body, because Earth (or Moon) is dominating source of gravitation. Other bodies can be accounted by perturbation theory (already rather complex formulas and a lot of calculations). But for some moments of approach to Moon even this is problematic becase the gravity of Moon and Earth are comparable there. If I remember correctly the trajectory for this moments was nearly to impossible to calculate without computers (source - A.Roy "Orbital motion").

PS I couldn't find any astrodynamics textbook in open access. If somebody can, please provide the link. :) It's enough just to look there once to see HOW MUCH MATH is there. :)

| improve this answer | |
$\endgroup$
0
$\begingroup$

According to this article, the nave & guidance computer had 36K of ROM, and 2K of RAM.

https://history.nasa.gov/afj/compessay.html

It lists 30 different “programs” that it could run.

The programs probably measure things like temperature, pressure, gyroscopes, etc. as input. The software then decides how to do motor control to keep the vehicle stabilized and on target.

If I had to, I suppose I could write software to simultaneously take 100 telemetry inputs, control 20 or so motors/actuators, and fit it into 32k.

Similar software I wrote in 1995 took 300k of ROM and had a lot more than 2K of RAM. I remember asking my boss, “which features do you want me to remove?” In order to keep the size under 300k.

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ There were about 300 people writing the programm for the Apollo computer, not a task for a single person. $\endgroup$ – Uwe Sep 14 at 13:54
  • 2
    $\begingroup$ The programs are heavily documented -- you can see exactly what's going into the calculations, so there's no need to speculate. $\endgroup$ – Mark Sep 14 at 21:38
  • $\begingroup$ Oh wow that’s an awesome link Mark. Shows like every single variable used. $\endgroup$ – Keith Knauber Sep 14 at 21:46
0
$\begingroup$

For more details on how the Apollo guidance computer was designed and built, and the people who did it, take a look at We Hack the Moon, the 50th anniversary website of the MIT lab that led the work. During the open to the public museum display in their lobby from June to October of 2019, they had a mockup of the LEM that let you try to land it yourself, which is nearly impossible without proper training

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.