Giving the Mars Rover Curiosity the brains she needs to operate took 5 million lines of code. And while the Mars Science Laboratory team froze the code a year before the roaming laboratory landed on Aug. 5, they kept sending software updates to the spacecraft during its 253-day, 352 million-mile flight.
The rover’s mission is to gather and analyze the Martian landscape for signs of microscopic evidence that life may have once existed there. Right now, she’s preparing to drill her first holes into the Martian soil.
In its belly, Curiosity has two computers, a primary and a backup. Fun fact: Apple’s iPhone 5 has more processing power than this one-eyed explorer.
“You’re carrying more processing power in your pocket than Curiosity,” Ben Cichy, chief flight software engineer, told an audience at this year’s MacWorld. Specifically:
- Processors: Curiosity’s is 132MHz; the iPhone 5’s is 1.3 GHz.
- Memory: Curiosity’s has 128 MB; the iPhone 5 has 1 GB.
- Storage: Curiosity holds 4 GB; iPhone 5 holds 64 GB.
- OS: Curiosity runs Wind River VxWorks 6.7 Real-time OS; the iPhone runs iOS 6.
And while NASA uses a Linux workstation to run Curiosity, it can compile the software using a MacBook Air. The notebook can easily port over applications because of the Unix infrastructure at its core, Cichy said.
How Fast Can You Program?
One of the team’s biggest challenges is having to script instructions for Curiosity within a 12- to 16-hour window. Each day, after the lander downloads the latest batch of data to the 100 scientists watching her movements, the team determines what they want her to do next and make sure that their goals align with Curiosity’s capabilities. Then the software team writes the necessary script and sends it off via uplink. Because of the roughly 14 minutes it takes for the instructions to reach Mars, all of this has to be done within the window, when Curiosity is sleeping.
“It’s a race against time to program within the uplink window,” says James Kurien, the team’s activity planning and sequencing software manager.
Too bad the iPhone doesn’t have a 352 million-mile range. The carriers would make a fortune off the data plan.