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
fi
if[ -n "$name"];then
sudo sed -i "s/callsign=.*/callsign=$name/g" /home/pi/FoxTelemetryData/FoxTelem.properties
fi
if["$ANS"="1"];then
echo"You have chosen to set the PacSat Ground Station Callsign"
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
elif["$ANS"="2"];then
sudo sed -i "s/foxTelemCalcsPosition=false/foxTelemCalcsPosition=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties
echo"You have chosen to set the CubeSatSim PacSat Satellite callsign"
echo
sudo sed -i "s/uploadToServer=false/uploadToServer=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties
/home/pi/CubeSatSim/config -c n
sudo sed -i "s/whenAboveHorizon=false/whenAboveHorizon=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties
elif["$ANS"="3"];then
sudo sed -i "s/retuneCenterFrequency=false/retuneCenterFrequency=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties
echo"You have chosen to set the Frequency of the PacSat Ground Station"
echo
sudo sed -i "s/stationDetails=.*/stationDetails=FoxInABox/g" /home/pi/FoxTelemetryData/FoxTelem.properties
/home/pi/CubeSatSim/config -F n
# 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
elif["$ANS"="4"];then
echo"You have chosen to reset the PacSat Ground Station"
echo
echo"Next time you run the Ground Station you will need to Add the PacSatSim spacecraft"
echo
/home/pi/CubeSatSim/groundstation/pacsat-reset.sh
# 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"="5"];then
elif["$ANS"="2"]||["$profile"="CubeSatSim"];then
echo"You have chosen to reset the PacSat Satellite"
echo
echo"You have chosen the CubeSatSim PacSat Ground Station profile."