Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Julia 0.60 KB | None | 0 0
  1. using Plots;
  2. using DSP;
  3.  
  4. # read I/Q samples
  5. data = reinterpret(Complex{Float32}, read("/home/domagoj/gqrx_20190101_165640_97192000_1800000_fc.raw"));
  6.  
  7.  
  8. # create and 24th order Butterworth bandpass filter to sample array
  9. responsetype = Bandpass(50, 150000; fs=1800000);
  10. prototype = Butterworth(24);
  11. db = filt(digitalfilter(responsetype, prototype), data);
  12.  
  13. # generate and plot 4096-FFT results
  14. #db = data;
  15. windowSize = 1024;
  16. n = floor(Int, size(db,1)/windowSize);
  17. for i in 1:n
  18.     plot(db[(i-1)*windowSize+1:i*windowSize])
  19.     ylims!(-1,1)
  20.     xlims!(-1,1)
  21.     gui();
  22.     sleep(0.04)
  23. end
  24.  
  25. # EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement