coloradocube / balloonsat

COTS balloonsat mission to test the RPi 4 with a battery UPS, a quad camarray, a GPS module, a RockBLOCK module, and a small number of Qwiic sensors
0 stars 5 forks source link

Multiple processes for FE, telemetry, camera, and rockblock #57

Open ivogeorg opened 2 years ago

ivogeorg commented 2 years ago

Description

The Flight-Executive, the Telemetry-Gathering, the Camarrray-Recording, and the RockBLOCK-Communication should each be a separate process.

  1. The Flight-Executive starts first and starts the rest of the processes. It should be able to send a stop notification to the processes and waiting for them to finish, so it can perform a regular shutdown of the RPi. Main purpose: Subprocesses should be allowed to halt because they are all writing to memory, which will be written back to the SD card, so as not to corrupt the SD card.
  2. The Flight-Executive or a subprocess should monitor temperature(s) and battery voltage and capacity:
    1. If the internal temperature drops to close to 0° C (the bottom of the room temperature operating range of the RPi) it should shut down.
    2. (Very optional) If the CPU temperature rises too far (unlikely, so won't test for that) it should throttle processes (too much logic here).
    3. If battery is low, it should shut down. Note: The current low-battery conditions are set at "either voltage < 3.0V or capacity < 20%", but the RPi can operate at lower. It might be throttled. Should investigate at what voltage it becomes throttled. Might specify lower values if an interesting event (e.g. balloon bursting, landing) is yet to be recorded. This will require very complex mission logic.
  3. The Telemetry-Gathering should poll all its telemetry sources without failing if a source fails (See #77). This includes:
    1. Qwiic sensors (internal/external temperature, environmental, RPi bus.
    2. UPS voltage, current, power, capacity.
    3. GPS WSG84 lon, lat, and alt.
    4. CPU temperature and load %.
  4. The Telemetry-Gathering should send messages (1 or 2, see #76) to the RockBLOCK-Communication queue periodically. The period should be set in Telemetry-Gathering. A reasonable period is 30s or 60s.
  5. The Camarray-Recording should alternate short video and stills and capture events of interest with longer continuous video. (See #80)
  6. The RockBLOCK should send its messages from the queue. (See #79).