Detecting the sync word is currently solved trivially. There is two ways we could improve on that:
Compute the hamming distance between the template and the masked shift register and allow for a slight mismatch. The threshold parameter has already been prepared in case we need this.
Only match e.g. the last 3 bytes of the sync word instead of the full 5 bytes. This is useful if clock recovery fails while transitioning from the preamble to the sync word. This seems to happen if the loop gain of the block is slightly off...
Detecting the sync word is currently solved trivially. There is two ways we could improve on that: