Created
December 3, 2018 10:15
-
-
Save darksidelemm/342e468ee9f37c3fbc3ada6dd3ca8799 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# STRF Cronjob Script | |
# Run with: | |
# rtl_capture.sh 437e6 10m | |
# Settings | |
FREQ=$1 | |
RATE=2048e3 | |
GAIN=32.8 | |
WORKINGDIR=/home/pi/satobs | |
FIFO=$WORKINGDIR/fifo | |
DURATION=$2 | |
# Cron starts this script elsewhere... CD to the right directory. | |
cd $WORKINGDIR | |
# Start channelizer | |
nice -20 rffft -i $FIFO -p $WORKINGDIR/data -f $FREQ -s $RATE -q -c 50 -F char & | |
# Start rx_samples_to_file | |
nice -20 rtl_sdr -g $GAIN -f $FREQ $FIFO & | |
RTL_PID=$! | |
# Sleep for the time specified | |
sleep $2 | |
# Kill the rtl_sdr capture | |
kill $RTL_PID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment