The documentation for the msequence module states that the default polynomial for a 5-bit sequence is x^5 + x^3 + 1, and the source code uses a lookup to derive g = 0x14 which looks correct. However, if I use the following code to create a msequence object and print the sequence:
int main()
{
msequence q = msequence_create_default(5);
msequence_print(q);
for (unsigned int i = 0; i < msequence_get_length(q); i++) {
std::cout << msequence_advance(q) << " ";
}
std::cout << "\n";
msequence_destroy(q);
}
The msequence state indicates a polynomial of x^5 + x^2 + 1 rather than x^5 + x^3 + 1. The sequence produced also backs this up when compared with the output from other libraries:
I also noticed when comparing to other libraries (scipy, commpy and gnuradio) that the sequence produced by liquid is in reverse order (hence np.flip). I am not sure if that actually matters or not though.
The documentation for the msequence module states that the default polynomial for a 5-bit sequence is x^5 + x^3 + 1, and the source code uses a lookup to derive g = 0x14 which looks correct. However, if I use the following code to create a msequence object and print the sequence:
I get the following output:
The msequence state indicates a polynomial of x^5 + x^2 + 1 rather than x^5 + x^3 + 1. The sequence produced also backs this up when compared with the output from other libraries:
I also noticed when comparing to other libraries (scipy, commpy and gnuradio) that the sequence produced by liquid is in reverse order (hence np.flip). I am not sure if that actually matters or not though.