Update sstv_decode_prompt.sh add auto-tune prompt option

fiabv4-auto-tune
Alan Johnston 2 months ago committed by GitHub
parent 992648f19b
commit dcab91164a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -34,7 +34,9 @@ sudo killall -9 rtl_fm &>/dev/null
#echo "s" >> .mode #echo "s" >> .mode
frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=220 --title="SSTV Decoding using QSSTV" --text="Choose the frequency for SSTV decoding:" --column="kHz" --column="Use" 145800 "ISS" 434900 "CubeSatSim" Other "Choose another frequency" SSTV "Test SSTV decoding with WAV file") autotune=0
frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=220 --title="SSTV Decoding using QSSTV" --text="Choose the frequency for SSTV decoding:" --column="kHz" --column="Use" 145800 "ISS" 434900 "CubeSatSim" Auto-tune "CubeSatSim Auto-tune" Other "Choose another frequency" SSTV "Test SSTV decoding with WAV file")
echo $frequency echo $frequency
@ -70,6 +72,11 @@ echo
echo "If your CubeSatSim is transmitting in SSTV mode (mode 4) you should get images." echo "If your CubeSatSim is transmitting in SSTV mode (mode 4) you should get images."
echo "Note: if you see and hear an SSTV signal but don't get any images, the CubeSatSim signal might have a frequency offset. Try rebooting the CubeSatSim to fix." echo "Note: if you see and hear an SSTV signal but don't get any images, the CubeSatSim signal might have a frequency offset. Try rebooting the CubeSatSim to fix."
elif [ "$frequency" = "Auto-tune" ]; then
frequency=434900000
autotune=1
elif [ "$choice" = "3" ] || [ "$frequency" = "Other" ]; then elif [ "$choice" = "3" ] || [ "$frequency" = "Other" ]; then
echo echo
@ -121,20 +128,13 @@ setsid qsstv &
sleep 5 sleep 5
source /home/pi/venv/bin/activate if [ "$autotune" = "1" ]; then
python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt
# echo "auto-tune.txt" source /home/pi/venv/bin/activate
# cat /home/pi/CubeSatSim/groundstation/auto-tune.txt
threshold="1"
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo -n "Auto tune confidence: "
echo $confidence
if [ "$confidence" -le "$threshold" ]; then
sleep 10
python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt
# echo "auto-tune.txt" # echo "auto-tune.txt"
# cat /home/pi/CubeSatSim/groundstation/auto-tune.txt # cat /home/pi/CubeSatSim/groundstation/auto-tune.txt
threshold="1"
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo -n "Auto tune confidence: " echo -n "Auto tune confidence: "
echo $confidence echo $confidence
@ -147,17 +147,28 @@ if [ "$confidence" -le "$threshold" ]; then
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo -n "Auto tune confidence: " echo -n "Auto tune confidence: "
echo $confidence echo $confidence
if [ "$confidence" -le "$threshold" ]; then
sleep 10
python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt
# echo "auto-tune.txt"
# cat /home/pi/CubeSatSim/groundstation/auto-tune.txt
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo -n "Auto tune confidence: "
echo $confidence
fi
fi fi
fi
if [ "$confidence" -gt "$threshold" ]; then if [ "$confidence" -gt "$threshold" ]; then
frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo -n "Auto tune frequency: " echo -n "Auto tune frequency: "
echo $frequency echo $frequency
else else
echo "Auto tune failed, frequency unchanged" echo "Auto tune failed, frequency unchanged"
fi
echo
fi fi
echo
#sudo systemctl restart cubesatsim #sudo systemctl restart cubesatsim

Loading…
Cancel
Save

Powered by TurnKey Linux.