"Lots of people ask me what sort of 'controller' we use for the rover," says Noah Warner, one of Curiosity's Tactical Uplink Leads in charge of the team sending commands to the rover. "And I think they are really asking if we use a keyboard and mouse, or something more like a joystick. They always seem a bit disappointed to find out it's just a keyboard."
It may involve a mere keyboard, but directing the Curiosity Mars Rover is a complicated, achingly deliberate process of planning, organizing, checking, re-checking, and re-re-checking distinct modules of computerized code. A stream of "1s" and "0s" is ultimately beamed through space, enacting the singular Space Age magic of turning a scientist's idea into a set of twists, turns, and scoops on the surface of another planet.
The uploading process begins with the arrival of the previous day's data. With new images and spectra in hand, the science theme groups survey their options, bandying about hypotheses and proposing activities in what amounts to an exercise in scientific horse-trading. Each group prepares "fragments" of computerized commands of the day's plan - known as the activity plan - that would enact its scientific wish list, though it's not yet certain if these particular activities will make the final cut.
At a particular moment in the daily schedule, the intercoms in the science theme group rooms buzz, and a tiny voice issues an ultimatum: "Please deliver your fragments," it says, and the scientists scurry to complete their proposed pieces of the day's plan.
What follows is a series of meetings bringing scientists and engineers together to produce a watertight plan that is ultimately uploaded to Curiosity's on-board computers. At the Science Operations Working Group (SOWG) meeting, the code plan fragments are assembled to see how they fit within constraints like data volume, onboard power resources, and environmental realities. Scientific activities are trimmed and shuffled accordingly, an occasionally tumultuous process that requires a clear-eyed view of daily details within the context of the rover's broader mission.
At the Activity Plan Approval Meeting (or, APAM, for the acronym-inclined), the plan is transferred from the Shift 1 scientists and engineers - those who developed the schedule - to the Shift 2 contingent - who will actually code it and send it. "At that point, the plan is approved," says Warner. "We move from developing the plan to turning that plan into commands and sequences of commands."
Tasks that involve the rover hardware - twisting the robotic arm to examine a rock from just the right angle, or driving forward to check out a new patch of soil - go to the rover planners, who build the commands from a library of vetted options and tailor them to the situation at hand. If the scientific payload is up to bat, coders from each specific instrument will take over. "Overall, the coding aspect is pretty straightforward, pretty readable" claims Warner. He says that possible sequences are divided into functionality-based modules, each with up to hundreds of commands. "For example, all driving commands start with 'MOB', and ChemCam commands start with 'CCAM.'"
With a full complement of code pieces in hand, the sequence integration engineer assembles the master sequence, incorporating other daily requirements. "That sequence will tell the rover when to go to sleep, when to wake up, when to do science, and when to get ready to communicate with either us on Earth or an orbiting asset, all of the basic functions," says warner.
The final two meetings - the Master/Submaster Walkthrough and the Sequence Report Walkthrough - are devoted to evaluating the master sequence and any sub-sequences delivered by rover planners or the instrument teams, making sure the commands won't unduly stress Curiosity's computers or resources. With so much inherent risk in driving around the surface of another planet, resource management - power, data, time - is one of the few things the rover's engineers can control, and they're very careful to not slip up. "We have software on the ground to model how things will likely going to play out on the vehicle. To make sure we're not violating any constraints or doing anything that's unsafe for the vehicle," says warner.When the sequences have been fully examined, the entire suite is handed off to the enigmatically named "ACE," who will talk to the controllers of the ground based antennas and supervise the transmission of the commands into space.
By 9 AM on Mars, as the Sun pokes through the red-tinged atmosphere and Curiosity wakes up from its frigid night, the master plan must be ready to start its voyage. Daily plans are sent to Mars via the Deep Space Network (DSN), a globally distributed set of enormous antennas that support a range of interplanetary spacecraft. Around the same time that dawn breaks on Mars, DSN engineers are determining which antenna will be called upon that day. Will it be the Goldstone complex in the heart of California's Mojave Desert? Or the Spanish station, positioned amid the rolling hills just west of Madrid? Or possibly the Australian center, an hour outside of Canberra, where kangaroos hop around the grassy valleys? The DSN stations are positioned roughly evenly across the globe, so one of them will always have a good view of Mars.
At approximately 9:45 AM (Curiosity Standard Time), the chosen station sweeps its transmitter's frequency to get locked into the rover's and make sure that everyone's on the same wavelength. The ACE will send the plan to the station operator, who will read it back to confirm its contents. The operator will also read out the "check sum," a unique identification number that confirms the file's identity and ensures that the document about to be beamed across space is in fact the team's carefully crafted plan and not a YouTube cat on a skateboard.
At 10 AM, the transmission window opens, and a stream of "1s" and "0s" is beamed at the speed of light toward Gale Crater, a journey that takes between 4 and 24 minutes (depending on the time of year). The plan is usually divided into 3-5 different pieces, as Curiosity can only handle 250 kilobyte-sized files.
Then, the engineers wait. If the new master sequence takes over from the old one, the rover's high gain antenna will emit a distinctive beep, eliciting a coordinated sigh of relief from Curiosity's handlers. There's a different type of beep built into the previous day's plan to indicate that the new file wasn't received, but fortunately that one hasn't been heard yet.
With a new set of directions, the rover gets to work, investigating its surroundings. And as Curiosity's day begins, the 2nd shift support team can get some rest, having successfully turned scientific inquiry in Pasadena into turning gears on the surface of Mars.