20

Just out of interest , we know there's a lot of programming involved in the making of a satellite . Which languages are they written in ?

trinity
  • 10,394
  • 15
  • 49
  • 67
  • 3
    How about the languages used for controlling Toyota accelerator and brake systems? – DOK Feb 22 '10 at 19:11
  • 2
    @DOK A comment I wrote in a related discussion thread on lwn.net: http://lwn.net/Articles/374618/ – Pascal Cuoq Feb 22 '10 at 19:14
  • Thanks all , that was really interesting :) – trinity Feb 23 '10 at 17:45
  • 1
    It definitely depends on the "assurance level", i.e. "how fracked are you when the software conks out"? E.g. for Galileo in 2004, high assurance level (Software Development Assurance Level, SW-DAL) "DAL A" means. C (hopefully MISRA subset), Ada, Assembler and a host of processes for reviews and checks. Going down to "DAL D" allows you to use C++, and "DAL E" (where failure is a shrug & reboot), you can use Java, too. A contractor may propose other languages if that can be duly justified. I hope so, I would not want to see stupid footshootery in C where Esterel is the right tool. – David Tonhofer Nov 02 '18 at 13:23

9 Answers9

19

The NASA satellite missions I've been involved with all used assembly language for the onboard software. There is a strong preference at NASA to use flight software with heritage -- reusing components (both hardware and software) with a proven successful history on previous missions. So rather than using compiled code on the latest, most powerful processors, we often end up using hand-coded assembly on wimpy, but tried-and-true, processors. For example, the THEMIS project, built in 2003 and launched in 2007, runs on Intel 8085 processors, with hand-coded assembly modules with heritage from previous missions like WIND, CLUSTER, and STEREO.

Jim Lewis
  • 43,505
  • 7
  • 82
  • 96
5

Since they have a custom architecture connected to miscellaneous I/O peripherals they should be programmed in C/C++ or directly in ASM for better performance and optimizations..

They are fully custom so I don't think there are other approaches to the problem, think also that they have to use really low energy (and must be charged by sun) so they tend to have not so powerful hardware and must be REALLY optimized (that's why ASM is the way). You shouldn't waste any single CPU cycle!

Lastly the kind of devices attached to a satellite are really uncommon so I think it's difficult to use any kind of standard API to interface (like RS232 or so on), I think they're different for every case.

I wouldn't surprise myself to find many old chips like Z80s doing the dirty work on a satellite just because they're powerful enough to do simple tasks although their 8bit bus!

Jack
  • 131,802
  • 30
  • 241
  • 343
4

Aside from the possibilities that have already been mentioned, at least one spacecraft was controlled by software written in Lisp for part of its flight.

Zak
  • 1,157
  • 8
  • 15
3

I can tell you that the Mars Rover had at least some C++ code (PDF Link); They used Rogue Wave's Tools.h++ library.

John Weldon
  • 39,849
  • 11
  • 94
  • 127
2

C, C++ and Ada are mentioned here (yes, the authors can't capitalize "Ada"). The C code may be written by hand or generated from Scade.

Pascal Cuoq
  • 79,187
  • 7
  • 161
  • 281
1

As with any other software endeavour, the language used to perform some function in a satellite will be the most appropriate language given the various business and IT drivers in effect.

You'll find examples of different languages being used in aerospace if you look around. Given your question, you probably want to have a look at Ada, which is often referred to as being used in 'real-time systems', a news article so that effect is here, some non-defence users are listed here.

brabster
  • 42,504
  • 27
  • 146
  • 186
1

Most of the operational languages used at NASA and Lockheed center around statistics and calculus. Thus meaning MATLAB, haskell, Erlang, and scala. MATLAB and Erlang being the big ones that was requested for provisioning.

While the hardware end of things is going to be centered around Assembly, C and Verilog.

Dwight Spencer
  • 1,472
  • 16
  • 22
1

NASA uses many languages and it varies on the basis of its uses and where it is used. The programmes written for some calculation and for some scripting are written in mostly using python. The programmes for ground instruments and ground control are written using C, C++, Ada, etc. The critical programmes written for the on board instruments and hardware are mostly in Assembly Language as it gives the most control over the hardware and some old languages are also used as many hardware on the satellite are of old technologies(It doesn't mean they're out dated cause some functions are impossible to do without them) and other languages like MatLab, Visual Basic is also used for scientific calculations.

Héctor Valverde
  • 1,089
  • 1
  • 14
  • 34
Mur2501
  • 11
  • 1
-1

you can not use just one program for all system, mostly they use Matlab and P

Hamed
  • 1