# script to send APRS or DTMR commands to a CubeSatSim
value=`cat /home/pi/CubeSatSim/.mode`
echo"$value" > /dev/null
set -- $value
if["$1" !="n"];then
echo"You are not in Transmit Commands mode"
sleep 10
exit
fi
sudo killall -9 zenity &>/dev/null
echo
autotune=0
mode=$(zenity --timeout=20 --list 2>/dev/null --width=300 --height=360 --title="Transmit Command" --text="Choose the command to transmit" --column="Mode" --column="Result" a "APRS Mode" f "FSK Mode" b "BPSK Mode" s "SSTV Mode" m "CM Mode" e "Repeater Mode" j "FUNcube Mode" o "Beacon On/Off")
frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=180 --title="FUNcube Telem Decoding" --text="Choose the frequency for FUNcube decoding:" --column="kHz" --column="Use"434900"CubeSatSim" Other "Choose another frequency")
frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=220 --title="FUNcube Telem Decoding" --text="Choose the frequency for FUNcube decoding:" --column="kHz" --column="Use"434900"CubeSatSim" Auto-tune "CubeSatSim Auto-tune" Other "Choose another frequency")
echo$frequency
@ -96,6 +99,11 @@ if [ "$frequency" = "434900" ]; then
frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application"144390"APRS US 2m"434900"CubeSatSim"144800"APRS European 2m"145175"APRS Australian 2m" Other "Choose another frequency"145825"APRS on ISS" APRS "Test APRS decoding with CubeSatSim WAV file")
autotune=0
frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=400 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application"144390"APRS US 2m"434900"CubeSatSim" Auto-tune "CubeSatSim Auto-tune"144800"APRS European 2m"145175"APRS Australian 2m" Other "Choose another frequency"145825"APRS on ISS" APRS "Test APRS decoding with CubeSatSim WAV file")
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=270 --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
@ -75,6 +79,11 @@ echo
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."
elif["$frequency"="Auto-tune"];then
frequency=434900000
autotune=1
elif["$choice"="3"]||["$frequency"="Other"];then
echo
@ -120,14 +129,48 @@ echo
echo -e "Auto decoding SSTV on $frequency Hz"
sleep 2
#sleep 2
setsid qsstv &
sleep 5
#sleep 5
if["$autotune"="1"];then
threshold=1
delay=5
retries=5
echo"Starting Auto-tune scanning"
echo"Scan will stop when confidence exceeds threshold value of"$threshold"or after"$retries"retries"
tries=0
confidence=0
delay=$((delay-2))# subtract 2 second built in delay