TJREVERB / pfs

Flight software for TJREVERB's nanosat.
7 stars 5 forks source link

Implement a RCA architecture #81

Open abagali1 opened 4 years ago

abagali1 commented 4 years ago

Description

Change the current, multithreaded system architecture to a singled threaded Main Control Loop system implementing a Read-Control-Actuate structure. In addition to changing the system architecture, also ensure that all new system states are implemented properly and completely according to the following ConOps.

Related Issues State Flow: #79 Removing continuous Radio read threads: #80

RCA

Instead of starting each submodule and letting them go off into their own tasks, the system should run completely linearly. This is a simplified loop process:

1 (R). Read data from all sensors, store into variables
2 (C). Given all data decide what should be done
  (switch states, send messages, execute commands, etc.)
3 (A). Actually execute previously queued tasks

Reading

Examples of data that should be collected in this phase: leave functionality for more data

Controlling

Everything that used to be threaded(core processes) should transition over to this stage i.e

Actuating

This is the stage where everything decided in Controlling is actually executed

Diagrams

State Flow: https://files.slack.com/files-pri/T2CHTKKKR-FS5208D2P/image_from_ios.jpg

RCA Overview: https://files.slack.com/files-pri/T2CHTKKKR-FSG2B88JG/image_from_ios.jpg

Preliminary Planning: https://files.slack.com/files-pri/T2CHTKKKR-FSJPBPY94/image_from_ios.jpg https://files.slack.com/files-pri/T2CHTKKKR-FSGH91DU0/image_from_ios.jpg