For the purposes of clarification
- will include machine code generated by a programming language on earth.
- 'in space' includes anything in orbit and deep space transit.
- special mentions of programming language on devices in space appreciated.
- special mentions of any coding by astronauts in space appreciated.
- 'popular' = by count of the number of satellites not most 'liked'. although discussion on this is welcome.

This question follows a reading of the excellent answers to my earlier question What was the first programming language in space?

  • 1
    $\begingroup$ Will "most popular" be problematic? Do you mean the one people liked the most, or most frequent/common? $\endgroup$ – uhoh Jun 14 '17 at 1:23
  • 1
    $\begingroup$ What if language A is present on by far the highest fraction of satellites, but there are by far the most lines of language B in space, and yet by far programmers were the most fond of language C? $\endgroup$ – uhoh Jun 14 '17 at 2:51
  • 1
    $\begingroup$ Edited my OP to clarify : by count of satellites installed on. Mostly I'm curious which languages are used and if this has changed since the first satellites. $\endgroup$ – aspiringGuru Jun 14 '17 at 4:16
  • 2
    $\begingroup$ @superdesk It confused me at first too, but I'm pretty sure he means that if a program is written in C and compiled to machine code, which is then sent to space, this will still count as "C in space". $\endgroup$ – called2voyage Jun 15 '17 at 17:40
  • 1
    $\begingroup$ Most projects don't really talk about the software side, so I can only talk about things where I was personally involved in some way, which is a quite limited sample. Nevertheless, I would say terrible horrible spaghetti Fortran is the most popular choice. $\endgroup$ – Rikki-Tikki-Tavi Jun 16 '17 at 21:48

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 required by a managed language.

Maybe things have changed in recent years. I hope so.

I don't have first-hand knowledge, but my guess is that the first satellites used assembly language -- small, tight code on slow processors with little RAM.


C would seem like a good guess: C is popular for embedded systems, satellites are embedded systems, therefore C is popular for satellites. There are a lot of holes you can poke in this line of reasoning, and of course many languages have been used to varying degrees of popularity. In the absence of a survey of languages used that would answer this question decisively, the examples here can give some context.

Keep in mind that since a significant number of satellites do not have publicly available information, such as military and spy satellites. One could guess that Ada may be more popular than a general survey would suggest, given it's widespread use in the US military in the past. More information on Ada is provided in this related question.

A specific example of C's use: NASA's Core Flight System (cFS homepage) is written in C, and is in use on several missions right now (related question).

Smaller platforms such as CubeSats may change the languages in space distribution as well: there are many of them and they have a much higher risk tolerance (and lower success rate). From the LightSail paper presented at SmallSat 2015, "LightSail FSW (software and firmware) is written in the C programming language." LightSail also ran a Linux distribution, again written in C.

Assembly was also a popular language, at least historically, according to Ron Garret who wrote the following about working at JPL in 1988: "Spacecraft were mostly programmed in assembler, or, if you were really being radical, Ada." The article with this quote documents the work done on Remote Agent, an experimental LISP program that controlled the Deep Space 1 satellite for two days during its mission.

  • $\begingroup$ Ah...Ada. $\endgroup$ – called2voyage Jun 15 '17 at 13:54
  • 1
    $\begingroup$ From personal experience I know Fortran is pretty popular as well. I think C beats it out though. $\endgroup$ – Arthur Dent Jun 15 '17 at 14:52
  • $\begingroup$ The question is a little bit fuzzy in that respect, but I think point #1 in the question together with some of the OP's comments would disqualify a lot of your examples, since the C code would be compiled on earth and what is actually installed on the spacecraft would be machine code, so the C code is not actually "in space". There are some exceptions, e.g. the C code that was uploaded to the Pathfinder spacecraft to be run in the C interpreter of its VXWorks operating system in order to fix the priority inversion problem. $\endgroup$ – Jörg W Mittag Jun 16 '17 at 7:27
  • $\begingroup$ I don't see the comments by aspiringGuru that clarifies point #1... I myself commented asking for clarification. Stepping back for a moment: counting the assembly generated by the compiler instead of the language the source was written in 1) doesn't follow conventional wisdom and 2) makes the question much less interesting. $\endgroup$ – superdesk Jun 16 '17 at 12:03
  • $\begingroup$ @ArthurDent Which kind? Sure, Fortran 2000 beats the pants off C, but I'd rather program in C than Fortran IV!! $\endgroup$ – WetSavannaAnimal Jun 18 '17 at 11:39

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.