Fix Viterbi decoder for punctured codes

This commit is contained in:
Andy
2018-01-26 17:07:15 -03:00
parent db65ea418c
commit e63c0f9f88
2 changed files with 18 additions and 9 deletions

10
NXDNSACCH.cpp Normal file → Executable file
View File

@@ -86,14 +86,14 @@ bool CNXDNSACCH::decode(const unsigned char* data)
unsigned int index = 0U;
for (unsigned int i = 0U; i < NXDN_SACCH_LENGTH_BITS; i++) {
if (n == PUNCTURE_LIST[index]) {
::strcat(text, "1, ");
temp2[n++] = 1U;
::strcat(text, "X, ");
temp2[n++] = 99U;
index++;
}
bool b = READ_BIT1(temp1, i);
temp2[n++] = b ? 2U : 0U;
::strcat(text, b ? "2, " : "0, ");
temp2[n++] = b ? 1U : 0U;
::strcat(text, b ? "1, " : "0, ");
}
LogMessage(text);
@@ -109,7 +109,7 @@ bool CNXDNSACCH::decode(const unsigned char* data)
conv.decode(s0, s1);
}
conv.chainback(m_data, 36U);
conv.chainback(m_data, 32U);
CUtils::dump("NXDN, SACCH decoded", m_data, 5U);