Which programming languages and operating systems are mostly used for interplanetary satellites (such as a mission to the moon)?

To my knowledge, I know some LEO CubeSats use C programming language with the FREERTOS system. Is it the same for interplanetary mission or something else is used to handle more complex tasks?

  • 2
    $\begingroup$ Ada and C/C++ are the most common programming languages, I believe. Operating systems are more varied, with some probes not using an OS at all (embedded systems). VxWorks has been used in a number of NASA applications. The ESA's Rosetta used Virtuoso RTOS. That makes the operating system portion of this question kind of hard to pin down. Maybe you could explain a little more why you want to know so we can narrow the field down a bit. $\endgroup$ – called2voyage Jan 8 '20 at 20:21

Filo has covered operating systems, so I won't repeat that here (except to reference this answer about New Horizons' OS, which is Nucleus RTOS rather than VxWorks, by way of a change).

As for programming languages, there's inevitably a lot of C and C++, though there's a chance that a somewhat restricted subset of the languages is used to improve safety, ease of reasoning about programs, realtime response limits and memory usage and all the rest so they won't quite be the usual C and C++.

For some examples of stuff that isn't C, how about:

  • HAL/S, originally designed for the Space Shuttle (aparently 85% of shuttle software was written in it). It has been used for other things, such as Galileo, which was put together back when the shuttle was still a thing.
  • Assembly language is common, especially for older projects where there would have been much poorer support for high level languages. The Apollo 11 AGC source code is open source if you wanted to see what it looked like.
  • FORTRAN seems to be everywhere. Voyager used FORTRAN 5 (presumably not released in 1905, but sometimes I do wonder... certainly it predated lower case letters) and later Fortran 77, also some C and some assembly language.
  • Ada has appeared in many projects, including Huygens, Mars Express and Rosetta.
  • Forth is also used (in NEAR, Galileo, Cassini, Rosetta and others), though more for smaller subcomponents and sensors rather than bigger and fancier control systems, I think. It is a quite different language to all the others listed here.
  • There's stuff that transpiles to C, such as Simulink. This was apparently used for the guidance and control stuff in New Horizons, though the vast majority of the rest of the software on the probe was written directly in C.

I don't doubt there are many others, but this seems to take care of the vast majority of things.

  • $\begingroup$ 1905? That's an old probe! :) $\endgroup$ – Organic Marble Jan 9 '20 at 14:20
  • $\begingroup$ en.wikipedia.org/wiki/Fortran#Fortran_5 $\endgroup$ – called2voyage Jan 9 '20 at 16:05
  • 1
    $\begingroup$ @called2voyage not to be confused with fortran V, of course. $\endgroup$ – Starfish Prime Jan 9 '20 at 16:06
  • $\begingroup$ @StarfishPrime Exactly, simple stuff. :P $\endgroup$ – called2voyage Jan 9 '20 at 16:07
  • 1
    $\begingroup$ @JörgWMittag it is possible, but unlikely... the memory allocation magic, for example, doesn't necessarily play well with the sort of predictability people like for safety or real-time critical software. You can work around it, but it is a massive faff. $\endgroup$ – Starfish Prime Jan 10 '20 at 13:44

Example 1 : RTEMS, source https://devel.rtems.org/wiki/TBR/Website/Wheres_RTEMS

Example 2: VxWorks, source: https://en.wikipedia.org/wiki/VxWorks#Aerospace_and_defense


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.