From f01670e425dde91daa78c3cc7b5d49e7000145bc Mon Sep 17 00:00:00 2001 From: antirez Date: Sat, 5 Jan 2013 17:03:03 +0100 Subject: [PATCH] Use 1.408 factor to create the magnitude look up talbe. Previously 1.4 was used that prevented to use the full 0-255 scale. Thanks to @keenerd for reporting this issue. --- mode1090.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mode1090.c b/mode1090.c index 64355f6..0f087cf 100644 --- a/mode1090.c +++ b/mode1090.c @@ -223,7 +223,7 @@ void modesInit(void) { Modes.maglut = malloc(129*129); for (i = 0; i <= 128; i++) { for (q = 0; q <= 128; q++) { - Modes.maglut[i*129+q] = round(sqrt(i*i+q*q)*1.4); + Modes.maglut[i*129+q] = round(sqrt(i*i+q*q)*1.408); } } }