dump1090 icon indicating copy to clipboard operation
dump1090 copied to clipboard

? about computing the avg value

Open BradWalker opened this issue 8 years ago • 0 comments

I see the following code in dump1090.c when validating the preamble starting at 1361

        /* The samples between the two spikes must be < than the average
         * of the high spikes level. We don't test bits too near to
         * the high levels as signals can be out of phase so part of the
         * energy can be in the near samples. */
        high = (m[j]+m[j+2]+m[j+7]+m[j+9]) / 6;

Shouldn't that read

high = (m[j]+m[j+2]+m[j+7]+m[j+9]) / 4 ;

BradWalker avatar Jul 11 '16 03:07 BradWalker