Last active
November 22, 2021 16:45
-
-
Save cbassa/04ebbe707591ee6573860268c3bd34b9 to your computer and use it in GitHub Desktop.
Capture spectra with STRF and an RLT SDR
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 | |
# Settings | |
SKY_FREQ=2242.5e6 | |
LO_FREQ=1833e6 | |
RATE=1e6 | |
OUTPUT=${HOME}/satobs | |
FIFO=${HOME}/satobs/fifo | |
GAIN=30 | |
# Remove fifo if it exists | |
if [ -p ${FIFO} ]; then | |
rm ${FIFO} | |
fi | |
# Create fifo | |
mkfifo ${FIFO} | |
# Compute IF | |
INTER_FREQ=`echo ${SKY_FREQ} ${LO_FREQ} | awk '{printf("%e",$1-$2)}'` | |
echo ${INTER_FREQ} | |
# Kill previous rffft instance | |
ps aux | grep -e "rffft" | grep -v -e "grep" | awk '{printf("kill -9 %s\n",$2)}' | sh | |
# Start rffft | |
rffft -i ${FIFO} -p ${OUTPUT} -f ${SKY_FREQ} -s ${RATE} -F char & | |
# Start rtl_sdr | |
rtl_sdr -f ${INTER_FREQ} -s ${RATE} -g ${GAIN} ${FIFO} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment