Skip to content

Commit

Permalink
~127.34
Browse files Browse the repository at this point in the history
Substract 127.34 instead of 127 for correcting DC spike
  • Loading branch information
orhun committed Feb 5, 2019
1 parent 20a545d commit 7a7c813
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified rtl_map
Binary file not shown.
4 changes: 2 additions & 2 deletions rtl_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ static void create_fft(int sample_c, uint8_t *buf){
* Convert buffer from IQ to complex ready for FFTW.
* RTL-SDR outputs 'IQIQIQ...' so we have to read two samples
* at the same time. 'n' is declared for this approach.
* Sample is 127 for zero signal, so substract 127 for exact value.
* Sample is 127 for zero signal, so substract ~127.34 for exact value.
* Loop through samples and fill 'in' array with complex samples.
*
* NOTE: There is a common issue with cheap RTL-SDR receivers which
Expand All @@ -377,7 +377,7 @@ static void create_fft(int sample_c, uint8_t *buf){
*/
n = 0;
for (int i=0; i<sample_c; i+=2){
in[i] = (buf[n]-127) + (buf[n+1]-127) * I;
in[i] = (buf[n]-127.34) + (buf[n+1]-127.34) * I;
n++;
}
/**!
Expand Down

0 comments on commit 7a7c813

Please sign in to comment.