@ -5,18 +5,18 @@ import time
import datetime
ppmshift = ' 1 ' #adjust this if you don't have a TCXO equipped RTLSDR
ppmshift = ' 1.1 ' #adjust this if you don't have a TCXO equipped RTLSDR
name = sys . argv [ 1 ] . upper ( ) #what satellite we're using
input_sample_rate = ' 48000 ' #actually the bandwidth of the audio sample we're taking from the RTLSDR
output_sample_rate = ' 11025 ' #what we downconvert to to play nicely with wxtoimg
gain = ' 40 ' #software gain
gain = ' 35 ' #software gain
gain_lower_pass = gain #we can add more or less gain if a satellite is at a lower elevation, currently disabled
gain_lower_pass_requirement = 40
data = json . load ( open ( ' satpredict.txt ' ) )
af_folder = ' / tmp/'
output_folder = ' ~ /sat_output/'
af_folder = ' tmp/ '
output_folder = ' /home/space/satstuff/PI_WXRX /sat_output/'
#this line is depreciated, make it a zero element array to do rtl_power surveys of the downline band
wxtoimg_options = [ ' HVCT ' , ' MCIR ' , ' NO ' ]
@ -75,12 +75,12 @@ filename = datestamp(data[name]['start_unix']) + name + '_' + str(int(data[name]
#I may or may not have forgotten to specify you need the heatmap.py from the rtl_power page on keenerd.
if ( len ( wxtoimg_options ) == 0 ) :
rtlpower = ' rtl_power -f 137M:138M:4k -g ' + gain + ' -i 1s -e ' + str ( data [ name ] [ ' duration_seconds ' ] ) + ' s -p ' + ppmshift + ' -c 0.2 ' + output_folder + filename + ' .csv '
heatmap = ' python heatmap.py ' + output_folder + name + ' _ ' + str ( int ( data [ name ] [ ' elevation ' ] ) ) + ' _ ' + timestamp + ' .csv ' + output_folder + name + ' _ ' + data [ name ] [ ' direction ' ] + str ( int ( data [ name ] [ ' elevation ' ] ) ) + ' _ ' + timestamp + ' .png '
# rtlpower = 'rtl_power -f 137M:138M:4k -g ' + gain + ' -i 1s -e ' + str(data[name]['duration_seconds']) + 's -p ' + ppmshift + ' -c 0.2 ' + output_folder + filename + '.csv '
# heatmap = 'python heatmap.py ' + output_folder + name + '_' + str(int(data[name]['elevation'])) + '_' + timestamp + '.csv ' + output_folder + name + '_' + data[name]['direction'] + str(int(data[name]['elevation'])) + '_' + timestamp + '.png '
print timeoutstr , rtlpower
print heatmap
print ' bash ftp.sh ' + output_folder + name + ' _ ' + str ( int ( data [ name ] [ ' elevation ' ] ) ) + ' _ ' + timestamp + ' .png '
# print 'bash ftp.sh ' + output_folder + name + '_' + str(int(data[name]['elevation'])) + '_' + timestamp + '.png '
else :
@ -94,6 +94,7 @@ else:
for v in sox_options :
soxstr = soxstr + ' ' + v
print ' /home/space/satstuff/rtl_biast/build/src/rtl_biast -b1 '
print timeoutstr , rtlstr , af_folder + filename + ' .raw '
print soxstr , af_folder + filename + ' .raw ' , af_folder + filename + ' .wav ' , ' rate 11025 '
print ' touch -r ' , af_folder + filename + ' .raw ' , af_folder + filename + ' .wav '