Update config add doppler mode -K

master-btb
Alan Johnston 1 month ago committed by GitHub
parent 3b7d31e39c
commit 0ba4ac3f80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

105
config

@ -260,6 +260,12 @@ if [ "$1" = "" ]; then
echo "Random Failure Mode is OFF"
fi
if [ "${14}" = "y" ] || [ "${14}" = "yes" ] ; then
echo "Doppler frequency shift mode enabled"
else
echo "Doppler frequency shift is OFF"
fi
echo -n "TX Frequency is: "
echo -n ${7}
echo -n " MHz, RX Frequency is: "
@ -368,7 +374,7 @@ if [ "$1" = "" ]; then
echo -e "Current sim.cfg configuration file:"
# echo
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13}
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
echo
echo "To change, include an OPTION"
@ -497,7 +503,7 @@ elif [ "$1" = "-t" ]; then
echo
# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13}
# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14}
echo "Do you want Simulated Telemetry ON (y/n) "
read sim
@ -515,8 +521,8 @@ elif [ "$1" = "-t" ]; then
# echo
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
# echo
echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} ${12} ${13}
echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg
echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}> /home/pi/CubeSatSim/sim.cfg
echo
## echo "Rebooting CubeSatSim with new configuration file"
## echo
@ -545,7 +551,7 @@ elif [ "$1" = "-c" ]; then
echo $oldcallsign
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13}
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14}
echo "Enter callsign in all capitals: "
read callsign
@ -559,8 +565,8 @@ elif [ "$1" = "-c" ]; then
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13}
echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg
echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} > /home/pi/CubeSatSim/sim.cfg
fi
if [ "$norestart" = "1" ]; then
@ -593,7 +599,7 @@ elif [ "$1" = "-r" ]; then
echo $2
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13}
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
echo -e "Enter Reset Count (integer): "
@ -613,8 +619,8 @@ elif [ "$1" = "-r" ]; then
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
echo $1 $resets $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13}
echo $1 $resets $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg
echo $1 $resets $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
echo $1 $resets $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} > /home/pi/CubeSatSim/sim.cfg
fi
if [ "$norestart" = "1" ]; then
@ -648,7 +654,7 @@ elif [ "$1" = "-l" ]; then
echo $3
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13}
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
echo -e "Enter latitude (decimal degrees, positive is north): "
@ -690,8 +696,8 @@ elif [ "$1" = "-l" ]; then
fi
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
echo $1 $2 $lat $long $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13}
echo $1 $2 $lat $long $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg
echo $1 $2 $lat $long $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
echo $1 $2 $lat $long $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} > /home/pi/CubeSatSim/sim.cfg
if [ "$norestart" = "1" ]; then
echo
@ -1002,7 +1008,7 @@ elif [ "$1" = "-q" ]; then
echo $6
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13}
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
echo -e "Enter squelch (integer 1 - 8): "
@ -1024,8 +1030,8 @@ elif [ "$1" = "-q" ]; then
# echo
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
# echo
echo $1 $2 $3 $4 $5 $sq $7 $8 $9 ${10} ${11} ${12} ${13}
echo $1 $2 $3 $4 $4 $sq $7 $8 $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg
echo $1 $2 $3 $4 $5 $sq $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
echo $1 $2 $3 $4 $4 $sq $7 $8 $9 ${10} ${11} ${12} ${13} ${14} > /home/pi/CubeSatSim/sim.cfg
echo
echo "Restarting CubeSatSim with new configuration file"
## echo
@ -1061,7 +1067,7 @@ elif [ "$1" = "-P" ]; then
echo ${11}
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13}
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
echo -e "Enter RX PL value integer 0: None, 01-38 CTCSS analog, 39-121CDCSS digital"
@ -1104,8 +1110,8 @@ elif [ "$1" = "-P" ]; then
# echo
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
# echo
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $rxpl $txpl ${12} ${13}
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $rxpl $txpl ${12} ${13} > /home/pi/CubeSatSim/sim.cfg
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $rxpl $txpl ${12} ${13} ${14}
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $rxpl $txpl ${12} ${13} ${14} > /home/pi/CubeSatSim/sim.cfg
echo
## echo "Rebooting CubeSatSim with new configuration file"
## echo
@ -1135,7 +1141,7 @@ elif [ "$1" = "-F" ]; then
echo $8
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13}
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
echo "Enter tx frequency as 4XX.XXXX: "
read tx
@ -1156,8 +1162,8 @@ elif [ "$1" = "-F" ]; then
fi
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
echo $1 $2 $3 $4 $5 $6 $tx $rx $9 ${10} ${11} ${12} ${13}
echo $1 $2 $3 $4 $5 $6 $tx $rx $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg
echo $1 $2 $3 $4 $5 $6 $tx $rx $9 ${10} ${11} ${12} ${13} ${14}
echo $1 $2 $3 $4 $5 $6 $tx $rx $9 ${10} ${11} ${12} ${13} ${14} > /home/pi/CubeSatSim/sim.cfg
echo
echo "Restarting CubeSatSim with new configuration file"
@ -1228,7 +1234,7 @@ elif [ "$1" = "-H" ]; then
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13}
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
echo "Do you want Balloon mode ON (y/n) "
read hab
@ -1245,8 +1251,8 @@ elif [ "$1" = "-H" ]; then
# echo
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
# echo
echo $1 $2 $3 $4 $5 $6 $7 $8 $hab ${10} ${11} ${12} ${13}
echo $1 $2 $3 $4 $5 $6 $7 $8 $hab ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg
echo $1 $2 $3 $4 $5 $6 $7 $8 $hab ${10} ${11} ${12} ${13} ${14}
echo $1 $2 $3 $4 $5 $6 $7 $8 $hab ${10} ${11} ${12} ${13} ${14} > /home/pi/CubeSatSim/sim.cfg
echo
## echo "Rebooting CubeSatSim with new configuration file"
## echo
@ -1721,7 +1727,7 @@ elif [ "$1" = "-U" ]; then
echo
# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13}
# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14}
echo "Do you want Random Simulated Failure ON (y/n) "
read sim
@ -1761,8 +1767,8 @@ elif [ "$1" = "-U" ]; then
# echo
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
# echo
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} $sim $time
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} $sim $time > /home/pi/CubeSatSim/sim.cfg
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} $sim $time ${14}
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} $sim $time ${14} > /home/pi/CubeSatSim/sim.cfg
echo
if [ "${12}" != "$sim" ] || [ "${13}" != "$time" ] ; then
@ -1888,6 +1894,48 @@ elif [ "$1" = "-k" ]; then
reboot=1
# sudo systemctl restart pacsatsim
elif [ "$1" = "-K" ]; then
echo
echo "Editing the Doppler frequency shift setting in"
echo "the configuration file for CubeSatSim"
echo
value=`cat /home/pi/CubeSatSim/sim.cfg`
echo "$value" > /dev/null
set -- $value
if [ "${14}" = "yes" ] || [ "${14}" = "y" ]; then
echo "Doppler frequency shift mode is ON"
else
echo " Doppler frequency shift mode is OFF"
fi
echo
# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14}
echo "Do you want Doppler frequency shift ON (y/n) "
read sim
echo
if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then
doppler="yes"
echo "Doppler frequency shift is ON"
else
doppler="no"
echo " Doppler frequency shift is OFF"
fi
# echo
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
# echo
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} $doppler
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} $doppler > /home/pi/CubeSatSim/sim.cfg
echo
restart=1
elif [ "$1" = "-h" ]; then
echo "config OPTION"
@ -1934,6 +1982,7 @@ elif [ "$1" = "-h" ]; then
echo " -N Set next mode or failure"
echo " -u Change gpsd state"
echo " -k Reset the PacSatSim Configuration"
echo " -K Change the Doppler frequency shift setting"
echo
exit

Loading…
Cancel
Save

Powered by TurnKey Linux.