The Stack Overflow podcast is back! Listen to an interview with our new CEO.
257

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


72

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


54

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


40

(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 microcode. You can get a lot of ...


38

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


36

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


30

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


29

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


28

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


28

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


26

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


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


23

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


22

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


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


21

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


21

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


21

This answer is a guess based on NASA Technical Note D-5869: Description and performance of the Saturn launch vehicle's navigation, guidance and control system (referred to as 'D-5869' below), also the Launch Vehicle Digital Computer pages (referred to as 'LVDC' below) and finally the description in the video in the question (referred to as 'the video' below)....


18

Orbiter The Solid State Mass Memory (SSMM) is 25 Gbit (about 3 GByte) with a 5Mbps data rate. The telemetry rate shall be switchable between 8 bps and 65536 bps and The bus throughput shall be minimal 131 kbps. The SSMM shall support an input data rate of up to 5 Mbps useable data (physical data rate excluding IEEE-1355 protocol overhead) ...


18

I am guessing VxWorks but I haven't found any sources to validate this. Close, but no cigar. If New Horizons flight software was built by Jet Propulsion Laboratory (JPL), then I guess Wind River's VxWorks RTOS would have been their first choice (it's also a popular choice for hardware on Mars - Pathfinder, Sojourner, Phoenix lander, Spirit, Opportunity, ...


18

Most cubesats are student projects that they want to have for only a matter of a few months at most. That being said, the Pi would likely be very susceptible to Single Event Upsets, SEUs, and thus might have some serious issues. It is low cost, and would fit inside of the spacecraft, with a bit of shielding it might be okay, but only for a few months for a ...


18

1. How did the Apollo guidance computer handle parity bit errors? According to Apollo 15 Hardware by Delco Electronics, Parity Alarm Occurs if any accessed word in fixed or erasable memory whose address is $10_8$ or greater contains an even number of "ones." All locations of $10_8$ or greater are stored in fixed or erasable memory with odd parity. ...


18

I remember taking Computer Science courses in the late 90s. The professor of CS explained to our meager group of CS majors that he was going to teach us C, rather than COBOL or Ada, because it would be more useful in general. At the time, they were the major programming languages colleges were teaching back in the day (every major university in the area ...


17

That ring is the "instrument unit" (IU). Here's a picture of the component layout. There is more there than a computer, but it's mostly dedicated to guidance, navigation, and control. There's a hugely detailed fact sheet here. It lists the systems of the IU as A more detailed layout (same source as first picture). Image source


16

I concur with Hohmannfan's response. This answer addresses the wider issue of computers in satellites. Who needs a computer? I don't think there is anything about the mission that you have described in the question that actually requires any "digital computer" at all. It might seem as if image handling and navigation are highly demanding in computing terms,...


15

I would think that e.g. life support isn't running on a laptop and isn't using an off-the-shelf operating system. That is correct. The heart and soul of the computational system in the Russian segment of the International Space Station is the Data Management System - Russia (DMS-R), which comprises a pair of fault tolerant computers (each of which has ...


14

From the website: AdaCore tools can be used to meet verification objectives including coding standard compliance, code accuracy (prevention of errors such as buffer overrun, integer overflow, and references to uninitialized variables), and structural coverage analysis up to MC/DC. Specialized high-assurance run-time libraries, including one that ...


13

Don't take random youtube videos as fact. That part of that video was incorrect. The unmanned SpaceX Dragon has three pairs of computers used for flight control (so six flight control computers), and has 54 processors in all. The Falcon 9 launch vehicle has another 30+ processors. See http://aviationweek.com/blog/dragons-radiation-tolerant-design. Orbital's ...


13

What a fascinatingly obscure question :-) It took some digging, so perhaps someone who's actually seen an AGC might know better: The parity bit was used to verify that data transferred correctly from memory to the registers. That is, the data in the memory was assumed to be correct, and the error was assumed to take place between the electronics that ...


12

Note: This answer has changed as of July 23, 2014. Because of the April 11, 2014 external MDM failure and some additional corrections and improvements, both the data and analysis portions of this answer have changed, so read carefully. If you are interested in the previous versions of this answer, please view the edit history. How often are they replaced? ...


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