We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have checked the CRC implementation of the TM with several other implementations and the one in TMTF_UpdateErrCtrlField seems to disagree with the others. If I read CCSDS 132.0-B-2 and http://reveng.sourceforge.net/crc-catalogue/16.htm#crc.cat-bits.16 correctly the CRC is the CRC-16/IBM-3740 (also CRC-16/CCITT-FALSE). For the test sequence 123456789 this is supposed to produce 0x29b1. So does the algorithm in https://github.com/nasa/channel-emulator/blob/master/lib/TM_Transfer_Frame.cpp and the one in https://github.com/Stefan-Korner/SpacePyLibrary/blob/master/UTIL/CRC.py.
TMTF_UpdateErrCtrlField however produces 0xa69d which corresponds to none of the CRCs with poly 0x1021.
To produce the right result the code in the function should be something like:
byte = (reg >> 8) & 0xff; reg = (reg << 8); reg ^= crc_table[byte ^ *ptr]; ptr++;
So, which of the CRCs is right?
harti
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have checked the CRC implementation of the TM with several other implementations and the one in TMTF_UpdateErrCtrlField seems to disagree with the others. If I read CCSDS 132.0-B-2 and http://reveng.sourceforge.net/crc-catalogue/16.htm#crc.cat-bits.16 correctly the CRC is the CRC-16/IBM-3740 (also CRC-16/CCITT-FALSE). For the test sequence 123456789 this is supposed to produce 0x29b1. So does the algorithm in https://github.com/nasa/channel-emulator/blob/master/lib/TM_Transfer_Frame.cpp and the one in https://github.com/Stefan-Korner/SpacePyLibrary/blob/master/UTIL/CRC.py.
TMTF_UpdateErrCtrlField however produces 0xa69d which corresponds to none of the CRCs with poly 0x1021.
To produce the right result the code in the function should be something like:
So, which of the CRCs is right?
harti
The text was updated successfully, but these errors were encountered: