Additional cleanups

This commit is contained in:
cyber-atomus 2016-03-11 16:23:42 +01:00
parent dfb61b8faa
commit 6e3b77fa67
2 changed files with 35 additions and 37 deletions

View File

@ -47,48 +47,36 @@ of the next pass for recording. It expects to call rtl_fm to do the
recording and sox to convert the file to .wav. It can create spectrogram of the pass using sox (not the RTL_POWER!)
A few words about the options.
####A few words about the options.
* satellites - this is a list of satellites you want to capture, this needs to be the same name as in TLE file
* freqs - frequencies of centre of the APT signal
* dongleGain - set this to the desired gain of the dongle, leave "0" if you want AGC
* dongleShift - set this to the dongle PPM shift, can be negative
* dongleIndex - set this to the index of your dongle, of you have only one - leave it unchanged.
* sample - "sample rate", option "-s" for rtl_fm - this is the width of the recorded signal. Please keep in mind that APT is 34kHz but you should include few kHz for doppler shift. This will change when the doppler tool is used.
* wavrate - sample rate of the WAV file used to generate JPEGs. Should be 11025.
satellites - this is a list of satellites you want to capture, this needs to be the same name as in TLE file
####Station options for doppler tool (not used right now).
freqs - frequencies of centre of the APT signal
* stationLat - latitude of the station in degrees NORTH, negative value for SOUTH.
* stationLon - longtitude of the station in degress WEST, negative for EAST.
* stationAlt - your altitude above sea level (in metres).
####Directories: directories used for misc. files
dongleGain - set this to the desired gain of the dongle, leave "0" if you want AGC
* recdir - this is a directory containing RAW and WAV files.
* specdir - this is a directory holding spectrogram files created from the pass (PNG).
* imgdir - where to put output JPG images.
dongleShift - set this to the dongle PPM shift, can be negative
####Misc options, not all are used right now
dongleIndex - set this to the index of your dongle, of you have only one - leave it unchanged.
sample - "sample rate", option "-s" for rtl_fm - this is the width of the recorded signal. Please keep in mind that APT is 34kHz but you should include few kHz for doppler shift. This will change when the doppler tool is used.
wavrate - sample rate of the WAV file used to generate JPEGs. Should be 11025.
Station options for doppler tool (not used right now).
stationLat - latitude of the station in degrees NORTH, negative value for SOUTH
stationLon - longtitude of the station in degress WEST, negative for EAST
stationAlt - your altitude above sea level (in metres)
Directories: directories used for misc. files
recdir - this is a directory containing RAW and WAV files
specdir - this is a directory holding spectrogram files created from the pass (PNG)
imgdir - output JPG images
Misc options, not all are used right now
createSpectro - should program create spectrogram files for the pass? Useful for debugging images. Possible values are "yes", "y" and "1" for YES, any other value will not create spectro.
runDoppler - should we do the doppler shift using "doppler" tool? Not needed for wxtoimg as it seems it does the correction itself.
* wxEnhHVC - should program do HVC image. Possible values are "yes", "y" and "1" for YES, any other value will not create HVC image.
* wxEnhHVCT - should program do HVCT image. Possible values are "yes", "y" and "1" for YES, any other value will not create HVCT image.
* createSpectro - should program create spectrogram files for the pass? Useful for debugging images. Possible values are "yes", "y" and "1" for YES, any other value will not create spectro.
* runDoppler - should we do the doppler shift using "doppler" tool? Not needed for wxtoimg as it seems it does the correction itself.
###pypredict.py

View File

@ -29,7 +29,9 @@ stationLon='53.3404'
stationLat='-15.0579'
stationAlt='20'
#
# Directories used in wx
# Directories used in this program
# wxtoimg install dir
wxInstallDir='/usr/local/bin'
# Recording dir, used for RAW and WAV files
#
recdir='/opt/wxsat/rec'
@ -44,6 +46,8 @@ imgdir='/opt/wxsat/img'
# Options for wxtoimg / aptdec
# None actually right now, this will hopefully change in upcoming release
wxEnhHVC='yes'
wxEnhHVCT='yes'
# Various options
# Should this script create spectrogram : yes/no
@ -92,8 +96,14 @@ def doppler(fname,emergeTime):
subprocess.call(cmdline)
def decode(fname):
cmdline = ['/usr/local/bin/wxtoimg','-A',recdir+'/'+fname+'.wav', imgdir+'/'+fname+'.jpg']
cmdline = [ wxInstallDir+'/wxtoimg','-A',recdir+'/'+fname+'.wav', imgdir+'/'+fname+'-normal.jpg']
subprocess.call(cmdline)
if wxEnhHVC in ('yes', 'y', '1'):
cmdline_hvc = [ wxInstallDir+'/wxtoimg','-A','-e','HVC',recdir+'/'+fname+'.wav', imgdir+'/'+fname+'-hvc.jpg']
subprocess.call(cmdline_hvc)
if wxEnhHVCT in ('yes', 'y', '1'):
cmdline_hvct = [ wxInstallDir+'/wxtoimg','-A','-e','HVCT',recdir+'/'+fname+'.wav', imgdir+'/'+fname+'-hvct.jpg']
subprocess.call(cmdline_hvct)
def recordWAV(freq,fname,duration):
recordFM(freq,fname,duration,xfname)