Update pacsat-run.sh 3 options

pacsat-v2.2-tlm3
Alan Johnston 4 weeks ago committed by GitHub
parent 7940341510
commit 7a7fb34320
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -11,20 +11,20 @@ sudo killall -9 java &>/dev/null
sudo killall -9 zenity &>/dev/null
FILE=/home/pi/.pacsatprofile
if [ ! -f "$FILE" ]; then
#FILE=/home/pi/.pacsatprofile
#if [ ! -f "$FILE" ]; then
profile=$(zenity --text="Choose your default Pacsat profile:" --list 2>/dev/null --width=410 --height=120 --title="Set FoxTelem Profile" --column="Profile" --column="Receive and decode telemetry from" "PacSat" "AMSAT Satellites" "CubeSatSim" "AMSAT CubeSat Simulator" "Loopback" "Locally Simulated PacSat")
profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Loopback" "Run a Locally Simulated PacSat")
echo $profile
if [ -z "$profile" ]; then
echo "No choice made. Exiting."
echo "No choice made. Exiting."
sleep 3
sleep 3
exit
exit
#echo "You need to choose your default FoxTelem profile."
#echo
@ -42,73 +42,25 @@ if [ ! -f "$FILE" ]; then
if [ "$ANS" = "1" ] || [ "$profile" = "PacSat" ] ; then
echo "You have chosen the PacSat profile."
echo "p" > /home/pi/.pacsatprofile
echo
sudo killall -9 java &>/dev/null
sudo killall -9 gpredict &>/dev/null
FILE=/home/pi/FoxTelemetryData/FoxTelem.properties.0
if [ ! -f "$FILE" ]; then
cp /home/pi/FoxTelemetryData/FoxTelem.properties /home/pi/FoxTelemetryData/FoxTelem.properties.0
fi
python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py
if [ $? -eq 1 ]; then
echo "Enter your Groundstation Name. If you upload telemetry data to the AMSAT servers, this name will be displayed on the FoxTelem leader board at https://amsat.org/tlm"
read name
if [ -n "$name" ]; then
sudo sed -i "s/callsign=.*/callsign=$name/g" /home/pi/FoxTelemetryData/FoxTelem.properties
fi
echo "You have chosen to run the PacSat Ground Station"
# echo "p" > /home/pi/.pacsatprofile
echo
sudo sed -i "s/uploadToServer=false/uploadToServer=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties
sudo sed -i "s/foxTelemCalcsDoppler=false/foxTelemCalcsDoppler=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties
sudo sed -i "s/foxTelemCalcsPosition=false/foxTelemCalcsPosition=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties
sudo sed -i "s/uploadToServer=false/uploadToServer=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties
sudo sed -i "s/whenAboveHorizon=false/whenAboveHorizon=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties
/home/pi/CubeSatSim/groundstation/pacsat.sh
sudo sed -i "s/retuneCenterFrequency=false/retuneCenterFrequency=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties
sudo sed -i "s/stationDetails=.*/stationDetails=FoxInABox/g" /home/pi/FoxTelemetryData/FoxTelem.properties
elif [ "$ANS" = "2" ] || [ "$profile" = "Configure" ] ; then
# sudo sed -i "s/soundCard=NONE/soundCard=RTL SDR/g" /home/pi/FoxTelemetryData/FoxTelem.properties # change to FunCube
sudo sed -i "s/soundCard=NONE/soundCard=Direct Audio Device\: FUNcube Dongle V2.0, USB Audi/g" /home/pi/FoxTelemetryData/FoxTelem.properties # change to FunCube
# echo "Enter your Maidenhead grid square. It is two letters followed by two numbers followed by two letters with no spaces. If you don't know your gridsquare, you can look it up here https://dxcluster.ha8tks.hu/hamgeocoding/"
# read grid
# sudo sed -i "s/maidenhead=XX00xx/maidenhead=$grid/g" /home/pi/Documents/FITB/FoxTelem.properties
# echo
fi
elif [ "$ANS" = "2" ] || [ "$profile" = "CubeSatSim" ] ; then
echo "You have chosen the CubeSatSim PacSat Ground Station profile."
echo "c" > /home/pi/.pacsatprofile
cp /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties.0
echo "You have chosen to configure the PacSat Ground Station"
echo
sudo sed -i "s/useCostas=false/useCostas=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties
/home/pi/CubeSatSim/groundstation/pacsat-config.sh
sudo sed -i "s/findSignal=false/findSignal=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties
elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then
elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then
echo "You have chosen the Loopback Simulated PacSat Ground Station"
echo "You have chosen the Loopback Simulated PacSat Ground Station profile."
echo "l" > /home/pi/.pacsatprofile
/home/pi/CubeSatSim/groundstation/pacsat.sh l
else
@ -116,31 +68,6 @@ if [ ! -f "$FILE" ]; then
fi
fi
value=`cat /home/pi/FoxTelemetryData/.foxprofile`
echo "$value" > /dev/null
set -- $value
sudo killall -9 java &>/dev/null
if [ "$1" = "c" ]; then
echo "CubeSatSim Ground Station profile is set!"
echo
/home/pi/CubeSatSim/groundstation/pacsat.sh
elif [ "$1" = "l" ]; then
echo "Loopback Ground Station profile is set!"
echo
/home/pi/CubeSatSim/groundstation/pacsat.sh l
else
echo "AMSAT profile is set!"
echo
# /home/pi/FoxTelem/FoxTelem /home/pi/FoxTelemetryData
cd /home/pi/Desktop/PacsatGround/
setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed &
fi
sleep 10

Loading…
Cancel
Save

Powered by TurnKey Linux.