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


77

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


71

I was a NASA contractor working on the same contract, but with 3 different companies, writing GN&C code for the space shuttles from 1989 until 1995. Initially, it was Ford Aerospace, then Loral, then Lockheed-Martin. IBM was the prime most of that time. It has been a long time since I did any work like that, so don't hold what I write below as gospel. ...


57

Almost all of the safety critical software that runs on the US side of the Space Station is written in Ada. I wrote "almost all" rather than "all" because there are probably some low level device drivers written in assembly. I can't find out in which language / languages the code that runs on the Russian side was written. I wouldn't be surprised if that also ...


57

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

NASA formed a board to investigate the loss of the spacecraft and reached some high level conclusions. The board cited a number of contributing factors, which I have filtered to include the ones most relevant to the question: errors went undetected within ground-based computer models of how small thruster firings on the spacecraft were predicted and ...


40

In many of the early probes, up until close to Apollo there were not true computers on space probes. All computing was done on Earth and the onboard electronics was known as a sequencer, for Pioneer 10 it had 222 possible commands 5 of which could be readied. Early Venus probes sent data by mechanically switching different sensors to modulate a CW ...


38

"Rigorous tests" doesn't begin to describe the process used to make sure there are no bugs in the Shuttle software. This massive article details how the process works. A few salient points: The Shuttle software consists of ca. 420,000 lines. The total bug count hovers around 1. At one point around 1996, they built 11 versions of the code with a total of ...


38

Although the Space Shuttle flight software was of outstanding quality, it's completely incorrect to think that there was only one bug. There were many known bugs in the flight software (FSW). Here are three I can think of off the top of my head that impacted missions. The flight campaign of the Shuttle program started out with an embarrassing software bug! ...


34

In 2015, the last original Voyager engineer still on the project, retired. NASA specified that his replacement would have to know FORTRAN. The software was updated regularly after launch: The last true software overhaul was in 1990, after the 1989 Neptune encounter and at the beginning of the interstellar mission. "The flight software was basically ...


27

(originally answered to "Samples of old guidance software") The first that comes to mind is the Github repository of the Apollo 11 Guidance Computer (AGC). The repository has both Command Module and Lunar Module software, but note that it is transcribed from hardcopies, so it might not be fully complete (yet). You can find a simulator of the AGC on the ...


26

There were a good number of chances to catch the error after launch, which is what most of the reports on the mission focus on. To look specifically at what testing was done before launch this paper from the American Astronautical Society has a decent overview, starting on page 6: The failures of the Mars Climate Orbiter and Mars Polar Lander: a perspective ...


23

Updates: Added Astro Digital and Planet Labs at bottom. There isn't a specific Linux distribution for spacecraft. At least not yet. I have heard of groups that basically took Buildroot to build only as much Linux system as they needed for a satellite. Beyond that, they needed to provided the customized middleware or applications. It is tempting to put ...


22

Almost all in C on the rover computer. On MSL, some of the C was generated automatically using UML state charts. I don't know the exact team sizes. On the order of 20 on MER and 40 on MSL for the flight software on the rover computer. You would also need to consider the software on the instruments. And the radio. And the motor controllers. Here's a ...


21

A typical approach as used on Mars rovers is to keep the previous build on the spacecraft as the default to boot to on a reset. You load the new build and command a boot to the new one. Then you test it. If something goes south, it will reboot to the old build. Or you can command a reboot to the old one. Once you're confident in the new build, you make ...


21

No, scientific spacecraft are not developed by scientists on the science team. They may develop their instruments, but not the spacecraft. The spacecraft are developed by professional spacecraft engineers in the government or industry. The software engineers are trained in software engineering, and in particular in high-reliability, real-time software. ...


20

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

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


16

Shameless plug for Tudat (TU Delft Astrodynamics Toolbox)... If you're looking for something that allows you a lot of freedom to set up and play with simulations, you might want to consider an open-source C++ project I've been working on for the last few years as part of my PhD. Most of the graduate students in my group use it, so a lot of effort has gone ...


16

With the exception of model rockets made of paper, wood, or breakable plastic, that are passively stabilized, that have low thrust and low delta V, and that do not have guidance software, launch vehicles fall under ITAR regulations. The regulations are now much more relaxed once the launch vehicle has achieved its goal and placed its payload into orbit. ...


16

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


15

Orekit is the best space mechanics tool I know. Developed in Java (cross-platform), Orekit is a space dynamics open source library, based on Common Apache Math. Despite the fact it has no visualisation tool so far, the different force model it contains make it a really good choice if your plan is to solve accurate flight dynamics problem. Orekit includes ...


15

There are a lot of programs involved in running the ISS. The exact details are difficult to discern, a lot of NASA's software is available via this site, with some restrictions, but here is what I can find. Astrobee- Runs the "Robotic Operating System" Geolocation via a Python Library Some elements use LabView I'm sure there are many other languages, ...


15

I am a software developer and with all the resources available today I cannot fathom where one could even start such an endeavour. There are plenty of computer-based systems to this day that have to live with such limitations. There are plenty of embedded systems where 2^16 (65536) bytes of memory remains a luxury. After all, on machines that use 16 bit ...


14

Specifically, for the Mars Pathfinder priority inversion problem, this is explained in detail in Mars Pathfinder: Priority Inversion Problem, Report for the Seminar Series on Software Failures, Risat Mahmud Pathan, Chalmers University of Technology (PDF). I'm reproducing here an excerpt that's most relevant to your question, and I'd recommend reading the ...


14

This is not a complete answer. It is instead an extended comment to the following: I understand I will have to retard the gravity from each source by its particular light-time, as well as correct for the light time for the HST images. While you do want to correct for light time travel with regard to seeing a moving remote object, you definitely do not ...


13

Kubos corporation (disclosure: I work at Kubos) have a cubesat-specific Linux distro and a real-time operating system (RTOS), for cubesats with tighter power and processing budgets, since, as noted by Rick 0xfff, above, smaller cubesats don't get much of a power budget. Kubos have, as suggested in his answer, taken Buildroot and created a lightweight Linux ...


13

I wrote code that flew on 3 spacecraft that went to Mars, one to the Moon, one to a comet and back, and a few Earth-orbiting satellites, the last of which was about 10 yrs ago. All of them used C. It's not the only language out there, of course, but it's popular because the perception is that code can be made smaller and faster using C, without the overhead ...


13

The Voyager spacecraft are not reprogrammed anymore, so the language in which they are programmed is largely irrelevant. The uplink is only 16 bits/second, just enough to send (simple) commands. How these commands are generated is irrelevant to the spacecraft. Any language that can generate a sequence of bits theoretically suffices. This pdf document ...


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