Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 

Repository files navigation

image

My summer Inern Work Docs

Overview

The objective of Week 1 was to understand the communication protocol and software architecture used in the CubeSat TT&C (Telemetry, Tracking & Command) system.

The work was divided into three tasks:

  1. Understanding the NGHam communication protocol.
  2. Learning the fundamentals of FreeRTOS.
  3. Designing the packet handling pipeline using FreeRTOS tasks.

.


Task 1 – Understanding the NGHam Protocol

Objective

The goal of this task was to understand how telemetry data is transformed into an NGHam packet before being transmitted over the radio.

Topics Covered

  • Packet-based communication
  • Payload vs Packet
  • Binary data representation
  • NGHam packet structure
  • CRC error detection
  • Reed-Solomon Forward Error Correction (FEC)
  • Packet scrambling
  • NGHam Serial Port Protocol (SPP)

Learning Outcomes

During this task I learned:

  • The difference between a payload and a transmission packet.
  • How NGHam improves communication reliability compared to AX.25.
  • The complete NGHam packet structure.
  • The purpose of CRC and Reed-Solomon error correction.
  • How packets are prepared before radio transmission.
  • The communication flow between a host computer and a radio using NGHam SPP.

Documentation

NGHam/
├── ngham-packet-explained.md
└── ngham-spp-explained.md

Task 2 – Learning FreeRTOS Fundamentals

Objective

The objective of this task was to understand the fundamentals of FreeRTOS and how embedded applications are divided into independent concurrent tasks.

These concepts are required before implementing the packet handling system.

Topics Covered

  • What is an RTOS?
  • Bare-metal vs RTOS
  • FreeRTOS architecture
  • Task creation
  • Scheduler
  • Task priorities
  • Context switching
  • Delays (vTaskDelay)
  • Queues
  • Semaphores
  • Mutexes
  • Memory management
  • Software timers

Learning Outcomes

After completing this task I understood:

  • How FreeRTOS schedules multiple tasks.
  • Why tasks execute independently.
  • How queues enable communication between tasks.
  • How synchronization primitives protect shared resources.
  • Why FreeRTOS is widely used in embedded systems and CubeSat software.

Documentation

FreeRTOS/
├── Lesson 1
├── Lesson 2
└── Lesson 3

Task 3 – Packet Handling Flow using FreeRTOS

Objective

The objective of this task was to understand how payload data can be prepared for transmission using multiple FreeRTOS tasks.

The implementation focuses on reading payload data, fragmenting it into packets, maintaining transmission order, and preparing packets for NGHam encoding.

Planned Processing Flow

Payload Memory
      │
      ▼
Memory Reader Task
      │
      ▼
Fragmentation Task
      │
      ▼
Packet Builder
      │
      ▼
FIFO Queue
      │
      ▼
NGHam Encoder Task
      │
      ▼
Radio Driver
      │
      ▼
Transmission

Packet Fragmentation

Large payloads cannot always fit inside a single transmission packet.

Each packet fragment contains:

  • Payload data
  • Sequence number
  • Occultation ID
  • Payload size
  • Additional packet metadata

These fields allow the receiver to correctly reconstruct the complete payload after transmission.

FreeRTOS Task Architecture

Task 1 – Payload Reader

Responsibilities:

  • Simulate payload memory
  • Read payload data
  • Divide large payloads into fixed-size chunks

Task 2 – FIFO Queue Manager

Responsibilities:

  • Receive fragmented packets
  • Store packets in transmission order
  • Deliver packets to the encoder

Task 3 – NGHam Encoder

Responsibilities:

  • Receive packets from the queue
  • Create NGHam payloads
  • Apply CRC
  • Apply Reed-Solomon FEC
  • Scramble packets
  • Generate complete NGHam frames

These frames are then ready for transmission by the radio.

Planned MCU Simulation

The implementation will initially simulate payload memory on a microcontroller.

Simulation workflow:

  1. Store sample payload data.
  2. Read data from simulated memory.
  3. Fragment payload into packets.
  4. Push packets into a FreeRTOS queue.
  5. Build NGHam frames.
  6. Output generated packets for testing.

Learning Outcomes

This task demonstrated how a communication pipeline can be divided into multiple FreeRTOS tasks.

The use of queues provides:

  • Ordered packet transmission
  • Modular software design
  • Independent processing stages
  • Scalable architecture suitable for CubeSat firmware

Documentation

FreeRTOS/
├── Lesson 1
├── Lesson 2
FreeRTOS practical/
├── Task 1

Repository Structure

updating soon

Learning Timeline

Phase Topic Duration Timeline Deliverables / Goals Status
1 PyNGHam Documentation & Repository 1 Week 15 Jun – 22 Jun - Study PyNGHam documentation
- Explore GitHub repository
- Practical implementation
- Complete 3 implementation tasks
✅ Completed
2 FreeRTOS Documentation 1 Week 25 Jun – 2 Jul - Learn FreeRTOS fundamentals
- Understand task scheduling, queues, semaphores, and synchronization
✅ Completed
3 TT&C Firmware Repository ~1 Week 2 Jul – 10 Jul - Study Queue implementation examples
- Study NGHam implementation
- Analyze FreeRTOS task architecture
- Complete 3 implementation tasks
✅ Completed
4 Housekeeping Data ~1 Week 20 Jul – 27 Jul - Study telementaroy data(ttc) implementation examples
- Perform task to continous display data
Working On...
Pending...

References

  • FreeRTOS Documentation
  • PyNGHam Documentation
  • PyNGHam GitHub Repository
  • Original NGHam Protocol Repository
  • TT&C Firmware Repository (for queue and NGHam implementation examples)

Next Steps

The next stage of the project will focus on implementing the packet handling pipeline on an MCU using FreeRTOS, including:

  • Simulated payload memory
  • Payload fragmentation
  • FIFO queue implementation
  • NGHam packet generation
  • End-to-end packet transmission simulation

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages