diff options
author | Kyle Keen <keenerd@gmail.com> | 2012-12-30 13:36:02 -0500 |
---|---|---|
committer | Steve Markgraf <steve@steve-m.de> | 2013-01-04 21:29:14 +0100 |
commit | 5673a562230a88787bed74c02ea9955901763271 (patch) | |
tree | ff6c32e645f8ad27f6c01cf27f86e5a8fab17913 | |
parent | 7840ec21d3c9a4a39ca6bbb3567e14caeccdb9f5 (diff) |
rtl_adsb: improve sensitivity, stability
Signed-off-by: Steve Markgraf <steve@steve-m.de>
-rw-r--r-- | src/rtl_adsb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rtl_adsb.c b/src/rtl_adsb.c index 33a8775..2fb7418 100644 --- a/src/rtl_adsb.c +++ b/src/rtl_adsb.c @@ -144,9 +144,10 @@ void display(int *frame, int len) void pyth_precompute(void) { int x, y; + double scale = 1.408 ; /* use the full 8 bits */ for (x=0; x<129; x++) { for (y=0; y<129; y++) { - pyth[x][y] = (uint8_t)round(sqrt(x*x + y*y)); + pyth[x][y] = (uint8_t)round(scale * sqrt(x*x + y*y)); }} } @@ -437,6 +438,7 @@ int main(int argc, char **argv) if (strcmp(filename, "-") == 0) { /* Write samples to stdout */ file = stdout; + setvbuf(stdout, NULL, _IONBF, 0); #ifdef _WIN32 _setmode(_fileno(file), _O_BINARY); #endif |