mojtaba/amini
Home/Writing/Embedded · Aerospace
Sep 2026·6 min read·Embedded · Aerospace

Telemetry for a CanSat: ground station, packets and checksums

In 2018 I wrote the telemetry ground station for a CanSat project for the AIAA competition: serial packets with checksums, flight instruments in JavaFX and a log file for every session. What I would do the same, and what not.

A CanSat is a small educational satellite the size of a soda can: it is launched to altitude and, while it descends, it has to transmit its data to the ground. In 2018, while studying aerospace engineering at Sharif University of Technology, I built the telemetry ground station for a CanSat project aimed at the AIAA competition. The code is public on my GitHub.

The heart of it is the packet format. Every telemetry packet arrives on the serial port with a fixed size of 100 bytes, opens with a start value (201) and closes with an end value (254). Inside are the team ID, mission time, packet counter, altitude, pressure, temperature, battery voltage, GPS data with the number of satellites, pitch and roll, the blade spin rate and the camera direction.

Delimiters and the counter look like details, but they are what lets you trust the data. A radio link drops and corrupts bytes: with a known start and end the receiver resynchronises, and with the counter it knows how many packets it lost instead of silently interpolating. The rule is always the same: a packet that fails the checks is dropped and counted, never displayed.

The ground station, in JavaFX, receives the packets through the jSerialComm library and shows them on instruments designed for whoever follows the flight: an altimeter, a compass and an artificial horizon. Before displaying them it writes them to a CSV file, one per session with the date and time in its name. The logs from captive tests on a restrained stand also record accelerometers and gyroscopes, four load cells, airspeed, attitude angles and control-surface positions.

I would keep the choice to record everything, immediately, as raw data. I would change three things: a real checksum computed over the packet's content, on top of the fixed start and end values; the ability to replay a CSV file as if it were a flight, to test the interface without hardware; and a documented, versioned packet format shared between the firmware and the ground station.

These are the same rules I apply today to industrial telemetry, to battery CAN data and to IoT devices: recognisable packets, counted losses, raw data kept. I also write about it in from sensor to dashboard and on the embedded systems and IoT page.