293

Since the Apollo 11 code is on GitHub, I was able to find the code that looks like an implementation of sine and cosine functions: see here for the command module and here for the lunar lander (it looks like it is the same code). For convenience, here is a copy of the code: # Page 1102 BLOCK 02 # SINGLE PRECISION SINE AND COSINE ...


186

SpaceX uses an Actor-Judge system to provide triple redundancy to its rockets and spacecraft. The Falcon 9 has 3 dual core x86 processors running an instance of linux on each core. The flight software is written in C/C++ and runs in the x86 environment. For each calculation/decision, the "flight string" compares the results from both cores. If there is a ...


111

In this AMA by the SpaceX software development team, they wrote: We've been getting a lot of questions about how C#/MVC/etc have to do with rockets. They don't. About their development they said: The Flight Software team is about 35 people. We write all the code for Falcon 9, Grasshopper, and Dragon applications; and do the core platform work, also on ...


75

This Wikibooks link lists its strong points, some of which are: An extremely strong, static and safe type system, which allows the programmer to construct powerful abstractions that reflect the real world, and allows the compiler to detect many logic faults before they become errors. Modularity, whereby the compiler directly manages the construction ...


73

Because shielding against radiation is heavy, and weight is the enemy of getting things into space. CPUs are quite sensitive to radiation, and some types of radiation (cosmic rays) are not only quite good at penetrating most things, as they do, they cause a cascade of secondary radiation. To protect a device form any of this radiation getting through is not ...


59

There are a number of reasons why spacecraft electronics typically lag what is commercially available by several years. Radiation tolerance Electronics are very susceptible to radiation phenomenon that terrestrial electronics are largely protected from by the Earth's atmosphere and magnetic field. Common radiation-based failure mechanisms are Single-Event ...


56

Timing. Ada was developed in the 1970s and 80s with the intent of replacing the plethora of languages used in the US Department of Defense's realtime systems. NASA (and also organizations from Europe) were active participants. The DoD mandated Ada for all major development in 1991. NASA did much the same. The International Space Station had been a paper ...


49

TL;DR: It was so busy getting stuff done, it didn't care. Being old, slow, massive and inefficient (by any modern standards, not by those in 1965) is a huge benefit when it comes to radiation hardness. Let's start with the memory: Changing a bit in current S(D)RAM cells is trivial - introduce a bit of charge in the wrong place and the bit is lost. This ...


46

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 ...


45

