|
|
|
@ -129,33 +129,23 @@ setsid qsstv &
|
|
|
|
#sleep 5
|
|
|
|
#sleep 5
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$autotune" = "1" ]; then
|
|
|
|
if [ "$autotune" = "1" ]; then
|
|
|
|
threshold="1"
|
|
|
|
threshold=1
|
|
|
|
retry="5"
|
|
|
|
delay=5
|
|
|
|
|
|
|
|
retries=5
|
|
|
|
|
|
|
|
|
|
|
|
source /home/pi/venv/bin/activate
|
|
|
|
tries=0
|
|
|
|
python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt
|
|
|
|
confidence=0
|
|
|
|
# echo "auto-tune.txt"
|
|
|
|
while [ $tries -le $retries ] && [ "$confidence" -le "$threshold" ]; do
|
|
|
|
# cat /home/pi/CubeSatSim/groundstation/auto-tune.txt
|
|
|
|
|
|
|
|
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
|
|
|
|
sleep $delay
|
|
|
|
echo "Auto tune confidence: " $confidence
|
|
|
|
source /home/pi/venv/bin/activate
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$confidence" -le "$threshold" ]; then
|
|
|
|
|
|
|
|
sleep $retry
|
|
|
|
|
|
|
|
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
|
|
|
|
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
|
|
|
|
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
|
|
|
|
echo "Auto tune confidence: " $confidence
|
|
|
|
echo "Auto tune confidence: " $confidence
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$confidence" -le "$threshold" ]; then
|
|
|
|
done
|
|
|
|
sleep $retry
|
|
|
|
|
|
|
|
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 "Auto tune confidence: " $confidence
|
|
|
|
|
|
|
|
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)
|
|
|
|
|