Payload Reader
/ Fragmenter
Reads payload data per occultation event and splits it into fixed-size chunks.
An open-source TT&C subsystem built during a SpaceLab (UFSC) summer internship — reading occultation payload data, fragmenting it, queuing it in order, encoding it into NGHam frames, and reporting live telemetry the whole way through.
01 · OVERVIEW
This module implements the packet handling pipeline for the S-band Transmitter payload: reading payload data, fragmenting it into transmission-sized chunks, ordering it through a FIFO queue, encoding it into NGHam frames, and monitoring pipeline telemetry — queue occupancy, generation and transmission rates, overflow counts.
It's implemented as four FreeRTOS tasks and validated end-to-end on the FreeRTOS POSIX/Linux simulator ahead of MCU integration.
02 · ARCHITECTURE
Each stage hands off to the next through a queue, preserving order end to end.
Reads payload data per occultation event and splits it into fixed-size chunks.
Forwards chunks in order, preserving transmission sequence.
Serializes and encodes each chunk into a transmittable NGHam frame — CRC16 + Reed-Solomon FEC.
Samples queue occupancy and updates generation/transmission rates in a shared, mutex-protected struct.
03 · BUILD & RUN
Validated on the FreeRTOS POSIX/Linux simulator before any MCU is involved.
$ cd firmware
$ make
$ ./build/telemetry_pipeline
=== CubeSat Packet Pipeline — Task 1+2+3+4 (Telemetry) Test ===
[Task1-PayloadReader] occultation 1000: 100 bytes -> 4 chunk(s)
[Task3-NGHamEncoder] occ=1000 seq=1/4 -> NGHam packet (90 bytes)
[Task4-TelemetryMonitor] gen_rate=9/s tx_rate=9/s overflow(Q1=0, Q2=0)
04 · DOCUMENTATION
Packet structure, SPP framing, extension packets, and FreeRTOS reference material
live in the repository's doc/ folder.
05 · CREW
06 · LICENSE
Firmware sources are under the GNU General Public License v3.0. Documentation is under CC BY-SA 4.0. Some third-party files — including the FreeRTOS kernel — carry their own license terms.