mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2024-12-25 18:38:29 +01:00
rtl_adsb: improve sensitivity, stability
Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
parent
7840ec21d3
commit
5673a56223
@ -144,9 +144,10 @@ void display(int *frame, int len)
|
|||||||
void pyth_precompute(void)
|
void pyth_precompute(void)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
double scale = 1.408 ; /* use the full 8 bits */
|
||||||
for (x=0; x<129; x++) {
|
for (x=0; x<129; x++) {
|
||||||
for (y=0; y<129; y++) {
|
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 */
|
if (strcmp(filename, "-") == 0) { /* Write samples to stdout */
|
||||||
file = stdout;
|
file = stdout;
|
||||||
|
setvbuf(stdout, NULL, _IONBF, 0);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
_setmode(_fileno(file), _O_BINARY);
|
_setmode(_fileno(file), _O_BINARY);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user