Auto-wrapping Flight Software¶
Because Basilisk is written in a combination of C, C++ and Python, when FSW is migrated out of the Basilisk
desktop environment into an embeddable flight target, the Python portion of the architecture needs to be translated
into other programming languages (like C, C++ or MicroPython).
fswAuto tools are meant to facilitate the migration of Basilisk flight algorithms
into either: a pure C application (
autosetter) or a C++ MicroPython application (
For further details on migration strategies the reader is referred to
The purpose of this script is to automatically translate the setup code from Basilisk Python scenarios into C. This facilitates the process to move a BSK simulation of algorithms into a pure C software architecture.
The setup code encompasses:
C modules’ variables initialization and
Grouping of modules in tasks
autosetter.py file that lives inside the
autosetter directory. The expected output has
one header and source file containing the setup code written in C will be created in a fresh local
The purpose of this script is to create C++ wrapper classes with setters and getters around each C module.
For instance, autrowrapping the
inertial3D C module will create an
inertial3D.hpp wrapper class.
In addition, source code required to integrate the generated C++ wrappers into MicroPython is also created
module.hpp). Note that this glue code is specific to MicroPython.
autowrapper.py file that lives inside the
autowrapper.py directory to execute an example.
The expected output are the C++ wrapper classes of the C FSW modules and the MicroPython integration/glue code
in a fresh local directory named