From 826d5e92fa1a70d1eb3397466286081faa90b647 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Fri, 26 Sep 2014 00:33:39 +0100 Subject: [PATCH] Don't count ambiguous bits beyond bit 56 towards SNR. --- mode_s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mode_s.c b/mode_s.c index da09f52..6e69adb 100644 --- a/mode_s.c +++ b/mode_s.c @@ -1694,7 +1694,7 @@ void detectModeS(uint16_t *m, uint32_t mlen) { else if (a < b) {/*theByte |= 0;*/ if (i < 56) { sigLevel += b; noiseLevel += a; }} 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 {errors++; /*theByte |= 0;*/} else if (i >= 5) //(a == b), and we're in the short part of a frame