Perseverance hit Mars’ atmosphere at almost 12,000 miles per hour (19,312 kilometers per hour) and a mere seven minutes later NASA landed its latest Mars rover softly and safely. Onboard the one-ton mobile science lab is its tiny flying companion, the drone helicopter Ingenuity. If all goes well, the four-pound (1.8 kilograms) Ingenuity will be the first vehicle to ever fly on another world.  At 11-light minutes from Earth, no one will fly the dual-propped Ingenuity with a drone controller. Instead, it will fly itself using a combination of Linux and a NASA-built program based on the Jet Propulsion Laboratory’s (JPL) open-source (pronounced F prime) framework.

This will be no easy task. No one has ever tried to fly on Mars, which has an atmosphere only one-hundredth of the density of Earth’s air. True, Mars also has only a third of Earth’s gravity, but still, Ingenuity’s engineers will be pleased as punch just to get Ingenuity off the ground.

Indeed, Ingenuity is purely a technology demonstration. It’s not designed to support the Perseverance mission, which is searching for signs of ancient life and collecting rock and dirt samples for later missions to return to Earth. Its mission is to show that it’s possible to fly on Mars using commercial off-the-shelf (COTS) hardware and open-source software. 

In an IEEE Spectrum interview, Timothy Canham, a JPL Embedded Flight Software Engineer, explained the helicopter’s processor board is powered by a Qualcomm Snapdragon 801 running at 500 Hz, not MegaHertz, Hertz. While that may sound painfully slow and old, it’s far faster than Perseverance’s processors. That’s because NASA-grade CPUs and chips must meet NASA’s High-Performance Spaceflight Computing (HPSC) radiation standards.  These customized processors take years of design work and testing before they’re certified for spaceflight. For instance, NASA’s newest general-purpose processor is an ARM A53 variant you may know from the Raspberry Pi 3. Ingenuity, however, as a demo project can use a more ordinary, and thus a more modern, CPU. 

In fact, Canham explained, “we literally ordered parts from SparkFun [Electronics]. This is commercial hardware, but we’ll test it, and if it works well, we’ll use it.”

As for the software, Canham said, 

This the first time we’ll be flying Linux on Mars. We’re actually running on a Linux operating system. The software framework that we’re using is one that we developed at JPL for CubeSats and instruments, and we open-sourced it a few years ago. So, you can get the software framework that’s flying on the Mars helicopter, and use it on your own project. It’s kind of an open-source victory because we’re flying an open-source operating system and an open-source flight software framework and flying commercial parts that you can buy off the shelf if you wanted to do this yourself someday.

That open-source software is F´. It’s a component-driven framework that enables rapid development and deployment of spaceflight and other embedded software applications. F´ has been successfully deployed on several space applications many times before. It is tailored but not limited to small-scale spaceflight systems such as CubeSats, SmallSats, and, now, a self-flying helicopter. 

It includes:

  • An architecture that decomposes flight software into discrete components with well-defined interfaces
  • A C++ framework that provides core capabilities such as message queues and threads
  • Modeling tools for specifying components and connections and automatically generating code
  • A growing collection of ready-to-use components
  • Testing tools for testing flight software at the unit and integration levels.

There are, of course, many other open-source NASA programs. There are more than 500 NASA Open Source 3.0 license software projects. Long before the concepts of free software and open-source had been articulated, NASA shared much of its code freely under the COSMIC program.

NASA has long used Linux both on the International Space Station (ISS). Linux’s path to supercomputer domination started at NASA’s Goddard Space Flight Center (GSFC) with the first Beowulf supercomputer.

Like Ingenuity the first Beowulf cluster was built with COTS equipment. It was built using 16 Intel 486DX processors and 10Mbps Ethernet for the bus for only a few thousand dollars. While its speed was only in single-digit gigaflops, Beowulf showed you could build supercomputers on a shoestring budget and Linux. Now, Ingenuity is showing that great things can still come from inexpensive hardware paired with Linux and open-source software.

Related Stories: