daniestevez / gr-satellites

GNU Radio decoder for Amateur satellites
GNU General Public License v3.0
762 stars 155 forks source link

CRC and FEC for PEGASUS (QB50, AT03) demodulated beacons #457

Closed OE3ALA closed 1 year ago

OE3ALA commented 1 year ago

Hello together,

as part of my Master thesis I am working on the implementation of an UHF and S-Band ground station using SatNOGS + PlutoSDR for our PEGASUS satellite (UHF) at the University of Applied Sciences Wiener Neustadt. In the future this ground station should serve for our new satellite CLIMB (UHF, S-Band).

A research question of my thesis is to compare the "quality" of demodulated beacons using software (SatNOGS + PlutoSDR) and hardware (Space Tech Group Austria STACIE). As a measure of quality the CRC and FEC will be used for comparison. These error checks are part of the PEGASUS beacons.

Unfortunately, the CRC and FEC are not part of the demodulated beacons uploaded to the SatNOGS Network. Exists there a possibility to implement these error checks into gr-satellites for PEGASUS?

I am not not a software engineer and first time digging into SatNOGS. Therefore, I would appreciate any help. :)

Many thanks!

Cheers, Alex, oe3ala

PEGASUS specific information

CRC

function crc_calc($data, $length)
{
 $checksum = 0;

# while ($length > 0)
 for ($i = 0; $i < $length; $i++)
 {
 $checksum = crc_update($data[$i], $checksum);
 }
 return $checksum;
}

function crc_update($data, $checksum)
{
 $checksum = $checksum ^ ord($data);
 for ($i= 0; $i < 8; $i++) {
 if ($checksum & 1) {
 $checksum = ($checksum >> 1) ^ 0xA001;
 }
 else {
 $checksum = ($checksum >> 1);
 }
 }
 return($checksum);
}

FEC

Manual for Radio Amateurs

Useful links I have found