Skip to content
Publications

Article · Zenodo · October 19, 2026

Coreloop - LuSEE-Night Flight Software

Abstract

Big picture. LuSEE-Night is a joint NASA-DOE pathfinder mission whose goal is to place a low-frequency radio spectrometer on the far side of the Moon. Measurements of the redshifted 21-cm signal from the cosmological Dark Ages would be a major advance in cosmology. The far side is uniquely suited to this measurement—the spectrometer there is shielded from terrestrial radio-frequency interference and from solar emissions during lunar night, with no ionosphere to absorb the signal. Overall structure of the spectrometer flight software (coreloop). Conceptually, the on-board flight software is rather simple. It is written in C; there is no OS, no dynamic memory. A rough outline of the main() function structure is as follows: while(true) { process next command from the command buffer move data from FPGA buffer to one of the tick/tock buffers do only one of the following: send heartbeat or housekeeping packet send spectral data (various types: normal, time-resolved, raw) if (command == TIME_TO_DIE) break; } The coreloop features and lessons learned. The spectrometer supports a primitive scripting capability to set a multi-hour observation program with varying settings. Various bit-packing schemes are used to send as much data as possible. Commands are listed in a Markdown table that serves as the single source of truth. The ctypesgen and ctypes Python libraries make interacting with C extremely easy, in particular, for writing unit tests. coreloop as a whole can also be tested on a regular computer with a minimalistic simulator, which makes development much easier. There remain a few regrettable inconsistencies. It would be better to have a simple header struct in all packets that we send (it is then trivial to construct its Python counterpart from the binary blob). Unfortunately, not all our packets have such a header. AI and the coreloop. We tried using AI to generate an FFT implementation, but the code was buggy. However, the models at that time were not as powerful as they are now. Later we decided to document the codebase, and GPT-5 was able to almost perfectly understand both the global structure of the code and the small bit-manipulation functions for various encoding schemes.

Embedded Systems and FPGA DesignRadio Astronomy Observations and TechnologySpacecraft Design and Technologyflight softwarelunar far sideHI 21 cm emission

More by Arnur Nigmetov