Added pow2dtfa helper script for rtl_power
More experimentation with multicapture.py
This commit is contained in:
parent
1ca1f726a3
commit
73c60dabcf
|
@ -6,6 +6,14 @@ def decode(fname):
|
||||||
cmdline = ['/root/atpdec-1.7/atpdec',fname+'.wav']
|
cmdline = ['/root/atpdec-1.7/atpdec',fname+'.wav']
|
||||||
subprocess.call(cmdline)
|
subprocess.call(cmdline)
|
||||||
|
|
||||||
|
def spectrum(fname,freq,duration):
|
||||||
|
flow = freq - 10000
|
||||||
|
fhigh = freq + 10000
|
||||||
|
fstep = 100
|
||||||
|
fparam = ":".join(map(str,[flow,fhigh,fstep]))
|
||||||
|
cmdline = ['rtl_power','-f',fparam,'-i','1m','-g','40',fname+'.csv']
|
||||||
|
runForDuration(cmdline,duration)
|
||||||
|
|
||||||
satellites = [\
|
satellites = [\
|
||||||
{'name': 'NOAA-18',\
|
{'name': 'NOAA-18',\
|
||||||
'freq': 137912500,\
|
'freq': 137912500,\
|
||||||
|
@ -17,7 +25,9 @@ satellites = [\
|
||||||
'freq': 137620000,\
|
'freq': 137620000,\
|
||||||
'postProcess': decode },\
|
'postProcess': decode },\
|
||||||
{'name': 'OSCAR-50',\
|
{'name': 'OSCAR-50',\
|
||||||
'freq': 436795000 },\
|
'freq': 436795000,
|
||||||
|
'listen': spectrum,
|
||||||
|
},\
|
||||||
{'name': 'ISS',\
|
{'name': 'ISS',\
|
||||||
'freq': 145800000 }\
|
'freq': 145800000 }\
|
||||||
]
|
]
|
||||||
|
@ -39,7 +49,6 @@ def recordFM(freq, fname, duration):
|
||||||
cmdline = ['rtl_fm',\
|
cmdline = ['rtl_fm',\
|
||||||
'-f',str(freq),\
|
'-f',str(freq),\
|
||||||
'-s',sample,\
|
'-s',sample,\
|
||||||
'-g','43',\
|
|
||||||
'-F','9',\
|
'-F','9',\
|
||||||
'-A','fast',\
|
'-A','fast',\
|
||||||
'-E','dc',\
|
'-E','dc',\
|
||||||
|
@ -55,10 +64,6 @@ def recordWAV(freq,fname,duration):
|
||||||
recordFM(freq,fname,duration)
|
recordFM(freq,fname,duration)
|
||||||
transcode(fname)
|
transcode(fname)
|
||||||
|
|
||||||
def spectrum(fname,duration):
|
|
||||||
cmdline = ['rtl_power','-f','137000000:138000000:1000','-i','1m','-g','40',fname+'.csv']
|
|
||||||
runForDuration(cmdline,duration)
|
|
||||||
|
|
||||||
def findNextPass():
|
def findNextPass():
|
||||||
predictions = [pypredict.aoslos(s['name']) for s in satellites]
|
predictions = [pypredict.aoslos(s['name']) for s in satellites]
|
||||||
aoses = [p[0] for p in predictions]
|
aoses = [p[0] for p in predictions]
|
||||||
|
@ -78,6 +83,9 @@ while True:
|
||||||
# dir= sat name and filename = start time
|
# dir= sat name and filename = start time
|
||||||
fname='./'+satName+'/'+str(aosTime)
|
fname='./'+satName+'/'+str(aosTime)
|
||||||
print "beginning pass "+fname+" predicted end "+str(losTime)
|
print "beginning pass "+fname+" predicted end "+str(losTime)
|
||||||
|
if 'listen' in sat:
|
||||||
|
sat['listen'](fname, freq, losTime-aosTime)
|
||||||
|
else:
|
||||||
recordWAV(freq,fname,losTime-aosTime)
|
recordWAV(freq,fname,losTime-aosTime)
|
||||||
if 'postProcess' in sat:
|
if 'postProcess' in sat:
|
||||||
sat['postProcess'](fname) # analyze, make pictures, graphs, etc.
|
sat['postProcess'](fname) # analyze, make pictures, graphs, etc.
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/gawk -f
|
||||||
|
# converts rtl_power format to CSV file with DATE, TIME, FREQ, DB
|
||||||
|
BEGIN { FS="," }
|
||||||
|
{
|
||||||
|
f0=$3;
|
||||||
|
f1=$4;
|
||||||
|
fs=$5;
|
||||||
|
i0=7;
|
||||||
|
i1=NF;
|
||||||
|
for(i=i0;i<i1;++i) print $1","$2","(f0+(i-i0)*fs)","$i
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue