Flight software for Project Caelus. This software is written in Python, version 3.7.
All necessary libraries can be installed using the following command:
pip3 install -r requirements.txt
Navigate to the Ground Station README and start the Ground Station first if you haven't already, then open a new command window, navigate to the src/pi folder, and run this command:
python main.py --config local
To see more options to run the simulation, run this command:
python main.py -h
- /requirements.txt
- Contains all the necessary python imports
- /src/
- /src/arduino/
- Contains low level code for reading sensors and actuating valves
- /src/pi/
- Contains three unit testing files for each of the main components: /src/pi/sensor_test.py [sensors], /src/pi/telemetry_test.py [telemetry], /src/pi/valve_test.py [valves]
- /src/pi/config.json
- Initial configuration for sensors, valves, and telemetry
- /src/pi/modules
- /src/pi/modules/mcl/
- Highest level code, instiantiates each of the tasks
- Contains
flagsandregistries - Runs the MCL (Main Control Loop), which runs read, control, and actuate for each task
read()updates theregistrywith new readings,control()makes decisions based on theregistry, and setsflagswhile doing soactuate()performs actions dictated by theflags
- /src/pi/modules/tasks/
- Low level code, performs the
readpart of the MCL - Contains
taskswhich directly communicate with the Arduino toread()from sensors andactuate()valves
- Low level code, performs the
- /src/pi/modules/control_tasks/
- Medium level code, performs the
controlpart of the MCL- /src/pi/modules/control_tasks/control_task.py: instantiates the necessary control tasks
- /src/pi/modules/control_tasks/telemetry_control.py
ingestsall the messages in the telemetry send queue and sets the properflagsbased on those messages - /src/pi/modules/control_tasks/sensor_control.py sends sensor data to the ground station and sets
flagsif the data is outside the boundaries specified in /src/pi/config.json - /src/pi/modules/control_tasks/valve_control.py sends valve data to the ground station and sets
flagsif the valves have been open for too long
- Medium level code, performs the
- /src/pi/modules/drivers/
- Low level code, sets up the Arduino, sensors, valves, and telemetry
- /src/pi/modules/lib/
- Contains utility files that are used throughout all the modules
- /src/pi/modules/lib/packet.py
- Contains
PacketsandLogs, which contain the information that is sent to and from ground station viaTelemetry
- Contains
- /src/pi/modules/lib/packet.py
- Contains utility files that are used throughout all the modules
- /src/pi/modules/mcl/
- /src/arduino/