Don't count ambiguous bits beyond bit 56 towards SNR.

This commit is contained in:
Oliver Jowett 2014-09-26 00:33:39 +01:00
parent 83d256e984
commit 826d5e92fa

View file

@ -1694,7 +1694,7 @@ void detectModeS(uint16_t *m, uint32_t mlen) {
else if (a < b) else if (a < b)
{/*theByte |= 0;*/ if (i < 56) { sigLevel += b; noiseLevel += a; }} {/*theByte |= 0;*/ if (i < 56) { sigLevel += b; noiseLevel += a; }}
else { else {
sigLevel += a; noiseLevel += a; if (i < 56) { sigLevel += a; noiseLevel += a; }
if (i >= MODES_SHORT_MSG_BITS) //(a == b), and we're in the long part of a frame if (i >= MODES_SHORT_MSG_BITS) //(a == b), and we're in the long part of a frame
{errors++; /*theByte |= 0;*/} {errors++; /*theByte |= 0;*/}
else if (i >= 5) //(a == b), and we're in the short part of a frame else if (i >= 5) //(a == b), and we're in the short part of a frame