(I'm interpreting the question as "what programming language was the first spacecraft software written in?", per discussion in comments above.) This will depend on your definitions of "computer" and "programming language". Almost certainly the first digital computers on spacecraft were programmed in assembly language or ...


41

POSIX time doesn't include leap seconds, and is not implemented the same way in every UNIX, so it routinely gets inconsistent for several seconds every couple of years. It is not a high-precision time scale, and there is little point correcting it for relativistic effects which are smaller than it can represent. GPS has to be corrected --- in particular, ...


41

Cosmic radiation represents a big threat to humans and to computing devices in space. Astronauts regularly report seeing flashes of light when they have their eyes shut. There are all kinds of things that just one cosmic ray can do to electronics. The generic name for these effects is single event effects. A cosmic ray might for example flip a bit (single ...


37

The Apollo Guidance Computer used a state vector either centered at the Earth or the Moon. The switchover point is the the lunar sphere of influence, defined in the AGC as 64,373,760 meters (https://www.ibiblio.org/apollo/NARA-SW/R-577-sec5-rev4-5.6-end.pdf PDF page 127). When in the idle program P00 the AGC will periodically check if it needs to update the ...


35

You also asked for the logarithm, so let's do this as well. As opposed to the sine and cosine functions, this one is not implemented with a Taylor series-like approach only. The algorithm is based on shifting the input and counting the number of shifts needed to arrive at the required scale. I don't know the name of this algorithm, this answer on SO ...


34

A big part of it is reliability. NASA could probably put in an Intel Xeon chip made in 2012 that has a crazy high amount of processing power. However, the chip that was used, the RAD750, has years of experiments and usage behind it, such as being used in a variety of spacecraft including: Deep Impact comet chasing spacecraft, launched in January 2005 -...


33

Can you have a spacecraft based on an Arduino? Sure you can! ArduSat was two kickstarter funded cubesats that were eventually launched from the International Space Station in November 2013. When you think about it, an Arduino easily outperforms for instance the over forty year old Apollo Guidance Computer All of your requirements should be doable, if it is ...


32

If I get you correctly, this should be the moment from the movie you're talking about:     And this is the corresponding part of the movie script: JACK SWIGERT - Now... Do we know for sure that we can power this thing back up?... It's going to get awfully cold in here. ANDY (CAPCOM - WHITE) - Copy that, Jack. We'll just have to deal with ...


31

No. Computer clocks are inaccurate. They rely on constant corrections to maintain the correct time. Since their inaccuracy is much bigger than the time speed difference between earth and the ISS, it really doesn't matter.


30

One might think that spacecraft would be on the cutting edge of technology. I wouldn't think this would be the case at all. If anything, NASA would want to use hardware (and software) that has been extensively tested throughout years of use, both in NASA and in industry as a whole. The last thing NASA wants is to find a bug in a spacecraft's system at an ...


28

Your spacecraft would need to be several orders of magnitude larger than the Saturn-Apollo. 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 ...


27

Was standard Newtonian mechanics sufficient or were relativistic effects included? Relativistic effects didn't have to be modeled; other sources of error would have swamped the effects of relativity, and midcourse corrections were made. Were the Earth, Moon, and spacecraft modelled as point masses or more complicated bodies? The moon's gravity was ...


27

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 ...


26

It doesn’t yet matter for most practical purposes. The slowdown from faster motion and speedup from a weaker gravitational field partly cancel out, and the net effect is that time on the ISS is only 0.0000000014% slower than time on Earth, so in its whole 22-year history it has lost about one hundredth of a second.


25

It was not random. Background: The shuttle data processing system was quad+ redundant, not triple. There were four Primary Avionics Software System (PASS) computers and a completely independent Backup Flight System (BFS) computer with totally different software. Each PASS computer controlled a "string" of avionics equipment (some really critical avionics ...


24

The equations required for flight to the moon are not all that complicated, particularly given that much of the work was done by larger computers based on the Earth. Some of the computer programs (e.g. P40-P42) run on the Apollo guidance computer simply calculated what direction to point the ship and how long to fire the engine in order to achieve a change ...


23

It's really hard to answer this without complicating about how Soyuz spacecraft designers obviously didn't. Or crack a joke or two. It's a cramped little space vehicle and that space between the three crew, the seats they occupy and the control panels is pretty much all the space they have to crawl into it and later out of it. Moving the panels closer would ...


23

You can, but it will suffer from a number of problems. These problems can probably be overcome with a short term mission. Problems include: Radiation- Degrading the long term effect of the electronics. Single event upsets- This is probably the biggest danger, a high energy cosmic ray strike could cause a bit flip, potentially changing the code running in a ...


23

“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 ...


22

What other space applications, projects and agencies are using the Ada programming language? In the US, old stuff such as the Delta rockets, the Atlas rockets, and the TDRSS ground terminal (but this is being switched to C, C++, C#, and Java). There might be new development, but it's mostly stuff you (and I) cannot know about because it's classified. New ...


22

The Voyagers have been so reliable due to careful design, plus lots of redundancy. Voyager employs three dual-redundant computer systems per spacecraft. The first, the CCS, is nearly identical to that flown on Viking, performing sequencing and spacecraft health functions along with new ones necessitated by the addition of the other computers. Telemetry ...


Only top voted, non community-wiki answers of a minimum length are eligible