STATUS · IN DEVELOPMENT PLATFORM · FREERTOS POSIX PROTOCOL · NGHAM CONTRIBUTORS · 3

Packet Pipeline
for the S‑band Transmitter

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

What this module does

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

Four tasks, two queues

Each stage hands off to the next through a queue, preserving order end to end.

01

Payload Reader
/ Fragmenter

Reads payload data per occultation event and splits it into fixed-size chunks.

$ occultation 1000: 100 bytes → 4 chunk(s)
02

FIFO Queue
Manager

Forwards chunks in order, preserving transmission sequence.

$ forwarding occ=1000 seq=1/4 bytes=32
03

NGHam
Encoder

Serializes and encodes each chunk into a transmittable NGHam frame — CRC16 + Reed-Solomon FEC.

$ → NGHam packet (90 bytes): AA AA AA AA…
04

Telemetry
Monitor

Samples queue occupancy and updates generation/transmission rates in a shared, mutex-protected struct.

$ Q1=0 Q2=0 gen_rate=9/s tx_rate=9/s

03 · BUILD & RUN

Running the simulator

Validated on the FreeRTOS POSIX/Linux simulator before any MCU is involved.

firmware — zsh
$ 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

Protocol & reference notes

Packet structure, SPP framing, extension packets, and FreeRTOS reference material live in the repository's doc/ folder.

05 · CREW

Who built this

06 · LICENSE

Open source, two licenses

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.