import rtlsdr as rsdr
import numpy as np
import matplotlib.pyplot as plt
def BB(data,len):
sum = None
bb = None
for i in range(0,len):
sum = data[i]*data[i]
bb = np.sqrt(sum/len)
bb = 20*np.log10(bb)
return bb
s = rsdr.RtlSdr()
for i in range(75000000,107700000,10000):
s.center_freq = i
data = s.read_samples(256)
data = np.array(data).view(np.float64)
b = BB(data,len(data))
print(i)
print(int(b))
import rtlsdr as rsdr
import numpy as np
import matplotlib.pyplot as plt
def BB(data,len):
sum = None
bb = None
for i in range(0,len):
sum = data[i]*data[i]
bb = np.sqrt(sum/len)
bb = 20*np.log10(bb)
return bb
s = rsdr.RtlSdr()
blist = []
for i in range(75000000,107700000,100000):
s.center_freq = i
data = s.read_samples(256)
data = np.array(data).view(np.float64)
b = BB(data,len(data))
if int(b) > -40:
print(str(i) + " " + str(int(b)))