A small C++ program for decoding images from the Lucky-7 cubesat, included are GNURadio flowgraphs for both IQ and FM/AF recordings as well as some sample data from Derek (@dereksgc) and FelixTRG (@OK9UWU).
Compiled binaries for both Windows and Linux are available in the releases page.
After downloading a release you can run it with:
./Lucky7-Decoder input.bin output.jpg
Or (if you are on Windows)
Lucky7-Decoder.exe input.bin output.jpg
You will need the awesome gr-satellites installed in order to use the flowgraphs (example data available here, both IQ and AF).
If you're using the IQ demod:
- Figure out the sample rate of your recording, say 93750hz
- Change the sample rate in the flowgraph to match that
- Change the path of the "File Source" to that of your SDR# IQ recording
- Select a sane output path and click run
If you're using the FM/AF demod:
- Figure out the sample rate of your recording, say 48000hz
- Change the sample rate in the flowgraph to match that
- Change the path of the "WAV File Source" to that of your recording
- Select a sane output path and click run
Some example images received by amateurs with a SDR setup and decoded with this decoder (converted to PNG to show consistently across devices)
GMSK demodulation, deframing, CRC and descrambling are all handled by gr-satellites, and therefore won't be covered in this section, if you are interested in this check out Daniel Estévez's blog post.
Each packet is laid out as following
- 1 byte for the OBC ID
- 2 bytes for the OBC's counter
- 2 bytes for the MCU's counter
- 2 bytes for the length of the data being transmitted (in number of packets)
- 28 bytes of actual data
Whenever an image is being transmitted the OBC's counter will start at 0xC000 and the first bytes of the JPEG will always be 0xFFD8FFDB, however due to the nature of the downlink and how missing packets can be retransmitted it is required that the decoder can deal with repeated packets. After this you can just concatenate the data from each packet into a normal JPEG file.
See LICENSE

