

What is the Mars Curiosity Rover's software built in? - joshuahedlund
http://programmers.stackexchange.com/questions/159637/what-is-the-mars-curiosity-rovers-software-built-in

======
Sukotto
Tangentially, "They Write the Right Stuff" was a very interesting 1996 article
about writing the software running the space shuttle.

[http://web.archive.org/web/20050830190246/www.fastcompany.co...](http://web.archive.org/web/20050830190246/www.fastcompany.com/magazine/06/writestuff.html)

------
eliben
So much programming language research in the past 40 years, but C is, no
doubt, still king.

~~~
jetti
It is a lot of money to possibly waste on a language that is not proven, so
why not stick with what works?

------
ColinDabritz
I believe the confusion between '500,000 lines' in the question vs '2.5
million/3.5 million' in the answers is the context. The 500,000 number is
involved in the entry, descent, and landing (EDL) process specifically, and
the rover systems are millions overall. Not sure why the values are 1m
different, but the 2.5m citation is what is in the linked PDF.

~~~
sanxiyn
Guess on 1 million difference: 2.5m citation is dated 2009, 3.5m citation is
dated 2010.

~~~
natep
It's hard for me to imagine 1M lines of code being written/generated in a year
and then flown. I suspect either the first person was responsible for testing
only 2.5M lines of it, or they used different counting methods.

As the one who posted the larger figure, I'd say it's more reliable because it
comes from the man who sat at the Flight Control station in the control center
:D

------
amirmansour
The two previous Mars rovers had some Java on them. I saw the code with my own
eyes!

~~~
sgt
I bet James Gosling was proud.

~~~
amirmansour
I bet he was. I also bet that MSL also has some Java on it since JPL is all
about code reuse.

------
natep
Thanks for posting! The existing answer had almost no detail, so I wrote
another: <http://programmers.stackexchange.com/a/159687/61021>

~~~
mturmon
You dug up a great talk, but I could not find the PDF. There's no link, and
the expected file FSW10_Cichy.pdf is not present with all the other PDFs in
the download directory.

The author, Ben Cichy, was the guy in Flight Control during the landing last
night, sitting behind the position marked "Flight Software". So he's
definitely a good source for the background ;-)

~~~
natep
I don't know if there is a PDF. The media player is interesting, though, in
that it's actually just some javascript that loads a sequence of stills at the
appropriate time, and if you look at the source, you can write, say, a python
script to download all the images, which I did. When I get home, I'll see if I
can find it.

------
antirez
Not sure what means that most of the C code is auto generated. From what?

~~~
mgurlitz
They make models of the software before writing any code, and a lot of the
code can be generated _from the models_. There's a guarantee that if the model
is correct so is the code. Or, you don't have to check that your hand-written
C actually matches the system you were building.

~~~
msh
What do you mean by model?

~~~
andor
A formal model of how the software is supposed to behave. Models can be proven
to have certain properties (e.g. deadlock-free, cruise control _always_ turns
off when brake is hit), while with software you're usually limited to testing.
A proof guarantees that the software works for all possible inputs, whereas
when testing only some inputs are tried.

To model individual processes, one could use automata, for interaction of
processes there are process calculi.

<http://en.wikipedia.org/wiki/Formal_methods>

------
stox
The processor is an embedded, radiation hardened, version of the PowerPC.

------
kylemaxwell
You could do worse than start at the NASA Github page:

<https://github.com/nasa/>

------
zwieback
The JPL coding standards (<http://lars-
lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf>) linked in one of the comments
seems surprisingly flexible. I would have expected more limitations.

------
msantos
Let's hope Nasa is not cutting corners like Boeing did (does?) running VxWorks
on 747s and using telnet to connect to any 747 aircraft while in flight. EDIT:
Boeing only connected to aircrafts to retrieve flight stats and other data. Or
when following a customer request. The point I wanna raise is not the fact
Boeing connects to aircrafts, but the fact they do so using non-crypt
ol'telnet

------
gm34
Are you planning hacking the Rover ? :)

------
sodelate
to be sure , vxworks

