Flight software for the GASPACS mission written in Python, with some compents in c.
The Get Away Special Passive Attitude Control Satellite (GASPACS) is an experimental 1U cubesat in development by Utah State University's Get Away Special team. The purpose of the experiment is to test the viability of an inflatable aero-stabilization boom deployable component in Low Earth Orbit (LEO). This repository contains CubeWorks, the flight software for the satellite. The CubeWorks software module is designed to run on a Raspberry Pi Zero W running Raspbian lite os as its operating system.
CubeWorks is intended to be a robust, modular, and fault tolerant software framework for small satellites, with minimal barrier to entry. The experienced developer may be asking, "Why write the entire framework in python and not a more performant language with closer hardware interaction?" The answer is because the framework is designed to be accessible to newer developers who want to get into space research. The software isn't as performant as an equivalent solution written in, say, c++ but it isn't designed to be.
Framework components are designed to be modular, and easy to add to and remove from a given system. All that is needed is to define a driver that interacts with your hardware components and inherits from the built in Component class, and include it in the main file.
- Download the CubeWorks Raspbian Lite image
- Flash image onto 8GB micro SD card
- Run image on Raspberry Pi Zero W
- Log in (email coordinator@gas.usu.edu if you do not have the login password)
- run "./install.exe"
- Image a Raspberry Pi with Raspbian lite and boot the Pi
- Use
sudo raspi-configto set the proper network settings, set a user password, localisation options. - Under Interfacing Options enable Camera, SSH, SPI, I2C, and Serial ("No" to login shell, "Yes" to serial interface)
- Update all packages with the commands:
sudo apt updatesudo apt full-upgrade - Reboot, install the following dependencies:
- Python3,
sudo apt install python3 - python3-pip,
sudo apt install python3-pip - NumPy,
sudo apt install python3-numpy
- Python3,
- Create the exe file to run for the installation process, run "gcc install.c -o install.exe"
- run "./install.exe"
- To run the testMainFlightLogic.py file (or any other program) on startup, run
sudo crontab -eand then add the following line to the end of the file:@reboot sudo runuser pi -c "cd ; ./startup.exe".
This file structure comprises the major compoments of CubeWorks.
- Get the updateCode.c (it should be in any of the cubeworks repositories.)
- use this command
gcc upDateCode.c -o upDateCode.exe ; cp upDateCode.exe ~/ ; rm upDateCode.exe - return to the root and then use
./upDateCode.exe
-TX windows have to be seperated by at least 25 seconds. This is the time from ending one window to the start time of the next window. If it is not separated by this buffer, then it is NOT guaranted that the TX window will be serviced.
Pi system
├──Home
│ ├──CubeWorks0
│ ├──CubeWorks1
│ ├──CubeWorks2
│ ├──CubeWorks3
│ ├──CubeWorks4
│ ├──flightlogicData
│ | ├──Attitude_Data.txt
│ | ├──TTNC_Data.txt
│ | ├──BootRecords.txt
│ | ├──backupBootRecors.txt
│ | └── Deploy_Data.txt
│ ├──TXISRData
│ | ├──AX25Flag.txt
│ | ├──flagsFile.txt
│ | ├──transmissionFla.txt
│ | └── txWindows.txt
│ ├──install.exe
│ ├──lastBase.txt
└── └── upDateCode.exe
Cubeworks
├── Drivers
│ ├── ExampleDriver
│ │ ├── ExampleDriver.py
│ │ └── __init__.py
│ ├── __init__.py
│ └── Driver.py
├── flightLogic
│ ├── mainFlightLogic.py
│ ├── missionModes
│ │ └── example.py
│ ├── postBoomTime.txt
│ └── saveTofiles.py
├── GroundStation
│ ├── example.sh
│ └── example.py
├── __init__.py
├── log.txt
├── mission_modes.py
├── protectionProticol
│ └── fileProtection.py
├── README.md
├── requirements.txt
├── runOnBoot.py
├── tests
│ ├── __init__.py
│ ├── testAllDrivers.py
│ └── unit_testing_example.py
├── TXISR
│ ├── example.py
│ └── __init__.py
└── watchdog
├── arduino_watchdog_v7
│ └── arduino_watchdog_v7.ino
└── Heartbeat
└── Heartbeat.py
###Data Flows:
