Earth

Starlink software, both in satellites and on the ground, is written almost exclusively in C++, with some prototyping development in Python. The software is developed in a continuous integration environment, with teams merging into the master development branch often and deploying to the fleet of satellites in space each week. 

“We use C++ for most of the vehicle control software. There is a lot of heritage with it at SpaceX as it’s a very low-level language we can use on bare metal microcontrollers. This lets us use it on our embedded Linux computers that we use throughout all our different vehicles,” explains Badshah. “We learned a lot from Dragon and Falcon about how you can run a self-redundant architecture on triplicated computers that are sharing data and solving the same problems.”

New code goes through an extensive testing cycle using many different test frameworks, from simple unit tests to running in massive simulations. Some of the most interesting tests include everything from putting satellites in anechoic isolation from ground stations and testing their communication, to a test that presents the test platform with a simulation of the entire environment in which the satellites will operate. In essence, Starlink has built a simulation to mock-up space-time, at least in the neighborhood of Earth.

“For development and test of these algorithms, we have a full-scale network simulation running in continuous integration on a high-performance computing cluster. This simulation is capable of running the C++ production code as well as running against prototype code written in Python,” says Bohn. “The Python version allows for rapid iteration during the design phase. Once we are happy with the results of an algorithm, we port it to C++ so it runs efficiently in production.”