News & Intelligence Briefings Newsroom ยท Updated daily
Space Autonomy Topics: The Aโ€“Z of How Spacecraft Think

Flight Software

Flight software is the code that runs on a spacecraft’s own computers: it reads sensors, commands actuators, stores and sends data, and decides what to do when something goes wrong. Every autonomous behaviour a spacecraft shows, from holding its attitude to landing itself, is ultimately expressed in flight software.

It matters because once a spacecraft is launched, its software is the only part of the system engineers can still change, and often the only thing that can react fast enough to save the mission. For the wider picture, see our guide What is Space Autonomy?

๐Ÿงญ Why it matters

Distance turns software into the spacecraft’s first responder. When NASA uploaded a patch to the Voyagers in 2023, the commands took more than 18 hours to arrive. Anything that must happen faster than that has to be decided on board.

Software is also where many missions are won or lost. A single wrong value can strand a vehicle in the wrong orbit, while a well-designed update can rescue a mission years after launch.

  • Speed: attitude control, fault protection and landing guidance run in milliseconds, far quicker than any ground loop.
  • Coverage gaps: spacecraft spend long periods out of contact, so the software must keep them safe unattended.
  • Adaptability: new capabilities can be uploaded after launch, extending a mission’s life and scope.

โš™๏ธ How it works

Most flight software is built in layers, so that mission-specific code sits on top of reusable, well-tested foundations.

  • Real-time operating system: schedules tasks by priority so that time-critical work, such as control loops, always runs on time. Mars Pathfinder, for example, ran on the commercial VxWorks system.
  • Framework: reusable services such as messaging, commanding, telemetry and file handling. NASA’s Core Flight System and JPL’s F Prime are open-source examples; F Prime connects modular C++ components through defined ports.
  • Applications: guidance, navigation and control, power and thermal management, payload operations and data storage.
  • Fault protection: monitors that watch for out-of-limit readings and responses that isolate a fault or put the spacecraft into a safe mode. See Failure Detection & Recovery.
  • Commanding and sequencing: stored command sequences, and increasingly onboard planners, decide what the spacecraft does between ground contacts.
  • Patching and reloading: engineers can upload changed code or swap whole software images, often sending only the differences to save bandwidth.

Rigour scales with risk. NASA’s software engineering requirements, NPR 7150.2, put software needed for human spaceflight in Class A and mission-critical software on uncrewed spacecraft in Class B, each with stricter process demands than the classes below.

๐Ÿš€ In the field

MissionAgencyYearWhat the flight software did
Mars PathfinderNASA/JPL1997Repeated computer resets on Mars were traced to priority inversion; engineers enabled priority inheritance and uploaded the fix as a patch.
Boeing Starliner Orbital Flight TestNASA / Boeing2019An incorrect mission elapsed time meant the orbital insertion burn did not happen as planned, and the capsule returned without reaching the ISS.
Ingenuity Mars HelicopterNASA/JPL2021Flew on the open-source F Prime framework for the first powered, controlled flight on another planet.
Perseverance roverNASA/JPL2021On its eighth sol, controllers replaced the landing software with a version built for surface science.
Voyager 1 and 2NASA/JPL2023A patch to the attitude control computer aimed to stop a 2022 glitch from recurring, decades after the 1977 launches.

โš ๏ธ Challenges

  • Verification: exhaustive testing is impossible, and gaps between test segments can hide faults. Reporting on Starliner noted Boeing had tested in pieces rather than running launch through docking end to end.
  • Constrained hardware: radiation-tolerant processors lag commercial chips by years, limiting memory and speed for demanding tasks such as vision or machine learning. See Edge Computing in Space.
  • Concurrency bugs: as Pathfinder showed, timing interactions between tasks can surface only in flight conditions.
  • Safe updates: every in-flight patch risks bricking the spacecraft, so uploads are usually tested first on ground replicas or, for Voyager, on the twin spacecraft.
  • Growing autonomy: onboard planners and learned models are harder to verify than fixed command sequences, raising questions about how much authority to give them. See Spacecraft Autonomy Levels.

๐Ÿ”— Related topics

๐Ÿ“ฐ Latest coverage

๐Ÿ“š Sources

  • NASA JPL, “NASA’s Voyager Team Focuses on Software Patch, Thrusters”: jpl.nasa.gov
  • NASA JPL, “Meet the Open-Source Software Powering NASA’s Ingenuity Mars Helicopter”: jpl.nasa.gov
  • NASA JPL, “F Prime Overview”: fprime.jpl.nasa.gov
  • NASA, “NPR 7150.2C: NASA Software Engineering Requirements”: soma.larc.nasa.gov
  • Glenn E. Reeves (JPL), “What really happened on Mars Pathfinder” (reply, 1997), archived by Cornell University: cs.cornell.edu
  • Aerospace America (AIAA), “Boeing: Starliner error would have been caught with expanded testing”: aerospaceamerica.aiaa.org
  • NASA, “NASA’s Perseverance Drives on Mars’ Terrain for First Time”: nasa.gov